WebEDI API Documentation
Revision History
| Date | Module | Description | Related Documentation | Notes |
|---|---|---|---|---|
| 2024/07/15 | Despatch Advice | Added Send Despatch Advice API; | Send Despatch Advice API | |
| 2024/07/29 | Despatch Advice | Added Body request parameter fields | Added interface fields See Request Parameters Description. | |
| 2024/09/12 | Despatch Advice | Modified Date format; Added Body request parameter fields | Added interface fields See Request Parameters Description. | |
| 2024/10/17 | Despatch Advice | Added ASN number parameter field | Added interface fields See Request Parameters Description. | |
| 2024/12/20 | API Request Example | Added login authorization interface; 增加接口 API Request Example; | ||
| 2024/12/26 | Order Details | Added order list API; Added order query API | Order List API Order Details API Order Query API | |
| 2025/03/20 | Invoice | Added Send Invoice API; | Send Invoice API | |
| 2025/04/10 | Send Delivery Note | Added Send Delivery Note API; | Send Delivery Note API | |
| 2025/05/27 | Party Address | Added Party Address Information API; | Party Address Information API |
Login Authorization Interface
Login authorization, used to obtain access_token parameter
Request Description
| Request Address | https://xxx.xxx.xxx.xxx:8481/api/auth/token |
|---|---|
| Request Method | POST |
Request Parameters
Body Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| admin | String | Username | Yes | xxx | |
| password | String | Password | Yes | xxx |
Return Parameters
| Parameter Name | Type | Description | Example Value | Description |
|---|---|---|---|---|
| status | Boolean | Return Status | true | true or false |
| message | String | Return Message | Failed to obtain token. | |
| access_token | String | Token | eyJhbGciOi... | |
| expiration | Number | Token Validity Period (Unit: seconds) | 28800 | |
| expired_at | Number | Token Expiration Timestamp | 1704508394000 |
Return Example
- Normal Return Example
{
"access_token": "eyJhbGciOi...",
"success": true,
"expiration": 28800,
"expired_at": 1704508394000
}- Error Return Example
{
"code": 403,
"success": false,
"message": "Failed to obtain token.",
}API Request Example

Order List - Main Order Information Only (Paginated Query)
Request Description
| Request Address | https://xxx.xxx.xxx.xxx:8481/api/order/page |
|---|---|
| Request Method | POST |
Request Parameters
Bearer Auth Authentication Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| access_token | String | Token | Yes | eyJhbGciOi... | Obtained via Login Authorization Interface |
Header Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| Return-Type | String | Interface Return Type | Yes | DocumentData | Fixed value |
Body Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| project_key | String | Project Key | Yes | ChinLink | Project Key assigned by ChinLink |
| pagination | Object | Pagination Parameters | Yes | ||
| pagination.current | Number | Current Page | Yes | 1 | |
| pagination.pageSize | Number | Page Size | Yes | 20 |
Return Parameters
| Parameter Name | Type | Description | Example Value | Description |
|---|---|---|---|---|
| status | Boolean | Return Status | true | true or false |
| message | String | Return Message | xxx | |
| data | Object | Return Data | ||
| data.records | Array | Order Data Collection |
data.records Parameter Description
| Parameter Name | Type | Description | Example Value | Description |
|---|---|---|---|---|
| serial_number | String | Serial Number | 135963345397353472 | Unique order identifier |
| document_number | String | Document Number | 1300001 | Customer sent document number |
| document_type | String | Message Type | 850 | Customer sent Message Type: 850-Purchase Order; 860-Purchase Order Change; 830-Long-term Forecast Order; 862-Short-term Forecast Order; |
| order_number | String | Order Number | 10193220643 |
API Request Example

Order List - Including Order Details (Paginated Query)
Request Description
| Request Address | https://xxx.xxx.xxx.xxx:8481/api/order/pageInfo |
|---|---|
| Request Method | POST |
Request Parameters
Bearer Auth Authentication Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| access_token | String | Token | Yes | eyJhbGciOi... | Obtained via Login Authorization Interface |
Header Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| Return-Type | String | Interface Return Type | Yes | DocumentData | Fixed value |
Body Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| project_key | String | Project Key | Yes | ChinLink | Project Key assigned by ChinLink |
| date | String | Query Date | No | 2025-11-06 | Query by order receive date, Date format: yyyy-MM-DD, Default: Current Date |
| document_type | String | Message Type | No | DELFOR | Query by Message Type, default empty (query all types) |
| current | Number | Current Page | No | 1 | Default value: 1 |
| page_size | Number | Page Size | No | 100 | Default value: 100 |
Return Parameters
| Parameter Name | Type | Description | Example Value | Description |
|---|---|---|---|---|
| status | Boolean | Return Status | true | true or false |
| message | String | Return Message | xxx | |
| data | Object | Return Data | ||
| data.records | Array | Order Data Collection | ||
| data.total | Number | Total | ||
| data.size | Number | Page Size | ||
| data.current | Number | Current Page |
data.records Parameter Description
| Parameter Name | Type | Description | Example Value | Description |
|---|---|---|---|---|
| Serial_Number | String | Serial Number | 135963345397353472 | Unique order identifier |
| Document_Number | String | Document Number | 1300001 | Customer sent document number |
| Document_Type | String | Message Type | 850 | Customer sent Message Type: 850-Purchase Order; 860-Purchase Order Change; 830-Long-term Forecast Order; 862-Short-term Forecast Order; |
| ... | String | Other parameters are business parameters, related to actual business |
API Request Example

