Create B2B Order
POST /B2b/SaveOrder
Creates a new order in Adisyo through the B2B flow. This endpoint matches products by stock code (stockCode) and uses a simplified body structure.
Example Request
Creating a B2B order
curl -X POST 'https://ext.adisyo.com/api/External/v2/B2b/SaveOrder' \
--header "x-api-key: ..." \
--header "x-api-secret: ..." \
--header "x-api-consumer: ..." \
--header 'Content-Type: application/json' \
--data '{
"description": "Order description",
"items": [
{
"stockCode": "Sc123",
"quantity": 1,
"description": "Item description 1"
},
{
"stockCode": "Sc123",
"quantity": 2,
"description": "Item description 2"
}
]
}'Request Parameters
| Parameter Name | Data Type | Description |
|---|---|---|
description | String? | Order description |
items | Array | List of order items |
[].items.stockCode | String | Product stock code. Should be obtained from the Product List. |
[].items.quantity | Number | Product quantity |
[].items.description | String? | Description for the order item |
Example Response
Saved B2B order response
{
"b2bOrderId": 643287,
"status": 100,
"message": null
}Response Parameters
| Parameter Name | Data Type | Description |
|---|---|---|
b2bOrderId | Number | B2B order ID in Adisyo system |
status | Number | Response Codes |
message | String | Operation result message |