SplitPurchaseOrder
Splits a purchase order and renders the resulting parent-child order structure. This API returns a list of items based on the final parent-child order structure. Distributors can use this response to render the final parent-child order layout, which simplifies receiving the purchase order creation success message and backfilling parent-child order information later.
Operation description
Call this API before creating a purchase order. It returns two lists: one for sellable items and one for unsellable items. The sellable items list follows the final parent-child order split structure.
Try it now
Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
linkedmall:SplitPurchaseOrder |
none |
*All Resource
|
None | None |
Request syntax
POST /opensaas-s2b/opensaas-s2b-biz-trade/v2/purchaseOrders/commands/split HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body | PurchaseOrderRenderQuery |
No |
Input parameters for splitting and rendering a purchase order |
Response elements
|
Element |
Type |
Description |
Example |
| PurchaseOrderRenderResult |
Response from splitting and rendering a purchase order |
Examples
Success response
JSON format
{
"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
}
}
Error codes
See Error CodesError Codes for a complete list.
Release notes
See Release NotesRelease Notes for a complete list.