Order Details (Query by Serial Number)
Request Description
| Request Address | https://xxx.xxx.xxx.xxx:8481/api/order/info/{serial_number} |
|---|---|
| Request Method | GET |
Request Parameters
Bearer Auth Authentication Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| access_token | String | Token | Yes | eyJhbGciOi... | Obtained via Login Authorization Interface |
Header Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| Return-Type | String | Interface Return Type | Yes | DocumentData | Fixed value |
Path Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| serial_number | String | Serial Number | Yes | 135963345397353472 | Unique order identifier |
Return Parameters
| Parameter Name | Type | Description | Example Value | Description |
|---|---|---|---|---|
| status | Boolean | Return Status | true | true or false |
| message | String | Return Message | xxx | |
| data | Object | Return Data | ||
| data.document_data | Array | Document/Order Data Content |
data.document_data Parameter Description
| Parameter Name | Type | Description | Example Value | Description |
|---|---|---|---|---|
| Sender_Id | String(36) | Sender ID Identifier | 958755 | |
| Sender_Internal_Id | String(36) | Sender Internal ID Identifier | LM485 | Not required, can be empty |
| Document_Type | String(36) | Message Type | 850 | Customer sent Message Type: 850/ORDERS-Purchase Order; 860/ORDCHG-Purchase Order Change; 830/DELFOR-Long-term Forecast Order; 862/DELJIT-Short-term Forecast Order; |
| Document_Number | String(36) | Document Number | 1300001 | Customer sent document number |
| Document_Datetime | String(36) | Message Date/Time | 20240509 | Customer sent Message Date Format: CCYYMMDD or CCYYMMDDHHmm |
| Purchase_Order_Number | String(36) | Purchase Order Number | 10193220643 | |
| Purchase_Order_Date | String(36) | Purchase Order Date | 20240509 | Purchase Order Date Format: CCYYMMDD |
| Buyer_Id | String(36) | Buyer/Purchaser Code | ||
| Buyer_Agency_Code | String(10) | Buyer/Purchaser CodeType | ||
| Buyer_Name | String(70) | Buyer/Purchaser Name | ||
| Buyer_Address | String(36) | Buyer/Purchaser Address | ||
| Buyer_Address_Info | String(36) | Buyer/Purchaser Detailed Address | ||
| Buyer_Street | String(256) | Buyer/Purchaser Street | ||
| Buyer_City | String(36) | Buyer/Purchaser City | ||
| Buyer_State_Province | String(36) | Buyer/Purchaser State/Province Code | ||
| Buyer_Postcode | String(18) | Buyer/Purchaser Postal Code | ||
| Buyer_Country | String(10) | Buyer/Purchaser Country/Region Code | ||
| Seller_xxx | String | Seller/Vendor Information | Refer to Buyer parameters | |
| Ship_From_xxx | String | Ship From Information | Refer to Buyer parameters | |
| Ship_To_xxx | String | Ship To Information | Refer to Buyer parameters | |
| Bill_To_xxx | String | Bill To Information | Refer to Buyer parameters | |
| Sold_To_xxx | String | Sold To Information | Refer to Buyer parameters | |
| Currency_Code | String(10) | Currency Code | USD | Required for Invoice 810 |
| Detail_Items. Detail_Item_Loop | Array | Material Data Collection |
Detail_Items.Detail_Item_Loop Parameter Description
| Parameter Name | Type | Description | Example Value | Description |
|---|---|---|---|---|
| Line_Item_Number | String(6) | Line Item Number | 00010 | |
| Buyer_Item_Number | String(36) | Buyer/Purchaser Item Number | PA123456 | |
| Purchase_Order_Number | String(70) | Purchase Order号 | 991935452615 | |
| Purchase_Order_Line _Number | String(6) | Order Line Number | 00010 | |
| Unit_Price | String(18) | Unit Price | 163.12 | Required for Invoice 810 |
| Unit_Price_Basis_Code | String(3) | Unit Price Basis Code | PN | (PE) Price per Each (PN) Price per Ten (HP) Price per Hundred (TP) Price per Thousand |
| Place_Of_Delivery | String(256) | Place of Delivery | ED05 | Required for Despatch Advice DESADV |
| Place_Port_Discharge | String(256) | Place/Port of Discharge Code | WEDJ | Required for Despatch Advice DESADV |
| Additional_Internal _Destination | String(256) | Additional Internal Destination Code | 3256 | Required for Despatch Advice DESADV |
| Item_Description | String(256) | Description Information | ||
| Delivery_Schedule_Number | String(70) | Delivery Schedule Number | 392 | |
| Delivery_Schedule_Date | String(36) | Delivery Schedule Date | Format: CCYYMMDD or CCYYMMDDHHmm | |
| Plan_Items. Plan_Item_Loop | Array | 预测/Order Data Collection |
Plan_Items.Plan_Item_Loop Parameter Description
| Parameter Name | Type | Description | Example Value | Description |
|---|---|---|---|---|
| Delivery_Plan_Status | String(10) | Delivery Plan Status Code | 4 | 1-Firm 4-Planning/forecast |
| Delivery_Plan_Status_View | String(256) | Delivery Plan Status Description | Planning/forecast | 1-Firm 4-Planning/forecast |
| Discrete_Quantity | String(36) | Delivery Quantity | 162 | Forecast/Order Quantity |
| Discrete_Unit | String(8) | Quantity Unit | EA | |
| Outstanding_Quantity | String(36) | Outstanding Quantity | 0 | Outstanding Quantity (Backorder) |
| Quantity_To_Be_Delivered | String(36) | Pending Delivery Quantity | 0 | Pending Delivery Quantity |
| Request_Delivery_Date | String(36) | Buyer Requested Delivery Date | 20250529 | Format: CCYYMMDD or CCYYMMDDHHmm |
Response Example
{
"data": {
"document_number": "20250426150038",
"document_data": {
"Sender_Id": "000987654321",
"Sender_Type": "ZZZ",
"Sender_Internal_Id": "",
"Receiver_Id": "O01234567890",
"Receiver_Type": "ZZZ",
"Receiver_Internal_Id": "",
"Number": "27041508",
"Test_Indicator": "",
"Serial_Number": "1365985846678032384",
"Document_Type": "DELFOR",
"Document_Number": "20250426150038",
"Document_Datetime": "202504270257",
"Document_Date_Format": "203",
"Expiry_Date": "20251217",
"Validity_Start_Date": "202504270257",
"Effective_From_Date": "202504270257",
"Effective_To_Date": "20251217",
"Delivery_Schedule_Number": "20250426150038",
"Buyer_Id": "PO001",
"Buyer_Agency_Code": "92",
"Buyer_Name": "",
"Buyer_Address": "",
"Buyer_Address_Info": "",
"Buyer_Street": "",
"Buyer_City": "",
"Buyer_State_Province": "",
"Buyer_Postcode": "",
"Buyer_Country": "",
"Seller_Id": "QA002",
"Seller_Agency_Code": "92",
"Seller_Address": "",
"Seller_Address_Info": "",
"Seller_Name": "",
"Seller_Street": "",
"Seller_City": "",
"Seller_State_Province": "",
"Seller_Postcode": "",
"Seller_Country": "",
"Ship_From_Id": "",
"Ship_From_Agency_Code": "",
"Ship_From_Address": "",
"Ship_From_Address_Info": "",
"Ship_From_Name": "",
"Ship_From_Street": "",
"Ship_From_City": "",
"Ship_From_State_Province": "",
"Ship_From_Postcode": "",
"Ship_From_Country": "",
"Ship_To_Id": "",
"Ship_To_Agency_Code": "",
"Ship_To_Address": "",
"Ship_To_Address_Info": "",
"Ship_To_Name": "",
"Ship_To_Street": "",
"Ship_To_City": "",
"Ship_To_State_Province": "",
"Ship_To_Postcode": "",
"Ship_To_Country": "",
"Detail_Items": {
"Detail_Item_Loop": [
{
"Line_Item_Number": "",
"Buyer_Item_Number": "8579552554",
"Purchase_Order_Number": "9958745411225",
"Purchase_Order_Line_Number": "",
"Calculation_Date": "202504270257",
"Place_Port_Discharge": "WEDJ",
"Additional_Internal_Destination": "3256",
"Plan_Items": {
"Plan_Item_Loop": [
{
"Delivery_Plan_Status": "4",
"Delivery_Plan_Status_View": "Planning/forecast",
"Discrete_Quantity": "28",
"Discrete_Unit": "EA",
"Quantity_To_Be_Delivered": "28",
"Request_Delivery_Date": "202505161200"
},
{
"Delivery_Plan_Status": "4",
"Delivery_Plan_Status_View": "Planning/forecast",
"Discrete_Quantity": "50",
"Discrete_Unit": "EA",
"Request_Delivery_Date": "202505181200"
},
{
"Delivery_Plan_Status": "4",
"Delivery_Plan_Status_View": "Planning/forecast",
"Discrete_Quantity": "200",
"Discrete_Unit": "EA",
"Quantity_To_Be_Delivered": "200",
"Request_Delivery_Date": "202512171200"
}
]
}
},
{
"Line_Item_Number": "",
"Buyer_Item_Number": "8579552998",
"Purchase_Order_Number": "9958745411225",
"Purchase_Order_Line_Number": "",
"Calculation_Date": "202504270257",
"Place_Port_Discharge": "TUYS",
"Additional_Internal_Destination": "TUYS",
"Plan_Items": {
"Plan_Item_Loop": [
{
"Delivery_Plan_Status": "4",
"Delivery_Plan_Status_View": "Planning/forecast",
"Discrete_Quantity": "162",
"Discrete_Unit": "EA",
"Quantity_To_Be_Delivered": "162",
"Request_Delivery_Date": "202512151200"
},
{
"Delivery_Plan_Status": "4",
"Delivery_Plan_Status_View": "Planning/forecast",
"Discrete_Quantity": "162",
"Discrete_Unit": "EA",
"Quantity_To_Be_Delivered": "162",
"Request_Delivery_Date": "202512161200"
},
{
"Delivery_Plan_Status": "4",
"Delivery_Plan_Status_View": "Planning/forecast",
"Discrete_Quantity": "162",
"Discrete_Unit": "EA",
"Quantity_To_Be_Delivered": "162",
"Request_Delivery_Date": "202512171200"
}
]
}
}
]
}
}
},
"code": 0,
"message": null,
"success": true
}API Request Example

Order Query (Query by Order Number)
Request Description
| Request Address | https://xxx.xxx.xxx.xxx:8481/api/order/info/order/{order_number}?project_key={project_key} |
|---|---|
| Request Method | GET |
Request Parameters
Bearer Auth Authentication Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| access_token | String | Token | Yes | eyJhbGciOi... | Obtained via Login Authorization Interface |
Header Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| Return-Type | String | Interface Return Type | Yes | DocumentData | Fixed value |
Path Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| order_number | String | Order Number | Yes | 10193220643 | If there are duplicate orders, get the most recent order by default |
Request Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| project_key | String | Project Key | Yes | ChinLink | Project Key assigned by ChinLink |
Return Parameters
Refer to Order Details (Query by Serial Number)
API Request Example

Create Despatch Advice
💡
Through the API interface, submit offline shipping information to the EDI system, which generates 856 or DESADV messages and sends them to customers.
Request Description
| Request Address | https://xxx.xxx.xxx.xxx:8481/api/delivery/saveData |
|---|---|
| Request Method | POST |
Request Parameters
Body Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| project_key | String | Project Key | Yes | ChinLink | Project Key assigned by ChinLink |
| action_type | String | Send Message Type Identifier | Yes | delivery | Fixed value |
| content | Json | Send Message Content | Yes |
content Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| despatch_datetime | String | Despatch Date/Time | Yes | 20240627 | Format: CCYYMMDD |
| delivery_datetime | String | Delivery Date/Time | No | 20240715 | Format: CCYYMMDD |
| estimated_arrival_date | String | Estimated Arrival Date/Time | Yes | 20240715 | Format: CCYYMMDD |
| bill_of_lading | String | Bill of Lading Number | Yes | PL123456987 | |
| packing_list_number | String | Packing List Number | Yes | PL2404120011 | |
| carrier_gross_weight | Number | Shipment Gross Weight (Unit: KG) | Yes | 520.00 | Total gross weight of all goods in ASN (accurate to two decimal places) |
| carrier_net_weight | Number | Shipment Net Weight (Unit: KG) | No | 480.00 | Total net weight of all goods in ASN (accurate to two decimal places) |
| weight_unit | String | Weight Unit | Yes | KG | |
| quantity_of_pack | String | Quantity of Packages | Yes | 33 | |
| package_type | String | Package Type | Yes | PCK90 | |
| carrier_bill_number | String | Carrier Number | No | CN00001 | |
| carrier_scac | String | Carrier SCAC Code | No | UPSN | Generally consists of four letters |
| transport_mode | String | Transport Mode | No | A | (A) Air (AE) Air Express (LT) Less than trailer load (M) Motor (Full truck) (R) Rail (SE) Sea |
| equipment_unit | String | 运输设备代码 (Equipment Description Code) | No | TL | (CN) Container (RR) Railcar (TE) Trailer (TL) Trailer (not otherwise specified) |
| equipment_initial | String | Equipment Initial/Prefix | Yes | UPSN | |
| equipment_number | String | Equipment Number (Truck/Container No.) | Yes | 200003211 | Customoer transport equipment number |
| ship_from_party_id | String | Ship From ID | Yes | According to agency_code parameter, generally 92, provided by customer (buyer) | |
| ship_from_party_name | String | Ship From Name | Yes | ||
| ship_from_agency_code | String | Ship From Agency Code Type | Yes | 91 | (91) Assigned by seller or seller's agent (92) Assigned by buyer or buyer's agent |
| ship_from_address | String | Address | Yes | ||
| ship_from_address_info | String | Detailed Address | No | ||
| ship_from_city_name | String | City | No | ||
| ship_from_state_province_code | String | State/Province Code | No | ||
| ship_from_postal_code | String | Postal Code | No | ||
| ship_from_country_code | String | Country/Region Code | No | ||
| ship_to_party_id | String | Ship To ID | Yes | According to agency_code parameter, generally 92, provided by customer (buyer) | |
| ship_to_party_name | String | Ship To Name | Yes | ||
| ship_to_agency_code | String | Ship To Agency Code Type | Yes | 92 | (91) Assigned by seller or seller's agent (92) Assigned by buyer or buyer's agent |
| ship_to_address | String | Address | Yes | ||
| ship_to_address_info | String | Detailed Address | No | ||
| ship_to_city_name | String | City | No | ||
| ship_to_state_province_code | String | State/Province Code | No | ||
| ship_to_postal_code | String | Postal Code | No | ||
| ship_to_country_code | String | Country/Region Code | No | ||
| no_packages.no_packages_loop | Array | Product Details |
no_packages_loop Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| no_package_type | String | Package Type | Yes | PCK90 | |
| no_package_type_agency_code | String | Package Type Code | Yes | 92 | (91) Assigned by seller or seller's agent (92) Assigned by buyer or buyer's agent |
| quantity_of_pack | String | Quantity of Packages | Yes | 33 | |
| package_gross_weight | String | Package Net Weight | Yes | 15 | |
| package_net_weight | String | Package Gross Weight | No | 13 | |
| weight_unit | String | Weight Unit | Yes | KG | |
| purchase_order_number | String | Purchase Order Number | Yes | 5526931007 | |
| purchase_order_date | String | Order Date | Yes | 20240706 | Format: CCYYMMDD |
| line_items.line_item_loop | Array | Material Details | Yes |
line_item_loop Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| buyer_item_number | String | Buyer/Purchaser Item Number | Yes | 89519892 | |
| seller_catalog_number | String | Seller Catalog Number | Yes | PK10001 | |
| quantity | Number | Despatch Quantity | Yes | 8808 | Quantity of materials in package (integer) |
| quantity_unit | String | Quantity Unit | Yes | EA | |
| order_line_number | String | Order Line Number | Yes | 00010 | Item line number from Purchase Order |
| country_origin | String | Country of Origin | Yes | CN |
Return Parameters
| Parameter Name | Type | Description | Example Value | Description |
|---|---|---|---|---|
| status | Boolean | Return Status | true | true or false |
| message | String | Return Message | xxx | |
| data | Object | Return Data | ||
| data.serial_number | String | Delivery Note Serial Number | 1360053108683337728 |
Examples
Request Example
This is a request example under general configuration. Optional fields can be set to empty strings.
{
"project_key": "ChinLink",
"action_type": "delivery",
"content": {
"despatch_datetime": "20250218",
"delivery_datetime": "",
"estimated_arrival_date": "20250228",
"bill_of_lading": "PL00001",
"carrier_gross_weight": "407.2",
"weight_unit": "KG",
"package_type": "PCK90",
"quantity_of_pack": "33",
"quantity_unit": "EA",
"carrier_bill_number": "CN00001",
"transport_mode": "A",
"carrier_scac": "UPSN",
"no_packages": {
"no_package_loop": [
{
"no_package_type": "PCK90",
"no_package_type_agency_code": "92",
"quantity_of_pack": "12",
"package_gross_weight": "15",
"weight_unit": "KG",
"purchase_order_number": "5526931007",
"purchase_order_date": "20240706",
"line_items": {
"line_item_loop": [
{
"buyer_item_number": "89519892",
"seller_catalog_number": "PK10001",
"quantity": "8808",
"quantity_unit": "EA",
"order_line_number": "00010",
"country_origin": "CN"
}
]
}
},
{
"no_package_type": "PCK90",
"no_package_type_agency_code": "92",
"quantity_of_pack": "11",
"package_gross_weight": "15",
"weight_unit": "KG",
"purchase_order_number": "5526931008",
"purchase_order_date": "20240706",
"line_items": {
"line_item_loop": [
{
"buyer_item_number": "89519893",
"seller_catalog_number": "PK10002",
"quantity": "8720",
"quantity_unit": "EA",
"order_line_number": "00010",
"country_origin": "CN"
}
]
}
}
]
},
"ship_from_party_id": "1001",
"ship_from_agency_code": "91",
"ship_from_address": "Fenghui South Road, High tech Zone",
"ship_from_address_info": "1107B, Building B, Huajing Plaza, No. 20",
"ship_from_party_name": "Xi'an ChinLink Technology Co., Ltd.",
"ship_from_city_name": "Xi'an",
"ship_from_street": "",
"ship_from_state_province_code": "XA",
"ship_from_postal_code": "710075",
"ship_from_country_code": "CN",
"ship_to_party_id": "1101",
"ship_to_agency_code": "92",
"ship_to_address": "Ship To Address",
"ship_to_address_info": "Ship To Address Info",
"ship_to_party_name": "Ship To Name",
"ship_to_city_name": "Ship To City",
"ship_to_street": "",
"ship_to_state_province_code": "",
"ship_to_postal_code": "111000",
"ship_to_country_code": "US"
}
}Return Example
- Normal Return Example
{
"success": true,
"message": "",
"data": {
"serial_number": "1360053108683337728",
}
}- Error Return Example
{
"status": false,
"message": " Failed message."
}API Request Example

Create Invoice
💡
Through API interface, submit offline Invoice info via API to EDI system, generating 810 or INVOIC messages and sending to customers.
Request Description
| Request Address | https://xxx.xxx.xxx.xxx:8481/api/delivery/saveData |
|---|---|
| Request Method | POST |
Request Parameters
Body Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| project_key | String | Project Key | Yes | ChinLink | Project Key assigned by ChinLink |
| action_type | String | Send Message Type Identifier | Yes | invoice | Fixed value |
| content | Json | Send Message Content | Yes |
content Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| purchase_order_number | String | Purchase Order Number | Yes | 10193220643 | |
| purchase_order_date | String | Order Date | Yes | 20240627 | Format: CCYYMMDD |
| invoice_number | String | Invoice Number | Yes | 20240715120603 | |
| total_invoice_amount | Number | Total Invoice Amount | Yes | 547.04 | |
| currency_code | String | Currency Code | Yes | USD | |
| trade_tax_type_code | String | Trade Tax Type Code | No | LS | (LS) State and Local Sales Tax |
| trade_tax_amount | String | Tax Amount | No | ||
| ship_to_party_id | String | Ship To ID | Yes | ||
| ship_to_party_name | String | Ship To Name | Yes | ||
| ship_to_agency_code | String | Ship To Agency Code Type | Yes | 92 | (91) Assigned by seller or seller's agent (92) Assigned by buyer or buyer's agent |
| ship_to_address | String | Address | Yes | ||
| ship_to_address_info | String | Detailed Address | No | ||
| ship_to_city_name | String | City | No | ||
| ship_to_state_province_code | String | State/Province Code | No | ||
| ship_to_postal_code | String | Postal Code | No | ||
| ship_to_country_code | String | Country/Region Code | No | ||
| bill_to_party_id | String | Bill To ID | Yes | ||
| bill_to_party_name | String | Bill To Name | Yes | ||
| bill_to_agency_code | String | Bill To Agency Code Type | Yes | 92 | (91) Assigned by seller or seller's agent (92) Assigned by buyer or buyer's agent |
| bill_to_address | String | Address | Yes | ||
| bill_to_address_info | String | Detailed Address | No | ||
| bill_to_city_name | String | City | No | ||
| bill_to_state_province_code | String | State/Province Code | No | ||
| bill_to_postal_code | String | Postal Code | No | ||
| bill_to_country_code | String | Country/Region Code | No | ||
| invoice_issuer_party_id | String | Invoice Issuer ID | Yes | ||
| invoice_issuer_party_name | String | Invoice Issuer Name | Yes | ||
| invoice_issuer_agency_code | String | Invoice Issuer Agency Code Type | Yes | 91 | (91) Assigned by seller or seller's agent (92) Assigned by buyer or buyer's agent |
| invoice_issuer_address | String | Address | Yes | ||
| invoice_issuer_address_info | String | Detailed Address | No | ||
| invoice_issuer_city_name | String | City | No | ||
| invoice_issuer_state_province_code | String | State/Province Code | No | ||
| invoice_issuer_postal_code | String | Postal Code | No | ||
| invoice_issuer_country_code | String | Country/Region Code | No | ||
| invoice_items.invoice_item_loop | Array | Yes | |||
| spac_items.spac_item_loop | Array | No |
invoice_items.invoice_item_loop Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| line_item_number | String | Line Item Number | Yes | 00010 | Item line number from Purchase Order |
| buyer_part_number | String | Buyer/Purchaser Item Number | Yes | 5800000001 | |
| quantity_invoiced | String | Quantity Invoiced | Yes | 32 | |
| quantity_unit | String | Quantity Unit | Yes | EA | |
| unit_price | String | Unit Price | Yes | 16.47 | |
| unit_price_basis_code | String | Unit Price Basis Code | Yes | PE | (PE) Price per Each (PN) Price per Ten (HP) Price per Hundred (TP) Price per Thousand |
| invoice_item_amount | String | Invoice Item Amount | Yes | 527.04 |
spac_items.spac_item_loop Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| allowance_charge_indicator | String | Allowance or Charge Type | Yes | C | (A) Allowance (C) Charge (N) No Allowance or Charge (P) Promotion (Q) Charge Request (R) Allowance Request (S) Service |
| service_charge_type | String | Charge Type (Service, Promotion, Allowance or Charge) | Yes | D500 | (C310) Discount (D240) Freight (D500) Handling |
| service_charge_amount | String | Service Charge Amount | Yes | 20 |
Return Parameters
| Parameter Name | Type | Description | Example Value | Description |
|---|---|---|---|---|
| status | Boolean | Return Status | true | true or false |
| message | String | Return Message | xxx | |
| data | Object | Return Data | ||
| data.serial_number | String | Delivery Note Serial Number | 1360053108683337728 |
Examples
Request Example
This is a request example under general configuration. Optional fields can be set to empty strings.
{
"project_key": "ChinLink",
"action_type": "invoice",
"content": {
"purchase_order_number": "10193220643",
"purchase_order_date": "20240627",
"invoice_number": "20240715120603",
"total_invoice_amount": "520.04",
"currency_code": "USD",
"invoice_items": {
"invoice_item_loop": [
{
"line_item_number": "00010",
"buyer_part_number": "5800000001",
"quantity_invoiced": "32",
"quantity_unit": "EA",
"unit_price": "16.47",
"unit_price_basis_code": "PE",
"invoice_item_amount": "527.04"
}
]
},
"spac_items": {
"spac_item_loop": [
{
"allowance_charge_indicator": "C",
"service_charge_type": "D500",
"service_charge_amount": "20"
}
]
},
"ship_to_party_id": "1101",
"ship_to_agency_code": "92",
"ship_to_address": "Ship To Address",
"ship_to_address_info": "Ship To Address Info",
"ship_to_party_name": "Ship To Name",
"ship_to_city_name": "Ship To City",
"ship_to_street": "",
"ship_to_state_province_code": "",
"ship_to_postal_code": "111000",
"ship_to_country_code": "US",
"bill_to_party_id": "1102",
"bill_to_agency_code": "92",
"bill_to_address": "Bill To Address",
"bill_to_address_info": "Bill To Address Info",
"bill_to_party_name": "Bill To Name",
"bill_to_city_name": "Bill To City",
"bill_to_street": "",
"bill_to_state_province_code": "NL",
"bill_to_postal_code": "111222",
"bill_to_country_code": "MX",
"invoice_issuer_party_id": "1001",
"invoice_issuer_agency_code": "91",
"invoice_issuer_address": "Fenghui South Road, High tech Zone",
"invoice_issuer_address_info": "1107B, Building B, Huajing Plaza, No. 20",
"invoice_issuer_party_name": "Xi'an ChinLink Technology Co., Ltd.",
"invoice_issuer_city_name": "Xi'an",
"invoice_issuer_street": "",
"invoice_issuer_state_province_code": "XA",
"invoice_issuer_postal_code": "710075",
"invoice_issuer_country_code": "CN"
}
}Return Example
- Normal Return Example
{
"success": true,
"message": "",
"data": {
"serial_number": "1360053108683337728",
}
}- Error Return Example
{
"status": false,
"message": " Failed message."
}API Request Example

Send Delivery Note (Despatch Advice/Invoice)
💡
Submit created Despatch Advice or Invoice via API to EDI system for transmission.
Message transmission is processed asynchronously.
Request Description
| Request Address | https://xxx.xxx.xxx.xxx:8481/api/file/action/delivery |
|---|---|
| Request Method | POST |
Request Parameters
Bearer Auth Authentication Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| access_token | String | Token | Yes | eyJhbGciOi... | Obtained via Login Authorization Interface |
Body Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| project_key | String | Project Key | Yes | ChinLink | Project Key assigned by ChinLink |
| action_type | String | Send Message Type | Yes | send-inv | send-inv: Send Invoice send-asn: Send Despatch Advice |
| serial_number | String | Delivery Note Serial Number | Yes | 1355079589866352640 | Delivery Note Serial Number returned when creating Despatch Advice or Invoice |
Return Parameters
| Parameter Name | Type | Description | Example Value | Description |
|---|---|---|---|---|
| status | Boolean | Return Status | true | true or false |
| message | String | Return Message | xxx |
Return Example
- Normal Return Example
{
"data": true,
"code": 0,
"message": null,
"success": true
}- Error Return Example
{
"data": null,
"code": 500,
"message": "Please configure the root directory of the project.",
"success": false
}Party Address Information List
Request Description
| Request Address | https://xxx.xxx.xxx.xxx:8481/api/location/list |
|---|---|
| Request Method | GET |
Request Parameters
Bearer Auth Authentication Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| access_token | String | Token | Yes | eyJhbGciOi... | Obtained via Login Authorization Interface |
Header Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| Return-Type | String | Interface Return Type | Yes | DocumentData | Fixed value |
Return Parameters
| Parameter Name | Type | Description | Example Value | Description |
|---|---|---|---|---|
| status | Boolean | Return Status | true | true or false |
| message | String | Return Message | xxx | |
| data | Array | Returned Address Information Collection |
data Parameter Description
| Parameter Name | Type | Description | Example Value | Description |
|---|---|---|---|---|
| location_id | String | Address Information ID | 24 | Unique Address Information Identifier |
| party_id | String | Party ID Identifier | 1001 | |
| party_name | String | Party Name | Xi'an ChinLink Technology Co., Ltd. | |
| agency_code | String | Agency Code (Identifies Party Information Source) | 92 | (1) D-U-N-S Number, Dun & Bradstreet (9) D-U-N-S+4, D-U-N-S Number with Four Character Suffix (10) ODETTE (14) UCC/EAN Location Code Prefix (16) DUNS (91) Assigned by seller or seller's agent (92) Assigned by buyer or buyer's agent (ZZ) Mutually Defined |
| address | String | Address Information | Fenghui South Road, High tech Zone | Max 35 characters |
| address_info | String | Address Information Details | 1107B, Building B, | Max 35 characters |
| street | String | Street Information | Huajing Plaza, No. 20 | |
| city_name | String | City Name | Xi'an | |
| state_province_code | String | State/Province Code | XA | |
| postal_code | String | Postal Code | 710065 | |
| country_code | String | Country/Region Code | CN | E.g., CN, US, HK |
API Request Example

