RenderPurchaseOrder - 采购单渲染

采购单渲染,会返回可售商品和不可售商品,客户可以选择可售商品进行采购单下单。

接口说明

采购单渲染,会返回可售商品和不可售商品,客户可以选择可售商品进行采购单下单。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求语法

POST /opensaas-s2b/opensaas-s2b-biz-trade/v2/purchaseOrders/commands/render HTTP/1.1

请求参数

名称类型必填描述示例值
bodyPurchaseOrderRenderQuery

渲染采购单

{
  "deliveryAddress": {
    "divisionCode": "610102",
    "addressDetail": "陕西省西安市***大厦",
    "receiverPhone": "187****1553",
    "receiver": "闫先生",
    "townDivisionCode": "61010212"
  },
  "buyerId": "test1234****679",
  "productList": [
    {
      "quantity": 1,
      "productId": "6600622091****6736",
      "purchaserId": "22000009",
      "skuId": "6600622091****6737"
    }
  ]
}

返回参数

名称类型描述示例值
PurchaseOrderRenderResult

采购单渲染结果

{
  "requestId": "0928251D-713B-17A1-A2B0-1A57****90B4",
  "orderList": [
    {
      "productList": [
        {
          "productId": "6600622091****6736",
          "productTitle": "儿童学习桌",
          "skuTitle": "浅灰色",
          "skuId": "6600622091****6737",
          "purchaserId": "22***09",
          "promotionFee": null,
          "quantity": 1,
          "productUrl": null,
          "productPicUrl": "//img.alicdn.com/imgextra/i4/2216003305543/O1CN01bip3Un1qokG0DYLWA_!!2216003305543.jpg",
          "price": 1,
          "canSell": true,
          "message": null,
          "features": null
        }
      ],
      "deliveryInfoList": [
        {
          "id": "20",
          "displayName": "快递 免邮",
          "postFee": 0,
          "serviceType": -4
        }
      ],
      "invoiceInfo": null,
      "extInfo": null,
      "canSell": true,
      "message": null
    }
  ],
  "unsellableOrderList": [
    {
      "productList": [],
      "deliveryInfoList": null,
      "invoiceInfo": null,
      "extInfo": null,
      "canSell": false,
      "message": null
    }
  ],
  "addressList": [
    {
      "addressId": 0,
      "receiver": "闫先生",
      "receiverPhone": "187****1553",
      "addressDetail": "陕西省西安市***大厦",
      "divisionCode": "610102",
      "townDivisionCode": "610102002"
    }
  ],
  "extInfo": null,
  "canSell": true,
  "message": null
}

示例

正常返回示例

JSON格式

{
  "addressList": [
    {
      "divisionCode": "330106",
      "addressDetail": "陕西省西安市新城区xx街道xxx大厦xx室",
      "receiverPhone": "182***5674",
      "townDivisionCode": "330106109",
      "receiver": "任先生",
      "addressId": 0
    }
  ],
  "canSell": true,
  "requestId": "841471F6-5D61-1331-8C38-2****B55",
  "orderList": [
    {
      "message": "库存为0",
      "deliveryInfoList": [
        {
          "postFee": 0,
          "serviceType": -4,
          "id": "20",
          "displayName": "快递 免邮"
        }
      ],
      "canSell": true,
      "productList": [
        {
          "productTitle": "儿童学习桌",
          "features": {
            "test": "test",
            "test2": 1
          },
          "skuTitle": "浅绿色",
          "quantity": 1,
          "productId": "6600****6736",
          "canSell": true,
          "price": 100,
          "productPicUrl": "//img.alicdn.com/imgextra/i4/2216003305543/O1CN01bip3Un1qokG0",
          "purchaserId": "PID56****2304",
          "message": "库存为0",
          "skuId": "6600****6737"
        }
      ],
      "extInfo": {
        "test": "test",
        "test2": 1
      }
    }
  ],
  "unsellableOrderList": [
    {
      "message": "库存为0",
      "deliveryInfoList": [
        {
          "postFee": 0,
          "serviceType": -4,
          "id": "20",
          "displayName": "快递 免邮"
        }
      ],
      "canSell": true,
      "productList": [
        {
          "productTitle": "儿童学习桌",
          "features": {
            "test": "test",
            "test2": 1
          },
          "skuTitle": "浅绿色",
          "quantity": 1,
          "productId": "6600****6736",
          "canSell": true,
          "price": 100,
          "productPicUrl": "//img.alicdn.com/imgextra/i4/2216003305543/O1CN01bip3Un1qokG0",
          "purchaserId": "PID56****2304",
          "message": "库存为0",
          "skuId": "6600****6737"
        }
      ],
      "extInfo": {
        "test": "test",
        "test2": 1
      }
    }
  ],
  "message": "库存为0",
  "extInfo": {
    "test": "test",
    "test2": 1
  }
}

错误码

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-09-18API 内部配置变更,不影响调用查看变更详情