Catalog
SearchCatalogItems
Searches for catalog items or item variations by matching supported search attribute values, including custom attribute values, against one or more of the specified query expressions.
This (SearchCatalogItems) endpoint differs from the SearchCatalogObjects endpoint in the following aspects:
- SearchCatalogItems can only search for items or item variations, whereas SearchCatalogObjects can search for any type of catalog objects.
- SearchCatalogItems supports the custom attribute query filters to return items or item variations that contain custom attribute values, where SearchCatalogObjects does not.
- SearchCatalogItems does not support the include_deleted_objects filter to search for deleted items or item variations, whereas SearchCatalogObjects does.
- The both endpoints use different call conventions, including the query filter formats.
post/v2/catalog/search-catalog-items
Request body
Example request
{
"request_body": {
"category_ids": [
"WINE_CATEGORY_ID"
],
"custom_attribute_filters": [
{
"bool_filter": true,
"custom_attribute_definition_id": "VEGAN_DEFINITION_ID"
},
{
"custom_attribute_definition_id": "BRAND_DEFINITION_ID",
"string_filter": "Dark Horse"
},
{
"key": "VINTAGE",
"number_filter": {
"max": 2018,
"min": 2017
}
},
{
"custom_attribute_definition_id": "VARIETAL_DEFINITION_ID",
"selection_ids_filter": "MERLOT_SELECTION_ID"
}
],
"enabled_location_ids": [
"ATL_LOCATION_ID"
],
"limit": 100,
"product_types": [
"REGULAR"
],
"sort_order": "ASC",
"stock_levels": [
"OUT",
"LOW"
],
"text_filter": "red"
}
}Response
Success
Example response
{
"items": [
{
"custom_attribute_values": {
"BRAND": {
"custom_attribute_definition_id": "BRAND_DEFINITION_ID",
"key": "BRAND",
"name": "Brand",
"string_value": "Dark Horse",
"type": "STRING"
},
"VARIETAL": {
"custom_attribute_definition_id": "VARIETAL_DEFINITION_ID",
"key": "VARIETAL",
"name": "Varietal",
"selection_uid_values": [
"MERLOT_SELECTION_ID",
null
],
"type": "SELECTION"
},
"VINTAGE": {
"custom_attribute_definition_id": "EI7IJQDUKYSHULREPIPH6HNU",
"key": "VINTAGE",
"name": "Vintage",
"number_value": 2018,
"type": "NUMBER"
}
},
"id": "GPOKJPTV2KDLVKCADJ7I77EZ",
"is_deleted": false,
"item_data": {
"description": "A nice red wine",
"name": "Dark Horse Merlot 2018",
"product_type": "REGULAR",
"variations": [
{
"id": "VBJNPHCOKDFECR6VU25WRJUD",
"is_deleted": false,
"item_variation_data": {
"item_id": "GPOKJPTV2KDLVKCADJ7I77EZ",
"name": "750 mL",
"ordinal": 0,
"price_money": {
"amount": 1000,
"currency": "USD"
},
"pricing_type": "FIXED_PRICING"
},
"present_at_all_locations": true,
"type": "ITEM_VARIATION",
"updated_at": "2020-06-18T17:55:56.646Z",
"version": 1592502956646
}
]
},
"present_at_all_locations": true,
"type": "ITEM",
"updated_at": "2020-06-18T17:55:56.646Z",
"version": 1592502956646
}
],
"matched_variation_ids": [
"VBJNPHCOKDFECR6VU25WRJUD"
]
}