Skip to main content
GET
/
categories
/
{id}
Get a Single Category
curl --request GET \
  --url https://api.fabric.inc/v3/categories/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "53184766610c0e32a86d875",
  "name": "Color",
  "localizedProperties": {
    "en-US": {
      "name": "Color"
    },
    "en-IN": {
      "name": "Colour"
    }
  },
  "isLocalizable": true,
  "isRoot": true,
  "isLeaf": false,
  "hasProducts": true,
  "categoryAttributes": [
    {
      "id": "64184766610c0e32a86d8758",
      "name": "color",
      "localizedProperties": {
        "en-US": {
          "name": "Color"
        },
        "en-IN": {
          "name": "Colour"
        }
      },
      "isLocalizable": true,
      "isInherited": true,
      "type": "TEXT",
      "validation": {
        "dateFormat": "MM-DD-YYYY"
      },
      "value": "blue"
    }
  ],
  "productAttributes": [
    {
      "id": "33184766610c0e32a86d8759",
      "name": "Color",
      "localizedProperties": {
        "en-US": {
          "name": "Color"
        },
        "en-IN": {
          "name": "Colour"
        }
      },
      "isLocalizable": true,
      "isInherited": true,
      "type": "TEXT",
      "isMandatory": true
    }
  ],
  "productIds": [
    "64184766610c0e32a86d8758"
  ],
  "children": [
    {
      "id": "33184766610c0e32a86d8759",
      "name": "Color",
      "localizedProperties": {
        "en-US": {
          "name": "Color"
        },
        "en-IN": {
          "name": "Colour"
        }
      },
      "isLocalizable": true,
      "isLeaf": false,
      "hasProducts": true
    }
  ],
  "updatedBy": "test@eamil.com",
  "updatedAt": "2023-04-20T10:24:36.162Z",
  "createdAt": "2021-04-20T10:24:36.162Z"
}

Authorizations

Authorization
string
header
required

S2S access token (JWT) from fabric Identity service (during Login)

Headers

x-fabric-tenant-id
string

A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.

Example:

"517fa9dfd42d8b00g1o3k312"

x-fabric-request-id
string

Unique request ID

Example:

"263e731c-45c8-11ed-b878-0242ac120002"

Path Parameters

id
string
required

24-character system-generated category ID

Query Parameters

locales
string

Comma-separated locale codes of category. The service throws a 400 error if locale isn't supported. Standard locales can be found at https://www.rfc-editor.org/rfc/rfc5646. The recommended way to get the locale is by invoking multi-channel service

Example:

"fr-CA, en-US"

Response

OK

Category details

id
string

24-character system-generated category ID

Example:

"53184766610c0e32a86d875"

name
string

Non-localized category name

Example:

"Color"

localizedProperties
object

Localized properties of category Localized details

Example:
{
"en-US": { "name": "Color" },
"en-IN": { "name": "Colour" }
}
isLocalizable
boolean

true: Category name is translated into different languages or localized for different regions <br /> false: Category name isn't localized Note: Refer to localizedProperties to get relevant details based on locale

Example:

true

isRoot
boolean

true: This is a root category <br /> false: This isn't a root category

Example:

true

isLeaf
boolean

true: This is the last category of the branch with no further children categories <br /> false: This isn't the last category of the branch and has children categories

Example:

false

hasProducts
boolean

true: This is the leaf category of the branch which has some products in it <br /> false: This branch doesn't have any direct products assigned to it

Example:

true

categoryAttributes
object[]

Attributes assigned to the specified category

productAttributes
object[]

Attributes assigned for all products in the specified category.

productIds
string[]

System-generated 24-character product IDs associated with a category

children
object[]

Immediate children of the specified category

updatedBy
string

Email of user who last update the category

Example:

"test@eamil.com"

updatedAt
string

Time of last update to category

Example:

"2023-04-20T10:24:36.162Z"

createdAt
string

Time of category creation

Example:

"2021-04-20T10:24:36.162Z"