Flavours Partner API
ProductCategory

Similar Product Categories

GET
/api/v2/product-categories/similar

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
API-TOKEN<token>

Your partner API key. Send it in the API-TOKEN header on every request.

In: header

Query Parameters

name_en?|

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.

name_ar?|

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

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

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
}