XM

Search Products

Path:

GET https://{baseurl}/api-product/v1/product/search?size=10&page=0

Enables you to search products, by keyword. You may alternatively use the query parameters 'page' and 'size,' for a paginated response.

Headers

Content-Type : application/json

x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox" }

Authorization: The JWT Authorization token from the Login API.

Parameters

Type : query

Name : The keywords to narrow down the search results.

Required: true

or

Type : query

Name : The page and size number for a focused search results.

Required: true

1. Sample request for products, by keywords

GET https://{baseurl}/api-product/v1/product/search?keyword=test1

Sample Response

Response Code: 200

Message: OK

Description: You will see this response when the products are successfully retrieved based on the query parameter 'keywords.' When there are no matching products, you will see a blank array of products in the success response.

{
"products": [
{
"sku": "PricingTest123",
"itemId": 68,
"children": [
{
"sku": "var1",
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "var1"
},
{
"name": "Active",
"description": "",
"mapping": "active",
"type": "BOOLEAN",
"value": "true"
}
]
},
{
"sku": "var2",
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "var2"
},
{
"name": "Active",
"description": "",
"mapping": "active",
"type": "BOOLEAN",
"value": "true"
}
]
}
],
"type": "ITEM",
"bundleItems": [],
"categories": [
{
"id": "60c10ad09572f1000875291a",
"name": "Base 1",
"breadcrumbs": [
{
"id": "60a417f5c4b80d0008461e87",
"name": "MASTER",
"attributes": []
}
],
"attributes": []
}
],
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "Pricing Test 123"
},
{
"name": "Active",
"description": "",
"mapping": "active",
"type": "BOOLEAN",
"value": "true"
}
],
"dependents": [
"var1",
"var2"
]
},
{
"sku": "test1",
"itemId": 39,
"children": [
{
"sku": "testc2",
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "Test C1"
},
{
"name": "Active",
"description": "",
"mapping": "active",
"type": "BOOLEAN",
"value": "true"
}
]
},
{
"sku": "testc3",
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "Test C3"
},
{
"name": "Active",
"description": "",
"mapping": "active",
"type": "BOOLEAN",
"value": "true"
}
]
}
],
"type": "ITEM",
"bundleItems": [],
"categories": [
{
"id": "60b896d2e723930008f3d432",
"name": "Drafting Tables",
"breadcrumbs": [
{
"id": "60a417f5c4b80d0008461e87",
"name": "MASTER",
"attributes": []
},
{
"id": "60b89690e723930008f3d42f",
"name": "Tables",
"attributes": []
}
],
"attributes": []
}
],
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "Test 1"
},
{
"name": "Active",
"description": "",
"mapping": "active",
"type": "BOOLEAN",
"value": "true"
}
],
"dependents": [
"testc2",
"testc3"
]
}
],
"totalSize": 2,
"pageSize": 2,
"pages": 1
}

2. Sample request for products, by page and size

GET https://{baseurl}/api-product/v1/product/search?size=10&page=0

Sample Response

Response Code: 200

Message: OK

Description: You will see this paginated response when the query parameters are size and page.

