Skip to main content
This comprehensive reference covers all error codes returned by the APIs. Each error includes a description, common causes, and resolution steps.

Error Response Format

All API errors follow a consistent JSON structure:
{
  "code": 400,
  "error": "InvalidToken",
  "description": "Jwt token is invalid."
}
Fields:
  • code (number): HTTP status code
  • error (string): Error identifier/type
  • description (string): Human-readable error description

Error Categories

Authentication Errors

HTTP Status: 401Description: Invalid or missing authentication tokenCommon Causes:
  • Missing x-firmly-authorization header
  • Expired authentication token
  • Invalid token format
Resolution:
  • Ensure the authorization header is included
  • Check token expiration and refresh if needed
  • Verify token format matches expected pattern
// Correct header format
headers: {
  'x-firmly-authorization': 'Bearer your-token-here'
}
HTTP Status: 401Description: Authorization header not providedCommon Causes:
  • Header name typo
  • Header not included in request
Resolution:
  • Add the x-firmly-authorization header
  • Check for typos in header name
HTTP Status: 401Description: Session has expired or is invalidCommon Causes:
  • Session timeout
  • Session transferred to another device
  • Invalid session ID
Resolution:
  • Create a new session
  • Re-authenticate the user

Quick Reference Table

Error CodeHTTP StatusCategoryQuick Fix
ErrorUnauthorized401AuthCheck auth token
ErrorCartNotFound404CartVerify cart ID
ErrorProductNotFound404ProductCheck variant ID
ErrorNotEnoughStock400InventoryReduce quantity
ErrorInvalidPromoCode400PromoVerify code
ErrorCountryNotSupported400CheckoutUse valid country
ErrorShipmentNotFound404ShipmentRefresh cart
ErrorAddonNotFound404AddonCheck addon ID
ErrorInvalidInputBody400ValidationFix request body
ErrorStoreUnavailable503SystemRetry request

Need Help?

If you encounter persistent errors or need assistance: