API REFERENCE
Resend a customs declaration
This API resends a customs declaration for an order already submitted to customs.
| Parameter | Type | Description | Required |
|---|---|---|---|
| user | String | UID of the cashier or super administrator account | Required |
| sign | String | Signature | Required |
| method | String | v3.CustomDeclareRedeclare | Required |
| time | Long | Timestamp | Required |
- Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| trade_id | String | YabandPay transaction ID | Required |
| customs | String | Customs name | Required |
| mch_customs_no | String | Merchant customs registration number | Required |
Signature example:
Sorted parameters concatenated into a URL-style query string
"customs=NINGBO&mch_customs_no=8888888888&method=v3.CustomDeclareRedeclare&time=1560499094&trade_id=dd11d082-810d-c8b7-3669-b784c466759b&user=YOUR_CASHIER_UID"
Sign stringA using secret_key
The resulting signature is:
"YOUR_SIGNATURE"
Request example:
{
"user": "YOUR_CASHIER_UID",
"sign": "YOUR_SIGNATURE",
"method": "v3.CustomDeclareRedeclare",
"time": 1560996670,
"data": {
"trade_id": "dd11d082-810d-c8b7-3669-b784c466759b",
"customs": "NINGBO",
"mch_customs_no": "8888888888"
}
}
Response example:
{
"status": true,
"code": "200",
"data": {
"state": "UNDECLARED",
"explanation": []
},
"message": ""
}
State statuses:
| Status | Description |
|---|---|
| UNDECLARED | Undeclared (the declaration has been submitted and is awaiting customs processing; no resubmission is needed) |
| SUBMITTED | Declaration submitted (this status is recorded when the order has been sent to customs, the merchant submits a new declaration, and customs provides a modification API) |
| PROCESSING | Declaration in progress |
| SUCCESS | Declaration successful |
| FAIL | Declaration failed |
| EXCEPT | Customs API error |
