Skip to content

WebEDI API Documentation

Revision History

DateModuleDescriptionRelated DocumentationNotes
2024/07/15Despatch AdviceAdded Send Despatch Advice API;Send Despatch Advice API
2024/07/29Despatch AdviceAdded Body request parameter fieldsAdded interface fields
See Request Parameters Description.
2024/09/12Despatch AdviceModified Date format;
Added Body request parameter fields
Added interface fields
See Request Parameters Description.
2024/10/17Despatch AdviceAdded ASN number parameter fieldAdded interface fields
See Request Parameters Description.
2024/12/20API Request ExampleAdded login authorization interface;
增加接口 API Request Example;
2024/12/26Order DetailsAdded order list API;
Added order query API
Order List API
Order Details API
Order Query API
2025/03/20InvoiceAdded Send Invoice API;Send Invoice API
2025/04/10Send Delivery NoteAdded Send Delivery Note API;Send Delivery Note API
2025/05/27Party AddressAdded Party Address Information API;Party Address Information API

Login Authorization Interface

Login authorization, used to obtain access_token parameter

Request Description

Request Addresshttps://xxx.xxx.xxx.xxx:8481/api/auth/token
Request MethodPOST

Request Parameters

Body Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
adminStringUsernameYesxxx
passwordStringPasswordYesxxx

Return Parameters

Parameter NameTypeDescriptionExample ValueDescription
statusBooleanReturn Statustruetrue or false
messageStringReturn MessageFailed to obtain token.
access_tokenStringTokeneyJhbGciOi...
expirationNumberToken Validity Period (Unit: seconds)28800
expired_atNumberToken Expiration Timestamp1704508394000

Return Example

  • Normal Return Example
json5
{
    "access_token": "eyJhbGciOi...",
    "success": true,
    "expiration": 28800,
    "expired_at": 1704508394000
}
  • Error Return Example
json5
{
    "code": 403,
    "success": false,
    "message": "Failed to obtain token.",
}

API Request Example

Order List - Main Order Information Only (Paginated Query)

Request Description

Request Addresshttps://xxx.xxx.xxx.xxx:8481/api/order/page
Request MethodPOST

Request Parameters

Bearer Auth Authentication Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
access_tokenStringTokenYeseyJhbGciOi...Obtained via Login Authorization Interface

Header Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
Return-TypeStringInterface Return TypeYesDocumentDataFixed value

Body Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
project_keyStringProject KeyYesChinLinkProject Key assigned by ChinLink
paginationObjectPagination ParametersYes
pagination.currentNumberCurrent PageYes1
pagination.pageSizeNumberPage SizeYes20

Return Parameters

Parameter NameTypeDescriptionExample ValueDescription
statusBooleanReturn Statustruetrue or false
messageStringReturn Messagexxx
dataObjectReturn Data
data.recordsArrayOrder Data Collection

data.records Parameter Description

Parameter NameTypeDescriptionExample ValueDescription
serial_numberStringSerial Number135963345397353472Unique order identifier
document_numberStringDocument Number1300001Customer sent document number
document_typeStringMessage Type850Customer sent Message Type:
850-Purchase Order;
860-Purchase Order Change;
830-Long-term Forecast Order;
862-Short-term Forecast Order;
order_numberStringOrder Number10193220643

API Request Example

Order List - Including Order Details (Paginated Query)

Request Description

Request Addresshttps://xxx.xxx.xxx.xxx:8481/api/order/pageInfo
Request MethodPOST

Request Parameters

Bearer Auth Authentication Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
access_tokenStringTokenYeseyJhbGciOi...Obtained via Login Authorization Interface

Header Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
Return-TypeStringInterface Return TypeYesDocumentDataFixed value

Body Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
project_keyStringProject KeyYesChinLinkProject Key assigned by ChinLink
dateStringQuery DateNo2025-11-06Query by order receive date, Date format: yyyy-MM-DD, Default: Current Date
document_typeStringMessage TypeNoDELFORQuery by Message Type, default empty (query all types)
currentNumberCurrent PageNo1Default value: 1
page_sizeNumberPage SizeNo100Default value: 100

Return Parameters

Parameter NameTypeDescriptionExample ValueDescription
statusBooleanReturn Statustruetrue or false
messageStringReturn Messagexxx
dataObjectReturn Data
data.recordsArrayOrder Data Collection
data.totalNumberTotal
data.sizeNumberPage Size
data.currentNumberCurrent Page

data.records Parameter Description

