Request Errors
In the event of API request errors, AfterShip uses conventional HTTP response codes in the 4XX and 5XX range to indicate the reason behind the error along with the error code already defined in the response body.
In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error caused by the given information (E.g., you omitted a required parameter or a charge failed), and codes in the 5xx range indicate an error related to AfterShip’s servers.
HTTP Status Code Summary
HTTP Status Code | meta.code | meta.type | Sample Error Message |
---|---|---|---|
200 | 200 | Ok | The request has been processed successfully. |
400 | 400 | BadRequest | The request body JSON payload is invalid. |
401 | 401 | Unauthorized | Invalid API key. |
403 | 403 | Forbidden | Access forbidden. |
429 | 429 | TooManyRequests | Rate limit exceeded. The default API call limit is 10 requests per second. |
500 | 500 | InternalError | Something went wrong on Automizely's end. |
422 | 10001 | UnprocessableEntity | Missing required parameters. |
422 | 10002 | UnprocessableEntity | Invalid request parameters. |
422 | 20001 | UnprocessableEntity | Unable to parse the order information from the email content. |
Examples
Invalid API key
preparing...
Missing Required Parameters
preparing...
Invalid Request Parameters
preparing...
Unable to Parse the Order Information from the Email Content
preparing...