Skip to main content
The Chariow API uses conventional HTTP response codes to indicate the success or failure of requests.

Response Format

All API responses follow a consistent format:
Error responses always carry message and errors. Some of them, such as authentication and rate limit errors, omit the data field.

HTTP Status Codes

Common Errors

Authentication Errors (401)

Solution:

Missing Scope (403)

The API key is valid but lacks a scope the endpoint requires:
Causes:
  • The key was created without the scope the endpoint requires
  • The role of the team member who created the key was downgraded, which removed the scope
Solution: Add the scopes listed in errors.scopes to the key in Settings → API Keys. Read errors.scopes rather than message in your code, because the message is translated into the request language. See Authentication for the scope each endpoint requires.

Resource Not Found (404)

Causes:
  • Invalid resource ID
  • Resource belongs to a different store
  • Resource has been deleted
  • Product is not published (for public endpoints)

Validation Errors (422)

Causes:
  • Missing required fields
  • Invalid field format
  • Business rule violations

Rate Limit Exceeded (429)

Solution: Wait for the number of seconds given in the Retry-After header and retry. See Rate Limits for details.

Handling Errors

JavaScript Example

PHP Example

Error Codes Reference

Checkout Errors

License Errors

Best Practices

Don’t assume success - always check the HTTP status code before processing the response.
Log error responses for debugging and monitoring purposes.
Translate API errors into user-friendly messages for your customers.
For 5xx errors and rate limits, implement automatic retry with exponential backoff.