SplitPurchaseOrder

Updated at:

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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.