Logo
Emporix Digital Commerce Platform API Documentation

Get all price models

GET {{api-url}}/price/{{tenant}}/priceModels?pageNumber=1&pageSize=16

AVAILABLE for Price Service v2 only

Retrieves all the price models. There is a possibility to filter by some price model simple fields.

A Price Model can be defined as a repeatable way to sell products in a market with the intention of making a profit. The price model defines basic structure for prices. Among other things, it allows you to determine whether the prices are gross or net, whether they have any restrictions, and the structure of tiers

  • If the Accept-Language is set to * each internationalized field is returned as a map that contains all of translations in a format of key:value pairs, where the key is the language code and value is the translation.
  • The Accept-Language can contain the priority list of languages which should be returned. Always one language is returned as a single string field.
  • If the Accept-Language header is empty default language defined in the Configuration service is taken.

 

Body PARAM

Key Datatype Required Description 
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.
pageSize
number The number of documents being retrieved on the page.
sort
string Fields to sort the response data by following order of the parameters from left to right. Can contain multiple fields in format: field name:sort direction separated by a comma. The colon with sort direction parameter is redundant and descending order is taken only if it is equal to desc or DESC. Ascending order is considered in any other case. Sorting by name parameter works properly only if the Accept-Language header is set to a specific language or is empty with default language specified in the configuration service.
includesTax
boolean Indicates whether provided price models are net of gross
includesMarkup
boolean `preview` parameter. Indicates whether provided price models are containing markup
tierType
string Indicates the tier type of the provided price models. Possible values: BASIC, TIER, VOLUME
name
string A name of price model
description
string A description of price model



HEADERS

Key Datatype Required Description 
Accept-Language
string The Accept-Language request HTTP header defines which languages the client is able to understand, and which locale variant is preferred. If empty English language is returned. It can be a priority list working as a fallback mechanism.
X-Total-Count
boolean The flag indicates if the total count of items should be returned.
Accept
string
X-Version
string




RESPONSES

status OK

[ { "id": "622730472d440745d5b1b42c", "name": "Piece price model", "description": "Price model description", "includesTax": true, "includesMarkup": true, "measurmentUnit": { "quantity": 1, "unitCode": "piece" }, "tiersDefinition": { "tierType": "BASIC", "tiers": [ { "minQuantity": { "quantity": 0, "unitCode": "piece" } } ] } }, { "id": "722730472d440745d5b1b34e", "name": "Piece tiered price model", "description": "Price model description", "includesTax": false, "includesMarkup": false, "measurmentUnit": { "quantity": 1, "unitCode": "piece" }, "tiersDefinition": { "tierType": "TIER", "tiers": [ { "minQuantity": { "quantity": 5, "unitCode": "piece" } }, { "minQuantity": { "quantity": 10, "unitCode": "piece" } } ] } } ]



Curl
curl -X GET 'api-url/price/api-url/priceModels?pageNumber=1&pageSize=16?pageNumber=1&pageSize=16&sort=name:desc&includesTax=true&includesMarkup=true&tierType=commodo aliquip veniam consequat est&name=commodo aliquip veniam consequat est&description=commodo aliquip veniam consequat est' -H 'Accept-Language: en' -H 'X-Total-Count: true' -H 'Accept: application/json' -H 'X-Version: v2'

ENDPOINTS