/erp/sc/routing/data/local_inventory/purchaseOrderList{
"operation": {
"method": "POST",
"path": "/erp/sc/routing/data/local_inventory/purchaseOrderList"
},
"protocol": "HTTPS",
"host": "https://openapi.lingxing.com",
"rateLimit": {
"tokenBucketCapacity": 1,
"text": ""
},
"requestExample": {
"search_field_time": "create_time",
"start_date": "2024-05-30",
"end_date": "2024-08-02",
"order_sn": [
"PO240802012",
"PO240802011"
],
"custom_order_sn": [
"PO240802012",
"PO240802011"
],
"purchase_type": 1,
"offset": 0,
"length": 20
},
"responseExample": {
"code": 0,
"message": "success",
"error_details": [],
"request_id": "46CDFE68-C43F-03A8-0A58-093B8AB18ED8",
"response_time": "2023-10-10 11:38:50",
"data": [
{
"order_sn": "PO230914108",
"custom_order_sn": "PO230914108",
"supplier_id": 925,
"supplier_name": "xxx",
"opt_uid": 10317908,
"opt_realname": "账户2",
"create_time": "2023-09-14 15:34:19",
"order_time": "2023-09-14 15:34:28",
"purchase_currency": "CNY",
"shipping_currency": "CNY",
"purchase_rate": "1.0000",
"status_shipped": 3,
"status_shipped_text": "全部到货",
"quantity_total": 10,
"payment": "0.00",
"pay_status": 0,
"pay_status_text": "未申请",
"principal_uids": [
{
"id": 10317908,
"name": "账户2"
}
],
"auditor_uid": 0,
"auditor_time": "",
"auditor_realname": "",
"last_uid": 10317908,
"last_time": "2023-09-14 17:40:34",
"last_realname": "账户2",
"purchaser_id": 129,
"contact_person": "",
"contact_number": "",
"settlement_method": 7,
"settlement_description": "",
"payment_method": 0,
"reason": "",
"wid": 1,
"is_tax": 0,
"status": 9,
"status_text": "已完成",
"ware_house_name": "默认仓库测试",
"ware_house_bak_name": "默认仓库测试",
"shipping_price": "0.00",
"amount_total": "660.00",
"other_fee": "0.00",
"other_currency": "CNY",
"fee_part_type": 0,
"total_price": "660.00",
"icon": "¥",
"remark": "",
"quantity_entry": 10,
"quantity_real": 10,
"quantity_receive": 0,
"update_time": "2023-09-14 17:40:34",
"logistics_info": [],
"item_list": [
{
"id": 8727,
"plan_sn": "",
"product_id": 22500,
"product_name": "规格测试-1",
"model": "",
"wid": 1,
"ware_house_name": "默认仓库测试",
"sku": "guigeceshi-1",
"fnsku": "",
"sid": 0,
"price": "66.0000",
"amount": "660.00",
"quantity_plan": 0,
"quantity_real": 10,
"quantity_per_case": 0,
"quantity_return": 0,
"quantity_exchange": 0,
"cases_num": 0,
"msku": [],
"attribute": [
{
"attr_id": 770,
"attr_name": "规格22",
"attr_value": "10-10"
}
],
"tax_rate": "0.00",
"spu": "guigeceshi",
"spu_name": "规格测试",
"quantity_entry": 10,
"quantity_receive": 0,
"quantity_qc": 9,
"quantity_qc_prepare": 9,
"expect_arrive_time": "",
"remark": "",
"is_delete": 0
}
]
}
],
"total": 1
}
}| 序号 | 字段 | 名称 | 类型 | 默认值 | 必填 | 描述 |
|---|---|---|---|---|---|---|
| 1 | start_date | 开始时间 | string | — | 必填 | 开始时间,格式:Y-m-d,双闭区间 当筛选更新时间时,支持Y-m-d或Y-m-d H:i:s |
| 2 | end_date | 结束时间 | string | — | 必填 | 结束时间,格式:Y-m-d,双闭区间 当筛选更新时间时,支持Y-m-d或Y-m-d H:i:s |
| 3 | search_field_time | 时间搜索维度 | string | — | 可选 | 时间搜索维度: create_time 创建时间【默认值】 expect_arrive_time 预计到货时间 update_time 更新时间 |
| 4 | order_sn | 采购单号 | array<any> | — | 可选 | 采购单号,上限500 |
| 5 | custom_order_sn | 自定义采购单号 | array<any> | — | 可选 | 自定义采购单号,上限500 |
| 6 | purchase_type | 采购类型 | integer | — | 可选 | 采购类型,1:普通采购,2:1688采购 |
| 7 | offset | 分页偏移量 | integer | — | 可选 | 分页偏移量,默认0 |
| 8 | length | 分页长度 | integer | — | 可选 | 分页长度,默认500,上限500 |
| 序号 | 字段 | 名称 | 类型 | 默认值 | 必填 | 描述 |
|---|---|---|---|---|---|---|
| 1 | code | 状态码 | integer | 0 | 必填 | 状态码,0 成功 |
| 2 | message | 消息提示 | string | success | 必填 | 消息提示 |
| 3 | error_details | 错误信息 | array<any> | — | 必填 | 错误信息 |
| 4 | request_id | 请求链路id | string | 929A1D7D-D656-0EA0-C78A-A686790C7090 | 必填 | 请求链路id |
| 5 | response_time | 响应时间 | string | 2022-05-20 16:57:03 | 必填 | 响应时间 |
| 6 | data | 响应数据 | array<object> | — | 必填 | 响应数据 |
| 6.1 | order_sn | 采购单号 | string | PO201019001 | 必填 | 采购单号 |
| 6.2 | custom_order_sn | 自定义单号 | string | — | 必填 | 自定义单号 |
| 6.3 | supplier_id | 供应商id | integer | 291 | 必填 | 供应商id |
| 6.4 | supplier_name | 供应商 | string | 深圳xxx有限公司 | 必填 | 供应商 |
| 6.5 | opt_uid | 采购员id | integer | 297 | 必填 | 采购员id |
| 6.6 | principal_uids | 单据负责人信息 | array<object> | — | 必填 | 单据负责人信息 |
| 6.6.1 | id | 单据负责人UID | string | 1221 | 必填 | 单据负责人UID |
| 6.6.2 | name | 单据负责人名称 | string | 用户A | 必填 | 单据负责人名称 |
| 6.7 | auditor_realname | 审核人姓名 | string | — | 必填 | 审核人姓名 |
| 6.8 | opt_realname | 操作人姓名 | string | 测试人员 | 必填 | 操作人姓名 |
| 6.9 | last_realname | 最后操作人姓名 | string | 测试人员 | 必填 | 最后操作人姓名 |
| 6.10 | create_time | 创建时间 | string | 2020-10-19 10:43:01 | 必填 | 创建时间 |
| 6.11 | order_time | 下单时间 | string | 2020-10-19 10:43:01 | 必填 | 下单时间 |
| 6.12 | payment | 应付货款(手工) | string | 0.00 | 必填 | 应付货款(手工) |
| 6.13 | auditor_uid | 审核人员id | integer | 10 | 必填 | 审核人员id |
| 6.14 | auditor_time | 审核时间 | string | 2020-10-19 10:43:01 | 必填 | 审核时间 |
| 6.15 | last_uid | 最后操作人员id | integer | 297 | 必填 | 最后操作人员id |
| 6.16 | last_time | 最后操作时间 | string | 2020-10-19 10:43:01 | 必填 | 最后操作时间 |
| 6.17 | reason | 作废原因 | string | 采购数量有误 | 必填 | 作废原因 |
| 6.18 | is_tax | 是否含税 | integer | — | 必填 | 是否含税:0 否,1 是 |
| 6.19 | status | 采购单状态 | integer | 1 | 必填 | 采购单状态: -1 作废 3 待提交 1 待下单 - 已审核 2 待签收(待到货) - 已下单 9 完成 121 (审批流)待审核 122 (审批流)驳回 124 (审批流)作废 |
| 6.20 | status_text | 状态说明 | string | 待审核 | 必填 | 状态说明 |
| 6.21 | pay_status_text | 支付状态说明 | string | 未申请 | 必填 | 支付状态说明 |
| 6.22 | status_shipped | 到货状态 | integer | 1 | 必填 | 到货状态: 1 未到货 2 部分到货 3 全部到货 |
| 6.23 | status_shipped_text | 到货状态说明 | string | 未到货 | 必填 | 到货状态说明 |
| 6.24 | amount_total | 货物总价 | number | 200 | 必填 | 货物总价 |
| 6.25 | total_price | 总金额 | number | 200 | 必填 | 总金额 |
| 6.26 | icon | 币种符号 | string | ¥ | 必填 | 币种符号 |
| 6.27 | pay_status | 付款状态 | integer | 1 | 必填 | 付款状态: 0 未申请 1 已申请 2 部分付款 3 已付款 |
| 6.28 | remark | 备注 | string | — | 必填 | 备注 |
| 6.29 | other_fee | 其他费用 | number | 0 | 必填 | 其他费用 |
| 6.30 | other_currency | 其他费用币种 | string | CNY | 必填 | 其他费用币种 |
| 6.31 | fee_part_type | 费用分摊方式 | integer | 1 | 必填 | 费用分摊方式: 0 不分摊 1 按金额 2 按数量 |
| 6.32 | shipping_price | 运费 | number | 0 | 必填 | 运费 |
| 6.33 | shipping_currency | 运费币种 | string | CNY | 必填 | 运费币种 |
| 6.34 | purchase_currency | 采购币种 | string | CNY | 必填 | 采购币种 |
| 6.35 | purchase_rate | 采购汇率 | number | 1 | 必填 | 采购汇率 |
| 6.36 | quantity_total | 采购总量 | number | 200 | 必填 | 采购总量 |
| 6.37 | wid | 仓库id | integer | 8 | 必填 | 仓库id |
| 6.38 | ware_house_name | 仓库名 | string | 测试仓库 | 必填 | 仓库名 |
| 6.39 | ware_house_bak_name | 仓库名(备份) | string | 测试仓库 | 必填 | 仓库名(备份) |
| 6.40 | quantity_entry | 入库量 | integer | 10 | 必填 | 入库量 |
| 6.41 | quantity_real | 实际采购量 | integer | 200 | 必填 | 实际采购量 |
| 6.42 | quantity_receive | 待到货量 | integer | 20 | 必填 | 待到货量 |
| 6.43 | update_time | 采购单更新时间 | string | 2020-10-19 10:43:01 | 必填 | 采购单更新时间 |
| 6.44 | purchaser_id | 采购方id | integer | — | 必填 | 采购方id |
| 6.45 | contact_person | 联系人 | string | — | 必填 | 联系人 |
| 6.46 | contact_number | 联系方式 | string | — | 必填 | 联系方式 |
| 6.47 | settlement_method | 结算方式 | integer | — | 必填 | 结算方式: 7 现结 8 月结 |
| 6.48 | settlement_description | 结算描述 | string | — | 必填 | 结算描述 |
| 6.49 | purchase_type | 采购类型 1 | string | — | 必填 | 采购类型 1:普通采购;2:1688采购 |
| 6.50 | purchase_type_text | 采购类型文本 | string | — | 必填 | 采购类型文本 |
| 6.51 | alibaba_order_sn | 1688订单号 | string | — | 必填 | 1688订单号 |
| 6.52 | sub_status | 1688订单状态 | string | — | 必填 | 1688订单状态,1:待1688下单,2:等待买家付款,3:等待买家 |
| 6.53 | sub_status_text | 1688订单状态文本 | string | — | 必填 | 1688订单状态文本 |
| 6.54 | custom_fields | 自定义字段 | array<any> | — | 必填 | 自定义字段 |
| 6.55 | payment_method | 支付方式 | integer | 0 | 必填 | 支付方式 |
| 6.56 | item_list | 采购单子项 | array<object> | — | 必填 | 采购单子项 |
| 6.56.1 | id | 采购单子项id | integer | 112 | 必填 | 采购单子项id |
| 6.56.2 | wid | 仓库id | integer | — | 必填 | 仓库id |
| 6.56.3 | ware_house_name | 仓库名称 | string | — | 必填 | 仓库名称 |
| 6.56.4 | relation_purchase_plan | 更多采购计划号 | array<any> | — | 必填 | 更多采购计划号 |
| 6.56.5 | plan_sn | 采购计划号 | string | PP171225003 | 必填 | 采购计划号 |
| 6.56.6 | product_id | 本地产品id | integer | 11528 | 必填 | 本地产品id |
| 6.56.7 | product_name | 品名 | string | 铅笔 | 必填 | 品名 |
| 6.56.8 | sku | sku | string | WYLS003 | 必填 | SKU |
| 6.56.9 | fnsku | fnsku | string | ES3001 | 必填 | FNSKU |
| 6.56.10 | sid | 店铺id | string | 6 | 必填 | 店铺id |
| 6.56.11 | model | 型号 | string | — | 必填 | 型号 |
| 6.56.12 | price | 含税单价 | number | 1 | 必填 | 含税单价 |
| 6.56.13 | amount | 价税合计 | number | 100 | 必填 | 价税合计 |
| 6.56.14 | quantity_plan | 计划采购量 | integer | 10 | 必填 | 计划采购量 |
| 6.56.15 | quantity_real | 实际采购量 | integer | 100 | 必填 | 实际采购量 |
| 6.56.16 | quantity_entry | 到货入库量 | integer | 10 | 必填 | 到货入库量 |
| 6.56.17 | quantity_receive | 待到货量 | integer | 2 | 必填 | 待到货量 |
| 6.56.18 | quantity_return | 退货数 | integer | — | 必填 | 退货数 |
| 6.56.19 | quantity_exchange | 换货量 | integer | 120 | 必填 | 换货量 |
| 6.56.20 | quantity_qc | 质检量 | integer | 10 | 必填 | 质检量 |
| 6.56.21 | quantity_qc_prepare | 待质检量 | integer | 10 | 必填 | 待质检量 |
| 6.56.22 | expect_arrive_time | 期待到货时间 | string | 2020-10-01 | 必填 | 期待到货时间 |
| 6.56.23 | first_receive_time | 首次到货时间 | string | — | 必填 | 首次到货时间 |
| 6.56.24 | last_receive_time | 最后到货时间 | string | — | 必填 | 最后到货时间 |
| 6.56.25 | first_qc_time | 首次质检时间 | string | — | 必填 | 首次质检时间 |
| 6.56.26 | remark | 备注 | string | — | 必填 | 备注 |
| 6.56.27 | cases_num | 箱数 | integer | — | 必填 | 箱数 |
| 6.56.28 | quantity_per_case | 单箱数量 | integer | 20 | 必填 | 单箱数量 |
| 6.56.29 | is_delete | 是否删除 | integer | 1 | 必填 | 是否删除:0 否,1 是 |
| 6.56.30 | msku | msku | array<any> | — | 必填 | MSKU |
| 6.56.31 | attribute | 属性 | string | — | 必填 | 属性 |
| 6.56.32 | tax_rate | 税率 | string | — | 必填 | 税率 |
| 6.56.33 | spu | spu | string | — | 必填 | spu |
| 6.56.34 | spu_name | 款名 | string | — | 必填 | 款名 |
| 6.56.35 | custom_fields | 自定义字段 | array<any> | — | 必填 | 自定义字段 |
| 6.57 | logistics_info | 物流信息 | array<object> | — | 必填 | 物流信息 |
| 6.57.1 | logistics_company | 物流公司 | string | — | 必填 | 物流公司 |
| 6.57.2 | logistics_order_no | 物流单号 | string | — | 必填 | 物流单号 |
| 6.57.3 | pol_id | 物流信息记录id | string | — | 必填 | 物流信息记录id |
| 6.57.4 | purchase_order_id | 采购订单唯一id | string | — | 必填 | 采购订单唯一id |
| 6.57.5 | purchase_order_sn | 采购订单号(order_sn) | string | | 必填 | 采购订单号(order_sn) |
领星ERP的接口:查询采购单列表(/erp/sc/routing/data/local_inventory/purchaseOrderList),由轻易云数据集成平台 API 资产管理模块整理收纳,并随领星ERP版本更新同步更新。