Parameter NameTypeDescriptionExample ValueDescription
Serial_NumberStringSerial Number135963345397353472Unique order identifier
Document_NumberStringDocument Number1300001Customer sent document number
Document_TypeStringMessage Type850Customer sent Message Type:
850-Purchase Order;
860-Purchase Order Change;
830-Long-term Forecast Order;
862-Short-term Forecast Order;
...StringOther parameters are business parameters, related to actual business

API Request Example

Order Details (Query by Serial Number)

Request Description

Request Addresshttps://xxx.xxx.xxx.xxx:8481/api/order/info/{serial_number}
Request MethodGET

Request Parameters

Bearer Auth Authentication Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
access_tokenStringTokenYeseyJhbGciOi...Obtained via Login Authorization Interface

Header Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
Return-TypeStringInterface Return TypeYesDocumentDataFixed value

Path Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
serial_numberStringSerial NumberYes135963345397353472Unique order identifier

Return Parameters

Parameter NameTypeDescriptionExample ValueDescription
statusBooleanReturn Statustruetrue or false
messageStringReturn Messagexxx
dataObjectReturn Data
data.document_dataArrayDocument/Order Data Content

data.document_data Parameter Description

Parameter NameTypeDescriptionExample ValueDescription
Sender_IdString(36)Sender ID Identifier958755
Sender_Internal_IdString(36)Sender Internal ID IdentifierLM485Not required, can be empty
Document_TypeString(36)Message Type850Customer 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_NumberString(36)Document Number1300001Customer sent document number
Document_DatetimeString(36)Message Date/Time20240509Customer sent Message Date
Format: CCYYMMDD or CCYYMMDDHHmm
Purchase_Order_NumberString(36)Purchase Order Number10193220643
Purchase_Order_DateString(36)Purchase Order Date20240509Purchase Order Date
Format: CCYYMMDD
Buyer_IdString(36)Buyer/Purchaser Code
Buyer_Agency_CodeString(10)Buyer/Purchaser CodeType
Buyer_NameString(70)Buyer/Purchaser Name
Buyer_AddressString(36)Buyer/Purchaser Address
Buyer_Address_InfoString(36)Buyer/Purchaser Detailed Address
Buyer_StreetString(256)Buyer/Purchaser Street
Buyer_CityString(36)Buyer/Purchaser City
Buyer_State_ProvinceString(36)Buyer/Purchaser State/Province Code
Buyer_PostcodeString(18)Buyer/Purchaser Postal Code
Buyer_CountryString(10)Buyer/Purchaser Country/Region Code
Seller_xxxStringSeller/Vendor InformationRefer to Buyer parameters
Ship_From_xxxStringShip From InformationRefer to Buyer parameters
Ship_To_xxxStringShip To InformationRefer to Buyer parameters
Bill_To_xxxStringBill To InformationRefer to Buyer parameters
Sold_To_xxxStringSold To InformationRefer to Buyer parameters
Currency_CodeString(10)Currency CodeUSDRequired for Invoice 810
Detail_Items.
Detail_Item_Loop
ArrayMaterial Data Collection

Detail_Items.Detail_Item_Loop Parameter Description

Parameter NameTypeDescriptionExample ValueDescription
Line_Item_NumberString(6)Line Item Number00010
Buyer_Item_NumberString(36)Buyer/Purchaser Item NumberPA123456
Purchase_Order_NumberString(70)Purchase Order号991935452615
Purchase_Order_Line
_Number
String(6)Order Line Number00010
Unit_PriceString(18)Unit Price163.12Required for Invoice 810
Unit_Price_Basis_CodeString(3)Unit Price Basis CodePN(PE) Price per Each
(PN) Price per Ten
(HP) Price per Hundred
(TP) Price per Thousand
Place_Of_DeliveryString(256)Place of DeliveryED05Required for Despatch Advice DESADV
Place_Port_DischargeString(256)Place/Port of Discharge CodeWEDJRequired for Despatch Advice DESADV
Additional_Internal
_Destination
String(256)Additional Internal Destination Code3256Required for Despatch Advice DESADV
Item_DescriptionString(256)Description Information
Delivery_Schedule_NumberString(70)Delivery Schedule Number392
Delivery_Schedule_DateString(36)Delivery Schedule DateFormat: CCYYMMDD or CCYYMMDDHHmm
Plan_Items.
Plan_Item_Loop
Array预测/Order Data Collection

Plan_Items.Plan_Item_Loop Parameter Description

