Get filtered products¶
POST
*base*/products/filter
Fetches a list of products based on the provided filter parameters. The GET calls below filter the product list on the parameter given in the URI. If you want to filter on several fields at once, you should use POST to /products/filter
.
Parameters¶
One, or many (for POST), of the following parameters can be specified:
string or array
optional
|
Product IDs, passed as string or array of strings
|
string
optional
|
Product URI
|
int
optional
|
Maximum amount of returned products. |
int
optional
|
Offset in the filtered list from where results will be returned |
string
optional
|
Centra product ID. |
string
optional
|
Centra variant ID. |
string or array of strings
optional
|
Filter on the category ID for the products.
|
string
optional
|
Filter on product SKU. |
string or int
optional
|
Filter on market ID. |
boolean
optional
|
Return products not being activated yet.
|
Request example¶
1 2 3 4 5 6 7 8 | POST <base>/products/filter HTTP/1.1
Content-type: application/json
{
"market": 123,
"products": ["514", "515"],
"categories": 1
}
|
Response¶
200
Content-type: application/json
The object returned will have the productId
for each product as the key. The product object is explained under Product data model.
Response example¶
1 2 3 4 5 6 7 | HTTP/1.1 200 OK
Content-type: application/json
{
"1": {"product-object"},
"2": {"product-object"},
}
|
Error example¶
1 2 3 4 5 6 7 8 | HTTP/1.1 404 Not Found
Content-type: application/json
{
"errors" : {
"categories" : "not found: 1"
}
}
|
Filter on categories¶
GET
*base*/products/categories/*categories*
Parameters explained under Multi parameter filtering parameters.
Filter on internal IDs¶
GET
*base*/products/silk-product/*silkProduct*
GET
*base*/products/silk-variant/*silkVariant*
Parameters explained under Multi parameter filtering parameters.
Filter on SKU or URI¶
GET
*base*/products/sku/*sku*
GET
*base*/products/uri/*uri*
Parameters explained under Multi parameter filtering parameters.