采购单渲染,会返回可售商品和不可售商品,客户可以选择可售商品进行采购单下单。
接口说明
警告 本接口即将下线,采购单渲染请使用 SplitPurchaseOrder - 采购单渲染并拆单接口
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用前面加 * 表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
linkedmall:RenderPurchaseOrder | none | *全部资源 * |
| 无 |
请求语法
POST /opensaas-s2b/opensaas-s2b-biz-trade/v2/purchaseOrders/commands/render HTTP/1.1
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
body | PurchaseOrderRenderQuery | 是 | 渲染采购单 |
{
"deliveryAddress": {
"divisionCode": "610102",
"addressDetail": "陕西省西安市***大厦",
"receiverPhone": "187****1553",
"receiver": "闫先生",
"townDivisionCode": "61010212"
},
"buyerId": "test1234****679",
"productList": [
{
"quantity": 1,
"productId": "6600622091****6736",
"purchaserId": "22000009",
"skuId": "6600622091****6737"
}
]
}
返回参数
{
"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-18 | API 内部配置变更,不影响调用 | 查看变更详情 |