Product Sales Stats
Sales/return metrics for a single product within a date range + branch window, using the same netting as the products report row.
Authorization
default You can retrieve your token by logging in.
In: header
Path Parameters
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/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
}Product Orders List GET
Paginated list of orders containing the given product within a date range + branch window, with each order's refund status (Completed/Refunded/Partially Refunded).
Products Report GET
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.