Skip to content

Storefronts

A storefront is any client that sells for one business: a website, a mobile app, a kiosk screen or a shopping assistant. It uses only the Storefront API and the business’s publishable key.

Area Endpoints
Business, theme and content GET /store/foulad/tenant
Categories (only this business) GET /store/foulad/categories
Products GET /store/products, GET /store/products/{id}
Regions and prices GET /store/regions (Bahrain, BHD, 10% VAT)
Cart POST /store/carts, line items, promotions, shipping methods
Checkout shipping options, payment collections and sessions, POST /store/carts/{id}/complete
Customers register and log in (/auth/customer/emailpass), profile, addresses
Orders GET /store/orders/{id}, and brand-scoped history at GET /store/foulad/orders

These are the official Medusa 2.23.1 Store API endpoints that are safe for Sedra’s multi-business setup, plus the Sedra extensions under /store/foulad. Medusa’s own /store/product-categories, /store/collections and order list are not part of the Sedra contract, because they are not limited to one business. Use the Sedra extensions instead.

  1. POST /store/carts with region_id (from the tenant response).
  2. POST /store/carts/{id}/line-items with variant_id and quantity.
  3. POST /store/carts/{id} with email and shipping address.
  4. GET /store/shipping-options?cart_id=…, then POST /store/carts/{id}/shipping-methods.
  5. POST /store/payment-collections with cart_id, then POST /store/payment-collections/{id}/payment-sessions with provider_id: "pp_foulad-sandbox_foulad-sandbox".
  6. POST /store/carts/{id}/complete. The response contains the order.

Payments are sandbox only today. See Payments.

  1. POST /auth/customer/emailpass/register returns a registration token.
  2. POST /store/customers with that token creates the customer.
  3. POST /auth/customer/emailpass logs in and returns a JWT for Authorization: Bearer.
  4. POST /store/foulad/customers/link links the signed-in customer to the current business, so the business can see the customer in its own records.

One email means one customer account across all Sedra brands. Order history from GET /store/foulad/orders only includes orders from the business behind your publishable key.

Sedra’s own demo storefronts (foulad.sedra.one, midad.sedra.one, market.sedra.one) are one server-rendered codebase on Cloudflare Workers, with no client JavaScript. Nothing in the backend depends on it. Next.js, Astro, SwiftUI, Flutter or anything else can use the same API.

An AI shopping assistant is a storefront. It uses the publishable key and, at most, the shopper’s own customer token. It never receives a merchant sdr_int_ or sdr_ai_ credential. See Agentic commerce.