文档中心 > API类目 > 全渠道API

taobao.omniorder.allocatedinfo.sync (分单结果同步给星盘)

ISV分单完成,将分单结果同步给星盘

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
tid Number 必须 1231243213213 淘宝交易主订单ID
report_timestamp Number 必须 1469970719197 1231243213213
trace_id String 可选 9iujfefe22 跟踪Id
status String 必须 Waiting 分单状态,如: 等待中(Waiting),已分单(Allocated),分单失败(AllocateFail)
message String 可选 internal error 分单结果消息, 如果status为AllocateFail, 则表示失败的理由.
sub_order_list StoreAllocatedResult [] 必须
  • 最大列表长度:50
  • 门店的分单列表
    • └ code
    • String
    • 必须
    • 0
    • 0表示无系统异常
    • └ message
    • String
    • 可选
    • internal error
    • 异常描述
    • └ sub_oid
    • Number
    • 必须
    • 1231243213213
    • 子订单Id
    • └ store_id
    • String
    • 必须
    • 13343
    • 店铺Id, 可能是门店或者电商仓
    • └ store_type
    • String
    • 必须
    • Store
    • 店铺类型, 门店(Store)或者电商仓(Warehouse)
    • └ store_name
    • String
    • 可选
    • XXX门店
    • 店铺名称
    • └ status
    • String
    • 必须
    • Waiting
    • 订单分单状态, 可选值: Waiting(仍在派单中) Allocated(派单成功) AllocateFail(派单失败)
    • └ tid
    • Number
    • 可选
    • 1231243213213
    • 主订单Id
    • └ attributes
    • String
    • 可选
    • {"key": "value"}
    • 扩展字段

    响应参数

    名称 类型 示例值 描述
    err_code String 56 错误码
    message String xxx 错误内容

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    OmniorderAllocatedinfoSyncRequest req = new OmniorderAllocatedinfoSyncRequest();
    req.setTid(1231243213213L);
    req.setReportTimestamp(1469970719197L);
    req.setTraceId("9iujfefe22");
    req.setStatus("Waiting");
    req.setMessage("internal error");
    List<OmniorderAllocatedinfoSyncRequest.StoreAllocatedResult> list2 = new ArrayList<OmniorderAllocatedinfoSyncRequest.StoreAllocatedResult>();
    OmniorderAllocatedinfoSyncRequest.StoreAllocatedResult obj3 = new OmniorderAllocatedinfoSyncRequest.StoreAllocatedResult();
    list2.add(obj3);
    obj3.setCode("0");
    obj3.setMessage("internal error");
    obj3.setSubOid(1231243213213L);
    obj3.setStoreId("13343");
    obj3.setStoreType("Store");
    obj3.setStoreName("XXX门店");
    obj3.setStatus("Waiting");
    obj3.setTid(1231243213213L);
    obj3.setAttributes("{\"key\": \"value\"}");
    req.setSubOrderList(list2);
    OmniorderAllocatedinfoSyncResponse rsp = client.execute(req);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <omniorder_allocatedinfo_sync_response>
        <err_code>56</err_code>
        <message>xxx</message>
    </omniorder_allocatedinfo_sync_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

    返回
    顶部