HTTP Status Codes
These are all of the status codes that the SureCart API will return.Error Responses
All error responses will be formatted like the example below, and they will have at least the following keys:http_status– The HTTP status code – matching the HTTP response status.type– The type of error – more specific than the http_status.code– The unique code for the error – this should be used for translations.message– The human readable error message.
Validation Errors
If an error is due to object validation a validation_errors key will also be set within the error response. The validation errors response will be formatted like the example below, and each validation error will have the following keys:attribute– The attribute the validation error is associated with.type– The type of validation error.code– The unique code for the validation error – this should be used for translations.options– Any options that apply to this error – these can be used for translation interpolation. (For example, a numerical validation error might have options for min and max.)message– The human readable validation error message.