文档中心 > API类目 > 代发管理

taobao.daifa.supplier.order.query (代发管理-供货商订单查询接口)

代发管理-供货商订单查询接口 此接口为详情接口和列表接口一体,当传入scp_order_id或者biz_order_id时查询出来的字段是全量字段,当不传入scp_order_id和biz_order_id时只保障返回参数中的订单id相关字段。

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
end_created String 可选 yyyy-MM-dd HH:mm:ss 结束时间 格式:yyyy-MM-dd HH:mm:ss,暂时只支持查询 30 天以内的订单
supplier_id Number 必须 12345 供货商ID
page_index Number 必须 1 页码
page_size Number 可选 10
  • 默认值:10
  • 每页数量
    start_created String 可选 yyyy-MM-dd HH:mm:ss 开始时间 格式:yyyy-MM-dd HH:mm:ss,暂时只支持查询 30天以内的订单,以分单时间(distribute_time)为准
    scp_order_id Number 可选 123456 当传入scpOrderId则其它筛选条件失败,返回参数中会额外增加地址信息
    biz_order_id Number 可选 123456 淘宝主订单id,传入对应的淘宝主订单id后,将返回该淘宝订单下分配给供货商的单据信息

    响应参数

    名称 类型 示例值 描述
    page_index Number 1 页码
    call_result String true 调用结果
    call_err_code String SYSTEM_ERROR 错误code
    call_err_msg String 系统异常 错误描述
    page_size Number 10 每页数量
    model QuerySupplierOrderResponse 业务对象
    • └ supplier_id
    • Number
    • 124
    • 供货商ID
    • scp_order_models
    • DaifaScpOrderModel []
    • 分销订单列表
    • └ scp_order_id
    • Number
    • 123456
    • 代发订单ID,获取电子面单接口tid使用即可通过密文OAID获取面单号
    • └ biz_order_id
    • String
    • 123456
    • 订单ID
    • └ parent_id
    • String
    • 123456
    • 淘宝主订单ID,主子一体订单 bizOrderId = parentId
    • └ main
    • Boolean
    • true
    • 是否是主订单
    • └ detail
    • Boolean
    • false
    • 是否是子订单
    • └ distributor_id
    • Number
    • 123456
    • 分销商ID
    • └ supplier_id
    • Number
    • 123456
    • 供货商ID
    • └ remark
    • String
    • xxxx
    • 订单备注信息 如果分单时没有新设置描述,则取得是淘宝订单上的sellerMemo
    • └ product_id
    • String
    • 123456
    • 货品ID
    • └ product_name
    • String
    • 鞋子
    • 货品名称
    • └ product_count
    • Number
    • 1
    • 货品数量
    • └ product_sku_id
    • String
    • 123456
    • 货品SKU ID
    • └ product_sku_spec
    • String
    • 鞋子,红色
    • 货品规格
    • └ product_pic_url
    • String
    • xxx.png
    • 货品图片名称
    • └ product_type
    • String
    • 0
    • 0 - 主货品 * 1 - 赠品
    • └ order_status
    • String
    • WAIT_SELLER_SEND_GOODS
    • WAIT_SELLER_SEND_GOODS(WAIT_SELLER_SEND_GOODS,等待卖家发货), SELLER_CONSIGNED_PART(SELLER_CONSIGNED_PART,卖家部分发货), WAIT_BUYER_CONFIRM_GOODS(WAIT_BUYER_CONFIRM_GOODS,卖家已发货,等待买家确认收货), TRADE_FINISHED(TRADE_FINISHED,交易完成), TRADE_CLOSED(TRADE_CLOSED,交易关闭),
    • └ distribute_status
    • String
    • DISTRIBUTE
    • DISTRIBUTE(1,已分配), CONSIGN(5,已回传), CANCEL(6,取消分配)
    • └ auction_id
    • String
    • 123456
    • 商品ID
    • └ auction_pict_url
    • String
    • xxx.png
    • 商品图片url
    • └ auction_name
    • String
    • 鞋子
    • 商品名称
    • └ quality
    • Number
    • 1
    • 淘宝订单购买数量
    • └ consign_time
    • String
    • yyyy-MM-dd HH:mm:ss
    • 发货时间
    • └ pay_time
    • String
    • yyyy-MM-dd HH:mm:ss
    • 支付时间
    • └ distribute_time
    • String
    • yyyy-MM-dd HH:mm:ss
    • 分配时间
    • address_do
    • AddressDO
    • 传入scpOrderId返回该字段
    • └ prov
    • String
    • 浙江省
    • └ city
    • String
    • 杭州市
    • └ area
    • String
    • 余杭区
    • └ town
    • String
    • 五常街道
    • 街道
    • └ oaid
    • String
    • sdfasfasdfaf
    • oaid
    • └ receiver_name
    • String
    • 王*
    • 收件人姓名 脱敏
    • └ receiver_mobile
    • String
    • 182014*******
    • 收件人手机号 脱敏
    • └ receiver_phone
    • String
    • 0731-********
    • 收件人电话号码 脱敏
    • └ receiver_address
    • String
    • 文一西路*********
    • 收件人详细地址(不包含省市区县4级地址)脱敏
    • └ refund_status
    • String
    • NO_REFUND
    • NO_REFUND(NO_REFUND,无退款), WAIT_SELLER_AGREE(REFUND_CREATE,买家已经申请退款,等待卖家同意), WAIT_BUYER_RETURN_GOODS(WAIT_BUYER_RETURN_GOODS,卖家已经同意退款,等待买家退货), WAIT_SELLER_CONFIRM_GOODS(WAIT_SELLER_CONFIRM_GOODS,买家已经退货,等待卖家确认收货), SELLER_REFUSE_BUYER(SELLER_REFUSE_BUYER,卖家拒绝退款), CLOSED(CLOSED,退款关闭), SUCCESS(SUCCESS,退款成功),
    • └ sku_id
    • Number
    • 123456
    • 淘宝订单sku id
    • └ sku_spec
    • String
    • 红色,56码
    • 淘宝订单sku描述
    • └ out_sku_id
    • String
    • 123456
    • 淘宝订单商品outSkuId
    • └ cid
    • Number
    • 123456
    • 交易商品对应的类目ID
    total_count Number 100 总条数

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    DaifaSupplierOrderQueryRequest req = new DaifaSupplierOrderQueryRequest();
    req.setEndCreated("yyyy-MM-dd HH:mm:ss");
    req.setSupplierId(12345L);
    req.setPageIndex(1L);
    req.setPageSize(10L);
    req.setStartCreated("yyyy-MM-dd HH:mm:ss");
    req.setScpOrderId(123456L);
    req.setBizOrderId(123456L);
    DaifaSupplierOrderQueryResponse rsp = client.execute(req, sessionKey);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <daifa_supplier_order_query_response>
        <page_index>1</page_index>
        <call_result>true</call_result>
        <call_err_code>SYSTEM_ERROR</call_err_code>
        <call_err_msg>系统异常</call_err_msg>
        <page_size>10</page_size>
        <model>
            <supplier_id>124</supplier_id>
            <scp_order_models>
                <daifa_scp_order_model>
                    <scp_order_id>123456</scp_order_id>
                    <biz_order_id>123456</biz_order_id>
                    <parent_id>123456</parent_id>
                    <main>true</main>
                    <detail>false</detail>
                    <distributor_id>123456</distributor_id>
                    <supplier_id>123456</supplier_id>
                    <remark>xxxx</remark>
                    <product_id>123456</product_id>
                    <product_name>鞋子</product_name>
                    <product_count>1</product_count>
                    <product_sku_id>123456</product_sku_id>
                    <product_sku_spec>鞋子,红色</product_sku_spec>
                    <product_pic_url>xxx.png</product_pic_url>
                    <product_type>0</product_type>
                    <order_status>WAIT_SELLER_SEND_GOODS</order_status>
                    <distribute_status>DISTRIBUTE</distribute_status>
                    <auction_id>123456</auction_id>
                    <auction_pict_url>xxx.png</auction_pict_url>
                    <auction_name>鞋子</auction_name>
                    <quality>1</quality>
                    <consign_time>yyyy-MM-dd HH:mm:ss</consign_time>
                    <pay_time>yyyy-MM-dd HH:mm:ss</pay_time>
                    <distribute_time>yyyy-MM-dd HH:mm:ss</distribute_time>
                    <address_do>
                        <prov>浙江省</prov>
                        <city>杭州市</city>
                        <area>余杭区</area>
                        <town>五常街道</town>
                        <oaid>sdfasfasdfaf</oaid>
                        <receiver_name>王*</receiver_name>
                        <receiver_mobile>182014*******</receiver_mobile>
                        <receiver_phone>0731-********</receiver_phone>
                        <receiver_address>文一西路*********</receiver_address>
                    </address_do>
                    <refund_status>NO_REFUND</refund_status>
                    <sku_id>123456</sku_id>
                    <sku_spec>红色,56码</sku_spec>
                    <out_sku_id>123456</out_sku_id>
                    <cid>123456</cid>
                </daifa_scp_order_model>
            </scp_order_models>
        </model>
        <total_count>100</total_count>
    </daifa_supplier_order_query_response>

    异常示例

    • XML示例
    • JSON示例
    <error_response>
        <code>50</code>
        <msg>Remote service error</msg>
        <sub_code>isv.invalid-parameter</sub_code>
        <sub_msg>非法参数</sub_msg>
    </error_response>

    错误码解释

    错误码 错误描述 解决方案

    API工具

    如何获得此API

    FAQ

    返回
    顶部