{
"products": [
{
"sku": "5",
"itemId": 78,
"children": [],
"type": "ITEM",
"bundleItems": [],
"categories": [
{
"id": "60c3ecd1eaeb3400084fff36",
"name": "Meal Plans",
"breadcrumbs": [
{
"id": "60a417f5c4b80d0008461e87",
"name": "MASTER",
"attributes": []
}
],
"attributes": []
}
],
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "12 Dinners"
}
],
"dependents": []
},
{
"sku": "4",
"itemId": 77,
"children": [],
"type": "ITEM",
"bundleItems": [],
"categories": [
{
"id": "60c3ecd1eaeb3400084fff36",
"name": "Meal Plans",
"breadcrumbs": [
{
"id": "60a417f5c4b80d0008461e87",
"name": "MASTER",
"attributes": []
}
],
"attributes": []
}
],
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "8 Dinners"
}
],
"dependents": []
},
{
"sku": "3",
"itemId": 76,
"children": [],
"type": "ITEM",
"bundleItems": [],
"categories": [
{
"id": "60c3ecd1eaeb3400084fff36",
"name": "Meal Plans",
"breadcrumbs": [
{
"id": "60a417f5c4b80d0008461e87",
"name": "MASTER",
"attributes": []
}
],
"attributes": []
}
],
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "6 Dinners"
}
],
"dependents": []
},
{
"sku": "2",
"itemId": 75,
"children": [],
"type": "ITEM",
"bundleItems": [],
"categories": [
{
"id": "60c3ecd1eaeb3400084fff36",
"name": "Meal Plans",
"breadcrumbs": [
{
"id": "60a417f5c4b80d0008461e87",
"name": "MASTER",
"attributes": []
}
],
"attributes": []
}
],
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "4 Dinners"
}
],
"dependents": []
},
{
"sku": "1",
"itemId": 74,
"children": [
{
"sku": "2",
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "4 Dinners"
}
]
},
{
"sku": "3",
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "6 Dinners"
}
]
},
{
"sku": "4",
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "8 Dinners"
}
]
},
{
"sku": "5",
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "12 Dinners"
}
]
}
],
"type": "ITEM",
"bundleItems": [],
"categories": [
{
"id": "60c3ecd1eaeb3400084fff36",
"name": "Meal Plans",
"breadcrumbs": [
{
"id": "60a417f5c4b80d0008461e87",
"name": "MASTER",
"attributes": []
}
],
"attributes": []
}
],
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "Dinners"
}
],
"dependents": [
"2",
"3",
"4",
"5"
]
},
{
"sku": "65387675",
"itemId": 71,
"children": [],
"type": "ITEM",
"bundleItems": [],
"categories": [
{
"id": "60c3ebbdeaeb3400084fff32",
"name": "sub prime",
"breadcrumbs": [
{
"id": "60a417f5c4b80d0008461e87",
"name": "MASTER",
"attributes": []
},
{
"id": "60ab85a19e69ae00080042e1",
"name": "Bedding",
"attributes": []
},
{
"id": "60c3eb9feaeb3400084fff2f",
"name": "Sub",
"attributes": []
}
],
"attributes": []
}
],
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "Component"
}
],
"dependents": []
},
{
"sku": "var2",
"itemId": 70,
"children": [],
"type": "ITEM",
"bundleItems": [],
"categories": [
{
"id": "60c10ad09572f1000875291a",
"name": "Base 1",
"breadcrumbs": [
{
"id": "60a417f5c4b80d0008461e87",
"name": "MASTER",
"attributes": []
}
],
"attributes": []
}
],
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "var2"
},
{
"name": "Active",
"description": "",
"mapping": "active",
"type": "BOOLEAN",
"value": "true"
}
],
"dependents": []
},
{
"sku": "var1",
"itemId": 69,
"children": [],
"type": "ITEM",
"bundleItems": [],
"categories": [
{
"id": "60c10ad09572f1000875291a",
"name": "Base 1",
"breadcrumbs": [
{
"id": "60a417f5c4b80d0008461e87",
"name": "MASTER",
"attributes": []
}
],
"attributes": []
}
],
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "var1"
},
{
"name": "Active",
"description": "",
"mapping": "active",
"type": "BOOLEAN",
"value": "true"
}
],
"dependents": []
},
{
"sku": "PricingTest123",
"itemId": 68,
"children": [
{
"sku": "var1",
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "var1"
},
{
"name": "Active",
"description": "",
"mapping": "active",
"type": "BOOLEAN",
"value": "true"
}
]
},
{
"sku": "var2",
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "var2"
},
{
"name": "Active",
"description": "",
"mapping": "active",
"type": "BOOLEAN",
"value": "true"
}
]
}
],
"type": "ITEM",
"bundleItems": [],
"categories": [
{
"id": "60c10ad09572f1000875291a",
"name": "Base 1",
"breadcrumbs": [
{
"id": "60a417f5c4b80d0008461e87",
"name": "MASTER",
"attributes": []
}
],
"attributes": []
}
],
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "Pricing Test 123"
},
{
"name": "Active",
"description": "",
"mapping": "active",
"type": "BOOLEAN",
"value": "true"
}
],
"dependents": [
"var1",
"var2"
]
},
{
"sku": "capio-child",
"itemId": 67,
"children": [],
"type": "ITEM",
"bundleItems": [],
"categories": [
{
"id": "60acf75737d4df0008185284",
"name": "AB",
"breadcrumbs": [
{
"id": "60a417f5c4b80d0008461e87",
"name": "MASTER",
"attributes": []
}
],
"attributes": []
}
],
"attributes": [
{
"name": "Display Name",
"description": "",
"mapping": "title",
"type": "TEXT",
"value": "capio-child"
},
{
"name": "Active",
"description": "",
"mapping": "active",
"type": "BOOLEAN",
"value": "true"
}
],
"dependents": []
}
],
"totalSize": 37,
"pageSize": 10,
"pages": 4
}

Change Log

  • June - 2021 First Updated

‚Äč