Light Mode
Create Order Item
POST
/orders/itemsLast modified: 22 days ago
This endpoint allows you to create an order item for a specific order by passing its ID in the body request.
Request
Body Params application/json
No schema defined
Example
{
"order_id": 837293123,
"identifier_type": "id",
"identifier": 123456,
"quantity": 1,
"branch_id": 12342,
"options": [
{
"id": 789012,
"value": [
"value1",
"value2"
]
}
],
"name": "Custom Product Name",
"price": 100,
"cost_price": 80,
"weight": 150,
"weight_type": "g"
}
Request samples
Responses
Success(200)
Not Found(404)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
No schema defined
Example
{
"status": 200,
"success": true,
"data": [
{
"id": 365435777,
"name": "SSD",
"sku": "sam-ssd-256g",
"quantity": 1,
"currency": "SAR",
"weight": 0.51,
"weight_label": "٥١٠ جم",
"amounts": {
"price_without_tax": {
"amount": 150,
"currency": "SAR"
},
"total_discount": {
"amount": 0,
"currency": "SAR"
},
"tax": {
"percent": "15.00",
"amount": {
"amount": 22.5,
"currency": "SAR"
}
},
"total": {
"amount": 150,
"currency": "SAR"
}
},
"notes": "",
"options": [
{
"id": 675638105,
"product_option_id": 1902643925,
"name": "size",
"type": "radio",
"value": {
"id": 1090448197,
"name": "256G",
"price": {
"amount": 0,
"currency": "SAR"
}
}
}
],
"images": [],
"codes": [],
"files": [],
"reservations": [],
"branches_quantity": []
}
]
}
Last modified: 22 days ago