App SDK Guide
Build apps that work with any Fez store
OAuth 2.0 Flow
1
Merchant clicks 'Install' in App Store2
Fez redirects to redirect_url with authorization code3
Your app exchanges code for access_token4
Use token to access the APIScopes
| Scope | Access |
|---|---|
| read_products | Product catalog, variants, inventory |
| write_products | Create, update, delete products |
| read_orders | Order list, details, status |
| write_orders | Update order status, add notes |
| read_customers | Customer profiles and addresses |
| read_store | Store info, settings, policies |
| write_store | Update store settings |
App Types
Frontend Apps
Script Tags & App Blocks in the storefront
Backend Apps
Webhooks + API for data processing
Example: Upselling App
// 1. Listen for order.created webhook
app.post("/webhooks/order", async (req, res) => {
const order = req.body.data;
// 2. Fetch related products via Fez API
const products = await fez.products.getRelated(order.items);
// 3. Send upsell email to customer
await sendUpsellEmail(order.customer.email, products);
res.json({ ok: true });
});