API Request Errors

In the events of API request errors, AfterShip Shipping uses conventional HTTP response codes in the 4XX and 5XX range to indicate the reason behind the error.

AfterShip Shipping uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, a charge failed, etc.), and codes in the 5xx range indicate an error with AfterShip Shipping's servers.

Status codeMeta codeRetryableMessage
401401Invalid API key.
429429TRUEYou have exceeded the API call rate limit. Please check the header field 'X-RateLimit-Reset' for time left until the limit release.
500500FALSESomething went wrong on AfterShip Shipping's end.
502502FALSESomething went wrong on AfterShip Shipping's end.
503503FALSESomething went wrong on AfterShip Shipping's end.
504504FALSESomething went wrong on AfterShip Shipping's end.
2003001FALSEThe request has been accepted for processing, but the processing has not been completed.
2004100FALSEInternal Error.
2004101TRUEInternal Error, please try again.
2004104FALSEThe request was invalid or cannot be otherwise served.
2004109FALSEInvalid JSON.
2004140FALSEShipper account not found.
2004153FALSEItem does not exist.
2004155TRUEAccess to shipper_account locked during manifest/cancel-label operation.
2004157FALSERate is not found
2004159TRUEThe prepaid account is currently deactivated, please try again later.
2004161FALSEYour card is declined by payment gateway.
2004162FALSEThere is an error when connecting to payment gateway.
2004163FALSEThe amount of given transaction is invalid.
2004164FALSEThe payment request is invalid.
2004171FALSEOperation is not allowed on this courier.
2004172TRUEYou have exceeded the limit on number of requests, please try again later
2004312TRUENetworking error encountered, please try again.
2004500FALSEYour account balance is not enough. Please top up the balance in your account page.
2004508FALSEThe given transaction id is invalid
2004510FALSEThe given transaction has been refunded already
2004703TRUEThe courier seems to be currently unavailable, please try again later.
2004705FALSENo response was returned.
2004713FALSEAll or partial failed in rate request.
2004715FALSEThe request is invalid or cannot be served by courier.
2004716FALSEThe address length is too long.
2004722FALSEThe tracking number is already canceled, it can not be canceled again.
2004723FALSEThe tracking number does not exist, can not not be canceled.
2004724FALSEThe tracking number is manifested, so can not be canceled.
2004725FALSEThere is no shipments to manifest.
2004730FALSENo more pre-assigned tracking numbers available in this shipper account. Please input the new tracking numbers in your shipper account setting page.
2004732FALSEThe credential error, please check your shipper account.
2004733FALSEThe request is invalid or cannot be served by AfterShip Shipping.
2004801FALSEDuplicate order_number, please specify a different order_number and try again.
2004802FALSEThe service_type is not available for this shipment.
2004803FALSEThe service_type and service_option are not available for this shipment.
2004804FALSEThe weight is not available for this shipment.