Skip to main content
PUT
/
collections
/
{id}
Update Collection
curl --request PUT \
  --url https://api.fabric.inc/v3/collections/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Color",
  "isLocalizable": true,
  "localizedProperties": {
    "en-US": {
      "name": "Color"
    },
    "en-IN": {
      "name": "Colour"
    }
  },
  "attributes": [
    {
      "id": "78184766610c0e32a86d8757",
      "value": "blue"
    }
  ],
  "categoryIdsIncluded": [
    "64184766610c0e32a86d8758",
    "917329dfd5288b0011332300"
  ],
  "categoryIdsExcluded": [
    "66184766610c0e32a86d8722",
    "41184766610c0e32a86d8778"
  ],
  "isActive": true,
  "productAttributeFilters": [
    {
      "attributeId": "53184766610c0e32a86d875",
      "condition": "EQUALS",
      "value": 2
    }
  ]
}
'
{
  "id": "55184766610c0e32a86d8759",
  "name": "Color",
  "localizedProperties": {
    "en-US": {
      "name": "Color"
    },
    "en-IN": {
      "name": "Colour"
    }
  },
  "isLocalizable": true,
  "isRoot": true,
  "isActive": false,
  "attributes": [
    {
      "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"
    }
  ],
  "categoriesIncluded": [
    {
      "id": "64184766610c0e32a86d8758",
      "name": "Chairs",
      "localizedProperties": {
        "en-US": {
          "name": "Color"
        },
        "en-IN": {
          "name": "Colour"
        }
      },
      "isLocalizable": true
    }
  ],
  "categoriesExcluded": [
    {
      "id": "64184766610c0e32a86d8758",
      "name": "Chairs",
      "localizedProperties": {
        "en-US": {
          "name": "Color"
        },
        "en-IN": {
          "name": "Colour"
        }
      },
      "isLocalizable": true
    }
  ],
  "productAttributeFilters": [
    {
      "attributeId": "53184766610c0e32a86d875",
      "name": "Mobile name",
      "localizedProperties": {
        "en-US": {
          "name": "Color"
        },
        "en-IN": {
          "name": "Colour"
        }
      },
      "isLocalizable": true,
      "condition": "EQUALS",
      "value": 2
    }
  ],
  "children": [
    {
      "id": "78184766610c0e32a86d8757",
      "name": "Chairs",
      "localizedProperties": {
        "en-US": {
          "name": "Color"
        },
        "en-IN": {
          "name": "Colour"
        }
      },
      "isLocalizable": true,
      "isLeaf": false
    }
  ],
  "updatedBy": "[email protected]",
  "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

System-generated 24-character collection ID

Body

application/json

Details to update collection

Details to update collection

name
string

Non-localized collection name

Example:

"Color"

isLocalizable
boolean

true: Collection name can be translated into different languages or localized for different regions.
false: Collection name can't be localized. Note: Refer to localizedProperties to get relevant collection name based on locale.

Example:

true

localizedProperties
object

Localized properties of collection

Example:
{
"en-US": { "name": "Color" },
"en-IN": { "name": "Colour" }
}
attributes
object[]

List of attributes assigned to the collection

categoryIdsIncluded
string[]

Category IDs included in collection

Example:
[
"64184766610c0e32a86d8758",
"917329dfd5288b0011332300"
]
categoryIdsExcluded
string[]
deprecated

Category IDs excluded in collection

Example:
[
"66184766610c0e32a86d8722",
"41184766610c0e32a86d8778"
]
isActive
boolean

true: Collection is active
false: Collection is inactive

Example:

true

productAttributeFilters
object[]

Response

OK

Collection details

id
string

24-character system-generated collection ID

Example:

"55184766610c0e32a86d8759"

name
string

Non-localized collection name

Example:

"Color"

localizedProperties
object

Localized details

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

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

Example:

true

isRoot
boolean

true: Collection is root category.
false: Collection isn't a root category.

Example:

true

isActive
boolean

true: Collection is active
false: Collection is inactive

Example:

false

attributes
object[]

Collection attributes

categoriesIncluded
object[]

List of categories included

categoriesExcluded
object[]

List of categories excluded

productAttributeFilters
object[]

Attribute filters applied to the category

children
object[]

Immediate children of the specified collection

updatedBy
string

Email of user who last updated the category

updatedAt
string

Time of last updated to category (UTC)

Example:

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

createdAt
string

Time of category creation (UTC)

Example:

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