Flavours API
Order

Order Products

GET
/api/v2/orders/{orderId}/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).

AuthorizationBearer <token>

You can retrieve your token by logging in.

In: header

Path Parameters

orderId*string

Query Parameters

page?|

Page number for pagination. Must be at least 1.

per_page?|

Rows per page (max 100). Defaults to 20. Must be at least 1. Must not be greater than 100.

status?|

Filter line items by lifecycle status: related (the order lines), returned, or changed. Omit for all statuses.

Value in"related" | "returned" | "changed"
sort?|

Sort by any order_products column; prefix with "-" for descending.

includes*array<>

Header Parameters

X-API-Version*string

API contract version to target. See the Changelog for what changed in each version.

Default"2.0.0"
Value in"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/quia/products?page=1&per_page=20&status=related&sort=-created_at&includes=adipisci" \  -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": "848aa3f5-fc3d-42d3-8cc9-4c6edd0140d0",
        "branch_id": "7c538fd7-9547-4b16-959d-f01052e04c6f",
        "order_id": "c00b8875-5715-4a2c-bfdf-13ae44449d82",
        "category_id": 2,
        "product_id": "728ed17b-cc85-46e6-9f17-e08c10ef71d6",
        "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,
        "product_category": {
          "id": 2,
          "icon": "🍔",
          "name_en": "Docs Menu",
          "name_ar": "قائمة",
          "deleted_at": null,
          "created_at": 1787446695950,
          "updated_at": null,
          "market_id": "848aa3f5-fc3d-42d3-8cc9-4c6edd0140d0",
          "image_url": null
        },
        "product": {
          "id": "728ed17b-cc85-46e6-9f17-e08c10ef71d6",
          "market_id": "848aa3f5-fc3d-42d3-8cc9-4c6edd0140d0",
          "branch_id": "7c538fd7-9547-4b16-959d-f01052e04c6f",
          "category_id": 2,
          "name_en": "Docs Burger",
          "name_ar": "برجر",
          "description_en": null,
          "description_ar": null,
          "duration": null,
          "stock": 0,
          "order": 46,
          "images": null,
          "is_active": true,
          "created_at": 1787446695927,
          "updated_at": 1787446695927,
          "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
        },
        "modifiers": [],
        "discount_fees": [],
        "tax_fees": [],
        "rating": null
      },
      {
        "id": 4,
        "market_id": "848aa3f5-fc3d-42d3-8cc9-4c6edd0140d0",
        "branch_id": "7c538fd7-9547-4b16-959d-f01052e04c6f",
        "order_id": "c00b8875-5715-4a2c-bfdf-13ae44449d82",
        "category_id": 2,
        "product_id": "728ed17b-cc85-46e6-9f17-e08c10ef71d6",
        "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,
        "product_category": {
          "id": 2,
          "icon": "🍔",
          "name_en": "Docs Menu",
          "name_ar": "قائمة",
          "deleted_at": null,
          "created_at": 1787446695950,
          "updated_at": null,
          "market_id": "848aa3f5-fc3d-42d3-8cc9-4c6edd0140d0",
          "image_url": null
        },
        "product": {
          "id": "728ed17b-cc85-46e6-9f17-e08c10ef71d6",
          "market_id": "848aa3f5-fc3d-42d3-8cc9-4c6edd0140d0",
          "branch_id": "7c538fd7-9547-4b16-959d-f01052e04c6f",
          "category_id": 2,
          "name_en": "Docs Burger",
          "name_ar": "برجر",
          "description_en": null,
          "description_ar": null,
          "duration": null,
          "stock": 0,
          "order": 46,
          "images": null,
          "is_active": true,
          "created_at": 1787446695927,
          "updated_at": 1787446695927,
          "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
        },
        "modifiers": [],
        "discount_fees": [],
        "tax_fees": [],
        "rating": null
      },
      {
        "id": 5,
        "market_id": "848aa3f5-fc3d-42d3-8cc9-4c6edd0140d0",
        "branch_id": "7c538fd7-9547-4b16-959d-f01052e04c6f",
        "order_id": "c00b8875-5715-4a2c-bfdf-13ae44449d82",
        "category_id": 2,
        "product_id": "728ed17b-cc85-46e6-9f17-e08c10ef71d6",
        "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,
        "product_category": {
          "id": 2,
          "icon": "🍔",
          "name_en": "Docs Menu",
          "name_ar": "قائمة",
          "deleted_at": null,
          "created_at": 1787446695950,
          "updated_at": null,
          "market_id": "848aa3f5-fc3d-42d3-8cc9-4c6edd0140d0",
          "image_url": null
        },
        "product": {
          "id": "728ed17b-cc85-46e6-9f17-e08c10ef71d6",
          "market_id": "848aa3f5-fc3d-42d3-8cc9-4c6edd0140d0",
          "branch_id": "7c538fd7-9547-4b16-959d-f01052e04c6f",
          "category_id": 2,
          "name_en": "Docs Burger",
          "name_ar": "برجر",
          "description_en": null,
          "description_ar": null,
          "duration": null,
          "stock": 0,
          "order": 46,
          "images": null,
          "is_active": true,
          "created_at": 1787446695927,
          "updated_at": 1787446695927,
          "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
        },
        "modifiers": [],
        "discount_fees": [],
        "tax_fees": [],
        "rating": null
      }
    ],
    "first_page_url": "http://localhost:8000/api/v2/orders/c00b8875-5715-4a2c-bfdf-13ae44449d82/products?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "http://localhost:8000/api/v2/orders/c00b8875-5715-4a2c-bfdf-13ae44449d82/products?page=1",
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "page": null,
        "active": false
      },
      {
        "url": "http://localhost:8000/api/v2/orders/c00b8875-5715-4a2c-bfdf-13ae44449d82/products?page=1",
        "label": "1",
        "page": 1,
        "active": true
      },
      {
        "url": null,
        "label": "Next &raquo;",
        "page": null,
        "active": false
      }
    ],
    "next_page_url": null,
    "path": "http://localhost:8000/api/v2/orders/c00b8875-5715-4a2c-bfdf-13ae44449d82/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
}