1. Puarchase order
API URL
post {HTTP(S)host} /api/{version}/purchase
1.1. Query Puarchase order list
1.1.1. SERVICE_TYPE
QUERY_PURCHASE_ORDER_LIST
1.1.2. Request
| Params | Require | DataType | Sample | |
|---|---|---|---|---|
| purchaseNumber | N | String | P210819125115 | Purchase number with a maximum of 50 characters |
| customNumber | N | String | 210819125115 | reference number |
| status | N | String | NEW | Purchase order status |
| updateTimeFrom | N | String | 2021-08-31 | Update time ( Begin of range ) |
| updateTimeTo | N | String | 2021-08-31 | Update time ( End of range ) |
| page | Y | Number | 1 | Page number, default 1 |
| pageSize | Y | Number | 100 | Number of records per page. no more than 200; |
1.1.3. Reponse
| Params | Require | DataType | Sample | |
|---|---|---|---|---|
| errorCode | Y | String | “DATA_INPUT_ERROR” | Error Code](commons/errors.md#_Error Code) |
| errorMsg | Y | String | “The input of Params is incorrect” | Business Error Messages |
| state | Y | String | success | Response State |
| total | Y | Number | 100 | Total num |
| result | Y | List | See PurchaseOrder |
PurchaseOrder(Purchase Order )
| Params | Require | DataType | Sample | |
|---|---|---|---|---|
| purchaseNumber | Y | String | P210819125115 | Purchase number |
| asnNumber | Y | String | A210819125116 | Inbound order number |
| customNumber | Y | String | custom Reference number | Reference number |
| warehouseName | Y | String | Purchase warehouse | Purchase warehouse |
| transferWarehouseName | Y | String | transfer warehouse | transfer warehouse |
| purchaseType | Y | String | TRANSFER | TRANSFER:海外warehousePurchase DIRECT:国内warehousePurchase |
| supplierName | Y | String | supplier | supplier |
| settlementType | Y | String | DELIVERY_ON_CASH | Billing method: DELIVERY_ON_CASH, FIXED_ACCOUNT_PERIOD,DYNAMIC_ACCOUNT_PERIOD, |
| prepayRate | Y | Decimal | 30 | Prepaid Percentage 30 means 30% |
| purchasePriceUnit | Y | String | CNY | Currency |
| paymentType | Y | Enum | CASH | PAYMENT METHODS: CASH,TRANSFER |
| shippingCost | Y | Decimal | 1.0 | carriage |
| transportMode | Y | Enum | SELF | Shipping method: SELF, EXPRESS, LOGISTICS, DELIVERY |
| buyerTitle | Y | String | 张三 | Buyer's letterhead |
| companyName | Y | String | Zhang San Co., Ltd | The company looks up |
| transportParty | Y | String | SUPPLIER | Transporting Contractor: SUPPLIER, PURCHASER |
| createTime | Y | String | 2021-08-01 00:00:00 | Creation time |
| updateTime | Y | String | 2021-08-01 00:00:00 | Update time |
| orderTime | N | String | 2021-08-01 00:00:00 | Time when the order was placed |
| preReceiveTime | Y | String | 2021-08-02 00:00:00 | Estimated arrival date |
| status | Y | String | NEW | Purchase order status |
| purchaseMode | Y | String | STANDARD | Purchase model: EASYWAY,STANDARD |
| remark | Y | String | Description | Description |
| skuList | Y | List | See PurchaseOrderSku |
PurchaseOrderSku Purchase Order details
| Params | Require | Date type | Sample | Description |
|---|---|---|---|---|
| sku | Y | String | SKU001 | sku |
| title | Y | String | This a good title | The title of the product |
| purchasePrice | Y | Decimal | 998 | Purchase price |
| purchaseQuantity | Y | Number | 1 | Purchase quantity |
| packSpecification | Y | Number | 5 | Packing rate |
| taxRate | Y | Decimal | 0.1 | Purchase taxRate |
Request:
curl --location --request POST 'https://gerp-test1.800best.com/api/v1/purchase' \
--form 'appId="TEST"' \
--form 'serviceType="CREATE_PURCHASE_ORDER"' \
--form 'bizParam="{
\"purchaseType\": \"DIRECT\",
\"warehouseName\":\"best warehouse(测试用)\",
\"purchaserName\":\"test主账号\",
\"purchaseDate\":\"2025-09-10\",
\"purchasePriceUnit\":\"CNY\",
\"transportParty\":\"SUPPLIER\",
\"transportMode\":\"SELF\",
\"supplierName\":\"supplier\",
\"paymentType\":\"CASH\",
\"settlementType\":\"DELIVERY_ON_CASH\",
\"skuList\":[{
\"sku\":\"sea003\",
\"purchasePrice\":10,
\"purchasePriceUnit\":\"CNY\",
\"purchaseQuantity\":1,
\"taxRate\":0.1
}]
}"' \
--form 'timestamp="1731742317"' \
--form 'sign="4d0646b8f6875144f987f1a2b579cf57"'
Response:
{
"state": "success",
"errorCode": "",
"errorMsg": "",
"bizContent": "{\"errorMsg\":\"采购员不存在,请先到【系统-用户管理】处添加\",\"notSuccess\":true,\"state\":\"failure\"}",
"requestId": "653708f2-4cd6-4832-85e2-74997b4b3bf9"
}
1.2. Create/update Purchase order
1.2.1. SERVICE_TYPE
CREATE_PURCHASE_ORDER
1.2.2. Request
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| purchaseNumber | N | String | PO223412451 | Purchase order number, if it is an updated purchase order request(isUpdate=true), it is required, otherwise do not fill it in |
| isUpdate | N | Boolean | false | Update the purchase order. Default false |
| purchaseType | Y | String | DIRECT/TRANSFER | Purchase order type |
| customNumber | N | String | Xxxx111 | Reference number |
| warehouseName | Y | String | abc | Purchase Warehouse name |
| transferWarehouseName | N | String | transferWarehouse name(Required when purchaseType=TRANSFER) | transferWarehouse name |
| purchaserName | Y | String | purchaser | purchaser |
| purchaseDate | Y | String | 2022-01-01 | Creation time |
| preReceiveTime | N | String | 2022-01-01 | Estimated time of arrival |
| purchasePriceUnit | Y | String | CNY | Monetary unit |
| shippingCost | N | BigDecimal | 100.00 | Carriage |
| companyName | N | String | Xxx111 | The company looks up |
| buyerTitle | N | String | Xxx111 | Buyer's letterhead |
| transportParty | Y | String | SUPPLIER | Transport principal |
| transportMode | Y | String | SELF | Shipping method |
| trackingNumber | N | String | Xxx111 | Tracking number |
| remark | N | String | Xxx111 | Description |
| supplierName | Y | String | supplier 名称 | supplier name |
| paymentType | Y | String | CASH | Payment method |
| settlementType | Y | String | DELIVERY_ON_CASH | Billing method |
| prepayRate | N | BigDecimal | 15 | Prepaid percentage |
| effectiveNode | N | String | RECEIVE | When the selected settlement method is a non-delivery withdrawal method is DELIVERY_ON_CASH ,*Params is require,Node effect type |
| accountPeriodList | N | String | [{"days":"1","percent":50},{"days":"2","percent":35}] | When the selected settlement method is dynamic billing period is DYNAMIC_ACCOUNT_PERIOD Params is require。Percent+The upfront percentage needs to be 100 |
| accountPeriodOpt | N | String | MONTHLY | When the selected billing method is a fixed billing period : FIXED_ACCOUNT_PERIOD ,*Params is require。 |
| billingDate | N | Long | 20 | When the selected billing method is a fixed billing period : FIXED_ACCOUNT_PERIOD , *Params is require。 |
| skuList | Y | List< PurchaseOrderSku> | Purchase details | |
| purchaseExtVO | N | purchaseExtVO | 1688 Extended Fields,see purchaseExtVO |
PurchaseOrderSku(Purchase details)
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| sku | Y | String | S90 | sku |
| purchasePrice | Y | BigDecimal | 100.00 | Purchase price of the product |
| purchasePriceUnit | Y | String | CNY | Purchase Monetary unit |
| purchaseQuantity | Y | Long | 100 | Purchase quantity |
| remark | N | String | This is remark! | Purchase Description |
| taxRate | Y | BigDecimal | 0 | Purchase taxRate |
purchaseExtVO(1688 ext info)
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| open1688AccountName | Y | String | 1688 order number | 1688 order number |
| open1688Address | Y | String | 1688 Receiving address | 1688 Receiving address |
| open1688BuyerMsg | N | String | Buyer's message | Buyer's message |
| open1688OrderType | Y | String | general | 1688 order type,1688 order type |
| open1688TradeType | N | String | FXASSURE | Trading Methods,1688 trade types |
1.2.3. Response
| Params | Require | DataType | Sample | |
|---|---|---|---|---|
| errorCode | Y | String | “DATA_INPUT_ERROR” | Error Code](commons/errors.md#_Error Code) |
| errorMsg | Y | String | “The input of Params is incorrect” | Business Error Messages |
| state | Y | String | success | Response State |
| total | Y | Number | 100 | Total num |
| result | Y | List | See PurchaseOrder |
PurchaseOrder(Purchase Order )
| Params | Require | DataType | Sample | |
|---|---|---|---|---|
| purchaseNumber | Y | String | P210819125115 | Purchase number |
| warehouseName | Y | String | Purchase warehouse | Purchase warehouse |
| skuList | Y | List | See PurchaseOrderSku |
PurchaseOrderSku Purchase Order details
| Params | Require | Date type | Sample | Description |
|---|---|---|---|---|
| sku | Y | String | SKU001 | sku |
| title | Y | String | This a good title | The title of the product |
| purchasePrice | Y | Decimal | 998 | Purchase price |
| purchaseQuantity | Y | Number | 1 | Purchase quantity |
| packSpecification | Y | Number | 5 | Packing rate |
| taxRate | Y | Decimal | 0.1 | Purchase taxRate |
Request:
curl --location --request POST 'https://gerp-test1.800best.com/api/v1/purchase' \
--form 'appId="TEST"' \
--form 'serviceType="QUERY_PURCHASE_ORDER_LIST"' \
--form 'bizParam="{
\"page\": 1,
\"pageSize\":3
}"' \
--form 'timestamp="1731742317"' \
--form 'sign="c45cc9116eda46ae8dc4bc5cb016a6e0"'
Response:
{
"state": "success",
"errorCode": "",
"errorMsg": "",
"bizContent": "{\"notSuccess\":false,\"result\":[{\"companyName\":\"X跨境电商公司\",\"createTime\":\"2025-09-09 15:07:51\",\"isDeleted\":0,\"paymentType\":\"CASH\",\"prepayRate\":20.0000,\"purchaseDate\":1757376000000,\"purchaseMode\":\"EASYWAY\",\"purchaseNumber\":\"P250909149499\",\"purchasePriceUnit\":\"CNY\",\"purchaseType\":\"DIRECT\",\"settlementType\":\"DELIVERY_ON_CASH\",\"shippingCost\":0.0000,\"skuList\":[{\"purchasePrice\":10.0000,\"purchaseQuantity\":1,\"sku\":\"hmsku090901-2\",\"taxRate\":1.00,\"title\":\"黑咪测展示商品-2\"},{\"purchasePrice\":10.0000,\"purchaseQuantity\":1,\"sku\":\"hmsku090901-1\",\"taxRate\":1.00,\"title\":\"黑咪测展示商品-1\"}],\"status\":\"NEW\",\"supplierName\":\"supplier\",\"transferWarehouseName\":\"\",\"transportParty\":\"SUPPLIER\",\"updateTime\":\"2025-09-09 15:07:51\",\"warehouseName\":\"best warehouse(测试用)\"},{\"accountPeriodOpt\":\"MONTHLY\",\"asnNumber\":\"A250904149344\",\"billingDate\":5,\"companyName\":\"X跨境电商公司\",\"createTime\":\"2025-09-04 17:14:17\",\"effectiveNode\":\"RECEIVE\",\"isDeleted\":0,\"orderTime\":1756977290000,\"paymentType\":\"CASH\",\"prepayRate\":0.0000,\"purchaseDate\":1756944000000,\"purchaseMode\":\"EASYWAY\",\"purchaseNumber\":\"P250904149343\",\"purchasePriceUnit\":\"CAD\",\"purchaseType\":\"DIRECT\",\"remark\":\"测试9.4\",\"settlementType\":\"FIXED_ACCOUNT_PERIOD\",\"shippingCost\":0.0000,\"skuList\":[{\"purchasePrice\":0.0000,\"purchaseQuantity\":1,\"sku\":\"test leo\",\"taxRate\":0.00,\"title\":\"测试leo\"}],\"status\":\"ORDERED\",\"supplierName\":\"test供应商权限001\",\"transferWarehouseName\":\"\",\"transportParty\":\"SUPPLIER\",\"updateTime\":\"2025-09-04 17:14:50\",\"warehouseName\":\"best warehouse(测试用)\"},{\"asnNumber\":\"A250904149342\",\"companyName\":\"X跨境电商公司\",\"createTime\":\"2025-09-04 17:11:33\",\"customNumber\":\"\",\"isDeleted\":0,\"orderTime\":1756977116000,\"paymentType\":\"CASH\",\"preReceiveTime\":\"2025-10-04 08:00:00\",\"prepayRate\":20.0000,\"purchaseDate\":1754265600000,\"purchaseMode\":\"EASYWAY\",\"purchaseNumber\":\"P250904149340\",\"purchasePriceUnit\":\"CNY\",\"purchaseType\":\"DIRECT\",\"remark\":\"测试备注123\",\"settlementType\":\"DELIVERY_ON_CASH\",\"shippingCost\":0.0000,\"skuList\":[{\"packSpecification\":12,\"purchasePrice\":11.2300,\"purchaseQuantity\":1,\"sku\":\"070101\",\"taxRate\":0.00,\"title\":\"测试申报商品我\"}],\"status\":\"ORDERED\",\"supplierName\":\"supplier\",\"trackingNumber\":\"202509040003\",\"transferWarehouseName\":\"\",\"transportParty\":\"SUPPLIER\",\"updateTime\":\"2025-09-04 17:12:44\",\"warehouseName\":\"jst-test\"}],\"state\":\"success\",\"total\":2934}",
"requestId": "aad05dc0-c890-4dbc-8f6b-1b8d9ca4a36f"
}