- Getting Started
- Data Ingestion
- Use Cases
Product Catalog User Guides
- Overview
- List
- Attributes
- Categories
- Collections
- Background Jobs
- Settings
Product Catalog API
- Overview
- API Authentication and Data Sync
- Attributes & Attribute Mapping
- Categories
- Products
- Collections
- Background Jobs
- Bulk Import & Export
- Published Products
Developer Guide
Catalog Connector User Guides
- Overview
- Items
- Bundles
Catalog Connector API
- Files
- Jobs
- Operations
Find Categories
This endpoint is used to search and find specific categories based on the search criteria given in the request body. This endpoint is also used to find the root category that’s automatically created when the merchant is onboarded to fabric Product Catalog.
curl --request POST \
--url https://api.fabric.inc/v3/categories/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"sort": "+name,-createdAt",
"match": {
"id": {
"op": "IN",
"value": [
"blue"
]
},
"name": {
"op": "IN",
"value": [
"blue"
],
"locale": [
"en_US"
]
},
"isLocalizable": {
"op": "EQUALS",
"value": true
},
"isRoot": {
"op": "EQUALS",
"value": true
},
"isLeaf": {
"op": "EQUALS",
"value": true
},
"attribute": [
{
"id": "60184766610c0e32a86d8758",
"value": [
{
"op": "IN",
"value": [
"blue"
],
"locale": "en_US"
}
]
}
],
"productAttributeIds": {
"op": "IN",
"value": [
"blue"
]
},
"hasProductAttributeMandatory": {
"op": "EQUALS",
"value": true
},
"updatedBy": {
"op": "IN",
"value": [
"blue"
]
},
"createdAt": {
"op": "RANGE",
"fromValue": "2022-04-20T10:24:36.162Z",
"toValue": "2023-04-20T10:24:36.162Z"
},
"updatedAt": {
"op": "RANGE",
"fromValue": "2022-04-20T10:24:36.162Z",
"toValue": "2023-04-20T10:24:36.162Z"
}
},
"offset": 2,
"limit": 10
}'
{
"offset": 5,
"limit": 10,
"count": 100,
"data": [
{
"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
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"
Body
Request body for attribute creation
The body is of type object
.
Response
OK
Search categories response Meta details needed for every paginated response
Was this page helpful?
curl --request POST \
--url https://api.fabric.inc/v3/categories/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"sort": "+name,-createdAt",
"match": {
"id": {
"op": "IN",
"value": [
"blue"
]
},
"name": {
"op": "IN",
"value": [
"blue"
],
"locale": [
"en_US"
]
},
"isLocalizable": {
"op": "EQUALS",
"value": true
},
"isRoot": {
"op": "EQUALS",
"value": true
},
"isLeaf": {
"op": "EQUALS",
"value": true
},
"attribute": [
{
"id": "60184766610c0e32a86d8758",
"value": [
{
"op": "IN",
"value": [
"blue"
],
"locale": "en_US"
}
]
}
],
"productAttributeIds": {
"op": "IN",
"value": [
"blue"
]
},
"hasProductAttributeMandatory": {
"op": "EQUALS",
"value": true
},
"updatedBy": {
"op": "IN",
"value": [
"blue"
]
},
"createdAt": {
"op": "RANGE",
"fromValue": "2022-04-20T10:24:36.162Z",
"toValue": "2023-04-20T10:24:36.162Z"
},
"updatedAt": {
"op": "RANGE",
"fromValue": "2022-04-20T10:24:36.162Z",
"toValue": "2023-04-20T10:24:36.162Z"
}
},
"offset": 2,
"limit": 10
}'
{
"offset": 5,
"limit": 10,
"count": 100,
"data": [
{
"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"
}
]
}