Flavours API
ReportProduct

Product Sales Stats

GET
/api/v2/reports/products/{productId}/stats

Sales/return metrics for a single product within a date range + branch window, using the same netting as the products report row.

AuthorizationBearer <token>

You can retrieve your token by logging in.

In: header

Path Parameters

productId*string

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/consequatur/stats" \  -H "X-API-Version: 2.3.0"
{
  "meta": {
    "code": 200,
    "status": "success",
    "message": "Product sales overview retrieved successfully."
  },
  "data": {
    "product_id": "c28eaf08-f9bd-4e2f-8654-07d333eb953d",
    "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,
    "duration": null,
    "price": "10",
    "calorie": null
  }
}
{
  "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
}