Similar Product Categories
Advisory lookup that returns up to 10 existing categories whose canonical name or the caller market's override name equals or contains the given name_en/name_ar, so the client can warn about a near-duplicate before creating one. At least one of name_en/name_ar is required. Tenant-scoped: never returns another market's private categories or overrides. Exact matches are ordered first, then contains, then by name.
Authorization
API-TOKEN Your partner API key. Send it in the API-TOKEN header on every request.
In: header
Query Parameters
The English name to look up near-duplicates for. At least one of name_en or name_ar is required. This field is required when name_ar is not present. Must not be greater than 191 characters.
The Arabic name to look up near-duplicates for. At least one of name_en or name_ar is required. This field is required when name_en is not present. Must not be greater than 191 characters.
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
application/json
curl -X GET "https://api.flavours.sa/dev/api/v2/product-categories/similar?name_en=Steak&name_ar=%D8%B3%D8%AA%D9%8A%D9%83" \ -H "X-API-Version: 2.3.0"{
"meta": {
"code": 200,
"status": "success",
"message": "Similar product categories retrieved successfully."
},
"data": [
{
"id": 9,
"name_en": "Steak",
"name_ar": "ستيك",
"icon": "🥩",
"image_url": "https://cdn.example.com/img/uploads/product-categories/sample.png",
"source": "canonical",
"is_adopted": false,
"match_type": "exact"
}
]
}{
"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": 422,
"status": "error",
"message": "At least one of the English or Arabic name is required. (and 1 more error)"
},
"data": [
{
"code": 0,
"message": "At least one of the English or Arabic name is required.",
"field": "name_en"
},
{
"code": 0,
"message": "At least one of the English or Arabic name is required.",
"field": "name_ar"
}
]
}{
"meta": {
"code": 500,
"status": "error",
"message": "Internal server error."
},
"data": null
}Set Product Category Status POST
Activate or deactivate a category for the caller's market by writing the caller's per-market is_active override (adopting/creating the config if the market has none yet for a visible global). Tenant-scoped: only the caller's own or in-sector categories, never another market's. Never mints a duplicate canonical.
Sort Product Categories POST
Replace the product category display order. Open to any order-page user (platform admin/merchant or a subscriber). A branch-bound subscriber sorts their OWN branch's order when the request carries a branch_id (any other branch id is ignored, never written) or omits it, and sorts the MARKET-wide order when the request carries an explicit branch_id null (the Product Categories page), which also requires the PRODUCT_CATEGORY_UPDATE grant (403 without it). An unbound saver (admin/merchant or an account-owner subscriber with no branch_id) chooses the scope with branch_id: send a branch_id in the caller's own market to set that branch's per-branch order, or send null/omit it to set the single market-wide global order (category_product_sorts with branch_id null). market_id is the subscriber's own market, or the request market_id for an admin/merchant (ownership-verified). The list with filter[branch_id] reads the branch order; a branch that never sorted follows the market order, and categories the branch has no row for come after its own order, in market order.