Request Errors

In case of API request errors, AfterShip employs standard HTTP response codes within the 4XX and 5XX ranges to specify the reason for the error. These error codes are detailed in the response body.

Typically, codes in the 2XX range indicate successful requests, codes in the 4XX range indicate errors caused by client-side input (e.g., missing a required parameter or a failed charge), and codes in the 5XX range indicate server-side issues on AfterShip’s end.

HTTP Status Codemeta.codemeta.typeSample Error Message
40040000BadRequestInvalid JSON.
40040001MissingParameterMissing required parameters.
401401UnauthorizedThe API key is invalid.
40340300ForbiddenThe request is not allowed.
40340301ForbiddenStore data is read-only. Cannot create or modify data via Commerce API.
40340302ForbiddenThe feature is not currently enabled for your organization. Please contact our support team for the details.
40440400NotFoundThe requested URI is invalid or the specified resource does not exist.
40940900ConflictRequest conflict, please confirm if there is any repeated idempotent key used.
41241201PreconditionFailedInvalid as-store-id or date header value.
41241202PreconditionFailedThe connection could not be found.
41241203PreconditionFailedPrivate connected app required for accessing your data.
41241204PreconditionFailedThe store could not be found.
42242200UnprocessableEntitySemantic errors found in the request body. Please review the response error details.
42942900TooManyRequestsThe request was not accepted because the application has exceeded the rate limit. The default API call limit is 10 requests per second.
50050000InternalErrorSomething went wrong on AfterShip's end.
preparing...