/erp/sc/routing/purchase/purchase/createPurchaseOrder{
"operation": {
"method": "POST",
"path": "/erp/sc/routing/purchase/purchase/createPurchaseOrder"
},
"protocol": "HTTPS",
"host": "https://openapi.lingxing.com",
"rateLimit": {
"tokenBucketCapacity": 1,
"text": ""
},
"requestExample": {
"sys_wid": 1,
"sys_supplier_id": 2,
"settlement_method": 8,
"purchase_currency": "CNY",
"fee_part_type": 0,
"remark": "测试123",
"opt_uid": 1,
"purchaser_id": 1,
"is_tax": 0,
"product_list": [
{
"sku": "SKU-1",
"price": "1.00",
"quantity_real": 50,
"plan_sn": "PP231211001",
"expect_arrive_time": "2023-12-21",
"tax_rate": "10"
}
]
},
"responseExample": {
"code": 0,
"message": "success",
"error_details": [],
"request_id": "D41373ED-AF54-CDF1-1658-B8F86286F209",
"response_time": "2021-11-12 12:37:55",
"data": {
"order_sn": "PO211112002",
"custom_order_sn": "PO211112002"
},
"total": 0
}
}| No. | Field | Name | Type | Default | Required | Description |
|---|---|---|---|---|---|---|
| 1 | wid | 客户仓库id | integer | — | Optional | 客户仓库id |
| 2 | sys_wid | 系统仓库id【与客户仓库id 二选一必填】 | integer | — | Optional | 系统仓库id【与客户仓库id 二选一必填】 |
| 3 | supplier_id | 客户供应商id | integer | — | Optional | 客户供应商id |
| 4 | sys_supplier_id | 系统供应商id【与客户供应商id 二选一必填】 | integer | — | Optional | 系统供应商id【与客户供应商id 二选一必填】 |
| 5 | custom_order_sn | custom_order_sn | string | — | Optional | 自定义采购单号【不传此字段则系统自动生成采购单号】 |
| 6 | contact_person | 联系人 | string | — | Optional | 联系人 |
| 7 | contact_number | 联系电话 | string | — | Optional | 联系电话 |
| 8 | settlement_method | 结算方式 | integer | — | Optional | 结算方式:7 现结,8 月结 |
| 9 | prepay_percent | 预付比例(%) | number | — | Optional | 预付比例(%) |
| 10 | period_config_key | 账期配置key | string | — | Optional | 账期配置key |
| 11 | settlement_description | 结算描述 | string | — | Optional | 结算描述 |
| 12 | payment_method | 支付方式 | integer | — | Optional | 支付方式:1 网银转账,2 网上支付 |
| 13 | purchase_currency | 采购币种 | string | — | Optional | 采购币种 |
| 14 | rate | 汇率 | number | — | Optional | 汇率 |
| 15 | shipping_currency | 运费币种 | string | — | Optional | 运费币种 |
| 16 | shipping_price | 运费 | number | — | Optional | 运费 |
| 17 | other_currency | 其它费用币种 | string | — | Optional | 其它费用币种 |
| 18 | other_fee | 其它费用 | number | — | Optional | 其它费用 |
| 19 | fee_part_type | 费用分摊方式 | integer | — | Optional | 费用分摊方式:0 不分摊,1 按金额,2 按数量 |
| 20 | is_tax | 是否含税 | integer | — | Optional | 是否含税:0 否,1 是【当含税为1时,tax_rate为必传字段】 |
| 21 | remark | 备注 | string | — | Optional | 备注 |
| 22 | qc_type | 质检类型 | integer | — | Optional | 质检类型:【默认0】 0 仓库质检,1 预检,2 免检 |
| 23 | opt_uid | 采购员uid | integer | — | Required | 采购员uid |
| 24 | purchaser_id | 采购方id | integer | — | Required | 采购方id,查询采购方列表 接口对应字段【purchaser_id】 |
| 25 | product_list | product_list | array<object> | — | Required | |
| 25.1 | sid | 店铺id | integer | — | Optional | 店铺id ,对应查询亚马逊店铺列表接口对应字段【sid】 |
| 25.2 | seller_id | 亚马逊店铺id【建议使用sid替换】 | string | — | Optional | 亚马逊店铺id【建议使用sid替换】 |
| 25.3 | marketplace_id | marketplace_id | string | — | Optional | marketplace_id【建议使用sid替换】 |
| 25.4 | sku | sku | string | — | Required | sku |
| 25.5 | fnsku | fnsku | string | — | Optional | fnsku |
| 25.6 | price | 单价 | string | — | Required | 单价 |
| 25.7 | tax_rate | 税率 | string | — | Optional | 税率,范围为[0,100)【当含税为1时,tax_rate为必传字段】 |
| 25.8 | cases_num | 箱数 | integer | — | Optional | 箱数 |
| 25.9 | quantity_per_case | 单箱数量 | integer | — | Optional | 单箱数量 |
| 25.10 | quantity_real | 实际采购量 | string | — | Required | 实际采购量 |
| 25.11 | expect_arrive_time | 预计到货时间 | string | — | Optional | 预计到货时间,格式:Y-m-d |
| 25.12 | remark | 备注 | string | — | Optional | 备注 |
| 25.13 | plan_sn | 采购计划编号 | string | — | Optional | 采购计划编号 |
| 26 | options | 创建选项 | object | — | Optional | 创建选项 |
| 26.1 | is_auto_fill_store | 是否自动填充店铺 | integer | — | Optional | 是否自动填充店铺:【默认0】 0 否,1 是 |
| 26.2 | is_auto_fill_fnsku | 是否自动填充fnsku | integer | — | Optional | 是否自动填充fnsku:【默认0】0 否,1 是 |
| No. | Field | Name | Type | Default | Required | Description |
|---|---|---|---|---|---|---|
| 1 | code | 状态码 | integer | 0 | Required | 状态码,0 成功 |
| 2 | message | 响应消息 | string | 操作成功 | Required | 响应消息 |
| 3 | error_details | 错误信息 | array<any> | — | Required | 错误信息 |
| 4 | request_id | 请求链路id | string | 8DFEE1CA-EC9B-F401-5D41-9F95251D5D50 | Required | 请求链路id |
| 5 | response_time | 响应时间 | string | 2020-09-21 15:48:58 | Required | 响应时间 |
| 6 | data | 响应数据 | object | — | Required | 响应数据 |
| 6.1 | order_sn | 采购单号 | string | PO211112002 | Required | 采购单号 |
| 6.2 | custom_order_sn | 自定义采购单号 | string | PO211112002 | Required | 自定义采购单号 |
The 创建待到货的采购单 API (/erp/sc/routing/purchase/purchase/createPurchaseOrder) of 领星ERP is curated by the API asset management module of the Qeasy Cloud data integration platform and kept in sync with 领星ERP version updates.
Qeasy ships with prebuilt adaptation for this API — contact us to start configuring data integration.