/erp/sc/routing/data/local_inventory/getPurchasePlans{
"operation": {
"method": "POST",
"path": "/erp/sc/routing/data/local_inventory/getPurchasePlans"
},
"protocol": "HTTPS",
"host": "https://openapi.lingxing.com",
"rateLimit": {
"tokenBucketCapacity": 1,
"text": ""
},
"requestExample": "{\n{\n \"search_field_time\": \"creator_time\",\n \"start_date\": \"2024-07-30\",\n \"end_date\": \"2024-08-02\",\n \"plan_sns\": [\n \"PP240730001\",\n \"PP240730002\",\n \"PP240730005\"\n ],\n \"is_combo\": 0,\n \"is_related_process_plan\": 0,\n \"status\": [\n -2\n ],\n \"sids\": [\n 0\n ],\n \"offset\": 0,\n \"length\": 20\n}",
"responseExample": "{\n \"code\": 0,\n \"message\": \"success\",\n \"error_details\": [],\n \"request_id\": \"350C7176-A759-3517-9CDA-369C9E1A5743\",\n \"response_time\": \"2022-05-20 11:48:25\",\n \"total\": 1,\n \"data\": [\n {\n \"plan_sn\": \"PP230712003\",\n \"ppg_sn\": \"PPG230712003\",\n \"product_name\": \"10369333测试\",\n \"sku\": \"10369333\",\n \"fnsku\": \"\",\n \"pic_url\": \"\",\n \"supplier_id\": 590,\n \"status_text\": \"待采购\",\n \"status\": 2,\n \"sid\": 0,\n \"expect_arrive_time\": \"\",\n \"remark\": \"\",\n \"quantity_plan\": 1,\n \"product_id\": 18791,\n \"group_id\": 2689,\n \"cg_uid\": 0,\n \"is_combo\": 0,\n \"is_aux\": 0,\n \"spu\": \"\",\n \"spu_name\": \"\",\n \"attribute\": [],\n \"creator_uid\": 10317908,\n \"wid\": 1,\n \"warehouse_name\": \"默认仓库\",\n \"purchaser_id\": 113,\n \"supplier_name\": \"好的供应商111\",\n \"cg_opt_username\": \"\",\n \"creator_real_name\": \"验证账户2\",\n \"file\": [\n {\n \"name\": \"导入计划采购商品模板news.xlsx\",\n \"url\": \"https://imagexxxx/d73aaf35f.xlsx\"\n }\n ],\n \"plan_remark\": \"\",\n \"create_time\": \"2021-10-11 01:20:20\",\n \"msku\": [],\n \"cg_box_pcs\": 0,\n \"seller_name\": \"\",\n \"marketplace\": \"\",\n \"purchaser_name\": \"基本abc\",\n \"is_related_process_plan\": 0,\n \"perm_uid\": [10001, 10002],\n \"perm_username\": {10001: \"AA\", 10002: \"BB\"},\n \"is_urgent\": 1\n }\n ]\n}"
}| 序号 | 字段 | 名称 | 类型 | 默认值 | 必填 | 描述 |
|---|---|---|---|---|---|---|
| 1 | search_field_time | 时间搜索维度 | string | — | 必填 | 时间搜索维度: creator_time 创建时间 expect_arrive_time 预计到货时间 update_time 更新时间 |
| 2 | start_date | 开始日期 | string | — | 必填 | 开始日期,Y-m-d,闭区间,当筛选update_time时,格式为:Y-m-d H:i:s |
| 3 | end_date | 结束日期 | string | — | 必填 | 结束日期,Y-m-d,闭区间,当筛选update_time时,格式为:Y-m-d H:i:s |
| 4 | plan_sns | 采购计划编号 | array<any> | — | 可选 | 采购计划编号 |
| 5 | is_combo | 是否为组合商品 | integer | — | 可选 | 是否为组合商品:0 否,1 是 |
| 6 | is_related_process_plan | 是否关联加工计划 | integer | — | 可选 | 是否关联加工计划,0:否,1:是 |
| 7 | status | 状态 | array<any> | — | 可选 | 状态: 2 待采购 -2 已完成 121 待审批 122 已驳回 -3、124 已作废 |
| 8 | sids | 店铺id | array<any> | — | 可选 | 店铺id ,对应查询亚马逊店铺列表接口对应字段【sid】 |
| 9 | offset | 分页偏移量 | integer | — | 可选 | 分页偏移量,默认0 |
| 10 | length | 分页长度 | integer | — | 可选 | 分页长度,默认500,上限500 |
| 序号 | 字段 | 名称 | 类型 | 默认值 | 必填 | 描述 |
|---|---|---|---|---|---|---|
| 1 | code | 状态码 | integer | 0 | 必填 | 状态码,0 成功 |
| 2 | message | 消息提示 | string | success | 必填 | 消息提示 |
| 3 | error_details | 错误信息 | string | — | 必填 | 错误信息 |
| 4 | request_id | 请求链路id | string | 350C7176-A759-3517-9CDA-369C9E1A5743 | 必填 | 请求链路id |
| 5 | response_time | 响应时间 | string | 2022-05-20 11:48:25 | 必填 | 响应时间 |
| 6 | total | 总数 | integer | 1 | 必填 | 总数 |
| 7 | data | 响应数据 | array<object> | — | 必填 | 响应数据 |
| 7.1 | plan_sn | 采购计划编号 | string | PP230712003 | 必填 | 采购计划编号 |
| 7.2 | ppg_sn | 采购计划批次号 | string | PPG230712003 | 必填 | 采购计划批次号 |
| 7.3 | status_text | 状态说明 | string | 待采购 | 必填 | 状态说明 |
| 7.4 | status | 状态值 | integer | 2 | 必填 | 状态值 |
| 7.5 | creator_real_name | 创建人名称 | string | 小明 | 必填 | 创建人名称 |
| 7.6 | creator_uid | 创建人id | integer | 297 | 必填 | 创建人id |
| 7.7 | create_time | 创建时间 | string | 2021-10-11 01:20:20 | 必填 | 创建时间 |
| 7.8 | file | 附件 | array<object> | — | 必填 | 附件 |
| 7.8.1 | name | 附件名 | string | 导入计划采购商品模板news.xlsx | 必填 | 附件名 |
| 7.8.2 | url | 附件url | string | https://imagexxxx/d73aaf35f.xlsx | 必填 | 附件url |
| 7.9 | plan_remark | 备注 | string | 备注 | 必填 | 备注 |
| 7.10 | pic_url | 产品图片 | string | https://image-1254213xxxxx.com/xxx4%B5%E7%9B%92.jpg | 必填 | 产品图片 |
| 7.11 | spu_name | 款名 | string | 童黄土-橘白条 | 必填 | 款名 |
| 7.12 | spu | spu | string | — | 必填 | SPU |
| 7.13 | product_name | 品名 | string | [演示数据]三星真无线耳塞含无线充电盒 | 必填 | 品名 |
| 7.14 | product_id | 商品id | integer | 1019 | 必填 | 商品id |
| 7.15 | sku | sku | string | SKU627B4F6 | 必填 | SKU |
| 7.16 | attribute | 属性 | array<any> | — | 必填 | 属性 |
| 7.17 | sid | 店铺id | number | 1 | 必填 | 店铺id |
| 7.18 | seller_name | 店铺名称 | string | 店铺1 | 必填 | 店铺名称 |
| 7.19 | marketplace | 国家 | string | 美国 | 必填 | 国家 |
| 7.20 | fnsku | fnsku | string | FN004 | 必填 | FNSKU |
| 7.21 | msku | msku | array<any> | — | 必填 | MSKU |
| 7.22 | supplier_id | 供应商id | object | 2 | 必填 | 供应商id |
| 7.23 | supplier_name | 供应商名称 | string | 测试供应商 | 必填 | 供应商名称 |
| 7.24 | wid | 仓库id | integer | 2 | 必填 | 仓库id |
| 7.25 | warehouse_name | 仓库名称 | string | 广州仓库 | 必填 | 仓库名称 |
| 7.26 | purchaser_id | 采购方id | integer | 1 | 必填 | 采购方id |
| 7.27 | purchaser_name | 采购方名称 | string | 默认采购方 | 必填 | 采购方名称 |
| 7.28 | cg_box_pcs | 单箱数量 | integer | 10 | 必填 | 单箱数量 |
| 7.29 | quantity_plan | 计划采购量 | integer | 100 | 必填 | 计划采购量 |
| 7.30 | expect_arrive_time | 期望到货时间 | string | 2022-04-15 | 必填 | 期望到货时间 |
| 7.31 | cg_uid | 采购员id | integer | 1 | 必填 | 采购员id |
| 7.32 | cg_opt_username | 采购员名称 | string | 小米 | 必填 | 采购员名称 |
| 7.33 | remark | 产品备注 | string | 备注 | 必填 | 产品备注 |
| 7.34 | is_combo | 是否为组合商品 | integer | 1 | 必填 | 是否为组合商品:0 否,1 是 |
| 7.35 | is_aux | 是否为辅料 | integer | 1 | 必填 | 是否为辅料:0 否,1 是 |
| 7.36 | is_related_process_plan | 是否关联了加工计划 | integer | 1 | 必填 | 是否关联了加工计划:0 否,1 是 |
| 7.37 | perm_uid | 单据负责人uid | array<any> | [10001,10002] | 必填 | 单据负责人uid |
| 7.38 | perm_username | 单据负责人名称 | object | {10001: "AA", 10002: "BB"} | 必填 | 单据负责人名称 |
| 7.39 | is_urgent | 是否加急 | integer | 1 | 必填 | 是否加急:1 加急,0 未加急 |
| 7.40 | purchase_mark | 采购标识 | integer | — | 必填 | 采购标识:0-无;1-组合采;2-单品采;3-委外采 |
| 7.41 | purchase_mark_text | 采购标识文本 | string | — | 必填 | 采购标识文本 |
领星ERP的接口:查询采购计划列表(/erp/sc/routing/data/local_inventory/getPurchasePlans),由轻易云数据集成平台 API 资产管理模块整理收纳,并随领星ERP版本更新同步更新。