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

taobao.daifa.distributor.order.query (代发管理-分销商订单查询接口)

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

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
auction_id Number 可选 12345 商品id
end_created String 可选 结束时间 格式:yyyy-MM-dd HH:mm:ss 结束时间
biz_order_id Number 可选 123456 主订单ID,传递主订单ID后其它筛选条件即失败,返回参数中会额外返回省、市、区、街道信息
page_index Number 必须 1 页码
distributor_id Number 可选 123 分销商平台id
page_size Number 可选 10
  • 默认值:10
  • 每页数量
    auction_name String 可选 鞋子 商品名称
    start_created String 可选 开始时间 格式:yyyy-MM-dd HH:mm:ss 开始时间,目前支持查询30天以内的订单,以订单创建时间为准
    query_cancel_scporder Boolean 可选 false
  • 默认值:false
  • 返回结果中是否包含已取消的代发单据,默认不反悔

    响应参数

    名称 类型 示例值 描述
    page_index Number 1 页码
    call_result String true 调用结果
    call_err_code String SYSTEM_ERROR 异常错误码
    call_err_msg String 系统异常 异常信息
    page_size Number 10 每页条数
    model QueryDistributorOrderResponse 业务对象
    • distributor_order_models
    • DistributorOrderModel []
    • 订单列表
    • └ parent_id
    • String
    • 123456
    • 淘宝主订单ID,主子一体订单 bizOrderId = parentId
    • └ main
    • Boolean
    • true
    • 是否是主订单
    • └ detail
    • Boolean
    • false
    • 是否是子订单
    • └ biz_order_id
    • String
    • 123456
    • 订单ID
    • └ order_status
    • String
    • 待发货
    • 订单状态 - 继承交易的订单状态,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", "交易关闭"),
    • └ pay_time
    • String
    • 格式:yyyy-MM-dd HH:mm:ss
    • 支付时间
    • └ seller_memo
    • String
    • xxxx
    • 卖家添加的备注
    • sub_distributor_order_models
    • SubDistributorOrderModel []
    • 子订单信息
    • └ scp_order_id
    • String
    • 12345
    • 请使用daifa_scp_order_models中信息,代发订单ID
    • └ parent_id
    • String
    • 12345
    • 淘宝主订单ID,主子一体订单 bizOrderId = parentId
    • └ main
    • Boolean
    • true
    • 是否是主订单
    • └ detail
    • Boolean
    • false
    • 是否是子订单
    • └ biz_order_id
    • String
    • 123456
    • 订单ID
    • └ order_status
    • String
    • 代发货
    • 订单状态 - 继承交易的订单状态,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
    • 已分配
    • 请使用daifa_scp_order_models中信息,一笔订单可能存在多次分配,所以此状态忽略,代发分配状态,INIT-未分配,DISTRIBUTE-已分配,CONSIGN-已回传,CANCEL-取消分配
    • └ auction_id
    • String
    • 12456
    • 商品ID
    • └ auction_pict_url
    • String
    • xxxx.png
    • 商品图片url
    • └ auction_name
    • String
    • 鞋子
    • 商品名称
    • └ quality
    • Number
    • 2
    • 数量
    • └ 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
    • 请使用daifa_scp_order_models中信息,分配时间
    • └ seller_memo
    • String
    • xxxx
    • 卖家添加的备注
    • └ sku_id
    • Number
    • 123456
    • 平台侧skuId
    • daifa_scp_order_models
    • DaifaScpOrderModel []
    • 代发单据对象
    • └ scp_order_id
    • Number
    • 123456
    • 代发单据id,已分配订单存在
    • └ distributor_id
    • Number
    • 123456
    • 分销商id
    • └ supplier_id
    • Number
    • 123456
    • 供货商id
    • └ remark
    • String
    • 卖家备注
    • 分单时的备注,分单无备注则去卖家在淘宝订单上的白术sellerMemo
    • └ product_id
    • String
    • 123456
    • 货品id
    • └ product_name
    • String
    • 鞋子
    • 货品名称
    • └ product_count
    • Number
    • 1
    • 货品数量
    • └ product_sku_id
    • String
    • 123456
    • 货品skuId
    • └ product_sku_spec
    • String
    • 红色,40码
    • 货品sku规格
    • └ product_pic_url
    • String
    • xxx.png
    • 货品图片
    • └ product_type
    • Number
    • 0
    • 0 - 主货品 * 1 - 赠品
    • └ supplier_name
    • String
    • xxx供货商
    • 供货商在平台侧名称
    • └ distribute_time
    • String
    • 2021-01-01 19:00:00
    • 订单分配时间
    • └ distribute_status
    • String
    • 已分配
    • 代发分配状态,INIT-未分配,DISTRIBUTE-已分配,CONSIGN-已回传,CANCEL-取消分配
    • └ consign_time
    • String
    • 2021-01-01 19:00:00
    • 发货时间,当前发货时间与父订单、子订单发货时间一致
    • └ cancel_reason
    • String
    • 订单修改地址
    • 代发单据取消分单原因
    • └ quality
    • Number
    • 1
    • 本次分单商品数量
    • └ sku_id
    • Number
    • 12345
    • 本次分单指定的商品sku,注意订单如果修改过sku,这个字段可能与子订单的skuId不一致
    • └ sku_spec
    • String
    • 红色,40码
    • 订单在平台sku描述信息
    • └ outer_sku_id
    • String
    • 12345
    • 外部网店自己定义的Sku编号。
    • └ outer_id
    • String
    • 123456
    • 商家外部编码(可与商家外部系统对接)。外部商家自己定义的商品Item的id,可以通过taobao.items.custom.get获取商品的Item的信息
    • └ gmt_create
    • String
    • 格式:yyyy-MM-dd HH:mm:ss
    • 子订单创建时间
    • └ gmt_modified
    • String
    • 格式:yyyy-MM-dd HH:mm:ss
    • 子订单最后更新时间
    • address_do
    • AddressDO
    • 传入订单ID查询返回该字段
    • └ prov
    • String
    • 浙江省
    • └ city
    • String
    • 杭州市
    • └ area
    • String
    • 余杭区
    • └ town
    • String
    • 五常街道
    • 街道
    • └ gmt_create
    • String
    • 格式:yyyy-MM-dd HH:mm:ss
    • 主订单创建时间
    • └ gmt_modified
    • String
    • 格式:yyyy-MM-dd HH:mm:ss
    • 主订单最后更新时间
    total_count Number 100 总条数

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    DaifaDistributorOrderQueryRequest req = new DaifaDistributorOrderQueryRequest();
    req.setAuctionId(12345L);
    req.setEndCreated("结束时间 格式:yyyy-MM-dd HH:mm:ss");
    req.setBizOrderId(123456L);
    req.setPageIndex(1L);
    req.setDistributorId(123L);
    req.setPageSize(10L);
    req.setAuctionName("鞋子");
    req.setStartCreated("开始时间 格式:yyyy-MM-dd HH:mm:ss");
    req.setQueryCancelScporder(false);
    DaifaDistributorOrderQueryResponse rsp = client.execute(req, sessionKey);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <daifa_distributor_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>
            <distributor_order_models>
                <distributor_order_model>
                    <parent_id>123456</parent_id>
                    <main>true</main>
                    <detail>false</detail>
                    <biz_order_id>123456</biz_order_id>
                    <order_status>待发货</order_status>
                    <pay_time>格式:yyyy-MM-dd HH:mm:ss</pay_time>
                    <seller_memo>xxxx</seller_memo>
                    <sub_distributor_order_models>
                        <sub_distributor_order_model>
                            <scp_order_id>12345</scp_order_id>
                            <parent_id>12345</parent_id>
                            <main>true</main>
                            <detail>false</detail>
                            <biz_order_id>123456</biz_order_id>
                            <order_status>代发货</order_status>
                            <distribute_status>已分配</distribute_status>
                            <auction_id>12456</auction_id>
                            <auction_pict_url>xxxx.png</auction_pict_url>
                            <auction_name>鞋子</auction_name>
                            <quality>2</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>
                            <seller_memo>xxxx</seller_memo>
                            <sku_id>123456</sku_id>
                            <daifa_scp_order_models>
                                <daifa_scp_order_model>
                                    <scp_order_id>123456</scp_order_id>
                                    <distributor_id>123456</distributor_id>
                                    <supplier_id>123456</supplier_id>
                                    <remark>卖家备注</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>红色,40码</product_sku_spec>
                                    <product_pic_url>xxx.png</product_pic_url>
                                    <product_type>0</product_type>
                                    <supplier_name>xxx供货商</supplier_name>
                                    <distribute_time>2021-01-01 19:00:00</distribute_time>
                                    <distribute_status>已分配</distribute_status>
                                    <consign_time>2021-01-01 19:00:00</consign_time>
                                    <cancel_reason>订单修改地址</cancel_reason>
                                    <quality>1</quality>
                                    <sku_id>12345</sku_id>
                                </daifa_scp_order_model>
                            </daifa_scp_order_models>
                            <sku_spec>红色,40码</sku_spec>
                            <outer_sku_id>12345</outer_sku_id>
                            <outer_id>123456</outer_id>
                            <gmt_create>格式:yyyy-MM-dd HH:mm:ss</gmt_create>
                            <gmt_modified>格式:yyyy-MM-dd HH:mm:ss</gmt_modified>
                        </sub_distributor_order_model>
                    </sub_distributor_order_models>
                    <address_do>
                        <prov>浙江省</prov>
                        <city>杭州市</city>
                        <area>余杭区</area>
                        <town>五常街道</town>
                    </address_do>
                    <gmt_create>格式:yyyy-MM-dd HH:mm:ss</gmt_create>
                    <gmt_modified>格式:yyyy-MM-dd HH:mm:ss</gmt_modified>
                </distributor_order_model>
            </distributor_order_models>
        </model>
        <total_count>100</total_count>
    </daifa_distributor_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

    返回
    顶部