PUT
/
categories
/
{id}
curl --request PUT \
  --url https://api.fabric.inc/v3/categories/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Color",
  "localizedProperties": {
    "en-US": {
      "name": "Color"
    },
    "en-IN": {
      "name": "Colour"
    }
  },
  "isLocalizable": true,
  "categoryAttributes": [
    {
      "id": "55184766610c0e32a86d8759",
      "value": "blue"
    }
  ],
  "productAttributes": [
    {
      "id": "55184766610c0e32a86d8759",
      "isMandatory": true
    }
  ]
}'
{
  "id": "53184766610c0e32a86d875",
  "name": "Color",
  "localizedProperties": {
    "en-US": {
      "name": "Color"
    },
    "en-IN": {
      "name": "Colour"
    }
  },
  "isLocalizable": true,
  "isRoot": true,
  "isLeaf": 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": true
    }
  ],
  "updatedBy": "test@eamil.com",
  "updatedAt": "2023-04-20T10:24:36.162Z",
  "createdAt": "2021-04-20T10:24:36.162Z"
}

Authorizations

Authorization
string
headerrequired

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

Headers

x-fabric-tenant-id
string

The x-fabric-tenant-id header is a string that contains the ID of the tenant from whom you wish to pull information from.

x-fabric-request-id
string

Unique request ID

Path Parameters

id
string
required

24-character system-generated category ID

Body

application/json
name
string

Non-localized category name

localizedProperties
object

Localized details

isLocalizable
boolean

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

categoryAttributes
object[]
productAttributes
object[]

Response

200 - application/json
id
string

24-character system-generated category ID

name
string

Non-localized category name

localizedProperties
object

Localized details

isLocalizable
boolean

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

isRoot
boolean

true: This is a root category <br /> false: This is not a root category

isLeaf
boolean

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

categoryAttributes
object[]

Attributes assigned to the specified category

productAttributes
object[]

Attributes assigned for all products in the specified category.

productIds
string[]
children
object[]

Immediate children of the specified category

updatedBy
string

Email of user who last update the category

updatedAt
string

Time of last update to category

createdAt
string

Time of category creation