curl --request POST \
--url https://api.fabric.inc/v3/products/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"match": {
"id": {
"op": "IN",
"value": [
"blue"
]
},
"sku": {
"op": "IN",
"value": [
"blue"
]
},
"type": {
"op": "EQUALS",
"value": "ITEM"
},
"hasDraft": {
"op": "EQUALS",
"value": true
},
"hasLive": {
"op": "EQUALS",
"value": true
},
"status": {
"op": "EQUALS",
"value": "LIVE"
},
"categoryId": [
{
"op": "IN",
"value": [
"blue"
]
}
],
"properties": [
{
"attributeId": "CAZZX1234567DDDDD",
"attributeValue": [
{
"op": "RANGE",
"fromValue": "2022-09-14T22:10:30.618Z",
"toValue": "2023-04-14T22:10:30.618Z"
}
]
}
],
"variantIds": {
"op": "IN",
"value": [
"blue"
]
},
"bundleProductIds": {
"op": "IN",
"value": [
"blue"
]
},
"createdAt": {
"op": "RANGE",
"fromValue": "2022-09-14T22:10:30.618Z",
"toValue": "2023-04-14T22:10:30.618Z"
},
"updatedAt": {
"op": "RANGE",
"fromValue": "2022-09-14T22:10:30.618Z",
"toValue": "2023-04-14T22:10:30.618Z"
},
"createdBy": {
"op": "IN",
"value": [
"blue"
]
}
},
"sort": "+sku,-name",
"offset": 2,
"limit": 10
}
'{
"data": [
{
"id": "8d7329dfd5288b0011332376",
"sku": "QWERTTY56DDFFVVV",
"type": "ITEM",
"isActive": true,
"hasDraft": true,
"hasLive": true,
"status": "LIVE",
"attributes": [
{
"id": "6d7329dfd5288b0011332345",
"name": "Color",
"type": "string",
"isDeleted": false,
"value": "blue",
"isInherited": true
}
],
"localizedProperties": {
"en-US": {
"attributes": [
{
"id": "517329dfd5288b0011332315",
"name": "Color",
"type": "string",
"isDeleted": false,
"value": "blue",
"isInherited": true
}
]
},
"en-IN": {
"attributes": [
{
"id": "617329dfd5288b0011332316",
"name": "Colour",
"type": "string",
"isDeleted": false,
"value": "blue",
"isInherited": true
}
]
}
},
"variants": [
{
"id": "717329dfd5288b0011332317"
}
],
"categoryId": "5e7329dfd5288b00113323e4",
"createdAt": "2021-09-14T22:10:30.618Z",
"updatedAt": "2021-09-14T22:10:30.618Z"
}
],
"offset": 5,
"limit": 10,
"count": 100
}To find specific products for review or reports, you need to specify the criteria for the search. With this endpoint, you can find products (items, variants, and bundles) based on ID or SKU, type, category, and other criteria.
curl --request POST \
--url https://api.fabric.inc/v3/products/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"match": {
"id": {
"op": "IN",
"value": [
"blue"
]
},
"sku": {
"op": "IN",
"value": [
"blue"
]
},
"type": {
"op": "EQUALS",
"value": "ITEM"
},
"hasDraft": {
"op": "EQUALS",
"value": true
},
"hasLive": {
"op": "EQUALS",
"value": true
},
"status": {
"op": "EQUALS",
"value": "LIVE"
},
"categoryId": [
{
"op": "IN",
"value": [
"blue"
]
}
],
"properties": [
{
"attributeId": "CAZZX1234567DDDDD",
"attributeValue": [
{
"op": "RANGE",
"fromValue": "2022-09-14T22:10:30.618Z",
"toValue": "2023-04-14T22:10:30.618Z"
}
]
}
],
"variantIds": {
"op": "IN",
"value": [
"blue"
]
},
"bundleProductIds": {
"op": "IN",
"value": [
"blue"
]
},
"createdAt": {
"op": "RANGE",
"fromValue": "2022-09-14T22:10:30.618Z",
"toValue": "2023-04-14T22:10:30.618Z"
},
"updatedAt": {
"op": "RANGE",
"fromValue": "2022-09-14T22:10:30.618Z",
"toValue": "2023-04-14T22:10:30.618Z"
},
"createdBy": {
"op": "IN",
"value": [
"blue"
]
}
},
"sort": "+sku,-name",
"offset": 2,
"limit": 10
}
'{
"data": [
{
"id": "8d7329dfd5288b0011332376",
"sku": "QWERTTY56DDFFVVV",
"type": "ITEM",
"isActive": true,
"hasDraft": true,
"hasLive": true,
"status": "LIVE",
"attributes": [
{
"id": "6d7329dfd5288b0011332345",
"name": "Color",
"type": "string",
"isDeleted": false,
"value": "blue",
"isInherited": true
}
],
"localizedProperties": {
"en-US": {
"attributes": [
{
"id": "517329dfd5288b0011332315",
"name": "Color",
"type": "string",
"isDeleted": false,
"value": "blue",
"isInherited": true
}
]
},
"en-IN": {
"attributes": [
{
"id": "617329dfd5288b0011332316",
"name": "Colour",
"type": "string",
"isDeleted": false,
"value": "blue",
"isInherited": true
}
]
}
},
"variants": [
{
"id": "717329dfd5288b0011332317"
}
],
"categoryId": "5e7329dfd5288b00113323e4",
"createdAt": "2021-09-14T22:10:30.618Z",
"updatedAt": "2021-09-14T22:10:30.618Z"
}
],
"offset": 5,
"limit": 10,
"count": 100
}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"
Search criteria to match attributes
Show child attributes
Attributes that match the search query using single product type
Attributes that match the search query using single status
Show child attributes
Operations that can be performed on a single-status
EQUALS "EQUALS"
Statuses indicating the product version considered for this operation. For example,
1. When the status is DRAFT, this operations will only apply to the Draft version of product, if it exists
2. When the status is LIVE, this operation will only apply to the Live version of the product.
DRAFT, LIVE "LIVE"
Search by category IDs
Product Attributes are searched with the combination of id and value. Multiple attributes can be included in the search
Show child attributes
Attribute ID
"CAZZX1234567DDDDD"
Product attribute value
Show child attributes
Search operation that can be performed on a date-time range type
RANGE "RANGE"
Start date for searching (UTC)
"2022-09-14T22:10:30.618Z"
End date for searching (UTC)
"2023-04-14T22:10:30.618Z"
Simple string search Advanced single-string search
Date-time search Date range search
Show child attributes
Search operation that can be performed on a date-time range type
RANGE "RANGE"
Start date for searching (UTC)
"2022-09-14T22:10:30.618Z"
End date for searching (UTC)
"2023-04-14T22:10:30.618Z"
Date-time search Date range search
Show child attributes
Search operation that can be performed on a date-time range type
RANGE "RANGE"
Start date for searching (UTC)
"2022-09-14T22:10:30.618Z"
End date for searching (UTC)
"2023-04-14T22:10:30.618Z"
Sorting criteria. Sorting is supported only on sku, type and createdAt. - refers to descending while + refers to ascending order
"+sku,-name"
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
Product list by IDs
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
Product ID
"AASSBCC12334FCD12334V"
Unique product ID that maps to fabric's standard attribute called SKU.
Note: sku shouldn't include ; or =
"XP-123345"
Supported product types
ITEM, VARIANT, BUNDLE "ITEM"
true: Product is active
false: Product is inactive
true
true: Product has a Draft version
false: Product doesn't have a Draft version
true
true: Product has a Live version
false: Product doesn't have a Live version
true
Represents the current status of product. This value takes precedence over isActive if both are sent in the request.
DRAFT, LIVE "LIVE"
Attributes of product
Show child attributes
Product ID
"AASSBCC12334FCD12334V"
Attribute name
"color"
Attribute type
"string"
true: Attributes are inherited from parent product
false: Attributes aren't inherited from parent product Note: Attributes are soft deleted when a product is moved from one category to another.
false
true: Attributes are inherited from parent product
false: Attributes aren't inherited from parent product
true
Attribute value
"blue"
Localized attribute names
Show child attributes
Show child attributes
Show child attributes
Product ID
"AASSBCC12334FCD12334V"
Attribute name
"color"
Attribute type
"string"
true: Attributes are inherited from parent product
false: Attributes aren't inherited from parent product Note: Attributes are soft deleted when a product is moved from one category to another.
false
true: Attributes are inherited from parent product
false: Attributes aren't inherited from parent product
true
Attribute value
"blue"
{
"en-US": {
"attributes": [
{
"id": "4e7329dfd5288b0011332366",
"name": "Color",
"type": "string",
"isDeleted": false,
"value": "blue",
"isInherited": true
}
]
}
}24-character system-generated category ID of product
"6h7329dfd5288b001133231d"
Time of product creation (UTC)
"2021-09-14T22:10:30.618Z"
Time of last update to product (UTC)
"2021-09-14T22:10:30.618Z"
Was this page helpful?