# Prices

## Retrieving all prices

> Retrieves all prices assigned to the tenant. You can filter the results with query parameters.\
> \
> \*\*Additional scopes info\*\*\
> No specific scopes are required.\
> The \`price.price\_read\_by\_vendor\` scope allows to fetch just the prices belonging to the vendor.

````json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"tags":[{"name":"Prices"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"price.price_manage":"Needed to manage prices.","price.price_read":"Needed to retrieve prices.","price.price_own":"Needed to calculate product prices (legacy).","price.prod_price_calculate":"Needed to calculate prices and synchronize sale prices (legacy).","price.price_delete_all":"Needed to delete all prices at once (legacy).","price.price_match_own":"Needed to use the price matching functionality based on information from the session context.","price.pricemodel_manage":"Needed to manage price models.","price.pricemodel_read":"Needed to retrieve price models.","price.price_manage_by_vendor":"Needed to manage prices belonging to the vendor."}}}}},"schemas":{"pricesV2":{"type":"array","items":{"$ref":"#/components/schemas/getPriceV2"},"title":"List of prices (v2)"},"getPriceV2":{"type":"object","title":"Price (v2)","properties":{"id":{"type":"string","description":"A price identifier."},"itemId":{"type":"object","description":"Item for which the price is defined.","properties":{"itemType":{"type":"string","description":"Type of the referenced item. Possible values:\n* `PRODUCT`\n* `SKU`\n\n**Note**: The `SKU` value is a `preview` value - the system does not fully operate on the SKU concept yet.\n"},"id":{"type":"string","description":"Product's unique identifier, generated when the product is created through the Product Service.\n"}}},"itemYrn":{"description":"Product's uniform resource name.","type":"string"},"currency":{"description":"Currency code, as defined in the Currency Service.","type":"string"},"location":{"allOf":[{"$ref":"#/components/schemas/location"}]},"salePrice":{"allOf":[{"$ref":"#/components/schemas/salePrice"}]},"priceModelId":{"type":"string","description":"ID of the price model to which the price is assigned. If the ID is not provided, the default price model is used."},"restrictions":{"$ref":"#/components/schemas/restrictions"},"tierValues":{"type":"array","items":{"$ref":"#/components/schemas/tierValueRetrieval"}},"vendorId":{"type":"string","description":"Id of a vendor to which the price belongs."},"mixins":{"type":"object","description":"Custom price attributes.","additionalProperties":true},"metadata":{"$ref":"#/components/schemas/priceMetadata"}}},"location":{"type":"object","properties":{"countryCode":{"type":"string","description":"Code of the country to which the price applies, as defined in the Country Service."}},"required":["countryCode"]},"salePrice":{"type":"object","properties":{"discountAmount":{"minimum":0,"description":"Discount expressed as a fixed amount.","type":"number"},"discountRate":{"minimum":0,"maximum":100,"description":"Discount expressed as a percentage of the original price.","type":"number"},"description":{"description":"Additional information about the discount.","type":"string"}}},"restrictions":{"type":"object","description":"Restrictions that limit the validity of the price model and prices assigned to it.\n","properties":{"principals":{"type":"array","description":"List of customers and customer groups for whom the price is valid.\n\n**Note** Customer groups are a `preview` feature.","items":{"allOf":[{"$ref":"#/components/schemas/principal"}]}},"validity":{"allOf":[{"$ref":"#/components/schemas/dateValidity"}]},"siteCodes":{"type":"array","description":"Codes of sites to which the price applies.","items":{"type":"string"}},"priceListId":{"type":"string","description":"Unique identifier of the price list to which the price should be assigned.\n\n**Note**: It is a `preview` field."}},"required":["siteCodes"]},"principal":{"description":"Customers or customer groups for whom the price is valid.","type":"object","properties":{"type":{"type":"string","description":"Customer or customer group for whom the price is valid. Possible values:\n* `CUSTOMER`\n* `GROUP`\n\n**Note**: The `GROUP` value is a `preview` value - the system does not fully operate on the customer groups concept yet."},"id":{"type":"string","description":"Unique identifier of the customer or customer group."}},"required":["type","id"]},"dateValidity":{"type":"object","description":"Date range in which the object is valid.","properties":{"from":{"type":"string","description":"Date from which the object is valid, compliant with the ISO 8601 standard."},"to":{"type":"string","description":"Date to which the object is valid, compliant with the ISO 8601 standard."}}},"tierValueRetrieval":{"description":"","type":"object","properties":{"id":{"type":"string","description":"An identifier of a tier. The ID is required only if the `priceModelId` is provided. If the price model is the default, the tier value is automatically assigned according to the default price model."},"priceValue":{"type":"number","description":"Gross price (if the `includesTax` field is set to `true`) or net price (if the `includesTax` field is set to `false`)."}},"required":["priceValue"]},"priceMetadata":{"allOf":[{"$ref":"#/components/schemas/metadata"},{"type":"object","properties":{"mixins":{"type":"object","description":"Mixins schemas","additionalProperties":true}}}]},"metadata":{"type":"object","properties":{"createdAt":{"description":"Date and time when the price was created.","type":"string"},"modifiedAt":{"description":"Date and time when the price was last modified.","type":"string"},"version":{"minimum":1,"type":"integer","description":"Version of the price object. If provided optimistic locking will be enabled and it has to match version in the database"}}},"errorMessage":{"type":"object","title":"error","description":"Schema for API-specific errors.","properties":{"code":{"minimum":100,"maximum":599,"description":"Original HTTP error code, should be consistent with the response HTTP code.","type":"integer"},"status":{"description":"Original HTTP error reason.","type":"string"},"message":{"description":"Descriptive error message for debugging","type":"string"},"details":{"description":"List of problems causing this error.","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"string"}},"errorCode":{"type":"string","description":"Additional error code."}}}},"responses":{"BadRequest_400":{"description":"Request was syntactically incorrect. Details are provided in the response payload.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details are provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"InternalServiceError_500":{"description":"Some server-side error occurred. Details are provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}},"parameters":{"trait_qParam":{"in":"query","name":"q","description":"A standard query parameter is used to search for specific values. \n\nSee: [Standard practises - Query parameter](https://developer.emporix.io/api-references/standard-practices/q-param)\n","schema":{"type":"string"}},"trait_siteCodeAware_siteCode":{"name":"siteCode","in":"query","description":"Codes of sites for which prices should be retrieved.","schema":{"default":"main","type":"string"}},"trait_currencyAware_currency":{"name":"currency","in":"query","description":"Codes of currencies in which prices should be retrieved.","schema":{"type":"string"}},"trait_effectiveDateAware_effectiveDate":{"name":"effectiveDate","in":"query","description":"Date on which retrieved prices should be valid, compliant with the ISO 8601 standard. Format:```date-fullyear \"-\" date-month \"-\" date-mday \"T\" partial-time time-offset```","schema":{"type":"string","default":"2022-01-01T00:00:00Z"}},"trait_sortable_sort":{"name":"sort","in":"query","description":"List of properties used to sort the results, separated by colons. The order of properties indicates their priority in sorting.\n\nPossible values:\n* `{fieldName}`\n* `{fieldName}:asc`\n* `{fieldName}:desc`\n\n**Note:** If you want to sort the results by localized properties, the possible values are:\n  * `{fieldName}.{language}`\n  * `{fieldName}.{language}:asc`\n  * `{fieldName}.{language}:desc`\n\nIf the sorting direction is not specified, the fields are sorted in ascending order.","schema":{"type":"string"}},"trait_paged_pageNumber":{"name":"pageNumber","in":"query","description":"Page number to be retrieved. The number of the first page is 1.\n\n**Note:** If the `pageNumber` parameter is passed, size of the pages must be specified in the `pageSize` parameter.\n","schema":{"default":1,"minimum":1,"type":"integer"}},"trait_paged_pageSize":{"name":"pageSize","in":"query","description":"Number of items to be retrieved per page.\n","schema":{"default":60,"minimum":1,"type":"integer"}},"trait_XTotalCount_header":{"in":"header","name":"X-Total-Count","required":false,"description":"Flag indicating whether the total count of retrieved items should be returned.","schema":{"default":false,"type":"boolean"}},"trait_principalIdAware_principalId":{"name":"principalId","in":"query","description":"IDs of customers for whom the retrieved prices should be valid.\n\n**Note**: This parameter is only available in the `v2` version of the Price Service.\n","schema":{"type":"string"}},"trait_priceModelIdAware_priceModelId":{"name":"priceModelId","in":"query","description":"ID of the price model to which the retrieved prices should be assigned.\n\n**Note**: This parameter is only available in the `v2` version of the Price Service.\n","schema":{"type":"string"}},"trait_acceptLanguageV2_header":{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"List of language codes acceptable for the response. You can specify factors that indicate which language should be retrieved if the one with a higher factor was not found in the localized fields.\n* If the header is set to a particular language or a list of languages, all localized fields are retrieved as strings.\n* If the header is set to `*`, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.\n* If the header is empty, localized fields are retrieved in the default language defined in the Configuration Service.\n"},"query_price_itemName":{"name":"itemName","in":"query","required":false,"schema":{"type":"string"},"description":"A product or SKU name. <b>This attribute is available only for Price v2</b>"}}},"paths":{"/price/{tenant}/prices":{"get":{"summary":"Retrieving all prices","tags":["Prices"],"responses":{"200":{"description":"The request was successful. A list of prices is returned.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total number of retrieved prices."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/pricesV2"}}}},"400":{"$ref":"#/components/responses/BadRequest_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"500":{"$ref":"#/components/responses/InternalServiceError_500"}},"description":"Retrieves all prices assigned to the tenant. You can filter the results with query parameters.\n\n**Additional scopes info**\nNo specific scopes are required.\nThe `price.price_read_by_vendor` scope allows to fetch just the prices belonging to the vendor.","parameters":[{"$ref":"#/components/parameters/trait_qParam"},{"$ref":"#/components/parameters/trait_siteCodeAware_siteCode"},{"$ref":"#/components/parameters/trait_currencyAware_currency"},{"$ref":"#/components/parameters/trait_effectiveDateAware_effectiveDate"},{"$ref":"#/components/parameters/trait_sortable_sort"},{"$ref":"#/components/parameters/trait_paged_pageNumber"},{"$ref":"#/components/parameters/trait_paged_pageSize"},{"$ref":"#/components/parameters/trait_XTotalCount_header"},{"$ref":"#/components/parameters/trait_principalIdAware_principalId"},{"$ref":"#/components/parameters/trait_priceModelIdAware_priceModelId"},{"schema":{"type":"string"},"in":"query","name":"itemId","description":"IDs of products for which prices should be retrieved.\n\n**Note**: This parameter is only available in the `v2` version of the Price Service.\n"},{"schema":{"type":"string"},"in":"query","name":"itemType","description":"Item types for which prices should be retrieved. Possible values:\n* `PRODUCT`\n* `SKU`\n\n  **Note**: The SKU value is a `preview` value - the system does not fully operate on the SKU concept yet.\n\n**Note**: This parameter is only available in the `v2` version of the Price Service.\n"},{"schema":{"type":"string"},"in":"query","name":"country","description":"Codes of countries for which prices should be retrieved.\n\n**Note**: This parameter is only available in the `v2` version of the Price Service.\n"},{"$ref":"#/components/parameters/trait_acceptLanguageV2_header"},{"$ref":"#/components/parameters/query_price_itemName"}],"operationId":"GET-price-list-all-prices"}}}}
````

## Creating a new price

> Creates a new price for a specified product.

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"tags":[{"name":"Prices"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["price.price_manage","price.price_manage_by_vendor"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"price.price_manage":"Needed to manage prices.","price.price_read":"Needed to retrieve prices.","price.price_own":"Needed to calculate product prices (legacy).","price.prod_price_calculate":"Needed to calculate prices and synchronize sale prices (legacy).","price.price_delete_all":"Needed to delete all prices at once (legacy).","price.price_match_own":"Needed to use the price matching functionality based on information from the session context.","price.pricemodel_manage":"Needed to manage price models.","price.pricemodel_read":"Needed to retrieve price models.","price.price_manage_by_vendor":"Needed to manage prices belonging to the vendor."}}}}},"parameters":{"trait_contentLanguageV2_header":{"name":"Content-Language","in":"header","required":false,"schema":{"type":"string"},"description":"List of languages in which localized fields in the request body are provided.\n\n* If the `Content-Language` header is set to `*`, the localized fields should be provided as maps of translations, where the keys are language codes and values are the fields in their respective languages.\n* If the `Content-Language` header is set to a specific language, the localized fields should be provided as strings.\n* If the `Content-Language` header is empty, the endpoint will asume that the localized fields are provided in the default language defined in the Configuration Service.\n\n**Note**: You can provide the localized fields only in languages defined in the Configuration Service. In case the fields are provided in languages that are not defined in the Configuration Service, the request will be rejected.\n"}},"schemas":{"errorMessage":{"type":"object","title":"error","description":"Schema for API-specific errors.","properties":{"code":{"minimum":100,"maximum":599,"description":"Original HTTP error code, should be consistent with the response HTTP code.","type":"integer"},"status":{"description":"Original HTTP error reason.","type":"string"},"message":{"description":"Descriptive error message for debugging","type":"string"},"details":{"description":"List of problems causing this error.","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"string"}},"errorCode":{"type":"string","description":"Additional error code."}}},"createPriceV2":{"type":"object","title":"Price (v2)","properties":{"id":{"type":"string","description":"Custom price identifier. If not provided, it is automatically generated."},"itemId":{"type":"object","description":"Item for which the price is defined.","required":["itemType","id"],"properties":{"itemType":{"type":"string","description":"Type of the referenced item. Possible values:\n* `PRODUCT`\n* `SKU`\n\n**Note**: The `SKU` value is a `preview` value - the system does not fully operate on the SKU concept yet.\n"},"id":{"type":"string","description":"Product's unique identifier - ID or SKU.\n\n**Note**: The SKU is a `preview` functionality - the system does not fully operate on the SKU concept yet.\n"}}},"itemYrn":{"description":"Product's uniform resource name.","type":"string"},"currency":{"allOf":[{"$ref":"#/components/schemas/currency"}]},"location":{"allOf":[{"$ref":"#/components/schemas/location"}]},"salePrice":{"allOf":[{"$ref":"#/components/schemas/salePrice"}]},"restrictions":{"allOf":[{"$ref":"#/components/schemas/restrictions"}]},"priceModelId":{"type":"string","description":"ID of the price model to which the price should assigned. If the ID is not provided, the default price model is used."},"tierValues":{"type":"array","description":"Prices for tiers specified in the price model. The prices will be assigned to tiers based on the entered order (the first value will be assigned to the first tier, the second value to second tier).\n\n**Note**: If this field does not contain values for all tiers defined in the price model, the endpoint responds with an error.\n","items":{"allOf":[{"$ref":"#/components/schemas/tierValueCreation"}]}},"mixins":{"type":"object","description":"Map of custom price attributes.","additionalProperties":true},"metadata":{"type":"object","properties":{"mixins":{"type":"object","description":"Schemas for custom price attributes.","additionalProperties":true}}}},"required":["itemId","currency","location","tierValues"]},"currency":{"type":"string","title":"currency","pattern":"[A-Z]{3}","description":"Currency code, compliant with the ISO 4217 standard."},"location":{"type":"object","properties":{"countryCode":{"type":"string","description":"Code of the country to which the price applies, as defined in the Country Service."}},"required":["countryCode"]},"salePrice":{"type":"object","properties":{"discountAmount":{"minimum":0,"description":"Discount expressed as a fixed amount.","type":"number"},"discountRate":{"minimum":0,"maximum":100,"description":"Discount expressed as a percentage of the original price.","type":"number"},"description":{"description":"Additional information about the discount.","type":"string"}}},"restrictions":{"type":"object","description":"Restrictions that limit the validity of the price model and prices assigned to it.\n","properties":{"principals":{"type":"array","description":"List of customers and customer groups for whom the price is valid.\n\n**Note** Customer groups are a `preview` feature.","items":{"allOf":[{"$ref":"#/components/schemas/principal"}]}},"validity":{"allOf":[{"$ref":"#/components/schemas/dateValidity"}]},"siteCodes":{"type":"array","description":"Codes of sites to which the price applies.","items":{"type":"string"}},"priceListId":{"type":"string","description":"Unique identifier of the price list to which the price should be assigned.\n\n**Note**: It is a `preview` field."}},"required":["siteCodes"]},"principal":{"description":"Customers or customer groups for whom the price is valid.","type":"object","properties":{"type":{"type":"string","description":"Customer or customer group for whom the price is valid. Possible values:\n* `CUSTOMER`\n* `GROUP`\n\n**Note**: The `GROUP` value is a `preview` value - the system does not fully operate on the customer groups concept yet."},"id":{"type":"string","description":"Unique identifier of the customer or customer group."}},"required":["type","id"]},"dateValidity":{"type":"object","description":"Date range in which the object is valid.","properties":{"from":{"type":"string","description":"Date from which the object is valid, compliant with the ISO 8601 standard."},"to":{"type":"string","description":"Date to which the object is valid, compliant with the ISO 8601 standard."}}},"tierValueCreation":{"description":"","type":"object","properties":{"id":{"type":"string","description":"An identifier of a tier. The ID is required only if the priceModelId is provided. If the price model is the default, the tier value is automatically assigned according to the default price model."},"priceValue":{"type":"number","description":"Gross price (if the `includesTax` field is set to `true`) or net price (if the `includesTax` field is set to `false`).\n\nThis field should contain by a number where the cent part is separated by a dot sign - such as `12.99`.\n\n**Note**: The cent part of the price is not limited to two digits. You can specify the price with any precision."}},"required":["priceValue"]}},"responses":{"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details are provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"Forbidden_403":{"description":"Given authorization scopes are not sufficient and do not match the scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"InternalServiceError_500":{"description":"Some server-side error occurred. Details are provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}}},"paths":{"/price/{tenant}/prices":{"post":{"summary":"Creating a new price","tags":["Prices"],"parameters":[{"$ref":"#/components/parameters/trait_contentLanguageV2_header"}],"responses":{"201":{"description":"The request was successful. The price has been created.","headers":{"Location":{"description":"Location of the newly created resource.\n","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of a newly created price."}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/Forbidden_403"},"500":{"$ref":"#/components/responses/InternalServiceError_500"}},"description":"Creates a new price for a specified product.","operationId":"POST-price-create-price","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPriceV2"}}},"required":false}}}}}
```

## Creating multiple prices

> Creates multiple prices. The maximum batch size is 200.\
> \
> Response for a particular price is returned at the same position (index) at which that price is located in the request body.

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"tags":[{"name":"Prices"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["price.price_manage","price.price_manage_by_vendor"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"price.price_manage":"Needed to manage prices.","price.price_read":"Needed to retrieve prices.","price.price_own":"Needed to calculate product prices (legacy).","price.prod_price_calculate":"Needed to calculate prices and synchronize sale prices (legacy).","price.price_delete_all":"Needed to delete all prices at once (legacy).","price.price_match_own":"Needed to use the price matching functionality based on information from the session context.","price.pricemodel_manage":"Needed to manage price models.","price.pricemodel_read":"Needed to retrieve price models.","price.price_manage_by_vendor":"Needed to manage prices belonging to the vendor."}}}}},"parameters":{"trait_contentLanguageV2_header":{"name":"Content-Language","in":"header","required":false,"schema":{"type":"string"},"description":"List of languages in which localized fields in the request body are provided.\n\n* If the `Content-Language` header is set to `*`, the localized fields should be provided as maps of translations, where the keys are language codes and values are the fields in their respective languages.\n* If the `Content-Language` header is set to a specific language, the localized fields should be provided as strings.\n* If the `Content-Language` header is empty, the endpoint will asume that the localized fields are provided in the default language defined in the Configuration Service.\n\n**Note**: You can provide the localized fields only in languages defined in the Configuration Service. In case the fields are provided in languages that are not defined in the Configuration Service, the request will be rejected.\n"}},"schemas":{"priceBulkResponseEntry":{"allOf":[{"type":"object","properties":{"index":{"type":"integer"},"id":{"type":"string"}}},{"$ref":"#/components/schemas/errorMessage"}]},"errorMessage":{"type":"object","title":"error","description":"Schema for API-specific errors.","properties":{"code":{"minimum":100,"maximum":599,"description":"Original HTTP error code, should be consistent with the response HTTP code.","type":"integer"},"status":{"description":"Original HTTP error reason.","type":"string"},"message":{"description":"Descriptive error message for debugging","type":"string"},"details":{"description":"List of problems causing this error.","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"string"}},"errorCode":{"type":"string","description":"Additional error code."}}},"createPriceV2":{"type":"object","title":"Price (v2)","properties":{"id":{"type":"string","description":"Custom price identifier. If not provided, it is automatically generated."},"itemId":{"type":"object","description":"Item for which the price is defined.","required":["itemType","id"],"properties":{"itemType":{"type":"string","description":"Type of the referenced item. Possible values:\n* `PRODUCT`\n* `SKU`\n\n**Note**: The `SKU` value is a `preview` value - the system does not fully operate on the SKU concept yet.\n"},"id":{"type":"string","description":"Product's unique identifier - ID or SKU.\n\n**Note**: The SKU is a `preview` functionality - the system does not fully operate on the SKU concept yet.\n"}}},"itemYrn":{"description":"Product's uniform resource name.","type":"string"},"currency":{"allOf":[{"$ref":"#/components/schemas/currency"}]},"location":{"allOf":[{"$ref":"#/components/schemas/location"}]},"salePrice":{"allOf":[{"$ref":"#/components/schemas/salePrice"}]},"restrictions":{"allOf":[{"$ref":"#/components/schemas/restrictions"}]},"priceModelId":{"type":"string","description":"ID of the price model to which the price should assigned. If the ID is not provided, the default price model is used."},"tierValues":{"type":"array","description":"Prices for tiers specified in the price model. The prices will be assigned to tiers based on the entered order (the first value will be assigned to the first tier, the second value to second tier).\n\n**Note**: If this field does not contain values for all tiers defined in the price model, the endpoint responds with an error.\n","items":{"allOf":[{"$ref":"#/components/schemas/tierValueCreation"}]}},"mixins":{"type":"object","description":"Map of custom price attributes.","additionalProperties":true},"metadata":{"type":"object","properties":{"mixins":{"type":"object","description":"Schemas for custom price attributes.","additionalProperties":true}}}},"required":["itemId","currency","location","tierValues"]},"currency":{"type":"string","title":"currency","pattern":"[A-Z]{3}","description":"Currency code, compliant with the ISO 4217 standard."},"location":{"type":"object","properties":{"countryCode":{"type":"string","description":"Code of the country to which the price applies, as defined in the Country Service."}},"required":["countryCode"]},"salePrice":{"type":"object","properties":{"discountAmount":{"minimum":0,"description":"Discount expressed as a fixed amount.","type":"number"},"discountRate":{"minimum":0,"maximum":100,"description":"Discount expressed as a percentage of the original price.","type":"number"},"description":{"description":"Additional information about the discount.","type":"string"}}},"restrictions":{"type":"object","description":"Restrictions that limit the validity of the price model and prices assigned to it.\n","properties":{"principals":{"type":"array","description":"List of customers and customer groups for whom the price is valid.\n\n**Note** Customer groups are a `preview` feature.","items":{"allOf":[{"$ref":"#/components/schemas/principal"}]}},"validity":{"allOf":[{"$ref":"#/components/schemas/dateValidity"}]},"siteCodes":{"type":"array","description":"Codes of sites to which the price applies.","items":{"type":"string"}},"priceListId":{"type":"string","description":"Unique identifier of the price list to which the price should be assigned.\n\n**Note**: It is a `preview` field."}},"required":["siteCodes"]},"principal":{"description":"Customers or customer groups for whom the price is valid.","type":"object","properties":{"type":{"type":"string","description":"Customer or customer group for whom the price is valid. Possible values:\n* `CUSTOMER`\n* `GROUP`\n\n**Note**: The `GROUP` value is a `preview` value - the system does not fully operate on the customer groups concept yet."},"id":{"type":"string","description":"Unique identifier of the customer or customer group."}},"required":["type","id"]},"dateValidity":{"type":"object","description":"Date range in which the object is valid.","properties":{"from":{"type":"string","description":"Date from which the object is valid, compliant with the ISO 8601 standard."},"to":{"type":"string","description":"Date to which the object is valid, compliant with the ISO 8601 standard."}}},"tierValueCreation":{"description":"","type":"object","properties":{"id":{"type":"string","description":"An identifier of a tier. The ID is required only if the priceModelId is provided. If the price model is the default, the tier value is automatically assigned according to the default price model."},"priceValue":{"type":"number","description":"Gross price (if the `includesTax` field is set to `true`) or net price (if the `includesTax` field is set to `false`).\n\nThis field should contain by a number where the cent part is separated by a dot sign - such as `12.99`.\n\n**Note**: The cent part of the price is not limited to two digits. You can specify the price with any precision."}},"required":["priceValue"]}},"responses":{"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details are provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"Forbidden_403":{"description":"Given authorization scopes are not sufficient and do not match the scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"InternalServiceError_500":{"description":"Some server-side error occurred. Details are provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}}},"paths":{"/price/{tenant}/prices/bulk":{"post":{"summary":"Creating multiple prices","tags":["Prices"],"parameters":[{"$ref":"#/components/parameters/trait_contentLanguageV2_header"}],"responses":{"207":{"description":"Multi-Status","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/priceBulkResponseEntry"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/Forbidden_403"},"500":{"$ref":"#/components/responses/InternalServiceError_500"}},"description":"Creates multiple prices. The maximum batch size is 200.\n\nResponse for a particular price is returned at the same position (index) at which that price is located in the request body.","operationId":"POST-price-create-multiple-prices","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/createPriceV2"}}}},"required":false}}}}}
```

## Upserting multiple prices

> Updates or creates multiple prices. The maximum batch size is 200.\
> \
> Response for a particular price is returned at the same position (index) at which that price is located in the request body.

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"tags":[{"name":"Prices"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["price.price_manage","price.price_manage_by_vendor"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"price.price_manage":"Needed to manage prices.","price.price_read":"Needed to retrieve prices.","price.price_own":"Needed to calculate product prices (legacy).","price.prod_price_calculate":"Needed to calculate prices and synchronize sale prices (legacy).","price.price_delete_all":"Needed to delete all prices at once (legacy).","price.price_match_own":"Needed to use the price matching functionality based on information from the session context.","price.pricemodel_manage":"Needed to manage price models.","price.pricemodel_read":"Needed to retrieve price models.","price.price_manage_by_vendor":"Needed to manage prices belonging to the vendor."}}}}},"parameters":{"trait_contentLanguageV2_header":{"name":"Content-Language","in":"header","required":false,"schema":{"type":"string"},"description":"List of languages in which localized fields in the request body are provided.\n\n* If the `Content-Language` header is set to `*`, the localized fields should be provided as maps of translations, where the keys are language codes and values are the fields in their respective languages.\n* If the `Content-Language` header is set to a specific language, the localized fields should be provided as strings.\n* If the `Content-Language` header is empty, the endpoint will asume that the localized fields are provided in the default language defined in the Configuration Service.\n\n**Note**: You can provide the localized fields only in languages defined in the Configuration Service. In case the fields are provided in languages that are not defined in the Configuration Service, the request will be rejected.\n"}},"schemas":{"priceBulkResponseEntry":{"allOf":[{"type":"object","properties":{"index":{"type":"integer"},"id":{"type":"string"}}},{"$ref":"#/components/schemas/errorMessage"}]},"errorMessage":{"type":"object","title":"error","description":"Schema for API-specific errors.","properties":{"code":{"minimum":100,"maximum":599,"description":"Original HTTP error code, should be consistent with the response HTTP code.","type":"integer"},"status":{"description":"Original HTTP error reason.","type":"string"},"message":{"description":"Descriptive error message for debugging","type":"string"},"details":{"description":"List of problems causing this error.","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"string"}},"errorCode":{"type":"string","description":"Additional error code."}}},"updatePriceV2":{"allOf":[{"$ref":"#/components/schemas/getSinglePriceV2"},{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/priceMetadata"}}}]},"getSinglePriceV2":{"allOf":[{"$ref":"#/components/schemas/getPriceV2"},{"type":"object","properties":{"priceModel":{"$ref":"#/components/schemas/priceModelExpand"}}}]},"getPriceV2":{"type":"object","title":"Price (v2)","properties":{"id":{"type":"string","description":"A price identifier."},"itemId":{"type":"object","description":"Item for which the price is defined.","properties":{"itemType":{"type":"string","description":"Type of the referenced item. Possible values:\n* `PRODUCT`\n* `SKU`\n\n**Note**: The `SKU` value is a `preview` value - the system does not fully operate on the SKU concept yet.\n"},"id":{"type":"string","description":"Product's unique identifier, generated when the product is created through the Product Service.\n"}}},"itemYrn":{"description":"Product's uniform resource name.","type":"string"},"currency":{"description":"Currency code, as defined in the Currency Service.","type":"string"},"location":{"allOf":[{"$ref":"#/components/schemas/location"}]},"salePrice":{"allOf":[{"$ref":"#/components/schemas/salePrice"}]},"priceModelId":{"type":"string","description":"ID of the price model to which the price is assigned. If the ID is not provided, the default price model is used."},"restrictions":{"$ref":"#/components/schemas/restrictions"},"tierValues":{"type":"array","items":{"$ref":"#/components/schemas/tierValueRetrieval"}},"vendorId":{"type":"string","description":"Id of a vendor to which the price belongs."},"mixins":{"type":"object","description":"Custom price attributes.","additionalProperties":true},"metadata":{"$ref":"#/components/schemas/priceMetadata"}}},"location":{"type":"object","properties":{"countryCode":{"type":"string","description":"Code of the country to which the price applies, as defined in the Country Service."}},"required":["countryCode"]},"salePrice":{"type":"object","properties":{"discountAmount":{"minimum":0,"description":"Discount expressed as a fixed amount.","type":"number"},"discountRate":{"minimum":0,"maximum":100,"description":"Discount expressed as a percentage of the original price.","type":"number"},"description":{"description":"Additional information about the discount.","type":"string"}}},"restrictions":{"type":"object","description":"Restrictions that limit the validity of the price model and prices assigned to it.\n","properties":{"principals":{"type":"array","description":"List of customers and customer groups for whom the price is valid.\n\n**Note** Customer groups are a `preview` feature.","items":{"allOf":[{"$ref":"#/components/schemas/principal"}]}},"validity":{"allOf":[{"$ref":"#/components/schemas/dateValidity"}]},"siteCodes":{"type":"array","description":"Codes of sites to which the price applies.","items":{"type":"string"}},"priceListId":{"type":"string","description":"Unique identifier of the price list to which the price should be assigned.\n\n**Note**: It is a `preview` field."}},"required":["siteCodes"]},"principal":{"description":"Customers or customer groups for whom the price is valid.","type":"object","properties":{"type":{"type":"string","description":"Customer or customer group for whom the price is valid. Possible values:\n* `CUSTOMER`\n* `GROUP`\n\n**Note**: The `GROUP` value is a `preview` value - the system does not fully operate on the customer groups concept yet."},"id":{"type":"string","description":"Unique identifier of the customer or customer group."}},"required":["type","id"]},"dateValidity":{"type":"object","description":"Date range in which the object is valid.","properties":{"from":{"type":"string","description":"Date from which the object is valid, compliant with the ISO 8601 standard."},"to":{"type":"string","description":"Date to which the object is valid, compliant with the ISO 8601 standard."}}},"tierValueRetrieval":{"description":"","type":"object","properties":{"id":{"type":"string","description":"An identifier of a tier. The ID is required only if the `priceModelId` is provided. If the price model is the default, the tier value is automatically assigned according to the default price model."},"priceValue":{"type":"number","description":"Gross price (if the `includesTax` field is set to `true`) or net price (if the `includesTax` field is set to `false`)."}},"required":["priceValue"]},"priceMetadata":{"allOf":[{"$ref":"#/components/schemas/metadata"},{"type":"object","properties":{"mixins":{"type":"object","description":"Mixins schemas","additionalProperties":true}}}]},"metadata":{"type":"object","properties":{"createdAt":{"description":"Date and time when the price was created.","type":"string"},"modifiedAt":{"description":"Date and time when the price was last modified.","type":"string"},"version":{"minimum":1,"type":"integer","description":"Version of the price object. If provided optimistic locking will be enabled and it has to match version in the database"}}},"priceModelExpand":{"allOf":[{"$ref":"#/components/schemas/priceModelRetrieval"},{"type":"object","description":"Price model to which the price is assigned.\n\n**Note**: This field is only returned if the `extendWithPriceModel` query param is set to `true` when retrieving a price by ID."}]},"priceModelRetrieval":{"description":"Price model holds additional attributes that are extending price. For example it's possible to define a price which will be specific for a given customer or customer group.\n","type":"object","properties":{"id":{"type":"string","description":"Price model's unique identifier, generated when the price model is created.\n"},"name":{"oneOf":[{"type":"object"},{"type":"string"}]},"description":{"oneOf":[{"type":"object"},{"type":"string"}]},"includesTax":{"type":"boolean","description":"Flag indicating whether prices assigned to the price model are expressed as net or gross.\n\n| Value | Description |\n| --- | --- |\n| `true` | Prices are expressed as gross values. |\n| `false` | Prices are expressed as net values. |\n"},"includesMarkup":{"type":"boolean","description":"Flag indicating whether prices assigned to the price model include markup.\n\n**Note**: This is a **preview** field.\n"},"measurementUnit":{"$ref":"#/components/schemas/measurementUnitV2"},"tierDefinition":{"type":"object","properties":{"tierType":{"type":"string","description":"If the price is created based on a price model (the `priceModelId` is provided, the field should stay null. Otherwise the provided value will override a value from price model.\n\nPossible values:\n* `BASIC`\n* `VOLUME`\n* `TIERED`\n\n`BASIC`: Used to offer the same price per unit, regardless of the ordered quantity.\n\n  **Note**: When using basic pricing, you need to define a single tier and set its `minQuantity` field to `0`.\n\n`VOLUME`: Used to offer a lower price per unit depending on the total ordered quantity.\n\n`TIERED`: Used to offer a lower price per unit based on the tiers that the total ordered quantity falls into.\n\n  **Example**: You defined three tiers, starting at 5, 10, and 15 pieces respectively. A customer orders 16 pieces. In this pricing model, the first 5 pieces will be priced according to the first tier, the next 5 according to the second tier, and the 16th piece will be priced according to the third tier."},"tiers":{"type":"array","items":{"type":"object","properties":{"minQuantity":{"$ref":"#/components/schemas/measurementUnit"},"id":{"type":"string","description":"Identifier of a given tier."}}}}}},"isDefault":{"type":"boolean","description":"Indicates if the price model is a default price model."},"metadata":{"$ref":"#/components/schemas/metadata"}}},"measurementUnitV2":{"type":"object","description":"Measurement unit for which the price is defined.","properties":{"quantity":{"minimum":0,"description":"Quantity of the measurement unit.","type":"number"},"unitCode":{"description":"Code of the measurement unit, as defined in the Unit Handling Service.","type":"string"}},"required":["quantity","unitCode"],"title":""},"measurementUnit":{"type":"object","properties":{"quantity":{"minimum":0,"description":"Quantity of the measurement unit.","type":"number"},"unitCode":{"description":"Code of the measurement unit.","enum":["kg","g","mg","l","ml","lb","qt","qtr","gal","pt","oz","MTR","XRO","MLT","LTR","H87","KGM","GRM","HLT","DL","DAG","RO"],"type":"string"}},"required":["quantity","unitCode"],"description":"Measurement unit for which the price is defined."}},"responses":{"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details are provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"Forbidden_403":{"description":"Given authorization scopes are not sufficient and do not match the scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"InternalServiceError_500":{"description":"Some server-side error occurred. Details are provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}}},"paths":{"/price/{tenant}/prices/bulk":{"put":{"summary":"Upserting multiple prices","tags":["Prices"],"parameters":[{"$ref":"#/components/parameters/trait_contentLanguageV2_header"}],"responses":{"207":{"description":"Multi-Status","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/priceBulkResponseEntry"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/Forbidden_403"},"500":{"$ref":"#/components/responses/InternalServiceError_500"}},"description":"Updates or creates multiple prices. The maximum batch size is 200.\n\nResponse for a particular price is returned at the same position (index) at which that price is located in the request body.","operationId":"PUT-price-update-multiple-prices","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/updatePriceV2"}}}},"required":false}}}}}
```

## Retrieving a price

> Retrieves a specified price's details by priceId.\
> \
> \### Additional scopes info\
> No specific scopes are required.\
> \
> The \`price.price\_read\_by\_vendor\` scope allows to fetch just the prices belonging to the vendor.

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"tags":[{"name":"Prices"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"price.price_manage":"Needed to manage prices.","price.price_read":"Needed to retrieve prices.","price.price_own":"Needed to calculate product prices (legacy).","price.prod_price_calculate":"Needed to calculate prices and synchronize sale prices (legacy).","price.price_delete_all":"Needed to delete all prices at once (legacy).","price.price_match_own":"Needed to use the price matching functionality based on information from the session context.","price.pricemodel_manage":"Needed to manage price models.","price.pricemodel_read":"Needed to retrieve price models.","price.price_manage_by_vendor":"Needed to manage prices belonging to the vendor."}}}}},"parameters":{"trait_acceptLanguageV2_header":{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"List of language codes acceptable for the response. You can specify factors that indicate which language should be retrieved if the one with a higher factor was not found in the localized fields.\n* If the header is set to a particular language or a list of languages, all localized fields are retrieved as strings.\n* If the header is set to `*`, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.\n* If the header is empty, localized fields are retrieved in the default language defined in the Configuration Service.\n"}},"schemas":{"getSinglePriceV2":{"allOf":[{"$ref":"#/components/schemas/getPriceV2"},{"type":"object","properties":{"priceModel":{"$ref":"#/components/schemas/priceModelExpand"}}}]},"getPriceV2":{"type":"object","title":"Price (v2)","properties":{"id":{"type":"string","description":"A price identifier."},"itemId":{"type":"object","description":"Item for which the price is defined.","properties":{"itemType":{"type":"string","description":"Type of the referenced item. Possible values:\n* `PRODUCT`\n* `SKU`\n\n**Note**: The `SKU` value is a `preview` value - the system does not fully operate on the SKU concept yet.\n"},"id":{"type":"string","description":"Product's unique identifier, generated when the product is created through the Product Service.\n"}}},"itemYrn":{"description":"Product's uniform resource name.","type":"string"},"currency":{"description":"Currency code, as defined in the Currency Service.","type":"string"},"location":{"allOf":[{"$ref":"#/components/schemas/location"}]},"salePrice":{"allOf":[{"$ref":"#/components/schemas/salePrice"}]},"priceModelId":{"type":"string","description":"ID of the price model to which the price is assigned. If the ID is not provided, the default price model is used."},"restrictions":{"$ref":"#/components/schemas/restrictions"},"tierValues":{"type":"array","items":{"$ref":"#/components/schemas/tierValueRetrieval"}},"vendorId":{"type":"string","description":"Id of a vendor to which the price belongs."},"mixins":{"type":"object","description":"Custom price attributes.","additionalProperties":true},"metadata":{"$ref":"#/components/schemas/priceMetadata"}}},"location":{"type":"object","properties":{"countryCode":{"type":"string","description":"Code of the country to which the price applies, as defined in the Country Service."}},"required":["countryCode"]},"salePrice":{"type":"object","properties":{"discountAmount":{"minimum":0,"description":"Discount expressed as a fixed amount.","type":"number"},"discountRate":{"minimum":0,"maximum":100,"description":"Discount expressed as a percentage of the original price.","type":"number"},"description":{"description":"Additional information about the discount.","type":"string"}}},"restrictions":{"type":"object","description":"Restrictions that limit the validity of the price model and prices assigned to it.\n","properties":{"principals":{"type":"array","description":"List of customers and customer groups for whom the price is valid.\n\n**Note** Customer groups are a `preview` feature.","items":{"allOf":[{"$ref":"#/components/schemas/principal"}]}},"validity":{"allOf":[{"$ref":"#/components/schemas/dateValidity"}]},"siteCodes":{"type":"array","description":"Codes of sites to which the price applies.","items":{"type":"string"}},"priceListId":{"type":"string","description":"Unique identifier of the price list to which the price should be assigned.\n\n**Note**: It is a `preview` field."}},"required":["siteCodes"]},"principal":{"description":"Customers or customer groups for whom the price is valid.","type":"object","properties":{"type":{"type":"string","description":"Customer or customer group for whom the price is valid. Possible values:\n* `CUSTOMER`\n* `GROUP`\n\n**Note**: The `GROUP` value is a `preview` value - the system does not fully operate on the customer groups concept yet."},"id":{"type":"string","description":"Unique identifier of the customer or customer group."}},"required":["type","id"]},"dateValidity":{"type":"object","description":"Date range in which the object is valid.","properties":{"from":{"type":"string","description":"Date from which the object is valid, compliant with the ISO 8601 standard."},"to":{"type":"string","description":"Date to which the object is valid, compliant with the ISO 8601 standard."}}},"tierValueRetrieval":{"description":"","type":"object","properties":{"id":{"type":"string","description":"An identifier of a tier. The ID is required only if the `priceModelId` is provided. If the price model is the default, the tier value is automatically assigned according to the default price model."},"priceValue":{"type":"number","description":"Gross price (if the `includesTax` field is set to `true`) or net price (if the `includesTax` field is set to `false`)."}},"required":["priceValue"]},"priceMetadata":{"allOf":[{"$ref":"#/components/schemas/metadata"},{"type":"object","properties":{"mixins":{"type":"object","description":"Mixins schemas","additionalProperties":true}}}]},"metadata":{"type":"object","properties":{"createdAt":{"description":"Date and time when the price was created.","type":"string"},"modifiedAt":{"description":"Date and time when the price was last modified.","type":"string"},"version":{"minimum":1,"type":"integer","description":"Version of the price object. If provided optimistic locking will be enabled and it has to match version in the database"}}},"priceModelExpand":{"allOf":[{"$ref":"#/components/schemas/priceModelRetrieval"},{"type":"object","description":"Price model to which the price is assigned.\n\n**Note**: This field is only returned if the `extendWithPriceModel` query param is set to `true` when retrieving a price by ID."}]},"priceModelRetrieval":{"description":"Price model holds additional attributes that are extending price. For example it's possible to define a price which will be specific for a given customer or customer group.\n","type":"object","properties":{"id":{"type":"string","description":"Price model's unique identifier, generated when the price model is created.\n"},"name":{"oneOf":[{"type":"object"},{"type":"string"}]},"description":{"oneOf":[{"type":"object"},{"type":"string"}]},"includesTax":{"type":"boolean","description":"Flag indicating whether prices assigned to the price model are expressed as net or gross.\n\n| Value | Description |\n| --- | --- |\n| `true` | Prices are expressed as gross values. |\n| `false` | Prices are expressed as net values. |\n"},"includesMarkup":{"type":"boolean","description":"Flag indicating whether prices assigned to the price model include markup.\n\n**Note**: This is a **preview** field.\n"},"measurementUnit":{"$ref":"#/components/schemas/measurementUnitV2"},"tierDefinition":{"type":"object","properties":{"tierType":{"type":"string","description":"If the price is created based on a price model (the `priceModelId` is provided, the field should stay null. Otherwise the provided value will override a value from price model.\n\nPossible values:\n* `BASIC`\n* `VOLUME`\n* `TIERED`\n\n`BASIC`: Used to offer the same price per unit, regardless of the ordered quantity.\n\n  **Note**: When using basic pricing, you need to define a single tier and set its `minQuantity` field to `0`.\n\n`VOLUME`: Used to offer a lower price per unit depending on the total ordered quantity.\n\n`TIERED`: Used to offer a lower price per unit based on the tiers that the total ordered quantity falls into.\n\n  **Example**: You defined three tiers, starting at 5, 10, and 15 pieces respectively. A customer orders 16 pieces. In this pricing model, the first 5 pieces will be priced according to the first tier, the next 5 according to the second tier, and the 16th piece will be priced according to the third tier."},"tiers":{"type":"array","items":{"type":"object","properties":{"minQuantity":{"$ref":"#/components/schemas/measurementUnit"},"id":{"type":"string","description":"Identifier of a given tier."}}}}}},"isDefault":{"type":"boolean","description":"Indicates if the price model is a default price model."},"metadata":{"$ref":"#/components/schemas/metadata"}}},"measurementUnitV2":{"type":"object","description":"Measurement unit for which the price is defined.","properties":{"quantity":{"minimum":0,"description":"Quantity of the measurement unit.","type":"number"},"unitCode":{"description":"Code of the measurement unit, as defined in the Unit Handling Service.","type":"string"}},"required":["quantity","unitCode"],"title":""},"measurementUnit":{"type":"object","properties":{"quantity":{"minimum":0,"description":"Quantity of the measurement unit.","type":"number"},"unitCode":{"description":"Code of the measurement unit.","enum":["kg","g","mg","l","ml","lb","qt","qtr","gal","pt","oz","MTR","XRO","MLT","LTR","H87","KGM","GRM","HLT","DL","DAG","RO"],"type":"string"}},"required":["quantity","unitCode"],"description":"Measurement unit for which the price is defined."},"errorMessage":{"type":"object","title":"error","description":"Schema for API-specific errors.","properties":{"code":{"minimum":100,"maximum":599,"description":"Original HTTP error code, should be consistent with the response HTTP code.","type":"integer"},"status":{"description":"Original HTTP error reason.","type":"string"},"message":{"description":"Descriptive error message for debugging","type":"string"},"details":{"description":"List of problems causing this error.","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"string"}},"errorCode":{"type":"string","description":"Additional error code."}}}},"responses":{"BadRequest_400":{"description":"Request was syntactically incorrect. Details are provided in the response payload.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details are provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"NotFound_404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"InternalServiceError_500":{"description":"Some server-side error occurred. Details are provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}}},"paths":{"/price/{tenant}/prices/{priceId}":{"get":{"summary":"Retrieving a price","tags":["Prices"],"parameters":[{"schema":{"type":"boolean","default":false},"in":"query","name":"extendWithPriceModel","description":"If set to `true`, the response will also include the price model's details.\n"},{"$ref":"#/components/parameters/trait_acceptLanguageV2_header"}],"responses":{"200":{"description":"The request was successful. Price details are returned.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getSinglePriceV2"}}}},"400":{"$ref":"#/components/responses/BadRequest_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"404":{"$ref":"#/components/responses/NotFound_404"},"500":{"$ref":"#/components/responses/InternalServiceError_500"}},"description":"Retrieves a specified price's details by priceId.\n\n### Additional scopes info\nNo specific scopes are required.\n\nThe `price.price_read_by_vendor` scope allows to fetch just the prices belonging to the vendor.","operationId":"GET-price-retrieve-price"}}}}
```

## Upserting a price

> Updates a specified price's details by priceId, or creates a new one with if a price with the given ID doesn't exist yet.

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"tags":[{"name":"Prices"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["price.price_manage","price.price_manage_by vendor"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"price.price_manage":"Needed to manage prices.","price.price_read":"Needed to retrieve prices.","price.price_own":"Needed to calculate product prices (legacy).","price.prod_price_calculate":"Needed to calculate prices and synchronize sale prices (legacy).","price.price_delete_all":"Needed to delete all prices at once (legacy).","price.price_match_own":"Needed to use the price matching functionality based on information from the session context.","price.pricemodel_manage":"Needed to manage price models.","price.pricemodel_read":"Needed to retrieve price models.","price.price_manage_by_vendor":"Needed to manage prices belonging to the vendor."}}}}},"parameters":{"trait_partiallyUpdatable_partial":{"name":"partial","in":"query","required":true,"description":"| Value | Description |\n| --- | --- |\n| `true` | A partial update will be performed. |\n| `false` | A full product replacement will be performed. |","schema":{"type":"boolean"}},"trait_contentLanguageV2_header":{"name":"Content-Language","in":"header","required":false,"schema":{"type":"string"},"description":"List of languages in which localized fields in the request body are provided.\n\n* If the `Content-Language` header is set to `*`, the localized fields should be provided as maps of translations, where the keys are language codes and values are the fields in their respective languages.\n* If the `Content-Language` header is set to a specific language, the localized fields should be provided as strings.\n* If the `Content-Language` header is empty, the endpoint will asume that the localized fields are provided in the default language defined in the Configuration Service.\n\n**Note**: You can provide the localized fields only in languages defined in the Configuration Service. In case the fields are provided in languages that are not defined in the Configuration Service, the request will be rejected.\n"}},"responses":{"Created_201":{"description":"The resource has been created.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of a newly created item."}}}}}},"BadRequest_400":{"description":"Request was syntactically incorrect. Details are provided in the response payload.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details are provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"Forbidden_403":{"description":"Given authorization scopes are not sufficient and do not match the scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"NotFound_404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"Conflict_409":{"description":"The request could not be completed due to a conflict with the current state of the target resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"InternalServiceError_500":{"description":"Some server-side error occurred. Details are provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}},"schemas":{"errorMessage":{"type":"object","title":"error","description":"Schema for API-specific errors.","properties":{"code":{"minimum":100,"maximum":599,"description":"Original HTTP error code, should be consistent with the response HTTP code.","type":"integer"},"status":{"description":"Original HTTP error reason.","type":"string"},"message":{"description":"Descriptive error message for debugging","type":"string"},"details":{"description":"List of problems causing this error.","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"string"}},"errorCode":{"type":"string","description":"Additional error code."}}},"updatePriceV2":{"allOf":[{"$ref":"#/components/schemas/getSinglePriceV2"},{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/priceMetadata"}}}]},"getSinglePriceV2":{"allOf":[{"$ref":"#/components/schemas/getPriceV2"},{"type":"object","properties":{"priceModel":{"$ref":"#/components/schemas/priceModelExpand"}}}]},"getPriceV2":{"type":"object","title":"Price (v2)","properties":{"id":{"type":"string","description":"A price identifier."},"itemId":{"type":"object","description":"Item for which the price is defined.","properties":{"itemType":{"type":"string","description":"Type of the referenced item. Possible values:\n* `PRODUCT`\n* `SKU`\n\n**Note**: The `SKU` value is a `preview` value - the system does not fully operate on the SKU concept yet.\n"},"id":{"type":"string","description":"Product's unique identifier, generated when the product is created through the Product Service.\n"}}},"itemYrn":{"description":"Product's uniform resource name.","type":"string"},"currency":{"description":"Currency code, as defined in the Currency Service.","type":"string"},"location":{"allOf":[{"$ref":"#/components/schemas/location"}]},"salePrice":{"allOf":[{"$ref":"#/components/schemas/salePrice"}]},"priceModelId":{"type":"string","description":"ID of the price model to which the price is assigned. If the ID is not provided, the default price model is used."},"restrictions":{"$ref":"#/components/schemas/restrictions"},"tierValues":{"type":"array","items":{"$ref":"#/components/schemas/tierValueRetrieval"}},"vendorId":{"type":"string","description":"Id of a vendor to which the price belongs."},"mixins":{"type":"object","description":"Custom price attributes.","additionalProperties":true},"metadata":{"$ref":"#/components/schemas/priceMetadata"}}},"location":{"type":"object","properties":{"countryCode":{"type":"string","description":"Code of the country to which the price applies, as defined in the Country Service."}},"required":["countryCode"]},"salePrice":{"type":"object","properties":{"discountAmount":{"minimum":0,"description":"Discount expressed as a fixed amount.","type":"number"},"discountRate":{"minimum":0,"maximum":100,"description":"Discount expressed as a percentage of the original price.","type":"number"},"description":{"description":"Additional information about the discount.","type":"string"}}},"restrictions":{"type":"object","description":"Restrictions that limit the validity of the price model and prices assigned to it.\n","properties":{"principals":{"type":"array","description":"List of customers and customer groups for whom the price is valid.\n\n**Note** Customer groups are a `preview` feature.","items":{"allOf":[{"$ref":"#/components/schemas/principal"}]}},"validity":{"allOf":[{"$ref":"#/components/schemas/dateValidity"}]},"siteCodes":{"type":"array","description":"Codes of sites to which the price applies.","items":{"type":"string"}},"priceListId":{"type":"string","description":"Unique identifier of the price list to which the price should be assigned.\n\n**Note**: It is a `preview` field."}},"required":["siteCodes"]},"principal":{"description":"Customers or customer groups for whom the price is valid.","type":"object","properties":{"type":{"type":"string","description":"Customer or customer group for whom the price is valid. Possible values:\n* `CUSTOMER`\n* `GROUP`\n\n**Note**: The `GROUP` value is a `preview` value - the system does not fully operate on the customer groups concept yet."},"id":{"type":"string","description":"Unique identifier of the customer or customer group."}},"required":["type","id"]},"dateValidity":{"type":"object","description":"Date range in which the object is valid.","properties":{"from":{"type":"string","description":"Date from which the object is valid, compliant with the ISO 8601 standard."},"to":{"type":"string","description":"Date to which the object is valid, compliant with the ISO 8601 standard."}}},"tierValueRetrieval":{"description":"","type":"object","properties":{"id":{"type":"string","description":"An identifier of a tier. The ID is required only if the `priceModelId` is provided. If the price model is the default, the tier value is automatically assigned according to the default price model."},"priceValue":{"type":"number","description":"Gross price (if the `includesTax` field is set to `true`) or net price (if the `includesTax` field is set to `false`)."}},"required":["priceValue"]},"priceMetadata":{"allOf":[{"$ref":"#/components/schemas/metadata"},{"type":"object","properties":{"mixins":{"type":"object","description":"Mixins schemas","additionalProperties":true}}}]},"metadata":{"type":"object","properties":{"createdAt":{"description":"Date and time when the price was created.","type":"string"},"modifiedAt":{"description":"Date and time when the price was last modified.","type":"string"},"version":{"minimum":1,"type":"integer","description":"Version of the price object. If provided optimistic locking will be enabled and it has to match version in the database"}}},"priceModelExpand":{"allOf":[{"$ref":"#/components/schemas/priceModelRetrieval"},{"type":"object","description":"Price model to which the price is assigned.\n\n**Note**: This field is only returned if the `extendWithPriceModel` query param is set to `true` when retrieving a price by ID."}]},"priceModelRetrieval":{"description":"Price model holds additional attributes that are extending price. For example it's possible to define a price which will be specific for a given customer or customer group.\n","type":"object","properties":{"id":{"type":"string","description":"Price model's unique identifier, generated when the price model is created.\n"},"name":{"oneOf":[{"type":"object"},{"type":"string"}]},"description":{"oneOf":[{"type":"object"},{"type":"string"}]},"includesTax":{"type":"boolean","description":"Flag indicating whether prices assigned to the price model are expressed as net or gross.\n\n| Value | Description |\n| --- | --- |\n| `true` | Prices are expressed as gross values. |\n| `false` | Prices are expressed as net values. |\n"},"includesMarkup":{"type":"boolean","description":"Flag indicating whether prices assigned to the price model include markup.\n\n**Note**: This is a **preview** field.\n"},"measurementUnit":{"$ref":"#/components/schemas/measurementUnitV2"},"tierDefinition":{"type":"object","properties":{"tierType":{"type":"string","description":"If the price is created based on a price model (the `priceModelId` is provided, the field should stay null. Otherwise the provided value will override a value from price model.\n\nPossible values:\n* `BASIC`\n* `VOLUME`\n* `TIERED`\n\n`BASIC`: Used to offer the same price per unit, regardless of the ordered quantity.\n\n  **Note**: When using basic pricing, you need to define a single tier and set its `minQuantity` field to `0`.\n\n`VOLUME`: Used to offer a lower price per unit depending on the total ordered quantity.\n\n`TIERED`: Used to offer a lower price per unit based on the tiers that the total ordered quantity falls into.\n\n  **Example**: You defined three tiers, starting at 5, 10, and 15 pieces respectively. A customer orders 16 pieces. In this pricing model, the first 5 pieces will be priced according to the first tier, the next 5 according to the second tier, and the 16th piece will be priced according to the third tier."},"tiers":{"type":"array","items":{"type":"object","properties":{"minQuantity":{"$ref":"#/components/schemas/measurementUnit"},"id":{"type":"string","description":"Identifier of a given tier."}}}}}},"isDefault":{"type":"boolean","description":"Indicates if the price model is a default price model."},"metadata":{"$ref":"#/components/schemas/metadata"}}},"measurementUnitV2":{"type":"object","description":"Measurement unit for which the price is defined.","properties":{"quantity":{"minimum":0,"description":"Quantity of the measurement unit.","type":"number"},"unitCode":{"description":"Code of the measurement unit, as defined in the Unit Handling Service.","type":"string"}},"required":["quantity","unitCode"],"title":""},"measurementUnit":{"type":"object","properties":{"quantity":{"minimum":0,"description":"Quantity of the measurement unit.","type":"number"},"unitCode":{"description":"Code of the measurement unit.","enum":["kg","g","mg","l","ml","lb","qt","qtr","gal","pt","oz","MTR","XRO","MLT","LTR","H87","KGM","GRM","HLT","DL","DAG","RO"],"type":"string"}},"required":["quantity","unitCode"],"description":"Measurement unit for which the price is defined."}}},"paths":{"/price/{tenant}/prices/{priceId}":{"put":{"summary":"Upserting a price","tags":["Prices"],"parameters":[{"$ref":"#/components/parameters/trait_partiallyUpdatable_partial"},{"$ref":"#/components/parameters/trait_contentLanguageV2_header"}],"responses":{"201":{"$ref":"#/components/responses/Created_201"},"204":{"description":"The request was successful. The price has been updated.\n"},"400":{"$ref":"#/components/responses/BadRequest_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/Forbidden_403"},"404":{"$ref":"#/components/responses/NotFound_404"},"409":{"$ref":"#/components/responses/Conflict_409"},"500":{"$ref":"#/components/responses/InternalServiceError_500"}},"description":"Updates a specified price's details by priceId, or creates a new one with if a price with the given ID doesn't exist yet.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePriceV2"}}},"required":false,"description":""},"operationId":"PUT-price-update-price"}}}}
```

## Deleting a price

> Deletes a specified price by priceId.

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"tags":[{"name":"Prices"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["price.price_manage","price.price_manage_by_vendor"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"price.price_manage":"Needed to manage prices.","price.price_read":"Needed to retrieve prices.","price.price_own":"Needed to calculate product prices (legacy).","price.prod_price_calculate":"Needed to calculate prices and synchronize sale prices (legacy).","price.price_delete_all":"Needed to delete all prices at once (legacy).","price.price_match_own":"Needed to use the price matching functionality based on information from the session context.","price.pricemodel_manage":"Needed to manage price models.","price.pricemodel_read":"Needed to retrieve price models.","price.price_manage_by_vendor":"Needed to manage prices belonging to the vendor."}}}}},"parameters":{"trait_tenant":{"name":"tenant","in":"path","required":true,"description":"Your Emporix tenant's name.\n\n**Note**: The tenant should always be written in lowercase.\n","schema":{"pattern":"^[a-z][a-z0-9]+$","minLength":3,"maxLength":16,"type":"string"}}},"responses":{"BadRequest_400":{"description":"Request was syntactically incorrect. Details are provided in the response payload.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details are provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"Forbidden_403":{"description":"Given authorization scopes are not sufficient and do not match the scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"NotFound_404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"InternalServiceError_500":{"description":"Some server-side error occurred. Details are provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}},"schemas":{"errorMessage":{"type":"object","title":"error","description":"Schema for API-specific errors.","properties":{"code":{"minimum":100,"maximum":599,"description":"Original HTTP error code, should be consistent with the response HTTP code.","type":"integer"},"status":{"description":"Original HTTP error reason.","type":"string"},"message":{"description":"Descriptive error message for debugging","type":"string"},"details":{"description":"List of problems causing this error.","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"string"}},"errorCode":{"type":"string","description":"Additional error code."}}}}},"paths":{"/price/{tenant}/prices/{priceId}":{"delete":{"summary":"Deleting a price","tags":["Prices"],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"required":false},"parameters":[{"name":"priceId","in":"path","required":true,"schema":{"type":"string"},"description":"Price's unique identifier, generated when the price is created."},{"$ref":"#/components/parameters/trait_tenant"}],"responses":{"204":{"description":"The request was successful. The price has been updated."},"400":{"$ref":"#/components/responses/BadRequest_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/Forbidden_403"},"404":{"$ref":"#/components/responses/NotFound_404"},"500":{"$ref":"#/components/responses/InternalServiceError_500"}},"description":"Deletes a specified price by priceId.","operationId":"DELETE-price-remove-price"}}}}
```

## Searching for prices

> Retrieves prices (or a single price) for a list of products.

````json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"tags":[{"name":"Prices"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["price.price_read","price.price_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"price.price_manage":"Needed to manage prices.","price.price_read":"Needed to retrieve prices.","price.price_own":"Needed to calculate product prices (legacy).","price.prod_price_calculate":"Needed to calculate prices and synchronize sale prices (legacy).","price.price_delete_all":"Needed to delete all prices at once (legacy).","price.price_match_own":"Needed to use the price matching functionality based on information from the session context.","price.pricemodel_manage":"Needed to manage price models.","price.pricemodel_read":"Needed to retrieve price models.","price.price_manage_by_vendor":"Needed to manage prices belonging to the vendor."}}}}},"schemas":{"pricesV2":{"type":"array","items":{"$ref":"#/components/schemas/getPriceV2"},"title":"List of prices (v2)"},"getPriceV2":{"type":"object","title":"Price (v2)","properties":{"id":{"type":"string","description":"A price identifier."},"itemId":{"type":"object","description":"Item for which the price is defined.","properties":{"itemType":{"type":"string","description":"Type of the referenced item. Possible values:\n* `PRODUCT`\n* `SKU`\n\n**Note**: The `SKU` value is a `preview` value - the system does not fully operate on the SKU concept yet.\n"},"id":{"type":"string","description":"Product's unique identifier, generated when the product is created through the Product Service.\n"}}},"itemYrn":{"description":"Product's uniform resource name.","type":"string"},"currency":{"description":"Currency code, as defined in the Currency Service.","type":"string"},"location":{"allOf":[{"$ref":"#/components/schemas/location"}]},"salePrice":{"allOf":[{"$ref":"#/components/schemas/salePrice"}]},"priceModelId":{"type":"string","description":"ID of the price model to which the price is assigned. If the ID is not provided, the default price model is used."},"restrictions":{"$ref":"#/components/schemas/restrictions"},"tierValues":{"type":"array","items":{"$ref":"#/components/schemas/tierValueRetrieval"}},"vendorId":{"type":"string","description":"Id of a vendor to which the price belongs."},"mixins":{"type":"object","description":"Custom price attributes.","additionalProperties":true},"metadata":{"$ref":"#/components/schemas/priceMetadata"}}},"location":{"type":"object","properties":{"countryCode":{"type":"string","description":"Code of the country to which the price applies, as defined in the Country Service."}},"required":["countryCode"]},"salePrice":{"type":"object","properties":{"discountAmount":{"minimum":0,"description":"Discount expressed as a fixed amount.","type":"number"},"discountRate":{"minimum":0,"maximum":100,"description":"Discount expressed as a percentage of the original price.","type":"number"},"description":{"description":"Additional information about the discount.","type":"string"}}},"restrictions":{"type":"object","description":"Restrictions that limit the validity of the price model and prices assigned to it.\n","properties":{"principals":{"type":"array","description":"List of customers and customer groups for whom the price is valid.\n\n**Note** Customer groups are a `preview` feature.","items":{"allOf":[{"$ref":"#/components/schemas/principal"}]}},"validity":{"allOf":[{"$ref":"#/components/schemas/dateValidity"}]},"siteCodes":{"type":"array","description":"Codes of sites to which the price applies.","items":{"type":"string"}},"priceListId":{"type":"string","description":"Unique identifier of the price list to which the price should be assigned.\n\n**Note**: It is a `preview` field."}},"required":["siteCodes"]},"principal":{"description":"Customers or customer groups for whom the price is valid.","type":"object","properties":{"type":{"type":"string","description":"Customer or customer group for whom the price is valid. Possible values:\n* `CUSTOMER`\n* `GROUP`\n\n**Note**: The `GROUP` value is a `preview` value - the system does not fully operate on the customer groups concept yet."},"id":{"type":"string","description":"Unique identifier of the customer or customer group."}},"required":["type","id"]},"dateValidity":{"type":"object","description":"Date range in which the object is valid.","properties":{"from":{"type":"string","description":"Date from which the object is valid, compliant with the ISO 8601 standard."},"to":{"type":"string","description":"Date to which the object is valid, compliant with the ISO 8601 standard."}}},"tierValueRetrieval":{"description":"","type":"object","properties":{"id":{"type":"string","description":"An identifier of a tier. The ID is required only if the `priceModelId` is provided. If the price model is the default, the tier value is automatically assigned according to the default price model."},"priceValue":{"type":"number","description":"Gross price (if the `includesTax` field is set to `true`) or net price (if the `includesTax` field is set to `false`)."}},"required":["priceValue"]},"priceMetadata":{"allOf":[{"$ref":"#/components/schemas/metadata"},{"type":"object","properties":{"mixins":{"type":"object","description":"Mixins schemas","additionalProperties":true}}}]},"metadata":{"type":"object","properties":{"createdAt":{"description":"Date and time when the price was created.","type":"string"},"modifiedAt":{"description":"Date and time when the price was last modified.","type":"string"},"version":{"minimum":1,"type":"integer","description":"Version of the price object. If provided optimistic locking will be enabled and it has to match version in the database"}}},"errorMessage":{"type":"object","title":"error","description":"Schema for API-specific errors.","properties":{"code":{"minimum":100,"maximum":599,"description":"Original HTTP error code, should be consistent with the response HTTP code.","type":"integer"},"status":{"description":"Original HTTP error reason.","type":"string"},"message":{"description":"Descriptive error message for debugging","type":"string"},"details":{"description":"List of problems causing this error.","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"string"}},"errorCode":{"type":"string","description":"Additional error code."}}},"searchPricesV2":{"type":"object","description":"","properties":{"itemIds":{"type":"array","description":"List of item IDs for which the prices should be retrieved.","maxItems":100,"minItems":1,"items":{"description":"Identifier of the item.","type":"string"}},"currency":{"type":"string","pattern":"[A-Z]{3}","description":"Currency in which the prices should be retrieved, as defined in the Currency Service."},"siteCode":{"description":"Code of the site for which the prices should be retrieved.","type":"string"},"principalId":{"description":"IDs of customers for whom the retrieved prices should be valid.","type":"string"},"effectiveDate":{"description":"Date on which retrieved prices should be valid, compliant with the ISO 8601 standard.\n\nFormat:\n```date-fullyear \"-\" date-month \"-\" date-mday \"T\" partial-time time-offset```","type":"string"},"includesTax":{"description":"Flag indicating whether the prices should be retrieved as net or a gross values.","type":"boolean"},"useFallback":{"type":"boolean","description":"If no price that matches the criteria is found for the specified site, the price searching functionality will try to find the best price for the `main` site. To enable this option, this field needs to be set to `true`.\n\n**Note**: Using the fallback mechanism may impact the performance as the price searching has to run a second time. If the fallback mechanism is used, the response's `siteCode` field will be set to `main`.\n","default":false},"searchMode":{"type":"string","description":"Search mode indicating which prices should be taken into account regarding their principal-related restrictions.\n\nPossible values:\n* `ALL_PRICES`  - all prices should be taken into account regardless of their principal restrictions.\n* `COMMON_PRICES` -  only the prices with no principal restrictions should be taken into account.\n* `USER_SPECIFIC_PRICES` - only the prices applicable for a given `principalId` should be taken into account.\n","enum":["ALL_PRICES","COMMON_PRICES","USER_SPECIFIC_PRICES"],"default":"ALL_PRICES"}},"required":["itemIds"]}},"responses":{"BadRequest_400":{"description":"Request was syntactically incorrect. Details are provided in the response payload.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details are provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"InternalServiceError_500":{"description":"Some server-side error occurred. Details are provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}},"parameters":{"trait_tenant":{"name":"tenant","in":"path","required":true,"description":"Your Emporix tenant's name.\n\n**Note**: The tenant should always be written in lowercase.\n","schema":{"pattern":"^[a-z][a-z0-9]+$","minLength":3,"maxLength":16,"type":"string"}},"query_pricesearch_expand":{"name":"expand","in":"query","required":false,"schema":{"type":"string"},"description":"Fields that should be expanded with additional information in the response body. Expressed as strings separated by commas.\n\nPossible values:\n  * `priceModel`\n"}}},"paths":{"/price/{tenant}/prices/search":{"post":{"summary":"Searching for prices","tags":["Prices"],"responses":{"200":{"description":"Prices have been successfully retrieved.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string"},"prices":{"$ref":"#/components/schemas/pricesV2"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"500":{"$ref":"#/components/responses/InternalServiceError_500"}},"description":"Retrieves prices (or a single price) for a list of products.","operationId":"POST-price-search-prices","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPricesV2"}}},"required":false},"parameters":[{"$ref":"#/components/parameters/trait_tenant"},{"$ref":"#/components/parameters/query_pricesearch_expand"}]}}}}
````


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/api-references/api-guides/prices-and-taxes/price-service/api-reference/prices.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
