Skip to main content

Error format

The Mage Loyalty API uses conventional HTTP status codes to indicate the success or failure of a request. Codes in the 2xx range indicate success, codes in the 4xx range indicate a client error, and codes in the 5xx range indicate a server-side problem. All errors return a JSON body following the JSON:API error format:

Error response codes

The status field is always returned as a string (for example "404"), not a number.

Example error bodies

A request for a customer that does not exist returns 404 Not Found:
A request body that is not valid JSON returns 400 Bad Request: