# Models

## The createPriceV2 object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"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"]}}}}
```

## The getPriceV2 object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"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"}}}}}}
```

## The errorMessage object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"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."}}}}}}
```

## The pricesV2 object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"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"}}}}}}
```

## The metadata object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"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"}}}}}}
```

## The measurementUnit object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"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."}}}}
```

## The measurementUnitV2 object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"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":""}}}}
```

## The matchMeasurementUnitV2 object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"matchMeasurementUnitV2":{"type":"object","description":"Measurement unit for which the price is defined.","title":"","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. This attribute is optional, if not provided the price model unit will be used.","type":"string"}},"required":["quantity"]}}}}
```

## The salePrice object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"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"}}}}}}
```

## The currency object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"currency":{"type":"string","title":"currency","pattern":"[A-Z]{3}","description":"Currency code, compliant with the ISO 4217 standard."}}}}
```

## The matchByContext object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"matchByContext":{"title":"Price matching (by session context) request body","type":"object","properties":{"items":{"type":"array","description":"List of items (products or prices) for which the prices should be matched.","items":{"type":"object","properties":{"itemId":{"type":"object","description":"Product or price for which a price should be matched.","properties":{"itemType":{"type":"string","description":"Type of the referenced item. Possible values:\n* `PRODUCT`\n* `PRICE`\n* `SKU`\n\n**Note**: The `SKU` value is a `preview` value - the system does not fully operate on the SKU concept yet."},"id":{"type":"string","description":"Item's unique identifier, generated when the item is created."}}},"quantity":{"$ref":"#/components/schemas/matchMeasurementUnitV2"}}}}}},"matchMeasurementUnitV2":{"type":"object","description":"Measurement unit for which the price is defined.","title":"","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. This attribute is optional, if not provided the price model unit will be used.","type":"string"}},"required":["quantity"]}}}}
```

## The match object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"match":{"title":"Price matching (by criteria) request body","type":"object","properties":{"targetCurrency":{"type":"string","description":"Code of the currency in which the prices should be matched, as defined in the Currency Service.\n\n**Note**: If the matched price is defined in another currency, a currency exchange algorithm will be used, but only if exchange rates between the two currencies have been defined."},"siteCode":{"type":"string","description":"Code of the site to which the matched prices should apply."},"targetLocation":{"type":"object","required":["countryCode"],"properties":{"countryCode":{"type":"string","description":"Code of the country for which the prices should be matched, as defined in the Country Service.\n\n**Note**: If the matched price is defined for another country, a tax calculation algorithm will be used, but only if tax classes for the two countries have been defined for relevant products."}}},"items":{"type":"array","description":"List of items (products or prices) for which the prices should be matched.","items":{"type":"object","properties":{"itemId":{"type":"object","description":"Product or price for which a price should be matched.","properties":{"itemType":{"type":"string","description":"Type of the referenced item. Possible values:\n* `PRODUCT`\n* `PRICE`\n* `SKU`\n\n**Note**: The `SKU` value is a `preview` value - the system does not fully operate on the SKU concept yet."},"id":{"type":"string","description":"Item's unique identifier, generated when the item is created."}},"required":["itemType","id"]},"quantity":{"type":"object","description":"Quantity of the product for which a matched price should be calculated.","required":["quantity"],"properties":{"quantity":{"type":"number","description":"Quantity of the product, expressed as a number."},"unitCode":{"type":"string","description":"Code of the measurement unit, as defined in the Unit Handling Service. This atribute is optional, if not provided the price model unit will be used."}}}},"required":["quantity"]}},"principal":{"type":"object","description":"Customer or customer group for whom the matched prices should be valid.","properties":{"id":{"type":"string","description":"Unique identifier of the customer or customer group."},"type":{"type":"string","description":"Customer or customer group for whom the matched should be 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."}}},"useFallback":{"type":"boolean","description":"If no price that matches the criteria is found for the specified site, the price matching 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 matching has to run a second time. If the fallback mechanism is used, the response's `siteCode` field will be set to `main`."},"legalEntityId":{"type":"string","description":"Legal entity for which price lists are included in the price match.\n**Note**: Price lists for the entity's parent legal entities are also included."}},"required":["targetCurrency","siteCode","targetLocation","items"]}}}}
```

## The dateValidity object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"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."}}}}}}
```

## The priceModelRetrieval object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"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."},"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"}}}}}}
```

## The principal object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"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"]}}}}
```

## The restrictions object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"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."}}}}}}
```

## The tierValueCreation object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"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"]}}}}
```

## The tierValueRetrieval object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"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"]}}}}
```

## The priceModelDefinitionCreation object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"priceModelDefinitionCreation":{"title":"priceModelDefinitionCreation","type":"object","description":"A price model can be defined as a repeatable way to sell products in a market with the intention of making a profit. Price models define basic structures for prices.","properties":{"id":{"type":"string","description":"Custom price model identifier. If not provided, it is automatically generated."},"includesTax":{"type":"boolean","description":"Flag indicating whether prices assigned to the price model will be expressed as net or gross.\n\n| Value | Description |\n| --- | --- |\n| `true` | Prices will be expressed as gross values. |\n| `false` | Prices will be 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."},"default":{"type":"boolean","description":"Indicates whether the price model is default one or not."},"name":{"description":"Price model name. It should be a brief, human-readable name that describes purposes of the model.\n\n* If the `Content-Language` header is set to `*`, then the name should be provided as a map of translations, where each key is a language code and the value is the name in its respective language.\n* If the `Content-Language` header is set to a specific language, the name should be provided as a string.\n* If the `Content-Language` header is empty, the endpoint will asume that the name is provided in the default language defined in the Configuration Service.\n\n**Note**: You can provide the names only in languages defined in the Configuration Service. In case the name is provided in a language that is not defined in the Configuration Service, the request will be rejected.","oneOf":[{"type":"object"},{"type":"string"}]},"description":{"description":"Price model description. It can contain details about the price model.\n\n* If the `Content-Language` header is set to `*`, then the description should be provided as a map of translations, where each key is a language code and the value is the description in its respective language.\n* If the `Content-Language` header is set to a specific language, the description should be provided as a string.\n* If the `Content-Language` header is empty, the endpoint will asume that the description is provided in the default language defined in the Configuration Service.\n\n**Note**: You can provide the descriptions only in languages defined in the Configuration Service. In case the description is provided in a language that is not defined in the Configuration Service, the request will be rejected.","oneOf":[{"type":"object"},{"type":"string"}]},"tierDefinition":{"allOf":[{"$ref":"#/components/schemas/tierDefinitionCreation"},{"type":"object","description":"Definition of pricing tiers."}]},"measurementUnit":{"allOf":[{"$ref":"#/components/schemas/measurementUnitV2"},{"type":"object","description":"Measurement unit and quantity for which the price is defined.\n\nFor example, if a product is sold by the piece, the field should contain `1 pc`. If products relevant to this price model are sold per kilogram, this field should contain `1 kg`.\n"}]}},"required":["includesTax","name","tierDefinition","measurementUnit"]},"tierDefinitionCreation":{"type":"object","properties":{"tierType":{"type":"string","description":"Possible 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","description":"Tier quantities.\n\nEach tier contains information about the minimum quantity from which it (and its price) is valid.\n\n**Example**: For two tiers with the following `minQuantity` values: 0 pieces and 10 pieces, the effective ranges will be `<0, 9)` and `<10, infinity)`.\n\n**Note**: When defining tiers, be aware of the following restrictions to the `PriceModel` object:\n* For `BASIC` tier type:\n  * Only one tier should be defined. If the tier is not defined, it will be automatically generated.\n  * The tier's `minQuantity.quantity` should be set to `0`.\n* For `VOLUME` and `TIERED` type:\n  * Each `minQuantity.quantity` field must contain a unique value.\n  * The tiers must be defined in an ascending order based on their `quantity` value.\n  * The `quantity` field in the first tier must be set to `0`.\n  * All `unitCode` fields must contain the same value.","items":{"allOf":[{"$ref":"#/components/schemas/tierDetailsDefinitionCreation"}]}}},"required":["tierType"]},"tierDetailsDefinitionCreation":{"type":"object","description":"Quantity that indicates the tier's range:\n* The `minQuantity` of the tier defines the left side of the range (inclusive).\n* The `minQuantity` of the next tier defines the right side of the range (exclusive).\n","properties":{"id":{"type":"string","description":"An identifier of the tier. If the value is not provided then it is automatically generated. The id is used during an update operation for recognizing whether a particular tier has been changed, removed or added. "},"minQuantity":{"allOf":[{"$ref":"#/components/schemas/measurementUnitV2"},{"type":"object","description":"Minimum quantity of the product from which the tier applies."}]}},"required":["minQuantity"]},"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":""}}}}
```

## The priceModelDefinitionRetrieval object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"priceModelDefinitionRetrieval":{"title":"priceModelDefinitionRetrieval","type":"object","description":"A price model can be defined as a repeatable way to sell products in a market with the intention of making a profit. Price models define basic structures for prices.","properties":{"id":{"type":"string","description":"Price model's unique identifier, generated when the price model is created."},"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"},"default":{"type":"boolean","description":"Indicates whether the price model is default one or not."},"name":{"description":"Price model name.","oneOf":[{"type":"object"},{"type":"string"}]},"description":{"description":"Price model description.","oneOf":[{"type":"object"},{"type":"string"}]},"tierDefinition":{"allOf":[{"$ref":"#/components/schemas/tierDefinitionCreation"},{"type":"object","description":"Definition of pricing tiers."}]},"measurementUnit":{"allOf":[{"$ref":"#/components/schemas/measurementUnitV2"},{"type":"object","description":"Measurement unit and quantity for which the price is defined.\n\nFor example, if a product is sold by the piece, the field should contain `1 pc`. If products for this price model are sold per kilogram, this field should contain `1kg`.\n"}]}}},"tierDefinitionCreation":{"type":"object","properties":{"tierType":{"type":"string","description":"Possible 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","description":"Tier quantities.\n\nEach tier contains information about the minimum quantity from which it (and its price) is valid.\n\n**Example**: For two tiers with the following `minQuantity` values: 0 pieces and 10 pieces, the effective ranges will be `<0, 9)` and `<10, infinity)`.\n\n**Note**: When defining tiers, be aware of the following restrictions to the `PriceModel` object:\n* For `BASIC` tier type:\n  * Only one tier should be defined. If the tier is not defined, it will be automatically generated.\n  * The tier's `minQuantity.quantity` should be set to `0`.\n* For `VOLUME` and `TIERED` type:\n  * Each `minQuantity.quantity` field must contain a unique value.\n  * The tiers must be defined in an ascending order based on their `quantity` value.\n  * The `quantity` field in the first tier must be set to `0`.\n  * All `unitCode` fields must contain the same value.","items":{"allOf":[{"$ref":"#/components/schemas/tierDetailsDefinitionCreation"}]}}},"required":["tierType"]},"tierDetailsDefinitionCreation":{"type":"object","description":"Quantity that indicates the tier's range:\n* The `minQuantity` of the tier defines the left side of the range (inclusive).\n* The `minQuantity` of the next tier defines the right side of the range (exclusive).\n","properties":{"id":{"type":"string","description":"An identifier of the tier. If the value is not provided then it is automatically generated. The id is used during an update operation for recognizing whether a particular tier has been changed, removed or added. "},"minQuantity":{"allOf":[{"$ref":"#/components/schemas/measurementUnitV2"},{"type":"object","description":"Minimum quantity of the product from which the tier applies."}]}},"required":["minQuantity"]},"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":""}}}}
```

## The priceModelDefinitionCreationResponse object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"priceModelDefinitionCreationResponse":{"title":"priceModelDefinitionCreationResponse","type":"object","description":"","properties":{"id":{"type":"string","description":"Price model's unique identifier."}}}}}}
```

## The tierDefinitionCreation object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"tierDefinitionCreation":{"type":"object","properties":{"tierType":{"type":"string","description":"Possible 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","description":"Tier quantities.\n\nEach tier contains information about the minimum quantity from which it (and its price) is valid.\n\n**Example**: For two tiers with the following `minQuantity` values: 0 pieces and 10 pieces, the effective ranges will be `<0, 9)` and `<10, infinity)`.\n\n**Note**: When defining tiers, be aware of the following restrictions to the `PriceModel` object:\n* For `BASIC` tier type:\n  * Only one tier should be defined. If the tier is not defined, it will be automatically generated.\n  * The tier's `minQuantity.quantity` should be set to `0`.\n* For `VOLUME` and `TIERED` type:\n  * Each `minQuantity.quantity` field must contain a unique value.\n  * The tiers must be defined in an ascending order based on their `quantity` value.\n  * The `quantity` field in the first tier must be set to `0`.\n  * All `unitCode` fields must contain the same value.","items":{"allOf":[{"$ref":"#/components/schemas/tierDetailsDefinitionCreation"}]}}},"required":["tierType"]},"tierDetailsDefinitionCreation":{"type":"object","description":"Quantity that indicates the tier's range:\n* The `minQuantity` of the tier defines the left side of the range (inclusive).\n* The `minQuantity` of the next tier defines the right side of the range (exclusive).\n","properties":{"id":{"type":"string","description":"An identifier of the tier. If the value is not provided then it is automatically generated. The id is used during an update operation for recognizing whether a particular tier has been changed, removed or added. "},"minQuantity":{"allOf":[{"$ref":"#/components/schemas/measurementUnitV2"},{"type":"object","description":"Minimum quantity of the product from which the tier applies."}]}},"required":["minQuantity"]},"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":""}}}}
```

## The tierDetailsDefinitionCreation object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"tierDetailsDefinitionCreation":{"type":"object","description":"Quantity that indicates the tier's range:\n* The `minQuantity` of the tier defines the left side of the range (inclusive).\n* The `minQuantity` of the next tier defines the right side of the range (exclusive).\n","properties":{"id":{"type":"string","description":"An identifier of the tier. If the value is not provided then it is automatically generated. The id is used during an update operation for recognizing whether a particular tier has been changed, removed or added. "},"minQuantity":{"allOf":[{"$ref":"#/components/schemas/measurementUnitV2"},{"type":"object","description":"Minimum quantity of the product from which the tier applies."}]}},"required":["minQuantity"]},"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":""}}}}
```

## The matchResponse object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"matchResponse":{"title":"matchResponse","type":"object","properties":{"priceId":{"type":"string","description":"Price's unique identifier, generated when the price is created.\n"},"priceListId":{"type":"string","description":"Price list's unique identifier. The property is populated only in case when the return price belongs to any price list.\n"},"itemRef":{"type":"object","description":"Item (product or price) for which the price was matched.","properties":{"itemType":{"type":"string","description":"Type of the retrieved 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."},"id":{"type":"string","description":"Item's unique identifier, generated when the item is created.\n"}}},"site":{"type":"object","description":"Site to which the matched price applies.","properties":{"code":{"type":"string","description":"Code of the site to which the matched price applies."},"includesTax":{"type":"boolean","description":"Flag indicating whether prices assigned to the site 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\n**Note**: If not specified, the retrieved price is net or gross depending on the `includesTax` field in the price's model."}}},"currency":{"type":"string","description":"Currency related to the price."},"location":{"type":"object","description":"Location for which the matched price is defined.","properties":{"countryCode":{"type":"string","description":"Code of the country to which the matched price applies."}}},"originalValue":{"type":"number","description":"Represents an original value without any discounts for a single unit of the requested item (PRODUCT or SKU). The value is a gross price (if includesTax is true) or net price (if includesTax is false).\n\nIt's worth to mention that the cent part is not limited just to two digits. For example, if the price is for one piece of screw, it could look like this: 0.0000317"},"effectiveValue":{"type":"number","description":"Represents a value with a discount (if applicable) for a single unit of the requested item (PRODUCT or SKU). The value is a gross price (if includesTax is true) or net price (if includesTax is false).\n\nIt's worth to mention that the cent part is not limited just to two digits. For example, if the price is for one piece of screw, it could look like this: 0.0000317"},"totalValue":{"type":"number","description":"Represents a total value with a discount (if applicable) for all units of the requested item (PRODUCT or SKU). The value is a gross price (if includesTax is true) or net price (if includesTax is false).\n\nIt's worth to mention that the cent part is not limited just to two digits. For example, if the price is for one piece of screw, it could look like this: 0.0000317"},"quantity":{"$ref":"#/components/schemas/measurementUnitV2"},"salePrice":{"$ref":"#/components/schemas/salePrice"},"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. |"},"priceModel":{"$ref":"#/components/schemas/priceModelRetrieval"},"tax":{"type":"object","description":"Sales tax applicable to the product.","properties":{"taxClass":{"type":"string","description":"Tax class's code, as defined in the Tax Service.\n"},"taxRate":{"type":"number","description":"Tax rate expressed as a number."},"prices":{"type":"object","description":"Tax details containing all prices with tax.","properties":{"originalValue":{"type":"object","description":"Original price with taxes.","properties":{"netValue":{"type":"number"},"grossValue":{"type":"number"},"taxValue":{"type":"number"}}},"effectiveValue":{"type":"object","description":"Effective price with taxes.","properties":{"netValue":{"type":"number"},"grossValue":{"type":"number"},"taxValue":{"type":"number"}}},"totalValue":{"type":"object","description":"Total price with taxes.","properties":{"netValue":{"type":"number"},"grossValue":{"type":"number"},"taxValue":{"type":"number"}}}}}}},"mixins":{"type":"object","description":"Custom price attributes.","additionalProperties":true},"metadata":{"type":"object","properties":{"version":{"type":"string","description":"Version of the price object."},"createdAt":{"type":"string","description":"Date and time when the matched price was created."},"modifiedAt":{"type":"string","description":"Date and time when the matched price was last modified."}}},"tierValues":{"type":"array","description":"A price tiers values for a matched price","items":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of a tier"},"priceValue":{"type":"number","description":"A price value for a particular tier"}}}}}},"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":""},"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"}}},"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"}}},"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."},"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"}}}}}}
```

## The location object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"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"]}}}}
```

## The priceListCore object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"priceListCore":{"title":"priceListCore","type":"object","properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/currency"}]},"countries":{"description":"Codes of countries to which the price list applies, as defined in the Country Service.\n\n**Note** If not specified, the price list will be applicable to users from all locations.","type":"array","items":{"type":"string"}},"regions":{"description":"List of the regions to which the price list applies.\n\n**Note** If not specified, the price list will be applicable to users from all locations.","type":"array","items":{"type":"string"}},"customerGroups":{"description":"List of customer groups IDs for which the price list is valid. If not specified, the price list is applicable to all customer groups.\n\n**Note**: Customer groups cannot be provided if there is a legal entity specified for the price list.\n\n**Note**: This is a preview field - the system does not fully operate on the customer groups concept yet.","type":"array","items":{"allOf":[{}],"type":"string"}},"legalEntityId":{"description":"ID of the legal entity to which the price list applies.\n**Note**: Price list assigned to legal entity is also applicable for all the subsidiaries.","type":"string"},"siteCode":{"description":"Code of the site to which the price list applies.","type":"string"},"validity":{"allOf":[{"$ref":"#/components/schemas/dateValidity"}]},"mixins":{"type":"object","description":"Map of custom price lists attributes.\n","additionalProperties":true}}},"currency":{"type":"string","title":"currency","pattern":"[A-Z]{3}","description":"Currency code, compliant with the ISO 4217 standard."},"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."}}}}}}
```

## The priceListCreation object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"priceListCreation":{"title":"priceListCreation","allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Custom price list identifier. If not provided, it is automatically generated."},"name":{"type":"object","description":"Price list name. It should be a brief, human-readable name that describes the purpose of the price list, specified in a form of a map of translations.\n\n* If the `Content-Language` header is set to `*`, then the name should be provided as a map of translations, where each key is a language code and the value is the name in its respective language.\n* If the `Content-Language` header is set to a specific language, then the name should be provided as a map of single translation, where the key is a language code and the value is the name in its respective language.\n* If the `Content-Language` header is empty, then the name should be provided as a map of single translation, where the key is a language code and the value is the name in its respective language. The endpoint will asume that the name is provided in the default language defined in the Configuration Service.\n\n**Note**: You can provide the names only in languages defined in the Configuration Service. In case the name is provided in a language that is not defined in the Configuration Service, the request will be rejected."}}},{"$ref":"#/components/schemas/priceListCore"},{"type":"object","properties":{"metadata":{"properties":{"mixins":{"type":"object","additionalProperties":{"type":"string"},"description":"Mixins schemas"}}}}}],"required":["siteCode","name"]},"priceListCore":{"title":"priceListCore","type":"object","properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/currency"}]},"countries":{"description":"Codes of countries to which the price list applies, as defined in the Country Service.\n\n**Note** If not specified, the price list will be applicable to users from all locations.","type":"array","items":{"type":"string"}},"regions":{"description":"List of the regions to which the price list applies.\n\n**Note** If not specified, the price list will be applicable to users from all locations.","type":"array","items":{"type":"string"}},"customerGroups":{"description":"List of customer groups IDs for which the price list is valid. If not specified, the price list is applicable to all customer groups.\n\n**Note**: Customer groups cannot be provided if there is a legal entity specified for the price list.\n\n**Note**: This is a preview field - the system does not fully operate on the customer groups concept yet.","type":"array","items":{"allOf":[{}],"type":"string"}},"legalEntityId":{"description":"ID of the legal entity to which the price list applies.\n**Note**: Price list assigned to legal entity is also applicable for all the subsidiaries.","type":"string"},"siteCode":{"description":"Code of the site to which the price list applies.","type":"string"},"validity":{"allOf":[{"$ref":"#/components/schemas/dateValidity"}]},"mixins":{"type":"object","description":"Map of custom price lists attributes.\n","additionalProperties":true}}},"currency":{"type":"string","title":"currency","pattern":"[A-Z]{3}","description":"Currency code, compliant with the ISO 4217 standard."},"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."}}}}}}
```

## The priceListUpdate object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"priceListUpdate":{"title":"priceListUpdate","allOf":[{"$ref":"#/components/schemas/priceListCreation"},{"type":"object","properties":{"metadata":{"properties":{"version":{"type":"number","description":"Current version of the object."},"mixins":{"type":"object","additionalProperties":{"type":"string"},"description":"Mixins schemas."}}}}}]},"priceListCreation":{"title":"priceListCreation","allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Custom price list identifier. If not provided, it is automatically generated."},"name":{"type":"object","description":"Price list name. It should be a brief, human-readable name that describes the purpose of the price list, specified in a form of a map of translations.\n\n* If the `Content-Language` header is set to `*`, then the name should be provided as a map of translations, where each key is a language code and the value is the name in its respective language.\n* If the `Content-Language` header is set to a specific language, then the name should be provided as a map of single translation, where the key is a language code and the value is the name in its respective language.\n* If the `Content-Language` header is empty, then the name should be provided as a map of single translation, where the key is a language code and the value is the name in its respective language. The endpoint will asume that the name is provided in the default language defined in the Configuration Service.\n\n**Note**: You can provide the names only in languages defined in the Configuration Service. In case the name is provided in a language that is not defined in the Configuration Service, the request will be rejected."}}},{"$ref":"#/components/schemas/priceListCore"},{"type":"object","properties":{"metadata":{"properties":{"mixins":{"type":"object","additionalProperties":{"type":"string"},"description":"Mixins schemas"}}}}}],"required":["siteCode","name"]},"priceListCore":{"title":"priceListCore","type":"object","properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/currency"}]},"countries":{"description":"Codes of countries to which the price list applies, as defined in the Country Service.\n\n**Note** If not specified, the price list will be applicable to users from all locations.","type":"array","items":{"type":"string"}},"regions":{"description":"List of the regions to which the price list applies.\n\n**Note** If not specified, the price list will be applicable to users from all locations.","type":"array","items":{"type":"string"}},"customerGroups":{"description":"List of customer groups IDs for which the price list is valid. If not specified, the price list is applicable to all customer groups.\n\n**Note**: Customer groups cannot be provided if there is a legal entity specified for the price list.\n\n**Note**: This is a preview field - the system does not fully operate on the customer groups concept yet.","type":"array","items":{"allOf":[{}],"type":"string"}},"legalEntityId":{"description":"ID of the legal entity to which the price list applies.\n**Note**: Price list assigned to legal entity is also applicable for all the subsidiaries.","type":"string"},"siteCode":{"description":"Code of the site to which the price list applies.","type":"string"},"validity":{"allOf":[{"$ref":"#/components/schemas/dateValidity"}]},"mixins":{"type":"object","description":"Map of custom price lists attributes.\n","additionalProperties":true}}},"currency":{"type":"string","title":"currency","pattern":"[A-Z]{3}","description":"Currency code, compliant with the ISO 4217 standard."},"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."}}}}}}
```

## The priceList object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"priceList":{"title":"priceList","allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the price that belongs to a price list, generated when the price is created and added to the price list."},"name":{"type":"object","description":"Price list's name, expressed as a map of translations."}}},{"$ref":"#/components/schemas/priceListCore"},{"type":"object","properties":{"metadata":{"allOf":[{"$ref":"#/components/schemas/metadata"},{"type":"object","properties":{"mixins":{"type":"object","additionalProperties":{"type":"string"},"description":"Mixins schemas"}}}]}}}]},"priceListCore":{"title":"priceListCore","type":"object","properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/currency"}]},"countries":{"description":"Codes of countries to which the price list applies, as defined in the Country Service.\n\n**Note** If not specified, the price list will be applicable to users from all locations.","type":"array","items":{"type":"string"}},"regions":{"description":"List of the regions to which the price list applies.\n\n**Note** If not specified, the price list will be applicable to users from all locations.","type":"array","items":{"type":"string"}},"customerGroups":{"description":"List of customer groups IDs for which the price list is valid. If not specified, the price list is applicable to all customer groups.\n\n**Note**: Customer groups cannot be provided if there is a legal entity specified for the price list.\n\n**Note**: This is a preview field - the system does not fully operate on the customer groups concept yet.","type":"array","items":{"allOf":[{}],"type":"string"}},"legalEntityId":{"description":"ID of the legal entity to which the price list applies.\n**Note**: Price list assigned to legal entity is also applicable for all the subsidiaries.","type":"string"},"siteCode":{"description":"Code of the site to which the price list applies.","type":"string"},"validity":{"allOf":[{"$ref":"#/components/schemas/dateValidity"}]},"mixins":{"type":"object","description":"Map of custom price lists attributes.\n","additionalProperties":true}}},"currency":{"type":"string","title":"currency","pattern":"[A-Z]{3}","description":"Currency code, compliant with the ISO 4217 standard."},"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."}}},"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"}}}}}}
```

## The priceListPriceCore object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"priceListPriceCore":{"title":"priceListPriceCore","properties":{"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"}}},"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."},"tierValues":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/tierValueCreation"},{"type":"object","properties":{"priceValue":{"type":"number","description":"This field should contain a net price given 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."}}}]}}}},"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"]}}}}
```

## The priceListPriceCreation object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"priceListPriceCreation":{"title":"priceListPriceCreation","allOf":[{"$ref":"#/components/schemas/priceListPriceCore"},{"type":"object","properties":{"id":{"type":"string","description":"Custom price identifier. If not provided, it is automatically generated."},"itemId":{"type":"object","required":["id","itemType"]}}}],"required":["itemId","priceModelId","tierValues"]},"priceListPriceCore":{"title":"priceListPriceCore","properties":{"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"}}},"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."},"tierValues":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/tierValueCreation"},{"type":"object","properties":{"priceValue":{"type":"number","description":"This field should contain a net price given 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."}}}]}}}},"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"]}}}}
```

## The priceListPriceUpdate object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"priceListPriceUpdate":{"title":"priceListPriceUpdate","allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the price that belongs to a price list, generated when the price is created and added to the price list."}}},{"$ref":"#/components/schemas/priceListPriceCore","required":["itemId","priceModelId","tierValues"]},{"type":"object","properties":{"metadata":{"properties":{"version":{"type":"number","description":"Current version of the object."}},"required":["version"]}}}],"required":["metadata","id"]},"priceListPriceCore":{"title":"priceListPriceCore","properties":{"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"}}},"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."},"tierValues":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/tierValueCreation"},{"type":"object","properties":{"priceValue":{"type":"number","description":"This field should contain a net price given 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."}}}]}}}},"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"]}}}}
```

## The priceListPrice object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"priceListPrice":{"title":"priceListPrice","allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the price that belongs to a price list, generated when the price is created and added to the price list."}}},{"$ref":"#/components/schemas/priceListPriceCore"},{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/metadata"}}}]},"priceListPriceCore":{"title":"priceListPriceCore","properties":{"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"}}},"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."},"tierValues":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/tierValueCreation"},{"type":"object","properties":{"priceValue":{"type":"number","description":"This field should contain a net price given 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."}}}]}}}},"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"]},"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"}}}}}}
```

## The priceBulkResponseEntry object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"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."}}}}}}
```

## The searchPricesV2 object

````json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"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"]}}}}
````

## The searchRequest object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"searchRequest":{"type":"object","properties":{"q":{"type":"string","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"}}}}}}
```

## The priceMetadata object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"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"}}}}}}
```

## The priceModelExpand object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"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."},"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"}}}}}}
```

## The getSinglePriceV2 object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"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."}}}}
```

## The updatePriceV2 object

```json
{"openapi":"3.0.0","info":{"title":"Price Service","version":"0.0.1"},"components":{"schemas":{"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."}}}}
```
