Purchase order creation result message
This message is returned asynchronously after a purchase order is created.
Topic
Kafka topic | order |
Message type | Ordered message |
Message partition key |
Message body
Purchase order creation is an asynchronous task. If a call to the CreatePurchaseOrder API returns an exception, such as error code 503, do not immediately issue a refund to the end customer. To prevent financial loss, wait to consume this message and verify the order status before you process any related business logic. For example, you can consume the Order status synchronization message to determine the order status.
Name | Type | Description | Example value | |
event | string | Message type | PurchaseOrderCreate | |
body | distributorId | String | Distributor ID | 12****01 |
purchaseId | String | Purchaser ID | ||
outerPurchaseOrderId | String | The external purchase order ID that was passed in during creation. | outer009100 | |
purchaseOrderId | String | Purchase order ID | 6696****5680 | |
purchaseOrderStatus | Integer | Purchase order status. 20: Purchase successful. Awaiting shipment. 30: Partially purchased. Awaiting shipment. 80: Transaction failed. | 20 | |
orderList | List<Order> | List of main orders. | ||
failReason | String | The reason why the purchase order creation failed. | Product not for sale | |
Example
{
"event": "PurchaseOrderCreate",
"body": {
"distributorId": "12****01",
"purchaseId": "PID12****01",
"orderList": [
{
"createDate": "2023-09-11T12:22:24.000+08:00",
"logisticsStatus": "8",
"orderAmount": "1",
"orderId": "6696****8593",
"orderLineList": [
{
"number": "1",
"orderLineId": "87788823******026",
"orderLineStatus": "1",
"payFee": 4006,
"productId": "763605422******307",
"productPicUrl": "//img.alicdn.com/imgextra/i3/60000*******14/O1CN017k7FhD1E******9WH_!!60000******14-2-at.png",
"productTitle": "Facial tissue, 3-ply, 100 sheets/pack, 20 packs, size M, new and old packaging alternated",
"skuId": "763605422******308",
"skuTitle": "1 item"
}
],
"orderStatus": "1"
}
],
"outerPurchaseOrderId": "outer009100",
"purchaseOrderId": "6696****5680",
"purchaseOrderStatus": 20
}
}