curl --request POST \
--url https://api.fabric.inc/v3/collections/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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"
}
]
}
],
"categoryIdsIncluded": {
"op": "IN",
"value": [
"blue"
]
},
"categoryIdsExcluded": {
"op": "IN",
"value": [
"blue"
]
},
"productAttributeIdsFilter": {
"op": "IN",
"value": [
"blue"
]
},
"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"
}
},
"sort": "+createdAt,-updatedAt",
"offset": 2,
"limit": 10
}
'{
"offset": 5,
"limit": 10,
"count": 100,
"data": [
{
"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"
}
]
}This endpoint enables you to find collections by the search criteria you specify in the request body. You can also sort the results.
curl --request POST \
--url https://api.fabric.inc/v3/collections/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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"
}
]
}
],
"categoryIdsIncluded": {
"op": "IN",
"value": [
"blue"
]
},
"categoryIdsExcluded": {
"op": "IN",
"value": [
"blue"
]
},
"productAttributeIdsFilter": {
"op": "IN",
"value": [
"blue"
]
},
"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"
}
},
"sort": "+createdAt,-updatedAt",
"offset": 2,
"limit": 10
}
'{
"offset": 5,
"limit": 10,
"count": 100,
"data": [
{
"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"
}
]
}S2S access token (JWT) from fabric Identity service (during Login)
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"
Request body for search
Specification for matching attributes
Show child attributes
Searches for attributes that matches the query. Append locale and name with a # as a value
String search
Multi-string search
Show child attributes
Operations that can be performed on a string type
IN "IN"
Sample string schema
"blue"
If isLocalizable is true, searches for the requested name in the list of locales provided here. If isLocalizable is false, searches for the non-localized names.
Locale
Show child attributes
24-character system-generated attribute ID
"60184766610c0e32a86d8758"
Attribute value
Search criteria based on localized data Advanced string search Advanced multi-string search
Show child attributes
Operations that can be performed on a string type
IN, NOT_IN "IN"
Sample string schema
"blue"
If isLocalizable is true, searches for the requested name in the list of locales provided here. If isLocalizable is false, searches for the non-localized names.
"en_US"
Simple string search Multi-string search
Simple string search Multi-string search
Simple string search Multi-string search
Date-time search Date range search
Show child attributes
Search operation performed on a date range
RANGE "RANGE"
Starting range (UTC)
"2022-04-20T10:24:36.162Z"
Ending range (UTC)
"2023-04-20T10:24:36.162Z"
Date-time search Date range search
Show child attributes
Search operation performed on a date range
RANGE "RANGE"
Starting range (UTC)
"2022-04-20T10:24:36.162Z"
Ending range (UTC)
"2023-04-20T10:24:36.162Z"
Sorting criteria. Sorting is supported only on createdAt, updatedAt. - refers to descending while + refers to ascending order
"+createdAt,-updatedAt"
Number of records to skip before returning records. For example, offset=20, limit=10 returns records 21-30.
2
Maximum number of records per page
10
OK
Search response
Number of records to skip before returning records. For example, offset=20, limit=10 returns records 21-30.
5
Maximum number of records per page
10
Total number of records in the response
100
Show child attributes
24-character system-generated collection ID
"55184766610c0e32a86d8759"
Non-localized collection name
"Color"
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
24-character system-generated attribute ID
"64184766610c0e32a86d8758"
Non-localized attribute name
"color"
true: Attribute name can be translated into different languages or localized for different regions.
false: Attribute name can't be localized. Note: Refer to localizedProperties to get relevant attributes based on locale.
true
true: Attribute is inherited from its parent.
false: Attribute isn't inherited from parent
true
Attribute type
"TEXT"
Attribute value
"blue"
List of categories included
Show child attributes
24-character system-generated category ID
"64184766610c0e32a86d8758"
Non-localized category name
"Chairs"
true: Category name is translated into different languages or localized for different regions
false: Category name isn't localized Note: Refer to localizedProperties to get relevant details based on locale
true
List of categories excluded
Show child attributes
24-character system-generated category ID
"64184766610c0e32a86d8758"
Non-localized category name
"Chairs"
true: Category name is translated into different languages or localized for different regions
false: Category name isn't localized Note: Refer to localizedProperties to get relevant details based on locale
true
Attribute filters applied to the category
Show child attributes
24-character system-generated attribute ID
"53184766610c0e32a86d875"
Non-localized attribute name
"Mobile name"
Localized properties of attribute
{
"en-US": { "name": "Color" },
"en-IN": { "name": "Colour" }
}true: Attribute name is translated into different languages or localized for different regions
false: Attribute name isn't localized Note: Refer to localizedProperties to get relevant attributes based on locale.
true
Filter conditions
GT, LT, EQUALS, IN, NOT_IN, CONTAINS, NOT_CONTAINS "EQUALS"
Attribute value to match filter condition
2
Immediate children of the specified collection
Show child attributes
24-character system-generated ID of child collection
"78184766610c0e32a86d8757"
Non-localized name of child collection
"Chairs"
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: This is the last collection of the branch with no further children collections
false: This isn't the last collection of the branch and has children collections
false
Email of user who last updated the category
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?