Commerce API
The Commerce API provides a clean, RESTful interface for building custom storefronts. Use these endpoints to list products, handle customer authentication, process checkouts, and manage orders.Base URL
Backwards Compatibility: All Commerce API endpoints are also available at
/api/v1/* for existing integrations. For example, both /api/v1/products and /api/v1/products work identically.Authentication
All Commerce API endpoints require an API key passed in theX-API-Key header:
Endpoints
Catalog
Authentication
Checkout
Orders
Checkout Flow
Customer Authentication
For endpoints that require customer authentication (like/orders), include the customer token in the Authorization header:
Error Handling
All errors return a consistent JSON structure:PRODUCT_NOT_FOUND- Product doesn’t existVALIDATION_FAILED- Invalid request dataAUTH_TOKEN_EXPIRED- Customer token expiredINTERNAL_ERROR- Server error
