Order Products
Paginated on-demand line items for an order, filtered by status (related/returned/changed). At X-API-Version >= 2.6.0 each row eager-loads its product/modifiers/taxes/discounts by default; below 2.6.0 rows are bare unless explicit includes are passed. Scoped to the caller's market/branch. Paginated via page/per_page (max 100).
Authorization
API-TOKEN Your partner API key. Send it in the API-TOKEN header on every request.
In: header
Path Parameters
Query Parameters
Page number for pagination. Must be at least 1.
Rows per page (max 100). Defaults to 20. Must be at least 1. Must not be greater than 100.
Filter line items by lifecycle status: related (the order lines), returned, or changed. Omit for all statuses.
"related" | "returned" | "changed"Sort by any order_products column; prefix with "-" for descending.
Header Parameters
API contract version to target. See the Changelog for what changed in each version.
"2.0.0""2.3.0" | "2.2.0" | "2.1.0" | "2.0.0"Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://api.flavours.sa/dev/api/v2/orders/repellendus/products?page=1&per_page=20&status=related&sort=-created_at&includes=consectetur" \ -H "X-API-Version: 2.3.0"{
"meta": {
"code": 200,
"status": "success",
"message": "Data Loaded Successfully"
},
"data": {
"current_page": 1,
"data": [
{
"id": 3,
"market_id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"branch_id": "2438ea30-370a-4ca0-9423-f635f83f1bec",
"order_id": "893ab8d2-8283-4048-baf1-38e0fcec1483",
"category_id": 4,
"product_id": "937369b1-96dd-4413-b303-5dc3426627fa",
"qty": 1,
"price": 50,
"discount": 0,
"tax": 0,
"subtotal": 50,
"total": 50,
"cost": 0,
"profit": 0,
"is_done": false,
"created_at": null,
"updated_at": null,
"status": "RELATED",
"notes": null,
"charge": 0,
"order_return_id": null,
"round_id": null,
"seat_no": null,
"course_no": null,
"fired_at": null,
"served_at": null,
"voided_at": null,
"void_reason_id": null,
"void_note": null,
"voided_by_user_id": null,
"void_approved_by_user_id": null,
"product_category": {
"id": 4,
"icon": "🍔",
"name_en": "Docs Menu",
"name_ar": "قائمة",
"deleted_at": null,
"created_at": 1792593340692,
"updated_at": null,
"market_id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"image_url": null,
"owned_by": null
},
"product": {
"id": "937369b1-96dd-4413-b303-5dc3426627fa",
"market_id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"branch_id": "2438ea30-370a-4ca0-9423-f635f83f1bec",
"category_id": 4,
"name_en": "Docs Burger",
"name_ar": "برجر",
"description_en": null,
"description_ar": null,
"duration": null,
"stock": 0,
"order": 4,
"images": null,
"is_active": true,
"created_at": 1792593340677,
"updated_at": 1792593340677,
"deleted_at": null,
"rating_amount": 0,
"rating_avg": "0.00",
"sold_amount": 0,
"sold_revenue": 0,
"qoyod_id": null,
"min_additionals": null,
"max_additionals": null,
"is_global": false,
"owned_by": null
},
"modifiers": [],
"discount_fees": [],
"tax_fees": [],
"rating": null
},
{
"id": 4,
"market_id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"branch_id": "2438ea30-370a-4ca0-9423-f635f83f1bec",
"order_id": "893ab8d2-8283-4048-baf1-38e0fcec1483",
"category_id": 4,
"product_id": "937369b1-96dd-4413-b303-5dc3426627fa",
"qty": 1,
"price": 50,
"discount": 0,
"tax": 0,
"subtotal": 50,
"total": 50,
"cost": 0,
"profit": 0,
"is_done": false,
"created_at": null,
"updated_at": null,
"status": "RELATED",
"notes": null,
"charge": 0,
"order_return_id": null,
"round_id": null,
"seat_no": null,
"course_no": null,
"fired_at": null,
"served_at": null,
"voided_at": null,
"void_reason_id": null,
"void_note": null,
"voided_by_user_id": null,
"void_approved_by_user_id": null,
"product_category": {
"id": 4,
"icon": "🍔",
"name_en": "Docs Menu",
"name_ar": "قائمة",
"deleted_at": null,
"created_at": 1792593340692,
"updated_at": null,
"market_id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"image_url": null,
"owned_by": null
},
"product": {
"id": "937369b1-96dd-4413-b303-5dc3426627fa",
"market_id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"branch_id": "2438ea30-370a-4ca0-9423-f635f83f1bec",
"category_id": 4,
"name_en": "Docs Burger",
"name_ar": "برجر",
"description_en": null,
"description_ar": null,
"duration": null,
"stock": 0,
"order": 4,
"images": null,
"is_active": true,
"created_at": 1792593340677,
"updated_at": 1792593340677,
"deleted_at": null,
"rating_amount": 0,
"rating_avg": "0.00",
"sold_amount": 0,
"sold_revenue": 0,
"qoyod_id": null,
"min_additionals": null,
"max_additionals": null,
"is_global": false,
"owned_by": null
},
"modifiers": [],
"discount_fees": [],
"tax_fees": [],
"rating": null
},
{
"id": 5,
"market_id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"branch_id": "2438ea30-370a-4ca0-9423-f635f83f1bec",
"order_id": "893ab8d2-8283-4048-baf1-38e0fcec1483",
"category_id": 4,
"product_id": "937369b1-96dd-4413-b303-5dc3426627fa",
"qty": 1,
"price": 50,
"discount": 0,
"tax": 0,
"subtotal": 50,
"total": 50,
"cost": 0,
"profit": 0,
"is_done": false,
"created_at": null,
"updated_at": null,
"status": "RELATED",
"notes": null,
"charge": 0,
"order_return_id": null,
"round_id": null,
"seat_no": null,
"course_no": null,
"fired_at": null,
"served_at": null,
"voided_at": null,
"void_reason_id": null,
"void_note": null,
"voided_by_user_id": null,
"void_approved_by_user_id": null,
"product_category": {
"id": 4,
"icon": "🍔",
"name_en": "Docs Menu",
"name_ar": "قائمة",
"deleted_at": null,
"created_at": 1792593340692,
"updated_at": null,
"market_id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"image_url": null,
"owned_by": null
},
"product": {
"id": "937369b1-96dd-4413-b303-5dc3426627fa",
"market_id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"branch_id": "2438ea30-370a-4ca0-9423-f635f83f1bec",
"category_id": 4,
"name_en": "Docs Burger",
"name_ar": "برجر",
"description_en": null,
"description_ar": null,
"duration": null,
"stock": 0,
"order": 4,
"images": null,
"is_active": true,
"created_at": 1792593340677,
"updated_at": 1792593340677,
"deleted_at": null,
"rating_amount": 0,
"rating_avg": "0.00",
"sold_amount": 0,
"sold_revenue": 0,
"qoyod_id": null,
"min_additionals": null,
"max_additionals": null,
"is_global": false,
"owned_by": null
},
"modifiers": [],
"discount_fees": [],
"tax_fees": [],
"rating": null
}
],
"first_page_url": "https://localhost:8000/api/v2/orders/893ab8d2-8283-4048-baf1-38e0fcec1483/products?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://localhost:8000/api/v2/orders/893ab8d2-8283-4048-baf1-38e0fcec1483/products?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"page": null,
"active": false
},
{
"url": "https://localhost:8000/api/v2/orders/893ab8d2-8283-4048-baf1-38e0fcec1483/products?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Next »",
"page": null,
"active": false
}
],
"next_page_url": null,
"path": "https://localhost:8000/api/v2/orders/893ab8d2-8283-4048-baf1-38e0fcec1483/products",
"per_page": 20,
"prev_page_url": null,
"to": 3,
"total": 3
}
}{
"meta": {
"code": 401,
"status": "error",
"message": "Unauthenticated."
},
"data": null
}{
"meta": {
"code": 403,
"status": "error",
"message": "Unauthorized."
},
"data": null
}{
"meta": {
"code": 404,
"status": "error",
"message": "Resource not found."
},
"data": null
}{
"meta": {
"code": 500,
"status": "error",
"message": "Internal server error."
},
"data": null
}Mark Order Product Done POST
Flips a single kitchen line's `is_done` flag. When the flip leaves no unfinished `RELATED` line on the order, the order is transitioned to `COMPLETED` through the same service the order update endpoint uses, so a status log is written, the table is released and the broadcast carries the new status. `is_done: 0` never moves the order back. When the order type's mandatory-field settings block the completion the tick still succeeds (200) and the response carries `meta.completion_blocked`, a list of `{field, message}`. **Gated by the branch cutover switch** (`branch_settings.kitchen.legacy_board`, contract §14.1): a branch on `READ_ONLY` answers `409` with `data.error.code = "kitchen.legacy_board_read_only"` and one on `OFF` answers `409 kitchen.legacy_board_off`, both before any write, so a stale client cannot tick a line on a branch that has moved to the kitchen screens.
Generate Order Invoice POST
Generate (or reuse a cached) invoice PDF for an order and return its file URL.