Spider TL API v3 Documentation
Shipping, international customs invoices and dedicated customs clearance workflows — including H7 declarations.
Overview
Integrate shipping rates, label creation and shipment tracking into your application through Spider TL API v3.
1. Request rates → 2. Select carriers[].id → 3. Create shipment → 4. Retrieve labels and tracking numbers.
Authentication
Send your API token in the Authorization header on every request. The Postman collection uses host and variable_token variables.
{
"Authorization": "Bearer {{variable_token}}",
"Content-Type": "application/json"
}Import the downloadable collection, set host to https://service.spider-tl.com, and set variable_token to your own API token. Do not expose tokens in frontend code.
Get shipping rates
Get available shipping services and price estimates using origin, destination and parcel weight.
/api/v3/shipments/ratesRequest example
{
"senderAddress": {
"countryCode": "FR",
"postalCode": "93300"
},
"receiverAddress": {
"countryCode": "FR",
"postalCode": "75002"
},
"parcels": [
{
"weight": 1
}
]
}Response example
{
"Response": {
"Date": 1765451621,
"Status": "SUCCEEDED",
"Code": 200,
"Message": {
"transactionId": "EXAMPLE_TRANSACTION_ID",
"shipmentRequest": {
"senderAddress": {
"countryCode": "FR",
"postalCode": "93300"
},
"receiverAddress": {
"countryCode": "FR",
"postalCode": "75002"
},
"parcels": [
{
"weight": 1
}
]
},
"carriers": [
{
"id": "EXAMPLE_CARRIER_ID",
"code": "fedex",
"name": "FedEx",
"price": 2107,
"priceIncTax": 2528,
"logo": "https://service.spider-tl.com/media/logo/sq/fedex.png",
"infos": {
"estimatedArrival": "3-4 day(s)",
"maximumSizeSupported": "Max 80*50*30cm, 25kg"
}
}
]
}
}
}price: 2107 corresponds to €21.07 excluding tax; priceIncTax: 2528 corresponds to €25.28 including tax. Currency interpretation follows the account/quotation context.Response fields
| Field | Type | Description |
|---|---|---|
Response.Date |
Integer | Response timestamp |
Response.Status |
String | Response status: "SUCCEEDED" indicates success |
Response.Code |
Integer | HTTP status code, 200 indicates success |
Message.transactionId |
String | Unique transaction ID for this quote request |
Message.shipmentRequest |
Object | Returned quote request parameters (for confirmation) |
Message.carriers |
Array | List of available carriers |
carriers[].id |
String | Carrier unique ID (used for subsequent order placement) |
carriers[].code |
String | Carrier code (e.g., fedex, ups, gls) |
carriers[].name |
String | Carrier display name |
carriers[].price |
Integer | Price excluding tax (unit: cent) |
carriers[].priceIncTax |
Integer | Price including tax (unit: cent) |
carriers[].logo |
String | Carrier logo image URL |
carriers[].infos |
Object | Additional carrier information (transit time, size limits, pickup points, etc.) |
| Field | Type | Unit | Example | Description |
|---|---|---|---|---|
"weight": 3 |
Float [0-9](0,3) | Kilogram (kg) | 3 = 3 kg | Parcel weight unit is kilogram |
Within parcels array |
Array | Kilogram | {"weight": 8} = 8 kg |
All weight-related fields use kilograms |
Weight units
| Field | Type | Unit | Example | Description |
|---|---|---|---|---|
"weight": 3 |
Float [0-9](0,3) | Kilogram (kg) | 3 = 3 kg | Parcel weight unit is kilogram |
Within parcels array |
Array | Kilogram | {"weight": 8} = 8 kg |
All weight-related fields use kilograms |
Create a shipment
Once the customer has selected a carrier, submit its rate-response carrierId together with the shipment details.
/api/v3/shipments/checkoutThe uploaded Postman requests consistently use /api/v3/shipments/checkout, including the international examples. The old documentation also mentioned singular /shipment/checkout; this version follows the supplied Postman collection.
{
"transactionId": "TRANSACTION_ID_FROM_RATES",
"carrierId": "CARRIER_ID_FROM_RATES",
"shipmentRequest": {
"parcels": [
{
"weight": 1,
"reference": "ORDER-001"
}
],
"senderAddress": {
"firstName": "Alex",
"lastName": "Martin",
"company": "Example Sender SAS",
"email": "sender@example.com",
"phoneNumber": "+33100000000",
"street": "10 Rue Exemple",
"city": "Aubervilliers",
"postalCode": "93300",
"countryCode": "FR"
},
"receiverAddress": {
"firstName": "Sam",
"lastName": "Taylor",
"company": "Example Recipient",
"email": "recipient@example.com",
"phoneNumber": "+33100000001",
"street": "20 Rue Exemple",
"city": "Paris",
"postalCode": "75002",
"countryCode": "FR"
}
}
}The sample uses a France-to-France shipment without an invoice object.
{
"transactionId": "TRANSACTION_ID_FROM_RATES",
"carrierId": "CARRIER_ID_FROM_RATES",
"shipmentRequest": {
"parcels": [
{
"weight": 1,
"reference": "ORDER-001"
}
],
"senderAddress": {
"firstName": "Alex",
"lastName": "Martin",
"company": "Example Sender SAS",
"email": "sender@example.com",
"phoneNumber": "+33100000000",
"street": "10 Rue Exemple",
"city": "Aubervilliers",
"postalCode": "93300",
"countryCode": "FR"
},
"receiverAddress": {
"firstName": "Sam",
"lastName": "Taylor",
"company": "Example Recipient",
"email": "recipient@example.com",
"phoneNumber": "+41790000000",
"street": "10 Example Street",
"city": "Lausanne",
"postalCode": "1003",
"countryCode": "CH"
},
"invoice": {
"invoiceNumber": "INV-001",
"invoiceDate": "2026-10-24",
"invoiceItems": [
{
"denomination": "Clothing accessories",
"hsCode": "71179000",
"weight": "1",
"value": "90.40",
"quantity": "1",
"originCountry": "CN"
}
],
"fileFormat": "PDF",
"file": "BASE64_ENCODED_PDF_CONTENT"
}
}
}For customs shipments, include the invoice structure when required by the service. The invoice.file value is illustrative; replace it with the complete Base64-encoded PDF content.
Checkout response example
{
"Response": {
"Date": 1765452070,
"Status": "SUCCEEDED",
"Code": 200,
"Message": {
"transactionId": "EXAMPLE_TRANSACTION_ID",
"labels": "https://service.spider-tl.com/storage/file/pdf/example/combined.pdf",
"parcels": [
{
"ticket": "https://service.spider-tl.com/storage/file/pdf/example/parcel-1.pdf",
"tracking": "EXAMPLE_TRACKING_NUMBER"
}
]
}
}
}Response fields
| Field | Type | Description |
|---|---|---|
Response.Date |
Integer | Response timestamp |
Response.Status |
String | Response status: "SUCCEEDED" indicates success |
Response.Code |
Integer | HTTP status code, 200 indicates success |
Message.transactionId |
String | Unique transaction ID for the order |
Message.labels |
String | Download URL for the shipping label PDF (combined for all parcels) |
Message.parcels |
Array | Detailed information for each parcel |
parcels[].ticket |
String | Shipping label PDF URL for individual parcel |
parcels[].tracking |
String | Parcel tracking number |
| Field | Type | Description |
|---|---|---|
transactionId |
String (Length: 42) | Order unique identifier, recommended to be generated by the business system |
carrierId |
String | Carrier ID, obtained from the /rates interface |
parcels |
Array | Parcel list, includes weight, reference number, etc. |
senderAddress |
Object | Sender address information |
receiverAddress |
Object | Receiver address information |
invoice |
Object | Invoice information (required for cross-border shipping) |
Request fields
| Field | Type | Description |
|---|---|---|
transactionId |
String (Length: 42) | Order unique identifier, recommended to be generated by the business system |
carrierId |
String | Carrier ID, obtained from the /rates interface |
parcels |
Array | Parcel list, includes weight, reference number, etc. |
senderAddress |
Object | Sender address information |
receiverAddress |
Object | Receiver address information |
invoice |
Object | Invoice information (required for cross-border shipping) |
Customs invoice
The international checkout examples in the supplied Postman collection include shipmentRequest.invoice, with invoice metadata, line items, and an encoded invoice document.
Invoice field reference
| Field | Type | Required | Description |
|---|---|---|---|
carrierId |
String | Yes | Carrier ID obtained from the rates interface response |
invoice.file |
String | Yes | Base64 encoded string of the invoice file |
invoice.fileFormat |
String | Yes | Invoice format (e.g., pdf) |
invoice.invoiceItems |
Array | Yes | Product details (including HS code, country of origin, unit price, etc.) |
| Invoice item field | Meaning |
|---|---|
denomination | Product description |
hsCode | Customs HS code |
weight | Item weight (kg) |
value | Declared item value |
quantity | Item quantity |
originCountry | Country of origin (ISO alpha-2) |
The Postman file includes a real-world invoice encoded in Base64. It has deliberately been excluded from these public-facing examples and the downloadable sanitized collection.
Find tracking information
Look up a shipment using the search query q. The supplied Postman collection contains a request example, but no saved response example.
/api/v3/tracking/findRequest example
{
"q": "EXAMPLE_TRACKING_NUMBER"
}Response fields have not been specified in the supplied materials. Confirm their structure using your authenticated API environment.
Company information lookup
Search company information using a keyword and postal code. The supplied Postman collection names this example G-A.
/api/v3/infos/companyRequest example
{
"q": "Easy",
"zipcode": "93300"
}No saved response schema was supplied for this operation.
Address fields
Both senderAddress and receiverAddress use a similar structure. Some shipping services can require additional fields depending on destination.
| Field | Type / Length | Example | Description |
|---|---|---|---|
firstName |
String / 25 | "TestFirstName" | First name |
lastName |
String / 25 | "TestLastName" | Last name |
company |
String / 35 | "TestCompany" | Company name |
siret |
String / 20 | "82339490300038" | French company registration number |
shopName |
String / 35 | "TestShopName" | Shop name |
email |
String / 35 | "test@123.com" | Email address |
phoneNumber / mobileNumber |
String / 15 | "0600000000" | Phone/Mobile number |
street |
String / 35 | "8 Rue de la Haie Coq" | Street address |
city |
String / 35 | "Aubervilliers" | City |
postalCode |
String / 10 | "93300" | Postal code |
countryCode |
String / 2 | "FR" | Country code (ISO 3166-1 alpha-2) |
instructions |
String / 35 | "TestInstruction" | Delivery notes |
The collection also uses complement and stateProvinceCode; these are included in examples but length constraints were not documented in the original page.
Response envelope
Available saved examples use a top-level Response object with Date, Status, Code and Message. The example below shows the structure of a successful response.
{
"Response": {
"Date": 1765451621,
"Status": "SUCCEEDED",
"Code": 200,
"Message": {
"transactionId": "EXAMPLE_TRANSACTION_ID"
}
}
}No authoritative error-code catalogue or failure-response examples were provided. Do not assume the numeric Response.Code is always identical to the HTTP status.
Customs Clearance API overview
Manage customs clearance applications through standardized templates, document attachments, workflow tracking and H7 parcel declarations. All paths below use the same API v3 host and Bearer token authentication as Shipping.
Recommended integration flow
1. GET /customs/templates → 2. POST /customs/clearances (or /h7) → 3. POST /customs/clearances/{task_number}/submit → 4. GET status/details/events/documents. Cancellation is a separate DELETE operation.
Status and progress semantics
| Field | Type | Description |
|---|---|---|
Response.Status | String | Outcome of the API call (e.g. SUCCEEDED). |
Message.status | String | Business state of the clearance (observed: NEW, IN_PROGRESS, CANCELLED). |
Message.h7.status | String | H7 submission processing state (observed: Pending). |
Message.nodes.progressPercent | Number | Workflow progress percentage returned by the status endpoint. |
Message.data[].progress.percent | Integer | Workflow progress in the list; CANCELLED may show 100% with all nodes SKIPPED. |
Success responses and request shapes are based on the supplied Postman collection and actual API examples. Required/optional flags, maximum lengths, failure payloads, exhaustive enums, timezone semantics and download response headers have not yet been independently verified. Application Response.Code is not assumed to equal the transport HTTP status.
Download the Customs Postman collection (included in the ZIP package) using the link below.
Download Customs Postman collection →List customs templates
/api/v3/customs/templatesRetrieve available customs service templates and select templates[].code for creating a request.
Success response example
{
"Response": {
"Date": 1794947067,
"Status": "SUCCEEDED",
"Code": 200,
"Message": {
"templates": [
{
"code": "TRADE_T1",
"name": "T1",
"description": "TRADE_T1",
"serviceType": "TRADE_T1",
"version": 1
},
{
"code": "TRADE_SEA_IMPORT",
"name": "海运进口",
"description": "SEA_IMPORT",
"serviceType": "SEA_IMPORT",
"version": 1
},
{
"code": "TRADE_SEA_IMPORT_STOPDOUANE",
"name": "海运进口STOPDOUANE",
"description": "TRADE_SEA_IMPORT_STOPDOUANE",
"serviceType": "TRADE_SEA_IMPORT_STOPDOUANE",
"version": 1
},
{
"code": "TRADE_SEA_IMPORT_STOPDOUANE_OFFSHORE",
"name": "海运进口STOPDOUANE离岸",
"description": "TRADE_SEA_IMPORT_STOPDOUANE_OFFSHORE",
"serviceType": "TRADE_SEA_IMPORT_STOPDOUANE_OFFSHORE",
"version": 1
},
{
"code": "TRADE_SEA_IMPORT_T1",
"name": "海运进口T1",
"description": "SEA_IMPORT_T1",
"serviceType": "SEA_IMPORT_T1",
"version": 1
},
{
"code": "TRADE_SEA_IMPORT_T1_OFFSHORE",
"name": "海运进口T1离岸",
"description": "TRADE_SEA_IMPORT_T1_OFFSHORE",
"serviceType": "TRADE_SEA_IMPORT_T1_OFFSHORE",
"version": 1
},
{
"code": "TRADE_SEA_IMPORT_OFFSHORE",
"name": "海运进口离岸",
"description": "TRADE_SEA_IMPORT_OFFSHORE",
"serviceType": "TRADE_SEA_IMPORT_OFFSHORE",
"version": 1
},
{
"code": "TRADE_AIR_EXPORT",
"name": "空运出口",
"description": "AIR_EXPORT",
"serviceType": "AIR_EXPORT",
"version": 1
},
{
"code": "TRADE_AIR_IMPORT",
"name": "空运进口",
"description": "AIR_IMPORT",
"serviceType": "AIR_IMPORT",
"version": 1
},
{
"code": "TRADE_AIR_IMPORT_H7",
"name": "空运进口H7_Villepinte",
"description": "TRADE_AIR_IMPORT_H7",
"serviceType": "TRADE_AIR_IMPORT_H7",
"version": 1
},
{
"code": "TRADE_AIR_IMPORT_T1",
"name": "空运进口T1",
"description": "TRADE_AIR_IMPORT_T1",
"serviceType": "TRADE_AIR_IMPORT_T1",
"version": 1
}
]
}
}
}Response fields
| Field | Type | Description |
|---|---|---|
Response.Date | Integer | Unix timestamp of the API response |
Response.Status | String | API call outcome; SUCCEEDED in this example |
Response.Code | Integer | Application result code; 200 in this example |
Message.templates | Array | Available clearance templates |
Message.templates[].code | String | Template code (when inside a template object) |
Message.templates[].name | String | Display name |
Message.templates[].description | String | Request description |
Message.templates[].serviceType | String | Template service type identifier |
Message.templates[].version | Integer | Template version |
Create clearance request
/api/v3/customs/clearancesCreate a standard customs clearance request and optionally include document attachments in Base64 form.
Request body
| Field | Type | Description |
|---|---|---|
templateCode | String | Template code from GET /api/v3/customs/templates |
title | String | Human-readable request title |
description | String | Request description |
priority | String | Priority; NORMAL is observed |
billOfLadingNo | String | Bill of Lading / Air Waybill number |
eventData | Object | Business metadata; the example contains requires_t1 and needs_storage booleans |
attachments | Array | Attached files encoded as Base64 |
Request example
{
"templateCode": "TRADE_AIR_IMPORT_T1",
"title": "Air import customs clearance",
"description": "Customs clearance request created through API.",
"priority": "NORMAL",
"billOfLadingNo": "784-85524025",
"eventData": {
"requires_t1": true,
"needs_storage": true
},
"attachments": [
{
"documentType": "bill_of_lading",
"fileName": "AWB-784-85524025.pdf",
"mimeType": "application/pdf",
"contentBase64": "BASE64_ENCODED_PDF_CONTENT"
},
{
"documentType": "commercial_invoice",
"fileName": "invoice.pdf",
"mimeType": "application/pdf",
"contentBase64": "BASE64_ENCODED_PDF_CONTENT"
},
{
"documentType": "packing_list",
"fileName": "packing-list.pdf",
"mimeType": "application/pdf",
"contentBase64": "BASE64_ENCODED_PDF_CONTENT"
}
]
}In this readable example, BASE64_ENCODED_PDF_CONTENT is a placeholder, not a valid encoded document. Supply real Base64 content when calling the API.
Attachment object fields
| Field | Type | Description |
|---|---|---|
attachments[].documentType | String | Document type (examples: bill_of_lading, commercial_invoice, packing_list) |
attachments[].fileName | String | Original filename |
attachments[].mimeType | String | MIME type; application/pdf in example |
attachments[].contentBase64 | String | Base64-encoded file bytes |
Success response example
{
"Response": {
"Date": 1794950085,
"Status": "SUCCEEDED",
"Code": 201,
"Message": {
"clearanceNumber": "TSK-20261117-000006",
"status": "NEW",
"template": {
"code": "TRADE_AIR_IMPORT_T1",
"name": "空运进口T1"
},
"documents": [
{
"id": 16,
"documentType": "bill_of_lading",
"fileName": "AWB-784-85524025.pdf",
"mimeType": "application/pdf",
"fileSize": 630
},
{
"id": 17,
"documentType": "commercial_invoice",
"fileName": "invoice.pdf",
"mimeType": "application/pdf",
"fileSize": 630
},
{
"id": 18,
"documentType": "packing_list",
"fileName": "packing-list.pdf",
"mimeType": "application/pdf",
"fileSize": 630
}
]
}
}
}Response fields
| Field | Type | Description |
|---|---|---|
Response.Date | Integer | Unix timestamp of the API response |
Response.Status | String | API call outcome; SUCCEEDED in this example |
Response.Code | Integer | Application result code; 201 in this example |
Message.clearanceNumber | String | Unique clearance application number |
Message.status | String | Current business status (H7 status when nested under h7) |
Message.template | Object | Selected clearance template |
Message.template.code | String | Template code (when inside a template object) |
Message.template.name | String | Display name |
Message.documents | Array | Associated clearance documents |
Message.documents[].id | Integer | Returned field; meaning depends on the parent object. |
Message.documents[].documentType | String | Document category |
Message.documents[].fileName | String | Filename |
Message.documents[].mimeType | String | MIME type |
Message.documents[].fileSize | Integer | File size value (unit not formally confirmed) |
Create H7 clearance
/api/v3/customs/clearances/h7Create a customs clearance request with H7 goodsItems[] and receive both the clearance number and H7 ticket/item associations.
Request body
| Field | Type | Description |
|---|---|---|
templateCode | String | Template code from GET /api/v3/customs/templates |
title | String | Human-readable request title |
description | String | Request description |
priority | String | Priority; NORMAL is observed |
billOfLadingNo | String | Bill of Lading / Air Waybill number |
eventData | Object | Business metadata; the example contains requires_t1 and needs_storage booleans |
attachments | Array | Attached files encoded as Base64 |
goodsItems | Array | H7 goods declaration items |
Request example
{
"templateCode": "TRADE_AIR_IMPORT_T1",
"title": "Air import customs clearance",
"description": "Customs clearance request created through API.",
"priority": "NORMAL",
"billOfLadingNo": "784-85524025",
"eventData": {
"requires_t1": true,
"needs_storage": true
},
"attachments": [
{
"documentType": "bill_of_lading",
"fileName": "AWB-784-85524025.pdf",
"mimeType": "application/pdf",
"contentBase64": "BASE64_ENCODED_PDF_CONTENT"
},
{
"documentType": "commercial_invoice",
"fileName": "invoice.pdf",
"mimeType": "application/pdf",
"contentBase64": "BASE64_ENCODED_PDF_CONTENT"
},
{
"documentType": "packing_list",
"fileName": "packing-list.pdf",
"mimeType": "application/pdf",
"contentBase64": "BASE64_ENCODED_PDF_CONTENT"
}
],
"goodsItems": [
{
"customOrderNumber": "EXAMPLE-0001",
"bagGrade": "1002-1",
"bagSizeInLength": 15.12,
"bagSizeInWidth": 20,
"bagSizeInHeight": 10,
"productId": "PROD-001",
"packageBarcode": "0123456789012",
"consignorName": "Example Export Ltd",
"consignorCity": "Shenzhen",
"consignorZipCode": "518000",
"consignorAddress": "88 Example Road",
"consignorOrigin": "CN",
"consigneeName": "Example Recipient",
"recipientAddress": "12 Rue Exemple, 75001 Paris, FR",
"countryCode": "FR",
"cityOrTown": "Paris",
"street": "12 Rue Exemple",
"zipCode": "75001",
"ioss": "SI_APPLICABLE",
"skuDescription": "USB cable",
"skuId": "SKU-001",
"currency": "EUR",
"price": 10.5,
"quantity": 2,
"weight": 0.25,
"hsCode": "854442",
"skuCode": "SKU-001",
"originCountry": "CN",
"type": "A_CONFIRMER",
"profile": "SPIDERVLP",
"MPID": "7417455454945",
"NSPID": "LINK-0786",
"SPID": ""
},
{
"customOrderNumber": "EXAMPLE-0001",
"bagGrade": "1002-1",
"bagSizeInLength": 15.12,
"bagSizeInWidth": 20,
"bagSizeInHeight": 10,
"productId": "PROD-001",
"packageBarcode": "0123456789012",
"consignorName": "Example Export Ltd",
"consignorCity": "Shenzhen",
"consignorZipCode": "518000",
"consignorAddress": "88 Example Road",
"consignorOrigin": "CN",
"consigneeName": "Example Recipient",
"recipientAddress": "12 Rue Exemple, 75001 Paris, FR",
"countryCode": "FR",
"cityOrTown": "Paris",
"street": "12 Rue Exemple",
"zipCode": "75001",
"ioss": "SI_APPLICABLE",
"skuDescription": "USB cable",
"skuId": "SKU-001",
"currency": "EUR",
"price": 10.5,
"quantity": 2,
"weight": 0.25,
"hsCode": "854442",
"skuCode": "SKU-001",
"originCountry": "CN",
"type": "A_CONFIRMER",
"profile": "SPIDERVLP",
"MPID": "7417455454945",
"NSPID": "LINK-0786",
"SPID": ""
}
]
}In this readable example, BASE64_ENCODED_PDF_CONTENT is a placeholder, not a valid encoded document. Supply real Base64 content when calling the API.
Attachment object fields
| Field | Type | Description |
|---|---|---|
attachments[].documentType | String | Document type (examples: bill_of_lading, commercial_invoice, packing_list) |
attachments[].fileName | String | Original filename |
attachments[].mimeType | String | MIME type; application/pdf in example |
attachments[].contentBase64 | String | Base64-encoded file bytes |
H7 goodsItems[] fields
| Field | Type | Description |
|---|---|---|
customOrderNumber | String | Customer order reference |
bagGrade | String | Bag grade (meaning not confirmed) |
bagSizeInLength | Number | H7 goods item field; example value: 15.12 |
bagSizeInWidth | Integer | H7 goods item field; example value: 20 |
bagSizeInHeight | Integer | H7 goods item field; example value: 10 |
productId | String | Product identifier |
packageBarcode | String | H7 goods item field; example value: 0123456789012 |
consignorName | String | H7 goods item field; example value: Example Export Ltd |
consignorCity | String | H7 goods item field; example value: Shenzhen |
consignorZipCode | String | H7 goods item field; example value: 518000 |
consignorAddress | String | H7 goods item field; example value: 88 Example Road |
consignorOrigin | String | H7 goods item field; example value: CN |
consigneeName | String | H7 goods item field; example value: Jean Dupont |
recipientAddress | String | H7 goods item field; example value: 12 Rue Exemple, 75001 Paris, FR |
countryCode | String | Consignee country code |
cityOrTown | String | H7 goods item field; example value: Paris |
street | String | H7 goods item field; example value: 12 Rue Exemple |
zipCode | String | H7 goods item field; example value: 75001 |
ioss | String | H7 goods item field; example value: SI_APPLICABLE |
skuDescription | String | H7 goods item field; example value: USB cable |
skuId | String | H7 goods item field; example value: SKU-001 |
currency | String | ISO-style currency code in example (EUR); validation not confirmed |
price | Number | Declared price (unit/precision rules not confirmed) |
quantity | Integer | Declared item quantity |
weight | Number | Declared weight (unit not confirmed by supplied H7 schema) |
hsCode | String | Harmonized System code |
skuCode | String | SKU code |
originCountry | String | Country of origin |
type | String | Type value; A_CONFIRMER in example |
profile | String | H7 profile; SPIDERVLP in example |
MPID | String | H7 MPID code; validation not confirmed |
NSPID | String | H7 NSPID code; validation not confirmed |
SPID | String | H7 SPID code; may be empty |
This sample uses templateCode TRADE_AIR_IMPORT_T1 even though GET /customs/templates also returns TRADE_AIR_IMPORT_H7. This documentation reproduces the supplied successful call; it does not assert a required template or the server-side grouping algorithm. Two goods items in the actual response share one LRN.
Success response example
{
"Response": {
"Date": 1794950194,
"Status": "SUCCEEDED",
"Code": 201,
"Message": {
"clearanceNumber": "TSK-20261117-000007",
"status": "NEW",
"template": {
"code": "TRADE_AIR_IMPORT_T1",
"name": "空运进口T1"
},
"documents": [
{
"id": 19,
"documentType": "bill_of_lading",
"fileName": "AWB-784-85524025.pdf",
"mimeType": "application/pdf",
"fileSize": 630
},
{
"id": 20,
"documentType": "commercial_invoice",
"fileName": "invoice.pdf",
"mimeType": "application/pdf",
"fileSize": 630
},
{
"id": 21,
"documentType": "packing_list",
"fileName": "packing-list.pdf",
"mimeType": "application/pdf",
"fileSize": 630
}
],
"h7": {
"ticketId": "TKT20261117221634870",
"status": "Pending",
"statusLabel": "Pending",
"itemCount": 3,
"items": [
{
"LRN": "TKT20261117221634870-1",
"customOrderNumber": "EXAMPLE-0001",
"productId": "PROD-001",
"hsCode": "854442",
"skuCode": "SKU-001",
"MPID": "7417455454945",
"NSPID": "LINK-0786",
"SPID": ""
},
{
"LRN": "TKT20261117221634870-1",
"customOrderNumber": "EXAMPLE-0001",
"productId": "PROD-001",
"hsCode": "854442",
"skuCode": "SKU-001",
"MPID": "7417455454945",
"NSPID": "LINK-0786",
"SPID": ""
},
{
"LRN": "TKT20261117221634870-2",
"customOrderNumber": "EXAMPLE-0002",
"productId": "PROD-001",
"hsCode": "854442",
"skuCode": "SKU-001",
"MPID": "7417455454945",
"NSPID": "LINK-0786",
"SPID": ""
}
]
}
}
}
}Response fields
| Field | Type | Description |
|---|---|---|
Response.Date | Integer | Unix timestamp of the API response |
Response.Status | String | API call outcome; SUCCEEDED in this example |
Response.Code | Integer | Application result code; 201 in this example |
Message.clearanceNumber | String | Unique clearance application number |
Message.status | String | Current business status (H7 status when nested under h7) |
Message.template | Object | Selected clearance template |
Message.template.code | String | Template code (when inside a template object) |
Message.template.name | String | Display name |
Message.documents | Array | Associated clearance documents |
Message.documents[].id | Integer | Returned field; meaning depends on the parent object. |
Message.documents[].documentType | String | Document category |
Message.documents[].fileName | String | Filename |
Message.documents[].mimeType | String | MIME type |
Message.documents[].fileSize | Integer | File size value (unit not formally confirmed) |
Message.h7 | Object | Returned field; meaning depends on the parent object. |
Message.h7.ticketId | String | H7 ticket identifier |
Message.h7.status | String | Current business status (H7 status when nested under h7) |
Message.h7.statusLabel | String | Human-readable H7 processing status |
Message.h7.itemCount | Integer | Number of H7 goods items |
Message.h7.items | Array | H7 item associations |
Message.h7.items[].LRN | String | H7 declaration LRN; can be shared by multiple goods items |
Message.h7.items[].customOrderNumber | String | Customer order reference |
Message.h7.items[].productId | String | Product identifier |
Message.h7.items[].hsCode | String | Harmonized System code |
Message.h7.items[].skuCode | String | SKU code |
Message.h7.items[].MPID | String | MPID value (semantics require confirmation) |
Message.h7.items[].NSPID | String | NSPID value (semantics require confirmation) |
Message.h7.items[].SPID | String | SPID value (may be empty) |
List clearance requests
/api/v3/customs/clearancesRetrieve paginated clearance applications. The confirmed request query is page=1.
Query parameters
| Parameter | Type | Description |
|---|---|---|
page | Integer | Page number; page=1 in supplied example. Other filters and page-size query parameters are not confirmed. |
The supplied CANCELLED record reports progress 18/18 (100%) while all detailed nodes are SKIPPED. Treat percent as workflow terminal progress, not successful clearance.
Success response example
{
"Response": {
"Date": 1794950012,
"Status": "SUCCEEDED",
"Code": 200,
"Message": {
"data": [
{
"clearanceNumber": "TSK-20261117-000005",
"title": "Air import customs clearance",
"status": "CANCELLED",
"priority": "NORMAL",
"templateCode": "TRADE_AIR_IMPORT_T1",
"templateName": "空运进口T1",
"billOfLadingNo": "784-85524025",
"customsTicketId": null,
"customsDeclarationId": null,
"dueAt": null,
"createdAt": "2026-11-17 22:09:53",
"updatedAt": "2026-11-17 23:11:03",
"progress": {
"total": 18,
"finished": 18,
"percent": 100
}
},
{
"clearanceNumber": "TSK-20261117-000004",
"title": "Air import customs clearance",
"status": "NEW",
"priority": "NORMAL",
"templateCode": "TRADE_AIR_IMPORT_T1",
"templateName": "空运进口T1",
"billOfLadingNo": "784-85524025",
"customsTicketId": null,
"customsDeclarationId": null,
"dueAt": null,
"createdAt": "2026-11-17 22:08:59",
"updatedAt": "2026-11-17 22:08:59",
"progress": {
"total": 18,
"finished": 0,
"percent": 0
}
},
{
"clearanceNumber": "TSK-20261117-000003",
"title": "Air import customs clearance",
"status": "NEW",
"priority": "NORMAL",
"templateCode": "TRADE_AIR_IMPORT_T1",
"templateName": "空运进口T1",
"billOfLadingNo": "784-85524025",
"customsTicketId": null,
"customsDeclarationId": null,
"dueAt": null,
"createdAt": "2026-11-17 22:07:45",
"updatedAt": "2026-11-17 22:07:45",
"progress": {
"total": 18,
"finished": 0,
"percent": 0
}
},
{
"clearanceNumber": "TSK-20261117-000002",
"title": "Air import customs clearance",
"status": "NEW",
"priority": "NORMAL",
"templateCode": "TRADE_AIR_IMPORT_T1",
"templateName": "空运进口T1",
"billOfLadingNo": "784-85524025",
"customsTicketId": null,
"customsDeclarationId": null,
"dueAt": null,
"createdAt": "2026-11-17 22:07:04",
"updatedAt": "2026-11-17 22:07:05",
"progress": {
"total": 18,
"finished": 0,
"percent": 0
}
},
{
"clearanceNumber": "TSK-20261117-000001",
"title": "Air import customs clearance",
"status": "IN_PROGRESS",
"priority": "NORMAL",
"templateCode": "TRADE_AIR_IMPORT_T1",
"templateName": "空运进口T1",
"billOfLadingNo": "157-53726960",
"customsTicketId": "TKT20261117205618244",
"customsDeclarationId": 1,
"dueAt": null,
"createdAt": "2026-11-17 21:56:18",
"updatedAt": "2026-11-17 22:01:23",
"progress": {
"total": 18,
"finished": 3,
"percent": 17
}
}
],
"page": 1,
"pages": 1,
"limit": 25,
"total": 5
}
}
}Response fields
| Field | Type | Description |
|---|---|---|
Response.Date | Integer | Unix timestamp of the API response |
Response.Status | String | API call outcome; SUCCEEDED in this example |
Response.Code | Integer | Application result code; 200 in this example |
Message.data | Array | Event-specific details or list results |
Message.data[].clearanceNumber | String | Unique clearance application number |
Message.data[].title | String | Request title |
Message.data[].status | String | Current business status (H7 status when nested under h7) |
Message.data[].priority | String | Priority value |
Message.data[].templateCode | String | Selected template code |
Message.data[].templateName | String | Template display name |
Message.data[].billOfLadingNo | String | Bill of Lading / Air Waybill number |
Message.data[].customsTicketId | String / Integer / Null | Customs ticket identifier if available |
Message.data[].customsDeclarationId | String / Integer / Null | Declaration identifier if available |
Message.data[].dueAt | String / Integer / Null | Due date, nullable |
Message.data[].createdAt | String | Creation timestamp |
Message.data[].updatedAt | String | Last update timestamp |
Message.data[].progress | Object | Workflow progress summary |
Message.data[].progress.total | Integer | Total number of records or nodes (context-dependent) |
Message.data[].progress.finished | Integer | Number of terminal/finished workflow nodes |
Message.data[].progress.percent | Integer | Workflow progress percent |
Message.page | Integer | Current page number |
Message.pages | Integer | Total number of pages |
Message.limit | Integer | Page size reported by API |
Message.total | Integer | Total number of records or nodes (context-dependent) |
Get clearance details
/api/v3/customs/clearances/{id}Retrieve detailed clearance metadata and an array of workflow nodes, including execution results and retry configuration.
Path parameter
| Parameter | Type | Description |
|---|---|---|
id | String | Clearance application number, e.g. TSK-20261117-000005. |
The full 18-node response is for a CANCELLED request; all nodes are SKIPPED. The exact JSON is included below for reference. Do not interpret SKIPPED as successful customs execution.
Success response example
{
"Response": {
"Date": 1794949898,
"Status": "SUCCEEDED",
"Code": 200,
"Message": {
"clearanceNumber": "TSK-20261117-000005",
"title": "Air import customs clearance",
"description": "Customs clearance request created through API.",
"status": "CANCELLED",
"priority": "NORMAL",
"template": {
"id": 1,
"code": "TRADE_AIR_IMPORT_T1",
"name": "空运进口T1",
"serviceType": "TRADE_AIR_IMPORT_T1"
},
"billOfLadingNo": "784-85524025",
"customsTicketId": null,
"customsDeclarationId": null,
"draftId": 5,
"dueAt": null,
"createdAt": "2026-11-17 22:09:53",
"updatedAt": "2026-11-17 23:11:03",
"nodes": [
{
"id": 73,
"key": "check_files",
"name": "Documents contrôlés",
"department": "空运进口",
"sequence": 1,
"status": "SKIPPED",
"required": true,
"result": {
"passed": false,
"status": "SKIPPED",
"summary": "Customs clearance cancelled before this node was executed.",
"reason": null,
"cancelled_at": "2026-11-17T22:11:03+01:00"
},
"dueAt": null,
"startedAt": null,
"completedAt": "2026-11-17 23:11:03",
"retry": {
"enabled": false,
"intervalSeconds": null,
"maxCount": null,
"count": 0,
"suspendedAt": null,
"nextRetryAt": null
}
},
{
"id": 74,
"key": "submit_order",
"name": "Dédouanement soumis",
"department": "空运进口",
"sequence": 2,
"status": "SKIPPED",
"required": true,
"result": {
"passed": false,
"status": "SKIPPED",
"summary": "Customs clearance cancelled before this node was executed.",
"reason": null,
"cancelled_at": "2026-11-17T22:11:03+01:00"
},
"dueAt": null,
"startedAt": null,
"completedAt": "2026-11-17 23:11:03",
"retry": {
"enabled": false,
"intervalSeconds": null,
"maxCount": null,
"count": 0,
"suspendedAt": null,
"nextRetryAt": null
}
},
{
"id": 75,
"key": "check_balance",
"name": "Solde vérifié",
"department": "审计部",
"sequence": 3,
"status": "SKIPPED",
"required": true,
"result": {
"passed": false,
"status": "SKIPPED",
"summary": "Customs clearance cancelled before this node was executed.",
"reason": null,
"cancelled_at": "2026-11-17T22:11:03+01:00"
},
"dueAt": null,
"startedAt": null,
"completedAt": "2026-11-17 23:11:03",
"retry": {
"enabled": false,
"intervalSeconds": null,
"maxCount": null,
"count": 0,
"suspendedAt": null,
"nextRetryAt": null
}
},
{
"id": 76,
"key": "customs_declaration_draft",
"name": "Service douane informé (Ébauche)",
"department": "空运进口",
"sequence": 5,
"status": "SKIPPED",
"required": true,
"result": {
"passed": false,
"status": "SKIPPED",
"summary": "Customs clearance cancelled before this node was executed.",
"reason": null,
"cancelled_at": "2026-11-17T22:11:03+01:00"
},
"dueAt": null,
"startedAt": null,
"completedAt": "2026-11-17 23:11:03",
"retry": {
"enabled": false,
"intervalSeconds": null,
"maxCount": null,
"count": 0,
"suspendedAt": null,
"nextRetryAt": null
}
},
{
"id": 77,
"key": "check_bonmag",
"name": "Bon Mag reçu",
"department": "空运进口",
"sequence": 7,
"status": "SKIPPED",
"required": true,
"result": {
"passed": false,
"status": "SKIPPED",
"summary": "Customs clearance cancelled before this node was executed.",
"reason": null,
"cancelled_at": "2026-11-17T22:11:03+01:00"
},
"dueAt": null,
"startedAt": null,
"completedAt": "2026-11-17 23:11:03",
"retry": {
"enabled": true,
"intervalSeconds": 900,
"maxCount": null,
"count": 0,
"suspendedAt": null,
"nextRetryAt": null
}
},
{
"id": 78,
"key": "t1_notify_customs_broker",
"name": "Service douane informé (T1)",
"department": "空运进口",
"sequence": 40,
"status": "SKIPPED",
"required": true,
"result": {
"passed": false,
"status": "SKIPPED",
"summary": "Customs clearance cancelled before this node was executed.",
"reason": null,
"cancelled_at": "2026-11-17T22:11:03+01:00"
},
"dueAt": null,
"startedAt": null,
"completedAt": "2026-11-17 23:11:03",
"retry": {
"enabled": false,
"intervalSeconds": null,
"maxCount": null,
"count": 0,
"suspendedAt": null,
"nextRetryAt": null
}
},
{
"id": 79,
"key": "check_t1",
"name": "T1 reçu",
"department": "清关部",
"sequence": 45,
"status": "SKIPPED",
"required": true,
"result": {
"passed": false,
"status": "SKIPPED",
"summary": "Customs clearance cancelled before this node was executed.",
"reason": null,
"cancelled_at": "2026-11-17T22:11:03+01:00"
},
"dueAt": null,
"startedAt": null,
"completedAt": "2026-11-17 23:11:03",
"retry": {
"enabled": true,
"intervalSeconds": 300,
"maxCount": 100,
"count": 0,
"suspendedAt": null,
"nextRetryAt": null
}
},
{
"id": 80,
"key": "notify_warehouse_department",
"name": "通知仓储部门",
"department": "空运进口",
"sequence": 50,
"status": "SKIPPED",
"required": true,
"result": {
"passed": false,
"status": "SKIPPED",
"summary": "Customs clearance cancelled before this node was executed.",
"reason": null,
"cancelled_at": "2026-11-17T22:11:03+01:00"
},
"dueAt": null,
"startedAt": null,
"completedAt": "2026-11-17 23:11:03",
"retry": {
"enabled": false,
"intervalSeconds": null,
"maxCount": null,
"count": 0,
"suspendedAt": null,
"nextRetryAt": null
}
},
{
"id": 81,
"key": "unloading_notification",
"name": "Stocké à l'entrepôt Spider",
"department": "Villepinte仓库部",
"sequence": 55,
"status": "SKIPPED",
"required": true,
"result": {
"passed": false,
"status": "SKIPPED",
"summary": "Customs clearance cancelled before this node was executed.",
"reason": null,
"cancelled_at": "2026-11-17T22:11:03+01:00"
},
"dueAt": null,
"startedAt": null,
"completedAt": "2026-11-17 23:11:03",
"retry": {
"enabled": false,
"intervalSeconds": null,
"maxCount": null,
"count": 0,
"suspendedAt": null,
"nextRetryAt": null
}
},
{
"id": 82,
"key": "check_balance_copy",
"name": "Solde vérifié",
"department": "审计部",
"sequence": 98,
"status": "SKIPPED",
"required": true,
"result": {
"passed": false,
"status": "SKIPPED",
"summary": "Customs clearance cancelled before this node was executed.",
"reason": null,
"cancelled_at": "2026-11-17T22:11:03+01:00"
},
"dueAt": null,
"startedAt": null,
"completedAt": "2026-11-17 23:11:03",
"retry": {
"enabled": false,
"intervalSeconds": null,
"maxCount": null,
"count": 0,
"suspendedAt": null,
"nextRetryAt": null
}
},
{
"id": 83,
"key": "notify_issue_final_customs_declaration",
"name": "Service douane informé (IMA)",
"department": "空运进口",
"sequence": 100,
"status": "SKIPPED",
"required": true,
"result": {
"passed": false,
"status": "SKIPPED",
"summary": "Customs clearance cancelled before this node was executed.",
"reason": null,
"cancelled_at": "2026-11-17T22:11:03+01:00"
},
"dueAt": null,
"startedAt": null,
"completedAt": "2026-11-17 23:11:03",
"retry": {
"enabled": false,
"intervalSeconds": null,
"maxCount": null,
"count": 0,
"suspendedAt": null,
"nextRetryAt": null
}
},
{
"id": 84,
"key": "check_bill_finaly",
"name": "IMA reçu",
"department": "清关部",
"sequence": 105,
"status": "SKIPPED",
"required": true,
"result": {
"passed": false,
"status": "SKIPPED",
"summary": "Customs clearance cancelled before this node was executed.",
"reason": null,
"cancelled_at": "2026-11-17T22:11:03+01:00"
},
"dueAt": null,
"startedAt": null,
"completedAt": "2026-11-17 23:11:03",
"retry": {
"enabled": true,
"intervalSeconds": 3600,
"maxCount": null,
"count": 0,
"suspendedAt": null,
"nextRetryAt": null
}
},
{
"id": 85,
"key": "delivery_notice",
"name": "Service transport informé",
"department": "空运进口",
"sequence": 110,
"status": "SKIPPED",
"required": true,
"result": {
"passed": false,
"status": "SKIPPED",
"summary": "Customs clearance cancelled before this node was executed.",
"reason": null,
"cancelled_at": "2026-11-17T22:11:03+01:00"
},
"dueAt": null,
"startedAt": null,
"completedAt": "2026-11-17 23:11:03",
"retry": {
"enabled": false,
"intervalSeconds": null,
"maxCount": null,
"count": 0,
"suspendedAt": null,
"nextRetryAt": null
}
},
{
"id": 86,
"key": "confirm_delivery",
"name": "Mise en livraison",
"department": "订车运输部",
"sequence": 200,
"status": "SKIPPED",
"required": true,
"result": {
"passed": false,
"status": "SKIPPED",
"summary": "Customs clearance cancelled before this node was executed.",
"reason": null,
"cancelled_at": "2026-11-17T22:11:03+01:00"
},
"dueAt": null,
"startedAt": null,
"completedAt": "2026-11-17 23:11:03",
"retry": {
"enabled": false,
"intervalSeconds": null,
"maxCount": null,
"count": 0,
"suspendedAt": null,
"nextRetryAt": null
}
},
{
"id": 87,
"key": "check_cmr",
"name": "CMR reçu",
"department": "订车运输部",
"sequence": 1002,
"status": "SKIPPED",
"required": true,
"result": {
"passed": false,
"status": "SKIPPED",
"summary": "Customs clearance cancelled before this node was executed.",
"reason": null,
"cancelled_at": "2026-11-17T22:11:03+01:00"
},
"dueAt": null,
"startedAt": null,
"completedAt": "2026-11-17 23:11:03",
"retry": {
"enabled": true,
"intervalSeconds": 2700,
"maxCount": null,
"count": 0,
"suspendedAt": null,
"nextRetryAt": null
}
},
{
"id": 88,
"key": "notify_accounting",
"name": "Comptabilité informée",
"department": "运营部",
"sequence": 1500,
"status": "SKIPPED",
"required": true,
"result": {
"passed": false,
"status": "SKIPPED",
"summary": "Customs clearance cancelled before this node was executed.",
"reason": null,
"cancelled_at": "2026-11-17T22:11:03+01:00"
},
"dueAt": null,
"startedAt": null,
"completedAt": "2026-11-17 23:11:03",
"retry": {
"enabled": false,
"intervalSeconds": null,
"maxCount": null,
"count": 0,
"suspendedAt": null,
"nextRetryAt": null
}
},
{
"id": 89,
"key": "check_invoice_exists",
"name": "Facture confirmée",
"department": "运营部",
"sequence": 1999,
"status": "SKIPPED",
"required": true,
"result": {
"passed": false,
"status": "SKIPPED",
"summary": "Customs clearance cancelled before this node was executed.",
"reason": null,
"cancelled_at": "2026-11-17T22:11:03+01:00"
},
"dueAt": null,
"startedAt": null,
"completedAt": "2026-11-17 23:11:03",
"retry": {
"enabled": true,
"intervalSeconds": 3600,
"maxCount": null,
"count": 0,
"suspendedAt": null,
"nextRetryAt": null
}
},
{
"id": 90,
"key": "air_import_t1_end",
"name": "Clôture import aérien T1",
"department": "空运进口",
"sequence": 2000,
"status": "SKIPPED",
"required": true,
"result": {
"passed": false,
"status": "SKIPPED",
"summary": "Customs clearance cancelled before this node was executed.",
"reason": null,
"cancelled_at": "2026-11-17T22:11:03+01:00"
},
"dueAt": null,
"startedAt": null,
"completedAt": "2026-11-17 23:11:03",
"retry": {
"enabled": false,
"intervalSeconds": null,
"maxCount": null,
"count": 0,
"suspendedAt": null,
"nextRetryAt": null
}
}
]
}
}
}Response fields
| Field | Type | Description |
|---|---|---|
Response.Date | Integer | Unix timestamp of the API response |
Response.Status | String | API call outcome; SUCCEEDED in this example |
Response.Code | Integer | Application result code; 200 in this example |
Message.clearanceNumber | String | Unique clearance application number |
Message.title | String | Request title |
Message.description | String | Request description |
Message.status | String | Current business status (H7 status when nested under h7) |
Message.priority | String | Priority value |
Message.template | Object | Selected clearance template |
Message.template.id | Integer | Returned field; meaning depends on the parent object. |
Message.template.code | String | Template code (when inside a template object) |
Message.template.name | String | Display name |
Message.template.serviceType | String | Template service type identifier |
Message.billOfLadingNo | String | Bill of Lading / Air Waybill number |
Message.customsTicketId | String / Integer / Null | Customs ticket identifier if available |
Message.customsDeclarationId | String / Integer / Null | Declaration identifier if available |
Message.draftId | Integer | Associated draft identifier |
Message.dueAt | String / Integer / Null | Due date, nullable |
Message.createdAt | String | Creation timestamp |
Message.updatedAt | String | Last update timestamp |
Message.nodes | Array | Workflow nodes or node progress information |
Message.nodes[].id | Integer | Returned field; meaning depends on the parent object. |
Message.nodes[].key | String | Workflow node key |
Message.nodes[].name | String | Display name |
Message.nodes[].department | String | Responsible department |
Message.nodes[].sequence | Integer | Node ordering number |
Message.nodes[].status | String | Current business status (H7 status when nested under h7) |
Message.nodes[].required | Boolean | Whether this workflow node is marked required |
Message.nodes[].result | Object | Node execution result |
Message.nodes[].result.passed | Boolean | Whether node execution passed |
Message.nodes[].result.status | String | Current business status (H7 status when nested under h7) |
Message.nodes[].result.summary | String | Human-readable result summary |
Message.nodes[].result.reason | String / Integer / Null | Additional reason, nullable |
Message.nodes[].result.cancelled_at | String | Cancellation timestamp from this scenario |
Message.nodes[].dueAt | String / Integer / Null | Due date, nullable |
Message.nodes[].startedAt | Nullable | Node start time, nullable |
Message.nodes[].completedAt | String | Node completion time, nullable |
Message.nodes[].retry | Object | Node retry settings |
Message.nodes[].retry.enabled | Boolean | Whether retry is enabled |
Message.nodes[].retry.intervalSeconds | Nullable | Retry delay in seconds, nullable |
Message.nodes[].retry.maxCount | Nullable | Retry limit, nullable |
Message.nodes[].retry.count | Integer | Recorded retry count |
Message.nodes[].retry.suspendedAt | String / Integer / Null | Retry suspension timestamp, nullable |
Message.nodes[].retry.nextRetryAt | String / Integer / Null | Next retry timestamp, nullable |
The response includes 18 workflow nodes. The retry object may contain null intervalSeconds/maxCount and node result may contain cancellation-related fields. Timestamp formats are mixed in the supplied response.
Get clearance status
/api/v3/customs/clearances/{id}/statusRetrieve the clearance business status and summarized node progress.
Path parameter
| Parameter | Type | Description |
|---|---|---|
id | String | Clearance application number, e.g. TSK-20261117-000005. |
Response.Status describes the API call. Message.status is the business status; nodes.progressPercent is workflow progress, not proof of customs release.
Success response example
{
"Response": {
"Date": 1794949575,
"Status": "SUCCEEDED",
"Code": 200,
"Message": {
"clearanceNumber": "TSK-20261117-000005",
"status": "NEW",
"customsTicketId": null,
"customsDeclarationId": null,
"nodes": {
"total": 18,
"finished": 0,
"progressPercent": 0,
"byStatus": {
"WAITING": 17,
"READY": 1
}
},
"updatedAt": "2026-11-17 22:09:53"
}
}
}Response fields
| Field | Type | Description |
|---|---|---|
Response.Date | Integer | Unix timestamp of the API response |
Response.Status | String | API call outcome; SUCCEEDED in this example |
Response.Code | Integer | Application result code; 200 in this example |
Message.clearanceNumber | String | Unique clearance application number |
Message.status | String | Current business status (H7 status when nested under h7) |
Message.customsTicketId | String / Integer / Null | Customs ticket identifier if available |
Message.customsDeclarationId | String / Integer / Null | Declaration identifier if available |
Message.nodes | Object | Workflow nodes or node progress information |
Message.nodes.total | Integer | Total number of records or nodes (context-dependent) |
Message.nodes.finished | Integer | Number of terminal/finished workflow nodes |
Message.nodes.progressPercent | Integer | Workflow progress percentage |
Message.nodes.byStatus | Object | Counts grouped by workflow node status |
Message.nodes.byStatus.WAITING | Integer | Number of waiting nodes |
Message.nodes.byStatus.READY | Integer | Number of ready nodes |
Message.updatedAt | String | Last update timestamp |
Submit clearance request
/api/v3/customs/clearances/{task_number}/submitSubmit a created clearance request. In the provided example, the business status becomes IN_PROGRESS.
Path parameter
| Parameter | Type | Description |
|---|---|---|
task_number | String | Clearance application number, e.g. TSK-20261117-000005. |
POST /customs/clearances and POST /customs/clearances/h7 return NEW on creation; the supplied submit example then returns IN_PROGRESS. This is not evidence that the customs declaration has been released.
Success response example
{
"Response": {
"Date": 1794950194,
"Status": "SUCCEEDED",
"Code": 201,
"Message": {
"clearanceNumber": "TSK-20261117-000007",
"status": "IN_PROGRESS"
}
}
}Response fields
| Field | Type | Description |
|---|---|---|
Response.Date | Integer | Unix timestamp of the API response |
Response.Status | String | API call outcome; SUCCEEDED in this example |
Response.Code | Integer | Application result code; 201 in this example |
Message.clearanceNumber | String | Unique clearance application number |
Message.status | String | Current business status (H7 status when nested under h7) |
List clearance documents
/api/v3/customs/clearances/{id}/documentsList attached document metadata and relative download URLs.
Path parameter
| Parameter | Type | Description |
|---|---|---|
id | String | Clearance application number, e.g. TSK-20261117-000005. |
downloadUrl is a relative URL, e.g. /api/v3/customs/clearances/TSK-20261117-000005/documents/15. Combine it with the configured host. HTTP download headers, file encoding and access rules have not yet been confirmed.
Success response example
{
"Response": {
"Date": 1794949753,
"Status": "SUCCEEDED",
"Code": 200,
"Message": {
"clearanceNumber": "TSK-20261117-000005",
"documents": [
{
"id": 15,
"documentType": "packing_list",
"fileName": "packing-list.pdf",
"mimeType": "application/pdf",
"fileSize": 630,
"createdAt": "2026-11-17 22:09:53",
"downloadUrl": "/api/v3/customs/clearances/TSK-20261117-000005/documents/15"
},
{
"id": 14,
"documentType": "commercial_invoice",
"fileName": "invoice.pdf",
"mimeType": "application/pdf",
"fileSize": 630,
"createdAt": "2026-11-17 22:09:53",
"downloadUrl": "/api/v3/customs/clearances/TSK-20261117-000005/documents/14"
},
{
"id": 13,
"documentType": "bill_of_lading",
"fileName": "AWB-784-85524025.pdf",
"mimeType": "application/pdf",
"fileSize": 630,
"createdAt": "2026-11-17 22:09:53",
"downloadUrl": "/api/v3/customs/clearances/TSK-20261117-000005/documents/13"
}
]
}
}
}Response fields
| Field | Type | Description |
|---|---|---|
Response.Date | Integer | Unix timestamp of the API response |
Response.Status | String | API call outcome; SUCCEEDED in this example |
Response.Code | Integer | Application result code; 200 in this example |
Message.clearanceNumber | String | Unique clearance application number |
Message.documents | Array | Associated clearance documents |
Message.documents[].id | Integer | Returned field; meaning depends on the parent object. |
Message.documents[].documentType | String | Document category |
Message.documents[].fileName | String | Filename |
Message.documents[].mimeType | String | MIME type |
Message.documents[].fileSize | Integer | File size value (unit not formally confirmed) |
Message.documents[].createdAt | String | Creation timestamp |
Message.documents[].downloadUrl | String | Relative API download URL |
Get clearance events
/api/v3/customs/clearances/{id}/eventsRetrieve clearance audit events, actors and type-specific event data.
Path parameter
| Parameter | Type | Description |
|---|---|---|
id | String | Clearance application number, e.g. TSK-20261117-000005. |
data properties vary with the type of event. The confirmed examples include CLEARANCE_CREATED and ATTACHMENT_UPLOADED. Actor email is anonymized for public documentation.
Success response example
{
"Response": {
"Date": 1794949796,
"Status": "SUCCEEDED",
"Code": 200,
"Message": {
"clearanceNumber": "TSK-20261117-000005",
"events": [
{
"id": 36,
"nodeId": null,
"type": "CLEARANCE_CREATED",
"actor": {
"id": 243,
"name": "api-user@example.com"
},
"data": {
"source": "API_V3",
"template_code": "TRADE_AIR_IMPORT_T1",
"attachment_count": 3
},
"createdAt": "2026-11-17 22:09:53"
},
{
"id": 35,
"nodeId": null,
"type": "ATTACHMENT_UPLOADED",
"actor": {
"id": 243,
"name": "api-user@example.com"
},
"data": {
"source": "API_V3",
"file_name": "packing-list.pdf",
"attachment_id": 15
},
"createdAt": "2026-11-17 22:09:53"
},
{
"id": 34,
"nodeId": null,
"type": "ATTACHMENT_UPLOADED",
"actor": {
"id": 243,
"name": "api-user@example.com"
},
"data": {
"source": "API_V3",
"file_name": "invoice.pdf",
"attachment_id": 14
},
"createdAt": "2026-11-17 22:09:53"
},
{
"id": 33,
"nodeId": null,
"type": "ATTACHMENT_UPLOADED",
"actor": {
"id": 243,
"name": "api-user@example.com"
},
"data": {
"source": "API_V3",
"file_name": "AWB-784-85524025.pdf",
"attachment_id": 13
},
"createdAt": "2026-11-17 22:09:53"
}
]
}
}
}Response fields
| Field | Type | Description |
|---|---|---|
Response.Date | Integer | Unix timestamp of the API response |
Response.Status | String | API call outcome; SUCCEEDED in this example |
Response.Code | Integer | Application result code; 200 in this example |
Message.clearanceNumber | String | Unique clearance application number |
Message.events | Array | Recorded events |
Message.events[].id | Integer | Returned field; meaning depends on the parent object. |
Message.events[].nodeId | String / Integer / Null | Associated workflow node ID, nullable |
Message.events[].type | String | Event type |
Message.events[].actor | Object | Actor information |
Message.events[].actor.id | Integer | Returned field; meaning depends on the parent object. |
Message.events[].actor.name | String | Display name |
Message.events[].data | Object | Event-specific details or list results |
Message.events[].data.source | String | Origin of event (e.g. API_V3) |
Message.events[].data.template_code | String | Template code |
Message.events[].data.attachment_count | Integer | Attachment count |
Message.events[].createdAt | String | Creation timestamp |
Cancel clearance request
/api/v3/customs/clearances/{id}/cancelCancel a clearance request and retrieve the new status and alreadyCancelled flag.
Path parameter
| Parameter | Type | Description |
|---|---|---|
id | String | Clearance application number, e.g. TSK-20261117-000005. |
The example returns alreadyCancelled=false and status=CANCELLED. Allowed source states and repeated-cancellation behavior are not confirmed.
Success response example
{
"Response": {
"Date": 1794949863,
"Status": "SUCCEEDED",
"Code": 200,
"Message": {
"clearanceNumber": "TSK-20261117-000005",
"status": "CANCELLED",
"alreadyCancelled": false
}
}
}Response fields
| Field | Type | Description |
|---|---|---|
Response.Date | Integer | Unix timestamp of the API response |
Response.Status | String | API call outcome; SUCCEEDED in this example |
Response.Code | Integer | Application result code; 200 in this example |
Message.clearanceNumber | String | Unique clearance application number |
Message.status | String | Current business status (H7 status when nested under h7) |
Message.alreadyCancelled | Boolean | Whether it was already cancelled before this operation |