Party Address Information (Query by ID)
Request Description
| Request Address | https://xxx.xxx.xxx.xxx:8481/api/location/info/{location_id} |
|---|---|
| Request Method | GET |
Request Parameters
Bearer Auth Authentication Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| access_token | String | Token | Yes | eyJhbGciOi... | Obtained via Login Authorization Interface |
Header Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| Return-Type | String | Interface Return Type | Yes | DocumentData | Fixed value |
Path Parameters
| Parameter Name | Description | Description | Required | Example Value | Description |
|---|---|---|---|---|---|
| location_id | String | Address Information ID | Yes | 44 | Unique Address Information Identifier |
Return Parameters
| Parameter Name | Type | Description | Example Value | Description |
|---|---|---|---|---|
| status | Boolean | Return Status | true | true or false |
| message | String | Return Message | xxx | |
| data | Object | Return Data |
data Parameter Description
Refer to data Parameter Description in Party Address Information List API documentation.
Return Example
{
"data": {
"location_id": 24,
"name": "ChinLink",
"party_id": "1001",
"party_name": "Xi'an ChinLink Technology Co., Ltd.",
"agency_code": "92",
"address": "Fenghui South Road, High tech Zone",
"address_info": "1107B, Building B",
"street": "Huajing Plaza, No. 20",
"city_name": "Xi'an",
"state_province_code": "XA",
"postal_code": "710065",
"country_code": "CN"
},
"code": 0,
"success": true
}API Request Example

Other Parameters Configuration Description
Bearer Auth Configuration

Header Parameters Configuration

WARNING
Note: All above data are test data.
