Flavours API
ReportProduct

Products Report

GET
/api/v2/reports/products

List per-product (or per-product-variant, via group_by) sales metrics (quantity, revenue, returns, average price, order count) for a market/branch/date window, with search, category filter and pagination.

AuthorizationBearer <token>

You can retrieve your token by logging in.

In: header

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/reports/products" \  -H "X-API-Version: 2.3.0"
{
  "meta": {
    "code": 200,
    "status": "success",
    "message": "Data Loaded Successfully"
  },
  "data": {
    "current_page": 1,
    "data": [
      {
        "product_id": "c28eaf08-f9bd-4e2f-8654-07d333eb953d",
        "product_name_en": "Est repudiandae",
        "product_name_ar": "sit",
        "product_prep_time": null,
        "product_images": null,
        "product_is_active": true,
        "product_min_price": 10,
        "product_max_price": 10,
        "products_qty": 5,
        "products_total": 50,
        "category_id": 10,
        "category_name_en": "Drinks",
        "category_name_ar": "مشروبات",
        "category_icon": "🥤",
        "quantity_sold": 5,
        "returned_qty": 1,
        "net_qty": 4,
        "gross_revenue": "50",
        "returns_value": "10",
        "net_revenue": "40",
        "avg_selling_price": "10",
        "order_count": 1,
        "is_archived": false,
        "modifiers": []
      },
      {
        "product_id": "4e533394-443f-4d64-bfeb-528ef65be86f",
        "product_name_en": "Ipsum doloremque",
        "product_name_ar": "et",
        "product_prep_time": null,
        "product_images": null,
        "product_is_active": true,
        "product_min_price": 10,
        "product_max_price": 10,
        "products_qty": 5,
        "products_total": 50,
        "category_id": 13,
        "category_name_en": "Drinks",
        "category_name_ar": "مشروبات",
        "category_icon": "🥤",
        "quantity_sold": 5,
        "returned_qty": 1,
        "net_qty": 4,
        "gross_revenue": "50",
        "returns_value": "10",
        "net_revenue": "40",
        "avg_selling_price": "10",
        "order_count": 1,
        "is_archived": false,
        "modifiers": []
      },
      {
        "product_id": "728ed17b-cc85-46e6-9f17-e08c10ef71d6",
        "product_name_en": "Docs Burger",
        "product_name_ar": "برجر",
        "product_prep_time": null,
        "product_images": null,
        "product_is_active": true,
        "product_min_price": 0,
        "product_max_price": 0,
        "products_qty": 3,
        "products_total": 150,
        "category_id": 2,
        "category_name_en": "Docs Menu",
        "category_name_ar": "قائمة",
        "category_icon": "🍔",
        "quantity_sold": 3,
        "returned_qty": 1,
        "net_qty": 2,
        "gross_revenue": "150",
        "returns_value": "50",
        "net_revenue": "100",
        "avg_selling_price": "50",
        "order_count": 1,
        "is_archived": false,
        "modifiers": []
      },
      {
        "product_id": "4914b85b-0c56-4794-a30f-710a64b8f780",
        "product_name_en": "Totam tenetur",
        "product_name_ar": "consequatur",
        "product_prep_time": null,
        "product_images": null,
        "product_is_active": true,
        "product_min_price": 0,
        "product_max_price": 0,
        "products_qty": 3,
        "products_total": 30,
        "category_id": 12,
        "category_name_en": "Burgers",
        "category_name_ar": "برغر",
        "category_icon": "🍔",
        "quantity_sold": 3,
        "returned_qty": 0,
        "net_qty": 3,
        "gross_revenue": "30",
        "returns_value": "0",
        "net_revenue": "30",
        "avg_selling_price": "10",
        "order_count": 1,
        "is_archived": false,
        "modifiers": []
      },
      {
        "product_id": "04374bab-ca75-49cd-a88f-781b5a095780",
        "product_name_en": "Docs Burger",
        "product_name_ar": "برجر",
        "product_prep_time": null,
        "product_images": null,
        "product_is_active": true,
        "product_min_price": 0,
        "product_max_price": 0,
        "products_qty": 2,
        "products_total": 100,
        "category_id": 1,
        "category_name_en": "Docs Menu",
        "category_name_ar": "قائمة",
        "category_icon": "🍔",
        "quantity_sold": 2,
        "returned_qty": 0,
        "net_qty": 2,
        "gross_revenue": "100",
        "returns_value": "0",
        "net_revenue": "100",
        "avg_selling_price": "50",
        "order_count": 1,
        "is_archived": false,
        "modifiers": []
      }
    ],
    "first_page_url": "http://localhost:8000/api/v2/reports/products?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "http://localhost:8000/api/v2/reports/products?page=1",
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "page": null,
        "active": false
      },
      {
        "url": "http://localhost:8000/api/v2/reports/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/reports/products",
    "per_page": 20,
    "prev_page_url": null,
    "to": 5,
    "total": 5
  }
}
{
  "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
}