/erp/sc/routing/data/local_inventory/createPurchasePlan{
"operation": {
"method": "POST",
"path": "/erp/sc/routing/data/local_inventory/createPurchasePlan"
},
"protocol": "HTTPS",
"host": "https://openapi.lingxing.com",
"rateLimit": {
"tokenBucketCapacity": 1,
"text": ""
},
"requestExample": {
"remark": "备注",
"custom_fields": [
{
"id": "field_001",
"val": "100",
"character": "CNY"
}
],
"data": [
{
"sid": "1",
"supplier_id": 1,
"sku": "SKU001",
"fnsku": "FNSKU001",
"wid": 1,
"purchaser_id": 1,
"expect_arrive_time": "2021-10-01",
"cg_uid": 0,
"quantity_plan": 100,
"remark": "",
"perm_uid": [
1,
10002
],
"options": {
"is_auto_fill_fnsku": 1,
"is_auto_fill_store": 1
}
}
]
},
"responseExample": {
"code": 0,
"message": "success",
"error_details": [],
"request_id": "D41373ED-AF54-CDF1-1658-B8F86286F209",
"response_time": "2021-11-12 12:37:55",
"data": {
"ppg_sn": "PPG211112001",
"plan_sn": [
"PP211112002"
]
},
"total": 0
}
}| 序号 | 字段 | 名称 | 类型 | 默认值 | 必填 | 描述 |
|---|---|---|---|---|---|---|
| 1 | remark | 计划备注 | string | — | 可选 | 计划备注 |
| 2 | custom_fields | 表头自定义字段 | array<object> | — | 可选 | 表头自定义字段 |
| 2.1 | id | 自定义字段 ID | string | — | 必填 | 自定义字段 ID |
| 2.2 | val | 字段值 | string | — | 可选 | 字段值 |
| 2.3 | character | 字段额外属性 | string | — | 可选 | 字段额外属性,如单位/币种;无则传空字符串 |
| 3 | data | 产品信息 | array<object> | — | 必填 | 产品信息 |
| 3.1 | sid | 店铺id | string | — | 可选 | 店铺id ,对应查询亚马逊店铺列表接口对应字段【sid】 |
| 3.2 | supplier_id | 供应商id | integer | — | 可选 | 供应商id |
| 3.3 | sku | sku | string | — | 必填 | sku |
| 3.4 | fnsku | fnsku | string | — | 可选 | fnsku |
| 3.5 | wid | 仓库id | integer | — | 可选 | 仓库id |
| 3.6 | purchaser_id | 采购方id | integer | — | 可选 | 采购方id |
| 3.7 | expect_arrive_time | 期望到货时间 | string | — | 可选 | 期望到货时间,格式:Y-m-d |
| 3.8 | cg_uid | 采购员id | integer | — | 可选 | 采购员id |
| 3.9 | quantity_plan | 计划采购量 | integer | — | 必填 | 计划采购量 |
| 3.10 | remark | 产品备注 | string | — | 可选 | 产品备注 |
| 3.11 | perm_uid | 单据负责人 | array<any> | — | 可选 | 单据负责人,int数组 |
| 3.12 | options | 可选参数 | object | — | 可选 | 可选参数 |
| 3.12.1 | is_auto_fill_fnsku | 是否自动FNSKU | integer | — | 可选 | 是否自动FNSKU:【默认0】 0 否,1 是 |
| 3.12.2 | is_auto_fill_store | 是否自动填充店铺 | integer | — | 可选 | 是否自动填充店铺:【默认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 | 2021-09-21 15:48:58 | 必填 | 响应时间 |
| 6 | data | 响应数据 | object | — | 必填 | 响应数据 |
| 6.1 | plan_sn | 计划编号 | array<any> | ["PP211112002"] | 必填 | 计划编号 |
| 6.2 | ppg_sn | 计划批次号 | string | PPG211112001 | 必填 | 计划批次号 |
领星ERP的接口:创建待采购的采购计划(/erp/sc/routing/data/local_inventory/createPurchasePlan),由轻易云数据集成平台 API 资产管理模块整理收纳,并随领星ERP版本更新同步更新。