Skip to main content

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 the X-API-Key header:
The API key identifies your business and scopes all responses to your products and customers.

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:
Common error codes:
  • PRODUCT_NOT_FOUND - Product doesn’t exist
  • VALIDATION_FAILED - Invalid request data
  • AUTH_TOKEN_EXPIRED - Customer token expired
  • INTERNAL_ERROR - Server error