Lingxing
切换旧版

查询采购单列表

POST/erp/sc/routing/data/local_inventory/purchaseOrderList

支持查询采购单列表,对应系统【采购】>【采购单】数据

接口信息

API Path请求协议请求方式令牌桶容量
/erp/sc/routing/data/local_inventory/purchaseOrderListHTTPSPOST1

请求参数

start_datestring必填
开始时间,格式:Y-m-d,双闭区间
当筛选更新时间时,支持Y-m-d或Y-m-d H:i:s
end_datestring必填
结束时间,格式:Y-m-d,双闭区间
当筛选更新时间时,支持Y-m-d或Y-m-d H:i:s
search_field_timestring
时间搜索维度:
create_time 创建时间【默认值】
expect_arrive_time 预计到货时间
update_time 更新时间
order_snarray<any>
采购单号,上限500
custom_order_snarray<any>
自定义采购单号,上限500
purchase_typeinteger
采购类型,1:普通采购,2:1688采购
offsetinteger
分页偏移量,默认0
lengthinteger
分页长度,默认500,上限500

请求示例

{
    "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
}

返回结果

Json Object

codeinteger必填
状态码,0 成功
示例 0
messagestring必填
消息提示
示例 success
error_detailsarray<any>必填
错误信息
request_idstring必填
请求链路id
示例 929A1D7D-D656-0EA0-C78A-A686790C7090
response_timestring必填
响应时间
示例 2022-05-20 16:57:03
dataarray<object>必填
响应数据
隐藏子属性
order_snstring必填
采购单号
示例 PO201019001
custom_order_snstring必填
自定义单号
supplier_idinteger必填
供应商id
示例 291
supplier_namestring必填
供应商
示例 深圳xxx有限公司
opt_uidinteger必填
采购员id
示例 297
principal_uidsarray<object>必填
单据负责人信息
隐藏子属性
idstring必填
单据负责人UID
示例 1221
namestring必填
单据负责人名称
示例 用户A
auditor_realnamestring必填
审核人姓名
opt_realnamestring必填
操作人姓名
示例 测试人员
last_realnamestring必填
最后操作人姓名
示例 测试人员
create_timestring必填
创建时间
示例 2020-10-19 10:43:01
order_timestring必填
下单时间
示例 2020-10-19 10:43:01
paymentstring必填
应付货款(手工)
示例 0.00
auditor_uidinteger必填
审核人员id
示例 10
auditor_timestring必填
审核时间
示例 2020-10-19 10:43:01
last_uidinteger必填
最后操作人员id
示例 297
last_timestring必填
最后操作时间
示例 2020-10-19 10:43:01
reasonstring必填
作废原因
示例 采购数量有误
is_taxinteger必填
是否含税:0 否,1 是
statusinteger必填
采购单状态:
-1 作废
3 待提交
1 待下单 - 已审核
2 待签收(待到货) - 已下单
9 完成
121 (审批流)待审核
122 (审批流)驳回
124 (审批流)作废
示例 1
status_textstring必填
状态说明
示例 待审核
pay_status_textstring必填
支付状态说明
示例 未申请
status_shippedinteger必填
到货状态:
1 未到货
2 部分到货
3 全部到货
示例 1
status_shipped_textstring必填
到货状态说明
示例 未到货
amount_totalnumber必填
货物总价
示例 200
total_pricenumber必填
总金额
示例 200
iconstring必填
币种符号
示例 ¥
pay_statusinteger必填
付款状态:
0 未申请
1 已申请
2 部分付款
3 已付款
示例 1
remarkstring必填
备注
other_feenumber必填
其他费用
示例 0
other_currencystring必填
其他费用币种
示例 CNY
fee_part_typeinteger必填
费用分摊方式:
0 不分摊
1 按金额
2 按数量
示例 1
shipping_pricenumber必填
运费
示例 0
shipping_currencystring必填
运费币种
示例 CNY
purchase_currencystring必填
采购币种
示例 CNY
purchase_ratenumber必填
采购汇率
示例 1
quantity_totalnumber必填
采购总量
示例 200
widinteger必填
仓库id
示例 8
ware_house_namestring必填
仓库名
示例 测试仓库
ware_house_bak_namestring必填
仓库名(备份)
示例 测试仓库
quantity_entryinteger必填
入库量
示例 10
quantity_realinteger必填
实际采购量
示例 200
quantity_receiveinteger必填
待到货量
示例 20
update_timestring必填
采购单更新时间
示例 2020-10-19 10:43:01
purchaser_idinteger必填
采购方id
contact_personstring必填
联系人
contact_numberstring必填
联系方式
settlement_methodinteger必填
结算方式:
7 现结
8 月结
settlement_descriptionstring必填
结算描述
purchase_typestring必填
采购类型 1:普通采购;2:1688采购
purchase_type_textstring必填
采购类型文本
alibaba_order_snstring必填
1688订单号
sub_statusstring必填
1688订单状态,1:待1688下单,2:等待买家付款,3:等待买家
sub_status_textstring必填
1688订单状态文本
custom_fieldsarray<any>必填
自定义字段
payment_methodinteger必填
支付方式
示例 0
item_listarray<object>必填
采购单子项
隐藏子属性
idinteger必填
采购单子项id
示例 112
widinteger必填
仓库id
ware_house_namestring必填
仓库名称
relation_purchase_planarray<any>必填
更多采购计划号
plan_snstring必填
采购计划号
示例 PP171225003
product_idinteger必填
本地产品id
示例 11528
product_namestring必填
品名
示例 铅笔
skustring必填
SKU
示例 WYLS003
fnskustring必填
FNSKU
示例 ES3001
sidstring必填
店铺id
示例 6
modelstring必填
型号
pricenumber必填
含税单价
示例 1
amountnumber必填
价税合计
示例 100
quantity_planinteger必填
计划采购量
示例 10
quantity_realinteger必填
实际采购量
示例 100
quantity_entryinteger必填
到货入库量
示例 10
quantity_receiveinteger必填
待到货量
示例 2
quantity_returninteger必填
退货数
quantity_exchangeinteger必填
换货量
示例 120
quantity_qcinteger必填
质检量
示例 10
quantity_qc_prepareinteger必填
待质检量
示例 10
expect_arrive_timestring必填
期待到货时间
示例 2020-10-01
first_receive_timestring必填
首次到货时间
last_receive_timestring必填
最后到货时间
first_qc_timestring必填
首次质检时间
remarkstring必填
备注
cases_numinteger必填
箱数
quantity_per_caseinteger必填
单箱数量
示例 20
is_deleteinteger必填
是否删除:0 否,1 是
示例 1
mskuarray<any>必填
MSKU
attributestring必填
属性
tax_ratestring必填
税率
spustring必填
spu
spu_namestring必填
款名
custom_fieldsarray<any>必填
自定义字段
logistics_infoarray<object>必填
物流信息
隐藏子属性
logistics_companystring必填
物流公司
logistics_order_nostring必填
物流单号
pol_idstring必填
物流信息记录id
purchase_order_idstring必填
采购订单唯一id
purchase_order_snstring必填
采购订单号(order_sn)
示例 &nbsp;

返回成功示例

{
    "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
}