文档中心 > API类目 > 货源服务API

taobao.itemmarket.purchase.distributor.create (创建采购单)

创建采购单

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
vendor_id Number 可选 7 服务商 id
sub_order_id_list String 可选 5404041050,5404041065 批量选择的采购子单 id 列表,与淘宝订单一一对应

响应参数

名称 类型 示例值 描述
result ImPurchaseOrderMeta 21 返回结果
  • └ purchase_order_id
  • Number
  • 5404041050
  • 采购单主单 id,关联多个采购子单
  • └ mobile_path_url
  • String
  • https://taobao.com
  • 移动端跳转的url地址
  • └ pc_path_url
  • String
  • https://taobao.pc.com
  • pc端跳转的url地址
call_sub_code String 501 错误子码
call_success Boolean true api调用是否成功
call_error_code String error 错误码
call_error_msg String 系统错误 错误信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
ItemmarketPurchaseDistributorCreateRequest req = new ItemmarketPurchaseDistributorCreateRequest();
req.setVendorId(7L);
req.setSubOrderIdList("5404041050,5404041065");
ItemmarketPurchaseDistributorCreateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<itemmarket_purchase_distributor_create_response>
    <result>
        <purchase_order_id>5404041050</purchase_order_id>
        <mobile_path_url>https://taobao.com</mobile_path_url>
        <pc_path_url>https://taobao.pc.com</pc_path_url>
    </result>
    <call_sub_code>501</call_sub_code>
    <call_success>true</call_success>
    <call_error_code>error</call_error_code>
    <call_error_msg>系统错误</call_error_msg>
</itemmarket_purchase_distributor_create_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

返回
顶部