Logo
Emporix Digital Commerce Platform API Documentation

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") Searching for items by boolean-based property: q=description.multiLanguage:true, where description.multiLanguage is the boolean field name and true is its desired value. Searching for items with a nonexistent or empty property: q=description.en:null, where description.en is the field that has its value set to null. Searching for items with an existing property: q=mixin:exists, where mixin is the field that has a non-empty value. Searching for items by multiple specific values: q=id:(5c3325baa9812100098ff48f,5c3325d1a9812100098ff494), where id is the field name, and strings within the bracket are the desired values. Searching for items by multiple fields: q=id:5c3325baa9812100098ff48f code:A705121667 where id and code are field names. All objects that contain the specified values are returned. Multiple fields (separated by space) can be specified. Multiple values for each field can also be specified in a format presented earlier. Searching for items with string-based properties conforming to a regex: q=code:~ABCD12 or q=code:(~AB CD) - in case of searching for strings with space, where code is the name of field and ABCD12 or AB CD is its querying regex. Searching for items with a localized string-based property conforming to a regex: name.localizedMap.en:~(Joghurt im) - where name is the field name, localizedMap is a keyword which indicates that the field is a localized one, en is a desired language, and Joghurt im is a search term.
sort
string List of properties used to sort the results, separated by commas. Possible values: {fieldName} {fieldName}.asc {fieldName}.desc Note: If you want to sort the results by localized properties, the possible values are: {fieldName}.{language} {fieldName}.{language}.asc {fieldName}.{language}.desc By default, the fields are sorted in ascending order.



HEADERS

Key Datatype Required Description 
Accept-Language
string
X-Total-Count
boolean




RESPONSES

status





Curl
curl -X GET 'api-url/product/api-url/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