/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
}
}| 序号 | 字段 | 名称 | 类型 | 默认值 | 必填 | 描述 |
|---|---|---|---|---|---|---|
| 1 | wid | 客户仓库id | integer | — | 可选 | 客户仓库id |
| 2 | sys_wid | 系统仓库id【与客户仓库id 二选一必填】 | integer | — | 可选 | 系统仓库id【与客户仓库id 二选一必填】 |
| 3 | supplier_id | 客户供应商id | integer | — | 可选 | 客户供应商id |
| 4 | sys_supplier_id | 系统供应商id【与客户供应商id 二选一必填】 | integer | — | 可选 | 系统供应商id【与客户供应商id 二选一必填】 |
| 5 | custom_order_sn | custom_order_sn | string | — | 可选 | 自定义采购单号【不传此字段则系统自动生成采购单号】 |
| 6 | contact_person | 联系人 | string | — | 可选 | 联系人 |
| 7 | contact_number | 联系电话 | string | — | 可选 | 联系电话 |
| 8 | settlement_method | 结算方式 | integer | — | 可选 | 结算方式:7 现结,8 月结 |
| 9 | prepay_percent | 预付比例(%) | number | — | 可选 | 预付比例(%) |
| 10 | period_config_key | 账期配置key | string | — | 可选 | 账期配置key |
| 11 | settlement_description | 结算描述 | string | — | 可选 | 结算描述 |
| 12 | payment_method | 支付方式 | integer | — | 可选 | 支付方式:1 网银转账,2 网上支付 |
| 13 | purchase_currency | 采购币种 | string | — | 可选 | 采购币种 |
| 14 | rate | 汇率 | number | — | 可选 | 汇率 |
| 15 | shipping_currency | 运费币种 | string | — | 可选 | 运费币种 |
| 16 | shipping_price | 运费 | number | — | 可选 | 运费 |
| 17 | other_currency | 其它费用币种 | string | — | 可选 | 其它费用币种 |
| 18 | other_fee | 其它费用 | number | — | 可选 | 其它费用 |
| 19 | fee_part_type | 费用分摊方式 | integer | — | 可选 | 费用分摊方式:0 不分摊,1 按金额,2 按数量 |
| 20 | is_tax | 是否含税 | integer | — | 可选 | 是否含税:0 否,1 是【当含税为1时,tax_rate为必传字段】 |
| 21 | remark | 备注 | string | — | 可选 | 备注 |
| 22 | qc_type | 质检类型 | integer | — | 可选 | 质检类型:【默认0】 0 仓库质检,1 预检,2 免检 |
| 23 | opt_uid | 采购员uid | integer | — | 必填 | 采购员uid |
| 24 | purchaser_id | 采购方id | integer | — | 必填 | 采购方id,查询采购方列表 接口对应字段【purchaser_id】 |
| 25 | product_list | product_list | array<object> | — | 必填 | |
| 25.1 | sid | 店铺id | integer | — | 可选 | 店铺id ,对应查询亚马逊店铺列表接口对应字段【sid】 |
| 25.2 | seller_id | 亚马逊店铺id【建议使用sid替换】 | string | — | 可选 | 亚马逊店铺id【建议使用sid替换】 |
| 25.3 | marketplace_id | marketplace_id | string | — | 可选 | marketplace_id【建议使用sid替换】 |
| 25.4 | sku | sku | string | — | 必填 | sku |
| 25.5 | fnsku | fnsku | string | — | 可选 | fnsku |
| 25.6 | price | 单价 | string | — | 必填 | 单价 |
| 25.7 | tax_rate | 税率 | string | — | 可选 | 税率,范围为[0,100)【当含税为1时,tax_rate为必传字段】 |
| 25.8 | cases_num | 箱数 | integer | — | 可选 | 箱数 |
| 25.9 | quantity_per_case | 单箱数量 | integer | — | 可选 | 单箱数量 |
| 25.10 | quantity_real | 实际采购量 | string | — | 必填 | 实际采购量 |
| 25.11 | expect_arrive_time | 预计到货时间 | string | — | 可选 | 预计到货时间,格式:Y-m-d |
| 25.12 | remark | 备注 | string | — | 可选 | 备注 |
| 25.13 | plan_sn | 采购计划编号 | string | — | 可选 | 采购计划编号 |
| 26 | options | 创建选项 | object | — | 可选 | 创建选项 |
| 26.1 | is_auto_fill_store | 是否自动填充店铺 | integer | — | 可选 | 是否自动填充店铺:【默认0】 0 否,1 是 |
| 26.2 | is_auto_fill_fnsku | 是否自动填充fnsku | integer | — | 可选 | 是否自动填充fnsku:【默认0】0 否,1 是 |
| 序号 | 字段 | 名称 | 类型 | 默认值 | 必填 | 描述 |
|---|---|---|---|---|---|---|
| 1 | code | 状态码 | integer | 0 | 必填 | 状态码,0 成功 |
| 2 | message | 响应消息 | string | 操作成功 | 必填 | 响应消息 |
| 3 | error_details | 错误信息 | array<any> | — | 必填 | 错误信息 |
| 4 | request_id | 请求链路id | string | 8DFEE1CA-EC9B-F401-5D41-9F95251D5D50 | 必填 | 请求链路id |
| 5 | response_time | 响应时间 | string | 2020-09-21 15:48:58 | 必填 | 响应时间 |
| 6 | data | 响应数据 | object | — | 必填 | 响应数据 |
| 6.1 | order_sn | 采购单号 | string | PO211112002 | 必填 | 采购单号 |
| 6.2 | custom_order_sn | 自定义采购单号 | string | PO211112002 | 必填 | 自定义采购单号 |
领星ERP的接口:创建待到货的采购单(/erp/sc/routing/purchase/purchase/createPurchaseOrder),由轻易云数据集成平台 API 资产管理模块整理收纳,并随领星ERP版本更新同步更新。