curl --request PATCH \
--url https://api.fabric.inc/v3/collections/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{
"op": "replace",
"path": "/name",
"value": "Color"
}
]
}
'{
"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": "test@eamil.com",
"updatedAt": "2023-04-20T10:24:36.162Z",
"createdAt": "2021-04-20T10:24:36.162Z"
}{
"message": "Request was invalid",
"type": "Bad request",
"errors": [
{
"type": "CLIENT_ERROR",
"message": "Invalid request"
}
]
}{
"message": "The requester is unauthorized",
"type": "UNAUTHORIZED_ERROR"
}{
"type": "REQUEST_DENIED",
"message": "User doesn't have the required permission"
}{
"type": "NOT_FOUND",
"message": "Resource not found"
}{
"type": "PAYLOAD_LIMIT_EXCEEDED_ERROR",
"message": "The payload exceeds maximum configured size"
}{
"type": "SERVER_ERROR",
"message": "Internal Server Error"
}Partially Update Collection
In contrast to the Update Collection endpoint - PUT /collections/{id}, which fully overwrites the collection details, this endpoint allows for selective modification of specific details such as fixing any typos present in the collection name as well as facilitating addition or removal of attributes
curl --request PATCH \
--url https://api.fabric.inc/v3/collections/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{
"op": "replace",
"path": "/name",
"value": "Color"
}
]
}
'{
"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": "test@eamil.com",
"updatedAt": "2023-04-20T10:24:36.162Z",
"createdAt": "2021-04-20T10:24:36.162Z"
}{
"message": "Request was invalid",
"type": "Bad request",
"errors": [
{
"type": "CLIENT_ERROR",
"message": "Invalid request"
}
]
}{
"message": "The requester is unauthorized",
"type": "UNAUTHORIZED_ERROR"
}{
"type": "REQUEST_DENIED",
"message": "User doesn't have the required permission"
}{
"type": "NOT_FOUND",
"message": "Resource not found"
}{
"type": "PAYLOAD_LIMIT_EXCEEDED_ERROR",
"message": "The payload exceeds maximum configured size"
}{
"type": "SERVER_ERROR",
"message": "Internal Server Error"
}Authorizations
S2S access token (JWT) from fabric Identity service (during Login)
Headers
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.
"517fa9dfd42d8b00g1o3k312"
Unique request ID
"263e731c-45c8-11ed-b878-0242ac120002"
Path Parameters
System-generated 24-character collection ID
Body
Collection details to be updated, including the name. Additionally, you can add, replace, or remove attributes of a collection or products associated with it.
1Show child attributes
Show child attributes
Response
OK
Collection details
24-character system-generated collection ID
"55184766610c0e32a86d8759"
Non-localized collection name
"Color"
Localized details
Show child attributes
Show child attributes
{
"en-US": { "name": "Color" },
"en-IN": { "name": "Colour" }
}
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
true
true: Collection is root category.
false: Collection isn't a root category.
true
true: Collection is active
false: Collection is inactive
false
Collection attributes
Show child attributes
Show child attributes
List of categories included
Show child attributes
Show child attributes
List of categories excluded
Show child attributes
Show child attributes
Attribute filters applied to the category
Show child attributes
Show child attributes
Immediate children of the specified collection
Show child attributes
Show child attributes
Email of user who last updated the category
"test@eamil.com"
Time of last updated to category (UTC)
"2023-04-20T10:24:36.162Z"
Time of category creation (UTC)
"2021-04-20T10:24:36.162Z"
Was this page helpful?
