Get filtered products

Shop API v1
POST*base*/products/filter
Authentication:API key

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:

products

string or array
optional

Product IDs, passed as string or array of strings

"products": "123" or "products": ["124", "125"]

uri

string
optional

Product URI

"uri": "the-uri-of-the-product"

quantity

int
optional
Maximum amount of returned products.

offset

int
optional
Offset in the filtered list from where results will be returned

silkProduct

string
optional
Centra product ID.

silkVariant

string
optional
Centra variant ID.

categories

string or array of strings
optional

Filter on the category ID for the products.

"categories": "123" or "categories": ["123", "124"].

sku

string
optional
Filter on product SKU.

market

string or int
optional
Filter on market ID.

preview

boolean
optional

Return products not being activated yet.

  • "preview": true return products for preview
  • "preview": false only return live products

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.