Alipay, China's leading third-party online payment solutionAlipay, China's leading third-party online payment solution

inquiryDeclarationRequests

POST /v1/customs/inquiryDeclarationRequests

Use this API to inquire about the customs declaration status. 

Structure

A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:

Note: Set the data type of each field (except array) as String. This means that you must use double quotation marks (" ") to enclose the field value. Examples:

  • If the data type of a field is Integer and its value is 20, set it as "20".
  • If the data type of a field is Boolean and its value is true, set it as "true".

 

Request parameters

declarationRequestIds Array<String>  REQUIRED

The unique declaration request ID that is assigned by the merchant to identify a declaration request. Batch queries are supported, and up to 10 declaration request IDs are supported at a time. 

More information about this field

  • Maximum length: 32 characters
  • Maximum size: 10 elements

Response parameters

result Result object REQUIRED

The request result, which contains information such as status and error codes.

Show child parameters

declarationRequestsNotFound Array<String>  

The list of declaration request IDs that cannot be found in the system.

Note: This field is returned when result.resultCode is S and one or more declaration request IDs cannot be found in the system. 

More information about this field

  • Maximum length: 32 characters
  • Maximum size: 10 elements

declarationRecords Array<DeclarationRecord> object 

The list of customs declaration records. Each record represents a customs declaration.

Note: This field is returned when result.resultCode is S.  

More information about this field

  • Maximum size: 10 elements
Show child parameters
API Explorer
Sample CodesRun in Sandbox

Request

URL
Request Body

Response

Case
Success
Response Body

More information

This table shows details about the customs code:

Customs name

Unified customs solution

Customs code

Alipay registration ID

General Administration of Customs

Transmit to ZONGSHU

ZONGSHU

31222699S7

Henan bonded logistics center

Transmit to ZHENGZHOU

ZHENGZHOU

31222699S7

Ningbo Customs

Transmit to NINGBO

NINGBO

31222699S7

Xinzheng comprehensive bonded zone (Airport)

First transmit to HENAN, then to ZONGSHU

HENAN

P460400005

Tianjin Customs

Transmit to ZONGSHU

ZONGSHU

31222699S7

Shanghai Customs

Transmit to SHANGHAI_CBT

SHANGHAI_CBT

31222699S7

Guangzhou Customs (Airport)

Transmit to Guangzhou airport national inspection. The enterprise's filing information is required.

ZONGSHU

C000010000416158

Guangzhou Customs (Nansha)

Transmit to Guangzhou Nansha national inspection. The enterprise's filing information is required.

ZONGSHU

C000010000416158

Guangzhou Customs (Huangpu)

Transmit to Guangzhou Huangpu national inspection. The enterprise's filing information is required.

ZONGSHU

C000010000416158

Guangzhou Customs (Shatian)

Transmit to Guangzhou Shatian national inspection. The enterprise's filing information is required.

ZONGSHU

C000010000416158

Hangzhou Customs

Transmit to ZONGSHU

ZONGSHU

ZF14021901

Result/Error codes

CodeValueMessageFurther action
SUCCESSSSuccess

The interface is called successfully, no further action is needed.

ACCESS_DENIEDFAccess is denied.

Contact Alipay Technical Support for detailed reasons. 

INVALID_APIFThe called API is invalid or not active.

Contact Alipay Technical Support to resolve the issue.  

ARRAY_SIZE_EXCEEDEDFOne inquiry request only supports a maximum number of 10 declaration request IDs.

Check whether more than 10 declaration request IDs exist in the declarationRequestID field.

CLIENT_INVALIDFThe client ID is invalid. Alipay has restrictions on client ID.

Check whether the client ID is correct, or contact Alipay Technical Support for detailed reasons. 

INVALID_CONTRACTFThe parameter values in the contract do not match those in the current transaction.

Check whether the parameter values in the contract match those in the current transaction. If the values match, contact Alipay Technical Support to troubleshoot the issue. 

INVALID_SIGNATUREFThe signature is not validated. The private key used to sign a request does not match the public key of Antom Dashboard.

Check whether the private key used to sign a request matches the public key of Antom Dashboard. The following signature references are useful:

KEY_NOT_FOUNDFThe private key or public key of Alipay or the merchant is not found.

Check whether the private key or public key exists. If not, upload the private key in Antom Dashboard. 

MEDIA_TYPE_NOT_ACCEPTABLEFThe server does not implement the media type that is acceptable to the client.

Check whether the media type is correct and use a media type that is accepted by Alipay. 

MERCHANT_NOT_REGISTEREDFThe merchant is not registered.

Please register the merchant by using the registration interface. Contact Alipay Technical Support if failed to call the registration interface. 

METHOD_NOT_SUPPORTEDFThe server does not implement the requested HTTP method. Only the POST method is supported.

Ensure the HTTP method is POST. 

NO_INTERFACE_DEFFAPI is not defined.

Check whether the URL is correct. Please refer to the endpoint in the API documentation. 

PARAM_ILLEGALFThe required parameters are not passed, or illegal parameters exist. For example, a non-numeric input, an invalid date, or the length and type of the parameter are wrong.

Check and verify whether the required request fields (including the header fields and body fields) of the current API are correctly passed and valid. 

PROCESS_FAILFA general business failure occurred.

Do not retry. Human intervention is usually needed. It is recommended that you contact Alipay Technical Support to troubleshoot the issue. 

RISK_REJECTFThe request is rejected because of the risk control.

Prompt the user that the request is rejected because the risk control failed.  

SYSTEM_ERRORFA system error occurred.

Do not retry, and contact Alipay Technical Support for more details. 

REQUEST_TRAFFIC_EXCEED_LIMITUThe request traffic exceeds the limit.

Call the interface again to resolve the issue. If not resolved, contact Alipay Technical Support. 

UNKNOWN_EXCEPTIONUAn API call has failed, which is caused by unknown reasons.

Call the interface again to resolve the issue. If not resolved, contact Alipay Technical Support.