App SDK Guide

Build apps that work with any Fez store

OAuth 2.0 Flow

1
Merchant clicks 'Install' in App Store
2
Fez redirects to redirect_url with authorization code
3
Your app exchanges code for access_token
4
Use token to access the API

Scopes

ScopeAccess
read_productsProduct catalog, variants, inventory
write_productsCreate, update, delete products
read_ordersOrder list, details, status
write_ordersUpdate order status, add notes
read_customersCustomer profiles and addresses
read_storeStore info, settings, policies
write_storeUpdate 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 });
});