Storefront API
Shopper API: what storefront themes call from the browser for catalog, cart, checkout and customer accounts.
The shopper-facing API storefront themes call: catalog, cart, checkout and customer accounts. Most endpoints are public and addressed by store slug.
| Base URL | https://api.mobiari.com/v1 |
| Authentication | Most operations are public; each operation lists what it requires |
| Conventions | Errors, pagination, idempotency, rate limits: API conventions |
| OpenAPI document | storefront.json (version 1.0.0) |
Paths below are relative to the base URL.
Catalog
Products and collections as shoppers see them
| Method | Path | Operation |
|---|---|---|
GET | /storefront-api/{store_slug}/api/categories/{category_slug}/products | List a category's products |
GET | /storefront-api/{store_slug}/api/products | List products |
GET | /storefront-api/{store_slug}/api/products/search | Search products |
GET | /storefront-api/{store_slug}/api/products/{product_ref} | Get a product |
Cart
The shopper's cart: lines, contact details, freight and pickup. The cart id travels in the X-Cart-Id header or the cart_id cookie
| Method | Path | Operation |
|---|---|---|
GET | /storefront-api/{store_slug}/api/cart | Get the shopper's cart |
POST | /storefront-api/{store_slug}/api/cart/contact | Save the checkout contact details |
PATCH | /storefront-api/{store_slug}/api/cart/contact | Save the checkout contact details (PATCH) |
POST | /storefront-api/{store_slug}/api/cart/freight/quote | Quote freight for the cart |
POST | /storefront-api/{store_slug}/api/cart/freight/select | Select a freight option |
POST | /storefront-api/{store_slug}/api/cart/items | Set a cart line |
PATCH | /storefront-api/{store_slug}/api/cart/items | Set a cart line (PATCH) |
DELETE | /storefront-api/{store_slug}/api/cart/items/{variant_id} | Remove a cart line |
POST | /storefront-api/{store_slug}/api/cart/pickup | Choose pickup or shipping |
POST | /storefront-api/{store_slug}/api/freight/simulate | Simulate freight for products |
POST | /storefront-api/{store_slug}/cart/add | Add to cart (theme form) |
POST | /storefront-api/{store_slug}/cart/change | Change a line (theme form) |
POST | /storefront-api/{store_slug}/cart/clear | Empty the cart (theme form) |
POST | /storefront-api/{store_slug}/cart/freight/quote | Quote freight (theme form) |
POST | /storefront-api/{store_slug}/cart/freight/select | Select freight (theme form) |
Checkout
Turning the cart into a paid order: payment intents, installments and confirmation
| Method | Path | Operation |
|---|---|---|
POST | /storefront-api/{store_slug}/api/checkout | Confirm a paid checkout |
GET | /storefront-api/{store_slug}/api/payments/config | Get the payment configuration |
GET | /storefront-api/{store_slug}/api/payments/installments | Get card installment plans |
POST | /storefront-api/{store_slug}/api/payments/intents | Pay for the cart |
GET | /storefront-api/{store_slug}/api/payments/intents/{intent_id} | Get a payment attempt |
Locations
Store locations and pickup points
| Method | Path | Operation |
|---|---|---|
GET | /storefront-api/{store_slug}/api/locations | List store locations |
GET | /storefront-api/{store_slug}/api/pickup-locations | List pickup locations |
Account
Customer sign-in, profile and orders
| Method | Path | Operation |
|---|---|---|
POST | /storefront-api/{store_slug}/customers/login | Sign a customer in |
GET | /storefront-api/{store_slug}/customers/me | Get the signed-in customer |
GET | /storefront-api/{store_slug}/customers/me/orders | List the signed-in customer's orders |
POST | /storefront-api/{store_slug}/customers/register | Create a customer account |
POST | /storefront-api/{store_slug}/customers/verify | Finish a customer registration |
Engagement
Chat, forms, reviews and subscriptions
| Method | Path | Operation |
|---|---|---|
GET | /storefront-api/{store_slug}/api/products/{product_ref}/reviews | List a product's reviews |
POST | /storefront-api/{store_slug}/api/products/{product_ref}/reviews | Submit a product review |
POST | /storefront-api/{store_slug}/api/products/{product_ref}/subscribe | Subscribe to a product |
GET | /widget/{key}/bootstrap | Get the chat widget settings |
POST | /widget/{key}/conversations | Start a chat |
GET | /widget/{key}/conversations/{conversation_id} | Get the chat |
PATCH | /widget/{key}/conversations/{conversation_id} | Update the shopper's contact details |
GET | /widget/{key}/conversations/{conversation_id}/cart | Get the chat's cart |
POST | /widget/{key}/conversations/{conversation_id}/csat | Rate the chat |
GET | /widget/{key}/conversations/{conversation_id}/messages | List the chat's messages |
POST | /widget/{key}/conversations/{conversation_id}/messages | Send a chat message |
POST | /widget/{key}/conversations/{conversation_id}/read | Mark the chat as read |
Channel API
The headless sales-channel API: products and order intake for an external storefront, authenticated by the sales channel's API key in X-Channel-Key. Field names are camelCase
| Method | Path | Operation |
|---|---|---|
POST | /storefront/orders | Create an order |
GET | /storefront/products | List the channel's products |
GET | /storefront/products/{slug} | Get one of the channel's products |