Create Order
POST
https://{serviceID}.retm.sa/api/v2/orders/create
Create Order
Endpoint
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
branch | string | Yes | The unique identifier of the branch. |
customer | Customer[] | Yes | An object containing the customer's details. |
discount | Discount[] | No | Optional discount details for the order. |
note | string | No | Additional notes for the order. |
ordertype | string | No | The order type ID obtained from the order type API. |
partner_reference | string | No | Reference ID for the order in the partner system. |
payments | Payments[] | No | Payment details for the order. |
products | Product[] | Yes | A list of products included in the order. |
subtotal | number | No | The subtotal amount before tax and discounts. |
tax | number | No | The total tax amount for the order. |
taxes | Taxes[] | No | A list of taxes applied to the order. |
total | number | No | The total amount after tax and discounts. |
Parameter | Type | Required | Description |
---|---|---|---|
address | Address | No | Customer's address details. |
name | CustomerName | No | Customer's name in multiple languages. |
phone | string | Yes | Customer's phone number. |
Parameter | Type | Required | Description |
---|---|---|---|
address | string | Yes | The detailed address. |
id | string | Yes | Unique identifier for the address. |
latitude | string | Yes | Latitude coordinate. |
longitude | string | Yes | Longitude coordinate. |
name | AddressName | Yes | Name for the address in multiple languages. |
note | string | No | Additional notes about the address. |
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Yes | Unique identifier of the product. |
quantity | number | Yes | Quantity of the product ordered. |
total | number | Yes | Total amount after tax and discounts. |
discount | number | No | Discount applied to the product. |
modifiers | Modifier[] | No | List of modifiers applied to the product. |
note | string | No | Additional notes for the product. |
subtotal | number | No | Subtotal amount before tax and discounts. |
tax | number | No | Tax amount for the product. |
taxes | Tax[] | No | List of taxes applied to the product. |
variant | string | No | Specific variant of the product. |
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Yes | Unique identifier of the modifier. |
amount | number | Yes | Price or amount associated with the modifier. |
quantity | number | Yes | Quantity of the modifier applied. |
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Yes | Unique identifier of the tax. |
value | number | Yes | Value of the tax applied. |
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Yes | Unique identifier for the payment method or transaction. |
amount | number | Yes | Total amount paid for the order. |
Request
Body Params application/json
Responses
Modified at 2025-06-17 11:20:10