Retrieving all products
GET {{api-url}}/product/{{tenant}}/products?pageSize=100&pageNumber=1
Body
PARAM
Key | Datatype | Required | Description |
pageSize
|
number | The number of documents being retrieved on the page. | |
pageNumber
|
number | The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1. | |
expand
|
string | Fields that should be expanded with additional information in the response body. Expressed as strings separated by commas. Possible values: template parentVariant | |
rawValue
|
boolean | Flag indicating whether product variant(s) should include their parent variants' attribute values. If set to true, the result will contain values from both the variant and its parent variant. If set to false, the result will only contain variant values. | |
fields
|
string | Example: fields=name,code Fields to be returned in the response. When this parameter is passed, only the id, yrn and {fieldName} are retrieved for each product. You can specify multiple fields by separating them with commas. | |
q
|
string | Example: q=name:{productName}
A standard query parameter is used to search for specific values.
Searching for items by string-based properties:
By field value: q=name:apple_lobo, where name is the field name and apple_logo is its desired value.
By localized field value: q=name.en:apple_lobo, where name is the field name, en is a language code and apple_lobo is the field value expressed in the specified language. Note: This query works only for localized fields, which are stored in a Map format where key is a language code and value is translation to particular language.
Searching for items by number-based property:
With a specific value: q=mixins.productCustomAttributes.maxOrderQuantity:20
With a value greater than: q=mixins.productCustomAttributes.maxOrderQuantity:>20
With a value lower than: q=mixins.productCustomAttributes.maxOrderQuantity:<20
With a value greater than or equal to: q=mixins.productCustomAttributes.maxOrderQuantity:>=20
With a value lower than or equal to: q=mixins.productCustomAttributes.maxOrderQuantity:<=20
With a value within a range of values: q=mixins.productCustomAttributes.maxOrderQuantity:(>=10 AND <=20)
where mixins.price.value is name of number-based field and 20 is it's querying value.
Searching for items by date-based property: All numer-based property queries are valid also for dates. In that case the date should be placed within double quotes: q=metadataCreatedAt:(>="2021-05-18T07:27:27.455Z" AND <"2021-05-20T07:27:27.455Z")
S Curl curl -X GET 'api-url/product/tenant/products?pageSize=100&pageNumber=1?pageSize=100&pageNumber=1&expand=parentVariant&rawValue=true&fields=code,name&q=parentVariantId:parentVariantId&sort=name:asc' -H 'Accept-Language: *' -H 'X-Total-Count: true' ENDPOINTS |