Product Category Stats — By Category
Product counts (total / active / inactive / sellable) for a single category.
Authorization
API-TOKEN Your partner API key. Send it in the API-TOKEN header on every request.
In: header
Path Parameters
Query Parameters
Restrict the counts to a market. Ignored for non-admin callers (always scoped to their own market); an admin may only target a market they are granted. Must match an existing stored value.
Restrict the counts to a branch (products with this branch_id or a null branch_id). Must match an existing stored value.
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/product-categories/81/stats" \ -H "X-API-Version: 2.3.0"{
"meta": {
"code": 200,
"status": "success",
"message": "Data Loaded Successfully"
},
"data": {
"count": 3,
"active_count": 1,
"inactive_count": 2,
"sellable_count": 1
}
}{
"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
}Merge Product Categories POST
Merge one or more duplicate canonical categories into a single winner: re-points products, per-branch sort order and kitchen mappings from the losers onto the winner, migrates per-tenant overrides, then soft-deletes the losers. Order history is never touched. Admin only.
Product Category Stats — Summary GET
Product counts across every product in the caller's scope (all categories plus uncategorized).