GET
/
api
/
v1
/
db
/
products

Retailed provides an extremely granular querying language through all APIs. Each API takes the same syntax and fully supports all options.

If you have any questions or need help with the API, please reach out our support team on Slack, Discord or Email.
x-api-key
string
required

Parameter defines the Retailed private key to use.

Operators

OperatorDescription
equalsThe value must be exactly equal.
not_equalsThe query will return all documents where the value is not equal.
greater_thanFor numeric or date-based fields.
greater_than_equalFor numeric or date-based fields.
less_thanFor numeric or date-based fields.
less_than_equalFor numeric or date-based fields.
likeCase-insensitive string must be present. If string of words, all words must be present, in any order.
containsMust contain the value entered, case-insensitive.
inThe value must be found within the provided comma-delimited list of values.
not_inThe value must NOT be within the provided comma-delimited list of values.
allThe value must contain all values provided in the comma-delimited list.
existsOnly return documents where the value either exists (true) or does not exist (false).

Query Parameters

where[or][0][and][0][name][equals]
string

An example of a query parameter for the name field.

where[or][0][and][0][sku][equals]
string

An example of a query parameter for the sku field.

page
number

The page number to return. Defaults to 1. You can paginate with the totalPages in the response.

I want to get all products with a retail price of 85 or 90 and with a description.
Example Query
GET https://app.retailed.io/api/v1/db/products?where[or][0][and][0][price][in]=85&where[or][1][and][0][price][in]=90&where[or][2][and][0][description][exists]=true&sort=-description

Sort

Retailed find queries support a sort parameter through all APIs. Pass the name of a top-level field to sort by that field in ascending order. Prefix the name of the field with a minus symbol (”-”) to sort in descending order. Because sorting is handled by the database, the field you wish to sort on must be stored in the database to work; not a virtual field.

https://app.retailed.io/api/v1/db/products?sort=-createdAt

Response

1 request returns 10 products by default.
products
Products Object