Skip to main content
The API uses standard HTTP status codes and returns errors in a consistent JSON format.

Response format

All errors return a JSON object with an error field:
{
  "error": "Description of what went wrong"
}
Some endpoints include additional context:
{
  "error": "Invalid variant IDs or variants do not belong to this store",
  "missingVariants": ["variant_123", "variant_456"]
}

HTTP status codes

CodeDescription
200Success
204Success (no content, used for OPTIONS preflight)
400Bad request - invalid or missing parameters
401Unauthorized - authentication failed
404Not found - resource doesn’t exist
500Server error

Authentication errors (401)

ErrorCause
Missing API keyNo Authorization header or missing Bearer prefix
Invalid API key formatKey doesn’t match expected format (ak_ + 48 hex characters)
Invalid API keyKey not found or doesn’t match
Store is deactivatedThe store associated with this key is inactive
API key validation failedInternal error during validation

Validation errors (400)

Returned when request body is missing required fields or has invalid values:
{
  "error": "Missing required field: items (array of { variantId, quantity })"
}
{
  "error": "Each item must have a positive integer quantity"
}

Not found errors (404)

Returned when the requested resource doesn’t exist or isn’t accessible:
{
  "error": "Product not found"
}
{
  "error": "Collection not found"
}

Server errors (500)

Returned when something unexpected goes wrong. The error message indicates which operation failed:
{
  "error": "Failed to fetch products"
}