ProductCategory
Product Category Stats — Summary
Product counts across every product in the caller's scope (all categories plus uncategorized).
Authorization
API-TOKEN API-TOKEN<token>
Your partner API key. Send it in the API-TOKEN header on every request.
In: header
Query Parameters
filter?object
filter.market_id?|
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.
filter.branch_id?|
Restrict the counts to a branch (products with this branch_id or a null branch_id). Must match an existing stored value.
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/product-categories/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
}