Parameter NameTypeDescriptionExample ValueDescription
Delivery_Plan_StatusString(10)Delivery Plan Status Code41-Firm
4-Planning/forecast
Delivery_Plan_Status_ViewString(256)Delivery Plan Status DescriptionPlanning/forecast1-Firm
4-Planning/forecast
Discrete_QuantityString(36)Delivery Quantity162Forecast/Order Quantity
Discrete_UnitString(8)Quantity UnitEA
Outstanding_QuantityString(36)Outstanding Quantity0Outstanding Quantity (Backorder)
Quantity_To_Be_DeliveredString(36)Pending Delivery Quantity0Pending Delivery Quantity
Request_Delivery_DateString(36)Buyer Requested Delivery Date20250529Format: CCYYMMDD or CCYYMMDDHHmm

Response Example

json5
{
  "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 Addresshttps://xxx.xxx.xxx.xxx:8481/api/order/info/order/{order_number}?project_key={project_key}
Request MethodGET

Request Parameters

Bearer Auth Authentication Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
access_tokenStringTokenYeseyJhbGciOi...Obtained via Login Authorization Interface

Header Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
Return-TypeStringInterface Return TypeYesDocumentDataFixed value

Path Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
order_numberStringOrder NumberYes10193220643If there are duplicate orders, get the most recent order by default

Request Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
project_keyStringProject KeyYesChinLinkProject 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 Addresshttps://xxx.xxx.xxx.xxx:8481/api/delivery/saveData
Request MethodPOST

Request Parameters

Body Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
project_keyStringProject KeyYesChinLinkProject Key assigned by ChinLink
action_typeStringSend Message Type IdentifierYesdeliveryFixed value
contentJsonSend Message ContentYes

content Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
despatch_datetimeStringDespatch Date/TimeYes20240627Format: CCYYMMDD
delivery_datetimeStringDelivery Date/TimeNo20240715Format: CCYYMMDD
estimated_arrival_dateStringEstimated Arrival Date/TimeYes20240715Format: CCYYMMDD
bill_of_ladingStringBill of Lading NumberYesPL123456987
packing_list_numberStringPacking List NumberYesPL2404120011
carrier_gross_weightNumberShipment Gross Weight (Unit: KG)Yes520.00Total gross weight of all goods in ASN (accurate to two decimal places)
carrier_net_weightNumberShipment Net Weight (Unit: KG)No480.00Total net weight of all goods in ASN (accurate to two decimal places)
weight_unitStringWeight UnitYesKG
quantity_of_packStringQuantity of PackagesYes33
package_typeStringPackage TypeYesPCK90
carrier_bill_numberStringCarrier NumberNoCN00001
carrier_scacStringCarrier SCAC CodeNoUPSNGenerally consists of four letters
transport_modeStringTransport ModeNoA(A) Air
(AE) Air Express
(LT) Less than trailer load
(M) Motor (Full truck)
(R) Rail (SE) Sea
equipment_unitString运输设备代码 (Equipment Description Code)NoTL(CN) Container
(RR) Railcar
(TE) Trailer
(TL) Trailer (not otherwise specified)
equipment_initialStringEquipment Initial/PrefixYesUPSN
equipment_numberStringEquipment Number (Truck/Container No.)Yes200003211Customoer transport equipment number
ship_from_party_idStringShip From IDYesAccording to agency_code parameter, generally 92, provided by customer (buyer)
ship_from_party_nameStringShip From NameYes
ship_from_agency_codeStringShip From Agency Code TypeYes91(91) Assigned by seller or seller's agent
(92) Assigned by buyer or buyer's agent
ship_from_addressStringAddressYes
ship_from_address_infoStringDetailed AddressNo
ship_from_city_nameStringCityNo
ship_from_state_province_codeStringState/Province CodeNo
ship_from_postal_codeStringPostal CodeNo
ship_from_country_codeStringCountry/Region CodeNo
ship_to_party_idStringShip To IDYesAccording to agency_code parameter, generally 92, provided by customer (buyer)
ship_to_party_nameStringShip To NameYes
ship_to_agency_codeStringShip To Agency Code TypeYes92(91) Assigned by seller or seller's agent
(92) Assigned by buyer or buyer's agent
ship_to_addressStringAddressYes
ship_to_address_infoStringDetailed AddressNo
ship_to_city_nameStringCityNo
ship_to_state_province_codeStringState/Province CodeNo
ship_to_postal_codeStringPostal CodeNo
ship_to_country_codeStringCountry/Region CodeNo
no_packages.no_packages_loopArrayProduct Details

no_packages_loop Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
no_package_typeStringPackage TypeYesPCK90
no_package_type_agency_codeStringPackage Type CodeYes92(91) Assigned by seller or seller's agent
(92) Assigned by buyer or buyer's agent
quantity_of_packStringQuantity of PackagesYes33
package_gross_weightStringPackage Net WeightYes15
package_net_weightStringPackage Gross WeightNo13
weight_unitStringWeight UnitYesKG
purchase_order_numberStringPurchase Order NumberYes5526931007
purchase_order_dateStringOrder DateYes20240706Format: CCYYMMDD
line_items.line_item_loopArrayMaterial DetailsYes

line_item_loop Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
buyer_item_numberStringBuyer/Purchaser Item NumberYes89519892
seller_catalog_numberStringSeller Catalog NumberYesPK10001
quantityNumberDespatch QuantityYes8808Quantity of materials in package (integer)
quantity_unitStringQuantity UnitYesEA
order_line_numberStringOrder Line NumberYes00010Item line number from Purchase Order
country_originStringCountry of OriginYesCN

Return Parameters

Parameter NameTypeDescriptionExample ValueDescription
statusBooleanReturn Statustruetrue or false
messageStringReturn Messagexxx
dataObjectReturn Data
data.serial_numberStringDelivery Note Serial Number1360053108683337728

Examples

Request Example

This is a request example under general configuration. Optional fields can be set to empty strings.

json5
{
  "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
json5
{
    "success": true,
    "message": "",
    "data": {
        "serial_number": "1360053108683337728",
    }
}
  • Error Return Example
json5
{
    "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 Addresshttps://xxx.xxx.xxx.xxx:8481/api/delivery/saveData
Request MethodPOST

Request Parameters

Body Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
project_keyStringProject KeyYesChinLinkProject Key assigned by ChinLink
action_typeStringSend Message Type IdentifierYesinvoiceFixed value
contentJsonSend Message ContentYes

content Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
purchase_order_numberStringPurchase Order NumberYes10193220643
purchase_order_dateStringOrder DateYes20240627Format: CCYYMMDD
invoice_numberStringInvoice NumberYes20240715120603
total_invoice_amountNumberTotal Invoice AmountYes547.04
currency_codeStringCurrency CodeYesUSD
trade_tax_type_codeStringTrade Tax Type CodeNoLS(LS) State and Local Sales Tax
trade_tax_amountStringTax AmountNo
ship_to_party_idStringShip To IDYes
ship_to_party_nameStringShip To NameYes
ship_to_agency_codeStringShip To Agency Code TypeYes92(91) Assigned by seller or seller's agent
(92) Assigned by buyer or buyer's agent
ship_to_addressStringAddressYes
ship_to_address_infoStringDetailed AddressNo
ship_to_city_nameStringCityNo
ship_to_state_province_codeStringState/Province CodeNo
ship_to_postal_codeStringPostal CodeNo
ship_to_country_codeStringCountry/Region CodeNo
bill_to_party_idStringBill To IDYes
bill_to_party_nameStringBill To NameYes
bill_to_agency_codeStringBill To Agency Code TypeYes92(91) Assigned by seller or seller's agent
(92) Assigned by buyer or buyer's agent
bill_to_addressStringAddressYes
bill_to_address_infoStringDetailed AddressNo
bill_to_city_nameStringCityNo
bill_to_state_province_codeStringState/Province CodeNo
bill_to_postal_codeStringPostal CodeNo
bill_to_country_codeStringCountry/Region CodeNo
invoice_issuer_party_idStringInvoice Issuer IDYes
invoice_issuer_party_nameStringInvoice Issuer NameYes
invoice_issuer_agency_codeStringInvoice Issuer Agency Code TypeYes91(91) Assigned by seller or seller's agent
(92) Assigned by buyer or buyer's agent
invoice_issuer_addressStringAddressYes
invoice_issuer_address_infoStringDetailed AddressNo
invoice_issuer_city_nameStringCityNo
invoice_issuer_state_province_codeStringState/Province CodeNo
invoice_issuer_postal_codeStringPostal CodeNo
invoice_issuer_country_codeStringCountry/Region CodeNo
invoice_items.invoice_item_loopArrayYes
spac_items.spac_item_loopArrayNo

invoice_items.invoice_item_loop Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
line_item_numberStringLine Item NumberYes00010Item line number from Purchase Order
buyer_part_numberStringBuyer/Purchaser Item NumberYes5800000001
quantity_invoicedStringQuantity InvoicedYes32
quantity_unitStringQuantity UnitYesEA
unit_priceStringUnit PriceYes16.47
unit_price_basis_codeStringUnit Price Basis CodeYesPE(PE) Price per Each
(PN) Price per Ten
(HP) Price per Hundred
(TP) Price per Thousand
invoice_item_amountStringInvoice Item AmountYes527.04

spac_items.spac_item_loop Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
allowance_charge_indicatorStringAllowance or Charge TypeYesC(A) Allowance
(C) Charge
(N) No Allowance or Charge
(P) Promotion
(Q) Charge Request
(R) Allowance Request
(S) Service
service_charge_typeStringCharge Type (Service, Promotion, Allowance or Charge)YesD500(C310) Discount
(D240) Freight
(D500) Handling
service_charge_amountStringService Charge AmountYes20

Return Parameters

Parameter NameTypeDescriptionExample ValueDescription
statusBooleanReturn Statustruetrue or false
messageStringReturn Messagexxx
dataObjectReturn Data
data.serial_numberStringDelivery Note Serial Number1360053108683337728

Examples

Request Example

This is a request example under general configuration. Optional fields can be set to empty strings.

json5
{
  "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
json5
{
    "success": true,
    "message": "",
    "data": {
        "serial_number": "1360053108683337728",
    }
}
  • Error Return Example
json5
{
    "status": false,
    "message": " Failed message."
}

API Request Example

Send Delivery Note (Despatch Advice/Invoice)

💡

  1. Submit created Despatch Advice or Invoice via API to EDI system for transmission.

  2. Message transmission is processed asynchronously.

Request Description

Request Addresshttps://xxx.xxx.xxx.xxx:8481/api/file/action/delivery
Request MethodPOST

Request Parameters

Bearer Auth Authentication Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
access_tokenStringTokenYeseyJhbGciOi...Obtained via Login Authorization Interface

Body Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
project_keyStringProject KeyYesChinLinkProject Key assigned by ChinLink
action_typeStringSend Message TypeYessend-invsend-inv: Send Invoice
send-asn: Send Despatch Advice
serial_numberStringDelivery Note Serial NumberYes1355079589866352640Delivery Note Serial Number returned when creating Despatch Advice or Invoice

Return Parameters

Parameter NameTypeDescriptionExample ValueDescription
statusBooleanReturn Statustruetrue or false
messageStringReturn Messagexxx

Return Example

  • Normal Return Example
json5
{
  "data": true,
  "code": 0,
  "message": null,
  "success": true
}
  • Error Return Example
json5
{
    "data": null,
    "code": 500,
    "message": "Please configure the root directory of the project.",
    "success": false
}

Party Address Information List

Request Description

Request Addresshttps://xxx.xxx.xxx.xxx:8481/api/location/list
Request MethodGET

Request Parameters

Bearer Auth Authentication Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
access_tokenStringTokenYeseyJhbGciOi...Obtained via Login Authorization Interface

Header Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
Return-TypeStringInterface Return TypeYesDocumentDataFixed value

Return Parameters

Parameter NameTypeDescriptionExample ValueDescription
statusBooleanReturn Statustruetrue or false
messageStringReturn Messagexxx
dataArrayReturned Address Information Collection

data Parameter Description

Parameter NameTypeDescriptionExample ValueDescription
location_idStringAddress Information ID24Unique Address Information Identifier
party_idStringParty ID Identifier1001
party_nameStringParty NameXi'an ChinLink Technology Co., Ltd.
agency_codeStringAgency 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
addressStringAddress InformationFenghui South Road, High tech ZoneMax 35 characters
address_infoStringAddress Information Details1107B, Building B,Max 35 characters
streetStringStreet InformationHuajing Plaza, No. 20
city_nameStringCity NameXi'an
state_province_codeStringState/Province CodeXA
postal_codeStringPostal Code710065
country_codeStringCountry/Region CodeCNE.g., CN, US, HK

API Request Example

Party Address Information (Query by ID)

Request Description

Request Addresshttps://xxx.xxx.xxx.xxx:8481/api/location/info/{location_id}
Request MethodGET

Request Parameters

Bearer Auth Authentication Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
access_tokenStringTokenYeseyJhbGciOi...Obtained via Login Authorization Interface

Header Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
Return-TypeStringInterface Return TypeYesDocumentDataFixed value

Path Parameters

Parameter NameDescriptionDescriptionRequiredExample ValueDescription
location_idStringAddress Information IDYes44Unique Address Information Identifier

Return Parameters

Parameter NameTypeDescriptionExample ValueDescription
statusBooleanReturn Statustruetrue or false
messageStringReturn Messagexxx
dataObjectReturn Data

data Parameter Description

Refer to data Parameter Description in Party Address Information List API documentation.

Return Example

json5
{
  "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.