# Models

## The restriction object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"restriction":{"type":"string","nullable":true,"description":"Access control identifier that determines who can view or manage the order.\n\n**Purpose**: Restricts order visibility based on scope permissions. Only users/applications \nwith matching restriction scopes can access orders with a specific restriction value.\n\n**Access Control**:\n- *Reading*: Users can only query and view orders with the `restriction` value that matches one of their authorized restrictions.\n\n**Validation**: The value must exist in the tenant's configured list of valid restrictions.\n\n**Site Synchronization**: If the `restriction` property is not set with tenant configuration property `enableSyncBetweenRestrictionsAndSiteCodes` set to `true`, the `restriction` field automatically syncs with `siteCode` property.\n"}}}}
```

## The localizedValue object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"localizedValue":{"description":"Localized value which can have different structure which depends on provided `Content-Language` header.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}]}}}}
```

## The aggregateFee object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"aggregateFee":{"type":"object","title":"Aggregate Fee","properties":{"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"elements":{"type":"array","items":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"},{"type":"object","description":"Fee name."}]},"yrn":{"type":"string","description":"Unique identifier of the fee."},"taxCode":{"type":"string","description":"Tax code of the fee."},"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"taxValues":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the tax."},"value":{"type":"number","description":"Value of the tax."},"rate":{"type":"number","description":"Rate of the tax."}}}}}}}},"required":["total"]},"localizedValue":{"description":"Localized value which can have different structure which depends on provided `Content-Language` header.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}]}}}}
```

## The orderEntriesDto object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"orderEntriesDto":{"properties":{"entries":{"title":"Entries of the order","type":"array","items":{"properties":{"entryId":{"type":"string","description":"Order entry id. Required if `productId` is not provided. Use for entry modification. Cannot be provided along with `productId`."},"productId":{"type":"string","description":"Id of the product added to the order. Required if `entryId` is not provided. Cannot be provided along with `entryId`."},"quantity":{"type":"number","description":"Quantity of the products added to the order. When set to `0` then such entries are removed from the order."}},"required":["quantity"]}}},"required":["entries"]}}}}
```

## The orderCalculationDto object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"orderCalculationDto":{"properties":{"entries":{"title":"Order Calculation DTO","description":"Order recalculation DTO contains a list of entries, where each entry contains entry ID and delivered amount of items.","type":"array","items":{"$ref":"#/components/schemas/orderCalculationEntryDto"}}}},"orderCalculationEntryDto":{"title":"Order Calculation Entry DTO","description":"Order Calculation DTO contains information to recalculate a single entry. Required information is ID of entry and (new) delivered amount of items.","properties":{"entryId":{"description":"Unique identifier of an entry.","type":"string"},"deliveredAmount":{"description":"Delivered amount is the new amount of items for recalculation.","type":"integer","minimum":0},"deliveredAmountInPc":{"description":"Delivered amount in pieces","type":"integer","minimum":0},"unit":{"description":"The measurement unit used to present the price.","type":"string"}},"required":["entryId","deliveredAmount"]}}}}
```

## The orderCalculationEntryDto object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"orderCalculationEntryDto":{"title":"Order Calculation Entry DTO","description":"Order Calculation DTO contains information to recalculate a single entry. Required information is ID of entry and (new) delivered amount of items.","properties":{"entryId":{"description":"Unique identifier of an entry.","type":"string"},"deliveredAmount":{"description":"Delivered amount is the new amount of items for recalculation.","type":"integer","minimum":0},"deliveredAmountInPc":{"description":"Delivered amount in pieces","type":"integer","minimum":0},"unit":{"description":"The measurement unit used to present the price.","type":"string"}},"required":["entryId","deliveredAmount"]}}}}
```

## The orders object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"orders":{"title":"Orders","description":"Collection of orders created by customers","type":"array","items":{"$ref":"#/components/schemas/order"}},"order":{"title":"Order","allOf":[{"type":"object","description":"The order visible for a customer, which includes all ordered items, customer addresses, information about ordered products etc.","properties":{"id":{"description":"Order's unique identifier.","type":"string"},"status":{"$ref":"#/components/schemas/orderStatus"},"created":{"description":"Order's creation date.","type":"string","format":"date-time"},"completed":{"description":"Order's completion date.","type":"string","format":"date-time"},"lastStatusChange":{"description":"Order last status change date.","type":"string","format":"date-time"},"shipments":{"description":"Shipment list.","type":"array","items":{"$ref":"#/components/schemas/shipment"}}}},{"$ref":"#/components/schemas/orderCommonDto"}]},"orderStatus":{"type":"string","enum":["IN_CHECKOUT","CREATED","CONFIRMED","DECLINED","SHIPPED","COMPLETED"],"description":"Status of the order. Supported order statuses are `IN_CHECKOUT`, `CREATED`, `CONFIRMED`, `DECLINED`, `SHIPPED`, `COMPLETED`'. Customers can only change the order status from `CREATED` to `DECLINED`."},"shipment":{"title":"Shipment","description":"Shippment details.","type":"object","properties":{"shippedDate":{"description":"Shipped date.","type":"string"},"carrier":{"description":"Carrier.","type":"string"},"trackingNumber":{"description":"Tracking number.","type":"string"},"expectDeliveryOn":{"description":"Expected delivery date.","type":"string"}},"required":["shippedDate","carrier"]},"orderCommonDto":{"title":"Order Common DTO","description":"The base order fields. This object is inherited by all of other order objects as Order Creation DTO, Order Update DTO etc.","type":"object","properties":{"restriction":{"$ref":"#/components/schemas/restriction"},"feeYrnAggregate":{"allOf":[{"$ref":"#/components/schemas/aggregateFee"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.totalFees` and `entries[].calculatedPrice.fees` instead. These fields provide the same values with updated functionality."}],"deprecated":true},"status":{"$ref":"#/components/schemas/orderStatus"},"cartId":{"type":"string","description":"The identifier of a cart that was used to create this order."},"vendor":{"$ref":"#/components/schemas/vendor"},"orderType":{"$ref":"#/components/schemas/splitOrderType"},"masterOrder":{"type":"string","description":"The identifier of a master order. Available on suborders that have been created after splitting the master order."},"splitInfo":{"$ref":"#/components/schemas/splitInfo"},"subOrders":{"type":"array","description":"A list of string IDs for suborders created after a split. Available only on the master order from which the split originated."},"entries":{"description":"Ordered item list.","type":"array","minItems":1,"items":{"$ref":"#/components/schemas/orderEntry"}},"discounts":{"description":"Discount list.","type":"array","items":{"$ref":"#/components/schemas/discount"}},"customer":{"$ref":"#/components/schemas/customer"},"siteCode":{"description":"Site's unique identifier. A site is a specific shop.","type":"string"},"countryCode":{"description":"Two-letter country code, compliant with the ISO 3166 standard.","type":"string"},"billingAddress":{"$ref":"#/components/schemas/address"},"shippingAddress":{"$ref":"#/components/schemas/address"},"payments":{"description":"Payment list.","type":"array","items":{"$ref":"#/components/schemas/payment"}},"shipping":{"allOf":[{"$ref":"#/components/schemas/shipping"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.totalShipping` instead. The `unitPrice` field provides the same value with updated functionality."}],"deprecated":true},"tax":{"allOf":[{"$ref":"#/components/schemas/tax"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.finalPrice.taxAggregate` instead. The `calculatedPrice.finalPrice.taxAggregate` field provides the same value with updated functionality."}],"deprecated":true},"subTotalPrice":{"type":"number","deprecated":true,"description":"Order sub total price. **This field is deprecated**. Please use `calculatedPrice.price` or `calculatedPrice.discountedPrice` instead. These fields provide the same value with updated functionality."},"totalPrice":{"type":"number","deprecated":true,"description":"Order total price. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality."},"totalAuthorizedAmount":{"type":"number","description":"The amount that should be authorized with payment provider. It's a sum of `calculatedPrice.finalPrice.grossValue` and `calculatedPrice.upliftValue.grossValue`."},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"orderCycle":{"description":"Order cycle date.\n\n***NOTE***\nThis attribute is DEPRECATED, please use the `deliveryWindow.deliveryCycle` attribute","deprecated":true,"type":"string"},"deliveryWindowId":{"description":"Delivery window's unique identifier.\n\n***NOTE***\nThis attribute is DEPRECATED, please use the `deliveryWindow.id` attribute","type":"string","deprecated":true},"deliveryWindow":{"$ref":"#/components/schemas/deliveryWindow"},"metadata":{"$ref":"#/components/schemas/metadataMixins"},"mixins":{"type":"object"},"calculatedPrice":{"allOf":[{"$ref":"#/components/schemas/orderCalculatedPrice"},{"type":"object","description":"A breakdown of the total price calculated from all line items, including detailed pricing components. Can be skipped if deprecated`totalPrice` is provided to preserve backward compatibility"}]},"legalEntityId":{"type":"string","description":"The identifier of the legal entity on whose behalf the order was placed."}},"required":["entries","customer","calculatedPrice"]},"restriction":{"type":"string","nullable":true,"description":"Access control identifier that determines who can view or manage the order.\n\n**Purpose**: Restricts order visibility based on scope permissions. Only users/applications \nwith matching restriction scopes can access orders with a specific restriction value.\n\n**Access Control**:\n- *Reading*: Users can only query and view orders with the `restriction` value that matches one of their authorized restrictions.\n\n**Validation**: The value must exist in the tenant's configured list of valid restrictions.\n\n**Site Synchronization**: If the `restriction` property is not set with tenant configuration property `enableSyncBetweenRestrictionsAndSiteCodes` set to `true`, the `restriction` field automatically syncs with `siteCode` property.\n"},"aggregateFee":{"type":"object","title":"Aggregate Fee","properties":{"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"elements":{"type":"array","items":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"},{"type":"object","description":"Fee name."}]},"yrn":{"type":"string","description":"Unique identifier of the fee."},"taxCode":{"type":"string","description":"Tax code of the fee."},"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"taxValues":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the tax."},"value":{"type":"number","description":"Value of the tax."},"rate":{"type":"number","description":"Rate of the tax."}}}}}}}},"required":["total"]},"localizedValue":{"description":"Localized value which can have different structure which depends on provided `Content-Language` header.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}]},"vendor":{"type":"object","properties":{"id":{"type":"string","description":"An identifier of a vendor"},"name":{"type":"string","description":"vendor name"}},"required":["id"]},"splitOrderType":{"type":"string","enum":["MASTER_ORDER","SUB_ORDER"],"description":"Available on orders that have been split. For standard orders, the value is `null`. For the original order that was split, the value is `MASTER_ORDER`s, and for the created suborders, the value is `SUB_ORDER`."},"splitInfo":{"type":"object","properties":{"splitBy":{"$ref":"#/components/schemas/splitBy"},"uniqueValue":{"type":"string","description":"A unique value used to split the entries of a master order into separate suborders. Available only on suborders that had uniqueValue for the split. Not available on master order."}},"description":"Information about how the order was split from the master order."},"splitBy":{"type":"string","enum":["VENDOR_ID"],"description":"Specifies the criteria used to split a master order into suborders. Currently, only `VENDOR_ID` is supported."},"orderEntry":{"title":"Order entry","description":"The ordered item.","type":"object","properties":{"id":{"description":"The ordered item ID.","type":"string"},"itemYrn":{"$ref":"#/components/schemas/YRN"},"fees":{"allOf":[{"$ref":"#/components/schemas/aggregateFee"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.fees` instead. The `calculatedPrice.fees` field provides the same value with updated functionality."}],"deprecated":true},"amount":{"description":"The amount of items.","type":"integer"},"orderedAmount":{"description":"The ordered amount of items.","type":"integer"},"packedAmountInPc":{"description":"The packed amount of items.","type":"integer"},"effectiveQuantity":{"description":"Effective quantity is q calculated average quantity customer is paying for.","type":"number","format":"double"},"originalAmount":{"description":"The original amount. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.","type":"number","deprecated":true},"originalPrice":{"description":"The original price. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.","type":"number","deprecated":true},"unitPrice":{"type":"number","deprecated":true,"description":"**This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality."},"calculatedUnitPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Product's unit price with tax values, can be skipped if deprecated `unitPrice` is provided for backward compatibility."}]},"measurementUnit":{"$ref":"#/components/schemas/measurementUnit"},"link":{"description":"Link to product.","type":"string"},"discounts":{"deprecated":true,"description":"The discount list. **This field is deprecated**. Please use `calculatedPrice.totalDiscount` instead. The `calculatedPrice.totalDiscount` field provides the same value with updated functionality."},"totalPrice":{"type":"number","deprecated":true,"description":"The total price of items. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality."},"authorizedAmount":{"description":"The authorized amount. **This field is deprecated**. Please use `calculatedPrice.upliftValue` instead. The `calculatedPrice.upliftValue` field how much payment authorization should be increased for given item.","deprecated":true,"type":"number"},"product":{"$ref":"#/components/schemas/product"},"tax":{"allOf":[{"$ref":"#/components/schemas/tax"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.price` instead. The `calculatedPrice.price` field provides the same value with updated functionality."}],"deprecated":true},"price":{"$ref":"#/components/schemas/price"},"metadata":{"$ref":"#/components/schemas/mixinsMetadata"},"mixins":{"type":"object"},"calculatedPrice":{"allOf":[{"$ref":"#/components/schemas/orderEntryCalculatedPrice"},{"type":"object","description":"Detailed price calculation for a single line item with all pricing components. Can be skipped if deprecated `totalPrice` is provided for backward compatibility."}]},"priceMatchDetails":{"$ref":"#/components/schemas/priceMatchDetails"},"externalDiscounts":{"type":"array","description":"External discounts applied to this order entry.","items":{"$ref":"#/components/schemas/externalDiscount"}},"externalFees":{"type":"array","description":"External fees applied to this order entry.","items":{"$ref":"#/components/schemas/externalFee"}}},"required":["amount","calculatedUnitPrice","calculatedPrice"]},"YRN":{"type":"string","title":"YRN","description":"In YaaS, a global resource identifier is a Uniform Resource Name (URN) with a custom YaaS schema and is called a YaaS Resource Name, or YRN.\n\nIt is a unique identifier, which stores information about a resource, such as its type, ID or name of the tenant.","minLength":1},"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]},"measurementUnit":{"title":"Measurement Unit","description":"The entry measurement unit","type":"object","properties":{"unit":{"description":"Code of the unit, like `kg` or `l`.","type":"string"},"value":{"description":"Quantity of given unit.","type":"number"}},"required":["value"]},"product":{"title":"Product","description":"Product details.","type":"object","properties":{"id":{"description":"Unique identifier of a product.","type":"string"},"sku":{"description":"Product sku.","type":"string"},"code":{"description":"Unique code of a product.","type":"string"},"name":{"description":"Unique name of a product.","type":"string"},"localizedName":{"description":"A product's name represented as a map, with language as the key and the corresponding translated name as the value","type":"object","additionalProperties":{"type":"string"}},"description":{"description":"Product description.","type":"string"},"published":{"description":"Product published flag.","type":"boolean"},"productType":{"description":"Type of the product (BASIC, VARIANT, BUNDLE).","type":"string","enum":["BASIC","VARIANT","BUNDLE"]},"bundledProducts":{"description":"The collection of products assigned to the bundle.","type":"array","items":{"$ref":"#/components/schemas/bundleProduct"}},"images":{"description":"Product images.","type":"array","items":{"$ref":"#/components/schemas/media"}},"vendor":{"$ref":"#/components/schemas/vendor"},"mixins":{"description":"Product additional information.","type":"object","additionalProperties":true},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"The metadata of the product."}]}}},"bundleProduct":{"title":"Bundle Product","description":"Represents the product used in a bundle.","type":"object","properties":{"amount":{"description":"The number of given products assigned to the bundle.","type":"number"},"productId":{"description":"Id of the product assigned to the bundle.","type":"string"}}},"media":{"title":"Media","description":"The media.","type":"object","properties":{"id":{"description":"Unique identifier of a media file.","type":"string"},"url":{"description":"Media URL.","type":"string"},"stored":{"description":"Media stored flag.","type":"boolean","default":false}}},"mixinsMetadata":{"title":"Product Metadata","description":"Product Metadata","type":"object","additionalProperties":true,"properties":{"mixins":{"description":"A key-value map of mixins, where the mixin name is a key and schema url is a value","type":"object","additionalProperties":true},"version":{"description":"The document version number.","type":"integer"}}},"tax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"}},"required":["total"]},"taxLine":{"title":"taxLine","description":"Tax line details.","type":"object","properties":{"amount":{"description":"Tax line amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Tax code.","type":"string"},"name":{"description":"Tax name.","type":"string"},"rate":{"description":"Tax rate.","type":"number","default":0},"taxable":{"description":"Order's taxable amount.","type":"number"},"sequenceId":{"description":"Sequence ID.","type":"integer","default":0},"inclusive":{"description":"Inclusive flag.","type":"boolean","default":false}},"required":["amount","currency","sequenceId","inclusive"]},"taxTotal":{"title":"Tax total","description":"The tax total tax amount.","type":"object","properties":{"amount":{"description":"Total tax amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"inclusive":{"description":"Total tax inclusive flag.","default":false,"type":"boolean"}},"required":["amount","currency","inclusive"]},"price":{"title":"Price","description":"Price details.","type":"object","properties":{"priceId":{"description":"Id of the price related to order entry.","type":"string"},"priceListId":{"type":"string","description":"Identifier of price list. The field should be populated only in case when the returned prices belongs to any price list."},"effectiveAmount":{"description":"Effective amount is a calculated average item price after a discount.","type":"number"},"originalAmount":{"description":"Oryginal amount is a price set by the merchant.","type":"number"},"currency":{"description":"Currency of the entry price.","type":"string"},"salePrice":{"allOf":[{"$ref":"#/components/schemas/salePrice"},{"type":"object","description":"Attributes of the sale price."}]}}},"salePrice":{"title":"Sale Price","description":"The sale price.","type":"object","properties":{"discountAmount":{"description":"Amount of the discount for sale price promotion.","type":"number"},"discountRate":{"description":"Rate of the discount for sale price promotion.","type":"number"},"description":{"description":"The sale price description.","type":"string"}}},"orderEntryCalculatedPrice":{"type":"object","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The price is calculated by multiplying the unit price (taken from priceMatch) by the quantity."},{"properties":{"calculated":{"type":"string","description":"Indicates how the line item price was determined. - `INTERNAL` — Calculated by Emporix using unit price × quantity. - `EXTERNAL` — Provided externally with `lineTax`.","enum":["INTERNAL","EXTERNAL"]}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Maximum additional amount authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for an item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to uplift amount, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"fees":{"type":"array","description":"A list of fees applied to the line item. If there are no fees on the item line, it's not returned in the response.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedFee"},{"type":"object","properties":{"id":{"type":"string","description":"Fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"PERCENT for fee percentage of the item's line `price.netValue` - unit price x quantity. ABSOLUTE for the absolute amount assigned to the item line. ABSOLUTE_MULTIPLY_ITEMQUANTITY for the monetary amount multiplied by the item quantity and assigned to the item line."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"INTERNAL defined in commerce engine, EXTERNAL specified when an item is added to the order."},"name":{"type":"object","description":"Fee name."},"price":{"type":"object","description":"The calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"Monetary amount of the fee, depends on the fee type."},"grossValue":{"type":"number","format":"double","description":"Value calculated based on the `taxCode` and the `taxRate` if `taxable=true`."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the provided `taxCode` at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"Tax code defined on the fee level, for example STANDARD. The value should match the available tax codes in the system configuration."}}},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Refers to `fees[].price.taxRate`."},"taxCode":{"type":"string","description":"Refers to `fees[].price.taxCode`."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Monetary amount of the discount applied to the price for the given discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]}}}]}},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"Sum of all fees applied to the item. It's calculated by summarizing `fees[].discountedPrice` if any discounts were applied to the fee, or `fees[].price` for an pre-discounted fee. If there are no fees applied to the line item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, which results in the same `taxRate`, then the value is present. Otherwise, the field is not returned."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode`, then the value is present. Otherwise, the field is not returned."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Sum of all `fees[].discountedPrice.appliedDiscounts[].value` grouped by `discount.id`"},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The final price is the sum of the `discountedPrice` or the original price, depending on whether any discounts were applied to the line item, and the `totalFee`, which includes all fees applied to the line item. Since the total fee already includes the discounted prices of fees, the sum is calculated at the `totalFee` level.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."}}}]}},"required":["finalPrice"]},"calculatedPriceWithDiscounts":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","properties":{"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}}]},"calculatedAppliedDiscount":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the applied discount."},"value":{"type":"number","format":"double","description":"The calculated value of the discount."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Applied discount's price. When discount is applied before tax the value equals `price.netValue` and `price.grossValue` for discount applied after tax."}]},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"The discount type which shows how the discount was calculated."},"origin":{"type":"string","enum":["INTERNAL","EXTERNAL"],"description":"Indicates whether the discount is from internal coupon (INTERNAL) or external discount (EXTERNAL)."}}},"calculatedFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"origin of the fee, `INTERNAL` defined in commerce engine, `EXTERNAL` specified when item is added to the cart."},"price":{"$ref":"#/components/schemas/calculatedPrice"},"discountedPrice":{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"}}},"calculatedTotalDiscount":{"type":"object","description":"The total combined value of all applied discounts.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were calculated using net or gross price values."},"value":{"type":"number","format":"double","description":"The calculated amount of all discounts."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Total discounts price. When discounts are applied before tax the value equals `price.netValue` and `price.grossValue` for discounts applied after tax."}]},"appliedDiscounts":{"type":"array","description":"All applied discounts that are parts of the sum.","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}},"priceMatchDetails":{"title":"priceMatchDetails","type":"object","properties":{"netValue":{"type":"number","format":"double","description":"The net value of the matched price"},"grossValue":{"type":"number","format":"double","description":"The gross value of the matched price"},"taxValue":{"type":"number","format":"double","description":"The calculated tax value"},"taxCode":{"type":"string","description":"The applied tax code"},"taxRate":{"type":"number","format":"double","description":"The applied tax rate"},"taxCountry":{"type":"string","description":"The tax country for which the price was matched"}},"description":"This model represents the price value retrieved from the price service"},"externalDiscount":{"type":"object","description":"External discount that was applied to order items.","properties":{"id":{"type":"string","description":"Unique identifier of the external discount."},"discountType":{"$ref":"#/components/schemas/externalDiscountType"},"value":{"type":"number","format":"double","minimum":0,"maximum":100,"description":"Value of the discount (percentage e.g 15.00 -> 15% or absolute amount e.g 10.00 -> 10 EUR depending on the discountType). For discountType=`PERCENT`, maximum is 100.0; for ABSOLUTE, there is no limit."},"includeFees":{"type":"boolean","description":"Flag indicating whether the discount is also applied to fees."},"sequence":{"type":"integer","description":"Sequence number determining the order in which discounts are applied. The lowest sequence number is applied first."}},"required":["id","discountType","value"]},"externalDiscountType":{"type":"string","description":"Type of the external discount.","enum":["PERCENT","ABSOLUTE"]},"externalFee":{"type":"object","required":["feeType"],"properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"}],"description":"Fee name."},"feeType":{"type":"string","description":"Type of the fee.","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"]},"feePercentage":{"type":"number","description":"Value of the fee as percentage. It must be provided when feeType equals `PERCENT`."},"feeAbsolute":{"type":"object","description":"Value of the fee as absolute. It must be provided when feeType equals `ABSOLUTE` or `ABSOLUTE_MULTIPLY_ITEMQUANTITY`.","required":["currency","amount"],"properties":{"currency":{"type":"string","description":"Currency of the fee absolute."},"amount":{"type":"number","description":"Value of the fee absolute."}}},"taxable":{"type":"boolean","description":"It marks whether tax should be included to the fee or not. A taxable fee must have the `taxCode` attribute provided."},"taxCode":{"type":"string","description":"Tax code of the fee."}}},"discount":{"title":"Discount","properties":{"code":{"description":"Discount's code.","type":"string"},"amount":{"description":"Amount of discount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"name":{"description":"Discount's name.","type":"string"},"discountRate":{"description":"Discount's rate.","type":"number"},"calculationType":{"description":"Discount's code.calculation type.","type":"string"},"discountCalculationType":{"description":"Determines whether the coupon is applied to the total or subtotal value of the order.","type":"string","enum":["SUBTOTAL","TOTAL"]},"discountType":{"description":"Discount's type.","type":"string"},"sequenceId":{"description":"Discount's unique sequence ID identifier.","type":"integer"},"link":{"allOf":[{"$ref":"#/components/schemas/reference"},{"type":"object","description":"Link to discount."}]},"categoryRestricted":{"description":"This flag indicates if discount is category restricted.","type":"boolean"},"restrictions":{"allOf":[{"$ref":"#/components/schemas/discountRestrictions"},{"type":"object","description":"The restrictions based on which the discount can be applied."}]}},"required":["code","currency"]},"reference":{"title":"Link","properties":{"id":{"description":"Unique identifier of a link.","type":"string"},"type":{"description":"Link type.","type":"string"},"url":{"description":"URL of the link.","type":"string"}},"required":["id","type","url"]},"discountRestrictions":{"title":"Discount Restrictions","properties":{"validFrom":{"description":"The date from which the discount restriction is valid.","type":"string"},"validUntil":{"description":"The date from which the discount restriction is valid.","type":"string"},"minOrderValue":{"allOf":[{"$ref":"#/components/schemas/discountRestrictionsPrice"},{"type":"object","description":"The minimum order price for which the discount is valid."}]},"includedCategories":{"description":"List of included categories.","type":"array","items":{"type":"string"}},"excludedCategories":{"description":"List of excluded categories.","type":"array","items":{"type":"string"}}}},"discountRestrictionsPrice":{"title":"Discount Restrictions Price","properties":{"amount":{"description":"The amount of discount price","type":"number"},"currency":{"description":"The currency of the price","type":"string"}}},"customer":{"title":"Customer","description":"Customer data. \n\nOne of these properties needs to be provided:\n- `name` for business customers (B2B)\n- `firstName` and `lastName` for individual customers (B2C)\n","properties":{"id":{"description":"Customer's unique identifier.","type":"string","default":"ANONYMOUS"},"name":{"description":"Customer's name.","type":"string"},"title":{"description":"Customer's title.","type":"string"},"firstName":{"description":"Customer's first name.","type":"string"},"middleName":{"description":"Customer's middle name.","type":"string"},"lastName":{"description":"Customer's last name.","type":"string"},"company":{"description":"Company name.","type":"string"},"email":{"description":"Customer's email address.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"Metadata."}]},"mixins":{"description":"Customer additional information.","type":"object","additionalProperties":true}},"required":["email"]},"address":{"title":"Address","description":"Customer's address.","type":"object","properties":{"contactName":{"description":"Customer's name.","type":"string"},"companyName":{"description":"Company name.","type":"string"},"street":{"description":"Street name.","type":"string"},"streetNumber":{"description":"Street number.","type":"string"},"streetAppendix":{"description":"Street appendix.","type":"string"},"extraLine1":{"description":"Additional address information.","type":"string"},"extraLine2":{"description":"Additional address information.","type":"string"},"extraLine3":{"description":"Additional address information.","type":"string"},"extraLine4":{"description":"Additional address information.","type":"string"},"zipCode":{"description":"Customer's address - zip code.","type":"string"},"city":{"description":"City name.","type":"string"},"state":{"description":"State name.","type":"string"},"country":{"description":"Country name.","type":"string"},"contactPhone":{"description":"Customer's contact phone.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"Metadata."}]},"mixins":{"description":"Additional address information.","type":"object","additionalProperties":true}},"required":["contactName","street","city","zipCode","country"]},"payment":{"title":"Payment","description":"Payment details.","type":"object","properties":{"method":{"description":"Payment method.","type":"string"},"status":{"description":"Payment status.","allOf":[{"$ref":"#/components/schemas/paymentStatus"}]},"paymentResponse":{"description":"Payment response.","type":"string"},"paidAmount":{"description":"Paid amount.","type":"number"},"refundAmount":{"description":"Refund amount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"transactionId":{"description":"The ID of the payment transaction.","type":"string"},"redirectUrl":{"description":"Redirect url.","type":"string"},"authorizedAmount":{"description":"Authorized amount.","type":"number"},"provider":{"description":"Payment provider.","type":"string"}},"required":["method","paidAmount","currency"]},"paymentStatus":{"type":"string","enum":["PENDING","AUTHORIZATION_SUCCESS","AUTHORIZATION_FAILURE","CAPTURE_SUCCESS","CAPTURE_FAILURE","SUCCESS","FAILURE","CANCELLATION_SUCCESS","CANCELLATION_FAILURE","REFUND_SUCCESS","REFUND_FAILURE"],"default":"PENDING","description":"Status of the payment."},"shipping":{"description":"Shipping details.","title":"Shipping","type":"object","properties":{"total":{"description":"Total shipping amount.","type":"object","properties":{"amount":{"type":"number","description":"Shipping amount.","default":0},"currency":{"type":"string","description":"Currency of the shipping amount."}}},"lines":{"description":"Shipping line list.","type":"array","items":{"$ref":"#/components/schemas/shippingLine"}}},"required":["total"]},"shippingLine":{"title":"Shipping line","description":"Shipping line.","type":"object","properties":{"amount":{"type":"number","description":"Shipping line amount.","default":0},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Shipping line code.","type":"string"},"name":{"description":"Shipping line name.","type":"string"},"localizedName":{"description":"Shipping line name in a form of a map of translations.","type":"object","additionalProperties":{"type":"string"}},"discounts":{"description":"Shipping line discount.","type":"array","items":{"$ref":"#/components/schemas/discount"}},"tax":{"$ref":"#/components/schemas/shippingTax"},"link":{"$ref":"#/components/schemas/reference"},"shippingTaxCode":{"type":"string"}},"required":["code"]},"shippingTax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"},"rate":{"description":"The rate of the shipping tax","type":"number"}},"required":["total"]},"deliveryWindow":{"title":"Delivery Window","type":"object","properties":{"id":{"type":"string","description":"Id of the delivery window"},"deliveryDate":{"type":"string","format":"date","description":"Delivery date."},"slotId":{"type":"string","description":"ID of the delivery slot"},"deliveryTimeRange":{"$ref":"#/components/schemas/deliveryTimeRange"},"deliveryCycle":{"type":"string","description":"Delivery cycle to which the order is assigned (containing date)"},"deliveryCycleName":{"type":"string","description":"Delivery cycle name to which the order is assigned"}}},"deliveryTimeRange":{"title":"Delivery Time Range","type":"object","properties":{"timeFrom":{"type":"string","format":"time","description":"Start Time"},"timeTo":{"type":"string","format":"time","description":"End Time"}}},"metadataMixins":{"title":"Metadata DTO","type":"object","additionalProperties":true,"properties":{"mixins":{"type":"object","additionalProperties":true},"version":{"type":"integer"}}},"orderCalculatedPrice":{"type":"object","description":"A breakdown of the total price calculated from all line items, including detailed pricing components.","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all line item price values, it means unit prices multiplied by quantity - `entries[].calculatedPrice.price`.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all line item uplift values. Uplift value is the maximum additional amount to be authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for any item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the uplift amount, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The sum of all line item prices after discounts are calculated. It's included in the response if at least one line item has a discounted price. It's the total amount of discounted prices for items with applied discounts and the original prices for items without discounts. It reflects the total cost of all line items after discounts.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"paymentFees":{"type":"array","description":"The list of payment fees applied to an order. Payment fees are not changed and are not discounted, even when a discount or coupon is applied to the total.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedPaymentFee"},{"type":"object","properties":{"id":{"type":"string","description":"Payment fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the payment fee. PERCENT for the fee’s `feePercentage`` multiplied by sum of line items `finalPrice` plus shipping cost. ABSOLUTE - monetary amount that is assigned to the payment method."},"price":{"description":"Calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"The monetary amount of the fee, depending on the fee type. ABSOLUTE for the value of defined fee’s `feeAbsolute.amount` attribute. The amount is treated as `netValue`. PERCENT, when defined on fee level percentage, `feePercentage` attribute, of sum of all item line’s `finalPrice.netValue` plus cart’s `calculatedPrice.totalShipping.netValue`. If the fee is taxable and has a tax code, the gross value is calculated. Otherwise, `grossValue` is equal to `netValue`."},"grossValue":{"type":"number","format":"double","description":"For a fee where `taxable=true` and a valid `taxCode` is provided, the tax rate associated with that tax code is used to calculate `grossValue`. If the fee is not taxable, `netValue` is equal to `grossValue`."},"taxValue":{"type":"number","format":"double","description":"Tax value of the payment fee, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the `taxCode` provided at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"The tax code defined at the fee level, for example STANDARD. The value must correspond to the available tax codes in the system configuration."}}}}}]}},"fees":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all fees applied on the line items plus the payment fee *before discounts*."}]},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The sum of all fees applied on the line items plus the payment fee. It's calculated by summing `entries[].calculatedPrice.totalFee` with `paymentFee`. **The `totalFee` is the value *after all the discounts*, if any discounts were applied.**","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the total fee, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the total fee, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the total fee, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, resulting in the same `taxRate`, the value is present. Otherwise, the field is not returned in the response."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode` defined, the value is present. Otherwise, the field is not returned in the response."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to on the line item fees. The payment fee itself is not discountable.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalFee[].appliedDiscounts[].value` grouped by `discount.id`."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the fee."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"shipping":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The total shipping cost is calculated by summing `items[].calculatedPrice.price.grossValue` for shipping estimation. `GrossValue` is used because, even for zero-tax items, it remains equal to `netValue`. The `shipping` is the value *before discounts*, use totalShipping to get the value after discounts."}]},"totalShipping":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total shipping cost is calculated by summing `entries[].calculatedPrice.price.grossValue` for shipping estimation. `GrossValue` is used because, even for zero-tax items, it remains equal to `netValue`. **The `totalShipping` is the value *after all the discounts(, if any discounts were applied.**","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxCode":{"type":"string","description":"Tax code applied to the shipping cost, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the shipping cost, it's the percentage at which an individual or business is taxed."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to shipping.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithTaxAggregate"},{"type":"object","description":"The final price is the sum of `entries[].finalPrice`, `totalShipping`, and `paymentFee`, without the uplift value.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."},"taxAggregate":{"properties":{"lines":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A list of tax values grouped by `taxCode` and `taxRate`. It includes the sum of `item[].calculatedPrice.discountedPrice` or `item[].calculatedPrice.price`, `item[].calculatedPrice.fees[].discountedPrice` or `item[].calculatedPrice.fees[].price`, `calculatedPrice.totalShipping` and `calculatedPrice.paymentFees`. If any of these values have the same `taxRate` but different `taxCode`, they are listed separately. The aggregation also includes items that do not have a `taxRate` or `taxCode` defined.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the tax, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the tax, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the tax, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the tax, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the tax, it's the percentage at which an individual or business is taxed."}}}]}}}}}]}}},"calculatedPaymentFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"price":{"$ref":"#/components/schemas/calculatedPrice"}},"title":"calculatedPaymentFee"},"calculatedPriceWithTaxAggregate":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A price calculation model that includes tax aggregate information.","properties":{"taxAggregate":{"$ref":"#/components/schemas/calculatedTaxAggregate"}}}]},"calculatedTaxAggregate":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/calculatedPrice"},"description":"List of tax calculations grouped by taxCode and taxRate"}},"description":"Aggregated tax information showing detailed tax calculations"}}}}
```

## The channel object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"channel":{"title":"Channel","type":"object","properties":{"name":{"type":"string"},"source":{"type":"string"}}}}}}
```

## The orderEntry object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"orderEntry":{"title":"Order entry","description":"The ordered item.","type":"object","properties":{"id":{"description":"The ordered item ID.","type":"string"},"itemYrn":{"$ref":"#/components/schemas/YRN"},"fees":{"allOf":[{"$ref":"#/components/schemas/aggregateFee"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.fees` instead. The `calculatedPrice.fees` field provides the same value with updated functionality."}],"deprecated":true},"amount":{"description":"The amount of items.","type":"integer"},"orderedAmount":{"description":"The ordered amount of items.","type":"integer"},"packedAmountInPc":{"description":"The packed amount of items.","type":"integer"},"effectiveQuantity":{"description":"Effective quantity is q calculated average quantity customer is paying for.","type":"number","format":"double"},"originalAmount":{"description":"The original amount. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.","type":"number","deprecated":true},"originalPrice":{"description":"The original price. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.","type":"number","deprecated":true},"unitPrice":{"type":"number","deprecated":true,"description":"**This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality."},"calculatedUnitPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Product's unit price with tax values, can be skipped if deprecated `unitPrice` is provided for backward compatibility."}]},"measurementUnit":{"$ref":"#/components/schemas/measurementUnit"},"link":{"description":"Link to product.","type":"string"},"discounts":{"deprecated":true,"description":"The discount list. **This field is deprecated**. Please use `calculatedPrice.totalDiscount` instead. The `calculatedPrice.totalDiscount` field provides the same value with updated functionality."},"totalPrice":{"type":"number","deprecated":true,"description":"The total price of items. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality."},"authorizedAmount":{"description":"The authorized amount. **This field is deprecated**. Please use `calculatedPrice.upliftValue` instead. The `calculatedPrice.upliftValue` field how much payment authorization should be increased for given item.","deprecated":true,"type":"number"},"product":{"$ref":"#/components/schemas/product"},"tax":{"allOf":[{"$ref":"#/components/schemas/tax"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.price` instead. The `calculatedPrice.price` field provides the same value with updated functionality."}],"deprecated":true},"price":{"$ref":"#/components/schemas/price"},"metadata":{"$ref":"#/components/schemas/mixinsMetadata"},"mixins":{"type":"object"},"calculatedPrice":{"allOf":[{"$ref":"#/components/schemas/orderEntryCalculatedPrice"},{"type":"object","description":"Detailed price calculation for a single line item with all pricing components. Can be skipped if deprecated `totalPrice` is provided for backward compatibility."}]},"priceMatchDetails":{"$ref":"#/components/schemas/priceMatchDetails"},"externalDiscounts":{"type":"array","description":"External discounts applied to this order entry.","items":{"$ref":"#/components/schemas/externalDiscount"}},"externalFees":{"type":"array","description":"External fees applied to this order entry.","items":{"$ref":"#/components/schemas/externalFee"}}},"required":["amount","calculatedUnitPrice","calculatedPrice"]},"YRN":{"type":"string","title":"YRN","description":"In YaaS, a global resource identifier is a Uniform Resource Name (URN) with a custom YaaS schema and is called a YaaS Resource Name, or YRN.\n\nIt is a unique identifier, which stores information about a resource, such as its type, ID or name of the tenant.","minLength":1},"aggregateFee":{"type":"object","title":"Aggregate Fee","properties":{"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"elements":{"type":"array","items":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"},{"type":"object","description":"Fee name."}]},"yrn":{"type":"string","description":"Unique identifier of the fee."},"taxCode":{"type":"string","description":"Tax code of the fee."},"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"taxValues":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the tax."},"value":{"type":"number","description":"Value of the tax."},"rate":{"type":"number","description":"Rate of the tax."}}}}}}}},"required":["total"]},"localizedValue":{"description":"Localized value which can have different structure which depends on provided `Content-Language` header.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}]},"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]},"measurementUnit":{"title":"Measurement Unit","description":"The entry measurement unit","type":"object","properties":{"unit":{"description":"Code of the unit, like `kg` or `l`.","type":"string"},"value":{"description":"Quantity of given unit.","type":"number"}},"required":["value"]},"product":{"title":"Product","description":"Product details.","type":"object","properties":{"id":{"description":"Unique identifier of a product.","type":"string"},"sku":{"description":"Product sku.","type":"string"},"code":{"description":"Unique code of a product.","type":"string"},"name":{"description":"Unique name of a product.","type":"string"},"localizedName":{"description":"A product's name represented as a map, with language as the key and the corresponding translated name as the value","type":"object","additionalProperties":{"type":"string"}},"description":{"description":"Product description.","type":"string"},"published":{"description":"Product published flag.","type":"boolean"},"productType":{"description":"Type of the product (BASIC, VARIANT, BUNDLE).","type":"string","enum":["BASIC","VARIANT","BUNDLE"]},"bundledProducts":{"description":"The collection of products assigned to the bundle.","type":"array","items":{"$ref":"#/components/schemas/bundleProduct"}},"images":{"description":"Product images.","type":"array","items":{"$ref":"#/components/schemas/media"}},"vendor":{"$ref":"#/components/schemas/vendor"},"mixins":{"description":"Product additional information.","type":"object","additionalProperties":true},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"The metadata of the product."}]}}},"bundleProduct":{"title":"Bundle Product","description":"Represents the product used in a bundle.","type":"object","properties":{"amount":{"description":"The number of given products assigned to the bundle.","type":"number"},"productId":{"description":"Id of the product assigned to the bundle.","type":"string"}}},"media":{"title":"Media","description":"The media.","type":"object","properties":{"id":{"description":"Unique identifier of a media file.","type":"string"},"url":{"description":"Media URL.","type":"string"},"stored":{"description":"Media stored flag.","type":"boolean","default":false}}},"vendor":{"type":"object","properties":{"id":{"type":"string","description":"An identifier of a vendor"},"name":{"type":"string","description":"vendor name"}},"required":["id"]},"mixinsMetadata":{"title":"Product Metadata","description":"Product Metadata","type":"object","additionalProperties":true,"properties":{"mixins":{"description":"A key-value map of mixins, where the mixin name is a key and schema url is a value","type":"object","additionalProperties":true},"version":{"description":"The document version number.","type":"integer"}}},"tax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"}},"required":["total"]},"taxLine":{"title":"taxLine","description":"Tax line details.","type":"object","properties":{"amount":{"description":"Tax line amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Tax code.","type":"string"},"name":{"description":"Tax name.","type":"string"},"rate":{"description":"Tax rate.","type":"number","default":0},"taxable":{"description":"Order's taxable amount.","type":"number"},"sequenceId":{"description":"Sequence ID.","type":"integer","default":0},"inclusive":{"description":"Inclusive flag.","type":"boolean","default":false}},"required":["amount","currency","sequenceId","inclusive"]},"taxTotal":{"title":"Tax total","description":"The tax total tax amount.","type":"object","properties":{"amount":{"description":"Total tax amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"inclusive":{"description":"Total tax inclusive flag.","default":false,"type":"boolean"}},"required":["amount","currency","inclusive"]},"price":{"title":"Price","description":"Price details.","type":"object","properties":{"priceId":{"description":"Id of the price related to order entry.","type":"string"},"priceListId":{"type":"string","description":"Identifier of price list. The field should be populated only in case when the returned prices belongs to any price list."},"effectiveAmount":{"description":"Effective amount is a calculated average item price after a discount.","type":"number"},"originalAmount":{"description":"Oryginal amount is a price set by the merchant.","type":"number"},"currency":{"description":"Currency of the entry price.","type":"string"},"salePrice":{"allOf":[{"$ref":"#/components/schemas/salePrice"},{"type":"object","description":"Attributes of the sale price."}]}}},"salePrice":{"title":"Sale Price","description":"The sale price.","type":"object","properties":{"discountAmount":{"description":"Amount of the discount for sale price promotion.","type":"number"},"discountRate":{"description":"Rate of the discount for sale price promotion.","type":"number"},"description":{"description":"The sale price description.","type":"string"}}},"orderEntryCalculatedPrice":{"type":"object","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The price is calculated by multiplying the unit price (taken from priceMatch) by the quantity."},{"properties":{"calculated":{"type":"string","description":"Indicates how the line item price was determined. - `INTERNAL` — Calculated by Emporix using unit price × quantity. - `EXTERNAL` — Provided externally with `lineTax`.","enum":["INTERNAL","EXTERNAL"]}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Maximum additional amount authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for an item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to uplift amount, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"fees":{"type":"array","description":"A list of fees applied to the line item. If there are no fees on the item line, it's not returned in the response.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedFee"},{"type":"object","properties":{"id":{"type":"string","description":"Fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"PERCENT for fee percentage of the item's line `price.netValue` - unit price x quantity. ABSOLUTE for the absolute amount assigned to the item line. ABSOLUTE_MULTIPLY_ITEMQUANTITY for the monetary amount multiplied by the item quantity and assigned to the item line."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"INTERNAL defined in commerce engine, EXTERNAL specified when an item is added to the order."},"name":{"type":"object","description":"Fee name."},"price":{"type":"object","description":"The calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"Monetary amount of the fee, depends on the fee type."},"grossValue":{"type":"number","format":"double","description":"Value calculated based on the `taxCode` and the `taxRate` if `taxable=true`."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the provided `taxCode` at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"Tax code defined on the fee level, for example STANDARD. The value should match the available tax codes in the system configuration."}}},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Refers to `fees[].price.taxRate`."},"taxCode":{"type":"string","description":"Refers to `fees[].price.taxCode`."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Monetary amount of the discount applied to the price for the given discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]}}}]}},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"Sum of all fees applied to the item. It's calculated by summarizing `fees[].discountedPrice` if any discounts were applied to the fee, or `fees[].price` for an pre-discounted fee. If there are no fees applied to the line item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, which results in the same `taxRate`, then the value is present. Otherwise, the field is not returned."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode`, then the value is present. Otherwise, the field is not returned."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Sum of all `fees[].discountedPrice.appliedDiscounts[].value` grouped by `discount.id`"},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The final price is the sum of the `discountedPrice` or the original price, depending on whether any discounts were applied to the line item, and the `totalFee`, which includes all fees applied to the line item. Since the total fee already includes the discounted prices of fees, the sum is calculated at the `totalFee` level.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."}}}]}},"required":["finalPrice"]},"calculatedPriceWithDiscounts":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","properties":{"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}}]},"calculatedAppliedDiscount":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the applied discount."},"value":{"type":"number","format":"double","description":"The calculated value of the discount."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Applied discount's price. When discount is applied before tax the value equals `price.netValue` and `price.grossValue` for discount applied after tax."}]},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"The discount type which shows how the discount was calculated."},"origin":{"type":"string","enum":["INTERNAL","EXTERNAL"],"description":"Indicates whether the discount is from internal coupon (INTERNAL) or external discount (EXTERNAL)."}}},"calculatedFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"origin of the fee, `INTERNAL` defined in commerce engine, `EXTERNAL` specified when item is added to the cart."},"price":{"$ref":"#/components/schemas/calculatedPrice"},"discountedPrice":{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"}}},"calculatedTotalDiscount":{"type":"object","description":"The total combined value of all applied discounts.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were calculated using net or gross price values."},"value":{"type":"number","format":"double","description":"The calculated amount of all discounts."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Total discounts price. When discounts are applied before tax the value equals `price.netValue` and `price.grossValue` for discounts applied after tax."}]},"appliedDiscounts":{"type":"array","description":"All applied discounts that are parts of the sum.","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}},"priceMatchDetails":{"title":"priceMatchDetails","type":"object","properties":{"netValue":{"type":"number","format":"double","description":"The net value of the matched price"},"grossValue":{"type":"number","format":"double","description":"The gross value of the matched price"},"taxValue":{"type":"number","format":"double","description":"The calculated tax value"},"taxCode":{"type":"string","description":"The applied tax code"},"taxRate":{"type":"number","format":"double","description":"The applied tax rate"},"taxCountry":{"type":"string","description":"The tax country for which the price was matched"}},"description":"This model represents the price value retrieved from the price service"},"externalDiscount":{"type":"object","description":"External discount that was applied to order items.","properties":{"id":{"type":"string","description":"Unique identifier of the external discount."},"discountType":{"$ref":"#/components/schemas/externalDiscountType"},"value":{"type":"number","format":"double","minimum":0,"maximum":100,"description":"Value of the discount (percentage e.g 15.00 -> 15% or absolute amount e.g 10.00 -> 10 EUR depending on the discountType). For discountType=`PERCENT`, maximum is 100.0; for ABSOLUTE, there is no limit."},"includeFees":{"type":"boolean","description":"Flag indicating whether the discount is also applied to fees."},"sequence":{"type":"integer","description":"Sequence number determining the order in which discounts are applied. The lowest sequence number is applied first."}},"required":["id","discountType","value"]},"externalDiscountType":{"type":"string","description":"Type of the external discount.","enum":["PERCENT","ABSOLUTE"]},"externalFee":{"type":"object","required":["feeType"],"properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"}],"description":"Fee name."},"feeType":{"type":"string","description":"Type of the fee.","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"]},"feePercentage":{"type":"number","description":"Value of the fee as percentage. It must be provided when feeType equals `PERCENT`."},"feeAbsolute":{"type":"object","description":"Value of the fee as absolute. It must be provided when feeType equals `ABSOLUTE` or `ABSOLUTE_MULTIPLY_ITEMQUANTITY`.","required":["currency","amount"],"properties":{"currency":{"type":"string","description":"Currency of the fee absolute."},"amount":{"type":"number","description":"Value of the fee absolute."}}},"taxable":{"type":"boolean","description":"It marks whether tax should be included to the fee or not. A taxable fee must have the `taxCode` attribute provided."},"taxCode":{"type":"string","description":"Tax code of the fee."}}}}}}
```

## The deliveryWindow object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"deliveryWindow":{"title":"Delivery Window","type":"object","properties":{"id":{"type":"string","description":"Id of the delivery window"},"deliveryDate":{"type":"string","format":"date","description":"Delivery date."},"slotId":{"type":"string","description":"ID of the delivery slot"},"deliveryTimeRange":{"$ref":"#/components/schemas/deliveryTimeRange"},"deliveryCycle":{"type":"string","description":"Delivery cycle to which the order is assigned (containing date)"},"deliveryCycleName":{"type":"string","description":"Delivery cycle name to which the order is assigned"}}},"deliveryTimeRange":{"title":"Delivery Time Range","type":"object","properties":{"timeFrom":{"type":"string","format":"time","description":"Start Time"},"timeTo":{"type":"string","format":"time","description":"End Time"}}}}}}
```

## The deliveryTimeRange object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"deliveryTimeRange":{"title":"Delivery Time Range","type":"object","properties":{"timeFrom":{"type":"string","format":"time","description":"Start Time"},"timeTo":{"type":"string","format":"time","description":"End Time"}}}}}}
```

## The discount object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"discount":{"title":"Discount","properties":{"code":{"description":"Discount's code.","type":"string"},"amount":{"description":"Amount of discount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"name":{"description":"Discount's name.","type":"string"},"discountRate":{"description":"Discount's rate.","type":"number"},"calculationType":{"description":"Discount's code.calculation type.","type":"string"},"discountCalculationType":{"description":"Determines whether the coupon is applied to the total or subtotal value of the order.","type":"string","enum":["SUBTOTAL","TOTAL"]},"discountType":{"description":"Discount's type.","type":"string"},"sequenceId":{"description":"Discount's unique sequence ID identifier.","type":"integer"},"link":{"allOf":[{"$ref":"#/components/schemas/reference"},{"type":"object","description":"Link to discount."}]},"categoryRestricted":{"description":"This flag indicates if discount is category restricted.","type":"boolean"},"restrictions":{"allOf":[{"$ref":"#/components/schemas/discountRestrictions"},{"type":"object","description":"The restrictions based on which the discount can be applied."}]}},"required":["code","currency"]},"reference":{"title":"Link","properties":{"id":{"description":"Unique identifier of a link.","type":"string"},"type":{"description":"Link type.","type":"string"},"url":{"description":"URL of the link.","type":"string"}},"required":["id","type","url"]},"discountRestrictions":{"title":"Discount Restrictions","properties":{"validFrom":{"description":"The date from which the discount restriction is valid.","type":"string"},"validUntil":{"description":"The date from which the discount restriction is valid.","type":"string"},"minOrderValue":{"allOf":[{"$ref":"#/components/schemas/discountRestrictionsPrice"},{"type":"object","description":"The minimum order price for which the discount is valid."}]},"includedCategories":{"description":"List of included categories.","type":"array","items":{"type":"string"}},"excludedCategories":{"description":"List of excluded categories.","type":"array","items":{"type":"string"}}}},"discountRestrictionsPrice":{"title":"Discount Restrictions Price","properties":{"amount":{"description":"The amount of discount price","type":"number"},"currency":{"description":"The currency of the price","type":"string"}}}}}}
```

## The discountRestrictions object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"discountRestrictions":{"title":"Discount Restrictions","properties":{"validFrom":{"description":"The date from which the discount restriction is valid.","type":"string"},"validUntil":{"description":"The date from which the discount restriction is valid.","type":"string"},"minOrderValue":{"allOf":[{"$ref":"#/components/schemas/discountRestrictionsPrice"},{"type":"object","description":"The minimum order price for which the discount is valid."}]},"includedCategories":{"description":"List of included categories.","type":"array","items":{"type":"string"}},"excludedCategories":{"description":"List of excluded categories.","type":"array","items":{"type":"string"}}}},"discountRestrictionsPrice":{"title":"Discount Restrictions Price","properties":{"amount":{"description":"The amount of discount price","type":"number"},"currency":{"description":"The currency of the price","type":"string"}}}}}}
```

## The discountRestrictionsPrice object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"discountRestrictionsPrice":{"title":"Discount Restrictions Price","properties":{"amount":{"description":"The amount of discount price","type":"number"},"currency":{"description":"The currency of the price","type":"string"}}}}}}
```

## The reference object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"reference":{"title":"Link","properties":{"id":{"description":"Unique identifier of a link.","type":"string"},"type":{"description":"Link type.","type":"string"},"url":{"description":"URL of the link.","type":"string"}},"required":["id","type","url"]}}}}
```

## The customer object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"customer":{"title":"Customer","description":"Customer data. \n\nOne of these properties needs to be provided:\n- `name` for business customers (B2B)\n- `firstName` and `lastName` for individual customers (B2C)\n","properties":{"id":{"description":"Customer's unique identifier.","type":"string","default":"ANONYMOUS"},"name":{"description":"Customer's name.","type":"string"},"title":{"description":"Customer's title.","type":"string"},"firstName":{"description":"Customer's first name.","type":"string"},"middleName":{"description":"Customer's middle name.","type":"string"},"lastName":{"description":"Customer's last name.","type":"string"},"company":{"description":"Company name.","type":"string"},"email":{"description":"Customer's email address.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"Metadata."}]},"mixins":{"description":"Customer additional information.","type":"object","additionalProperties":true}},"required":["email"]},"mixinsMetadata":{"title":"Product Metadata","description":"Product Metadata","type":"object","additionalProperties":true,"properties":{"mixins":{"description":"A key-value map of mixins, where the mixin name is a key and schema url is a value","type":"object","additionalProperties":true},"version":{"description":"The document version number.","type":"integer"}}}}}}
```

## The address object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"address":{"title":"Address","description":"Customer's address.","type":"object","properties":{"contactName":{"description":"Customer's name.","type":"string"},"companyName":{"description":"Company name.","type":"string"},"street":{"description":"Street name.","type":"string"},"streetNumber":{"description":"Street number.","type":"string"},"streetAppendix":{"description":"Street appendix.","type":"string"},"extraLine1":{"description":"Additional address information.","type":"string"},"extraLine2":{"description":"Additional address information.","type":"string"},"extraLine3":{"description":"Additional address information.","type":"string"},"extraLine4":{"description":"Additional address information.","type":"string"},"zipCode":{"description":"Customer's address - zip code.","type":"string"},"city":{"description":"City name.","type":"string"},"state":{"description":"State name.","type":"string"},"country":{"description":"Country name.","type":"string"},"contactPhone":{"description":"Customer's contact phone.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"Metadata."}]},"mixins":{"description":"Additional address information.","type":"object","additionalProperties":true}},"required":["contactName","street","city","zipCode","country"]},"mixinsMetadata":{"title":"Product Metadata","description":"Product Metadata","type":"object","additionalProperties":true,"properties":{"mixins":{"description":"A key-value map of mixins, where the mixin name is a key and schema url is a value","type":"object","additionalProperties":true},"version":{"description":"The document version number.","type":"integer"}}}}}}
```

## The payment object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"payment":{"title":"Payment","description":"Payment details.","type":"object","properties":{"method":{"description":"Payment method.","type":"string"},"status":{"description":"Payment status.","allOf":[{"$ref":"#/components/schemas/paymentStatus"}]},"paymentResponse":{"description":"Payment response.","type":"string"},"paidAmount":{"description":"Paid amount.","type":"number"},"refundAmount":{"description":"Refund amount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"transactionId":{"description":"The ID of the payment transaction.","type":"string"},"redirectUrl":{"description":"Redirect url.","type":"string"},"authorizedAmount":{"description":"Authorized amount.","type":"number"},"provider":{"description":"Payment provider.","type":"string"}},"required":["method","paidAmount","currency"]},"paymentStatus":{"type":"string","enum":["PENDING","AUTHORIZATION_SUCCESS","AUTHORIZATION_FAILURE","CAPTURE_SUCCESS","CAPTURE_FAILURE","SUCCESS","FAILURE","CANCELLATION_SUCCESS","CANCELLATION_FAILURE","REFUND_SUCCESS","REFUND_FAILURE"],"default":"PENDING","description":"Status of the payment."}}}}
```

## The shipping object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"shipping":{"description":"Shipping details.","title":"Shipping","type":"object","properties":{"total":{"description":"Total shipping amount.","type":"object","properties":{"amount":{"type":"number","description":"Shipping amount.","default":0},"currency":{"type":"string","description":"Currency of the shipping amount."}}},"lines":{"description":"Shipping line list.","type":"array","items":{"$ref":"#/components/schemas/shippingLine"}}},"required":["total"]},"shippingLine":{"title":"Shipping line","description":"Shipping line.","type":"object","properties":{"amount":{"type":"number","description":"Shipping line amount.","default":0},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Shipping line code.","type":"string"},"name":{"description":"Shipping line name.","type":"string"},"localizedName":{"description":"Shipping line name in a form of a map of translations.","type":"object","additionalProperties":{"type":"string"}},"discounts":{"description":"Shipping line discount.","type":"array","items":{"$ref":"#/components/schemas/discount"}},"tax":{"$ref":"#/components/schemas/shippingTax"},"link":{"$ref":"#/components/schemas/reference"},"shippingTaxCode":{"type":"string"}},"required":["code"]},"discount":{"title":"Discount","properties":{"code":{"description":"Discount's code.","type":"string"},"amount":{"description":"Amount of discount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"name":{"description":"Discount's name.","type":"string"},"discountRate":{"description":"Discount's rate.","type":"number"},"calculationType":{"description":"Discount's code.calculation type.","type":"string"},"discountCalculationType":{"description":"Determines whether the coupon is applied to the total or subtotal value of the order.","type":"string","enum":["SUBTOTAL","TOTAL"]},"discountType":{"description":"Discount's type.","type":"string"},"sequenceId":{"description":"Discount's unique sequence ID identifier.","type":"integer"},"link":{"allOf":[{"$ref":"#/components/schemas/reference"},{"type":"object","description":"Link to discount."}]},"categoryRestricted":{"description":"This flag indicates if discount is category restricted.","type":"boolean"},"restrictions":{"allOf":[{"$ref":"#/components/schemas/discountRestrictions"},{"type":"object","description":"The restrictions based on which the discount can be applied."}]}},"required":["code","currency"]},"reference":{"title":"Link","properties":{"id":{"description":"Unique identifier of a link.","type":"string"},"type":{"description":"Link type.","type":"string"},"url":{"description":"URL of the link.","type":"string"}},"required":["id","type","url"]},"discountRestrictions":{"title":"Discount Restrictions","properties":{"validFrom":{"description":"The date from which the discount restriction is valid.","type":"string"},"validUntil":{"description":"The date from which the discount restriction is valid.","type":"string"},"minOrderValue":{"allOf":[{"$ref":"#/components/schemas/discountRestrictionsPrice"},{"type":"object","description":"The minimum order price for which the discount is valid."}]},"includedCategories":{"description":"List of included categories.","type":"array","items":{"type":"string"}},"excludedCategories":{"description":"List of excluded categories.","type":"array","items":{"type":"string"}}}},"discountRestrictionsPrice":{"title":"Discount Restrictions Price","properties":{"amount":{"description":"The amount of discount price","type":"number"},"currency":{"description":"The currency of the price","type":"string"}}},"shippingTax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"},"rate":{"description":"The rate of the shipping tax","type":"number"}},"required":["total"]},"taxLine":{"title":"taxLine","description":"Tax line details.","type":"object","properties":{"amount":{"description":"Tax line amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Tax code.","type":"string"},"name":{"description":"Tax name.","type":"string"},"rate":{"description":"Tax rate.","type":"number","default":0},"taxable":{"description":"Order's taxable amount.","type":"number"},"sequenceId":{"description":"Sequence ID.","type":"integer","default":0},"inclusive":{"description":"Inclusive flag.","type":"boolean","default":false}},"required":["amount","currency","sequenceId","inclusive"]},"taxTotal":{"title":"Tax total","description":"The tax total tax amount.","type":"object","properties":{"amount":{"description":"Total tax amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"inclusive":{"description":"Total tax inclusive flag.","default":false,"type":"boolean"}},"required":["amount","currency","inclusive"]}}}}
```

## The shippingLine object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"shippingLine":{"title":"Shipping line","description":"Shipping line.","type":"object","properties":{"amount":{"type":"number","description":"Shipping line amount.","default":0},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Shipping line code.","type":"string"},"name":{"description":"Shipping line name.","type":"string"},"localizedName":{"description":"Shipping line name in a form of a map of translations.","type":"object","additionalProperties":{"type":"string"}},"discounts":{"description":"Shipping line discount.","type":"array","items":{"$ref":"#/components/schemas/discount"}},"tax":{"$ref":"#/components/schemas/shippingTax"},"link":{"$ref":"#/components/schemas/reference"},"shippingTaxCode":{"type":"string"}},"required":["code"]},"discount":{"title":"Discount","properties":{"code":{"description":"Discount's code.","type":"string"},"amount":{"description":"Amount of discount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"name":{"description":"Discount's name.","type":"string"},"discountRate":{"description":"Discount's rate.","type":"number"},"calculationType":{"description":"Discount's code.calculation type.","type":"string"},"discountCalculationType":{"description":"Determines whether the coupon is applied to the total or subtotal value of the order.","type":"string","enum":["SUBTOTAL","TOTAL"]},"discountType":{"description":"Discount's type.","type":"string"},"sequenceId":{"description":"Discount's unique sequence ID identifier.","type":"integer"},"link":{"allOf":[{"$ref":"#/components/schemas/reference"},{"type":"object","description":"Link to discount."}]},"categoryRestricted":{"description":"This flag indicates if discount is category restricted.","type":"boolean"},"restrictions":{"allOf":[{"$ref":"#/components/schemas/discountRestrictions"},{"type":"object","description":"The restrictions based on which the discount can be applied."}]}},"required":["code","currency"]},"reference":{"title":"Link","properties":{"id":{"description":"Unique identifier of a link.","type":"string"},"type":{"description":"Link type.","type":"string"},"url":{"description":"URL of the link.","type":"string"}},"required":["id","type","url"]},"discountRestrictions":{"title":"Discount Restrictions","properties":{"validFrom":{"description":"The date from which the discount restriction is valid.","type":"string"},"validUntil":{"description":"The date from which the discount restriction is valid.","type":"string"},"minOrderValue":{"allOf":[{"$ref":"#/components/schemas/discountRestrictionsPrice"},{"type":"object","description":"The minimum order price for which the discount is valid."}]},"includedCategories":{"description":"List of included categories.","type":"array","items":{"type":"string"}},"excludedCategories":{"description":"List of excluded categories.","type":"array","items":{"type":"string"}}}},"discountRestrictionsPrice":{"title":"Discount Restrictions Price","properties":{"amount":{"description":"The amount of discount price","type":"number"},"currency":{"description":"The currency of the price","type":"string"}}},"shippingTax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"},"rate":{"description":"The rate of the shipping tax","type":"number"}},"required":["total"]},"taxLine":{"title":"taxLine","description":"Tax line details.","type":"object","properties":{"amount":{"description":"Tax line amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Tax code.","type":"string"},"name":{"description":"Tax name.","type":"string"},"rate":{"description":"Tax rate.","type":"number","default":0},"taxable":{"description":"Order's taxable amount.","type":"number"},"sequenceId":{"description":"Sequence ID.","type":"integer","default":0},"inclusive":{"description":"Inclusive flag.","type":"boolean","default":false}},"required":["amount","currency","sequenceId","inclusive"]},"taxTotal":{"title":"Tax total","description":"The tax total tax amount.","type":"object","properties":{"amount":{"description":"Total tax amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"inclusive":{"description":"Total tax inclusive flag.","default":false,"type":"boolean"}},"required":["amount","currency","inclusive"]}}}}
```

## The shipment object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"shipment":{"title":"Shipment","description":"Shippment details.","type":"object","properties":{"shippedDate":{"description":"Shipped date.","type":"string"},"carrier":{"description":"Carrier.","type":"string"},"trackingNumber":{"description":"Tracking number.","type":"string"},"expectDeliveryOn":{"description":"Expected delivery date.","type":"string"}},"required":["shippedDate","carrier"]}}}}
```

## The tax object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"tax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"}},"required":["total"]},"taxLine":{"title":"taxLine","description":"Tax line details.","type":"object","properties":{"amount":{"description":"Tax line amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Tax code.","type":"string"},"name":{"description":"Tax name.","type":"string"},"rate":{"description":"Tax rate.","type":"number","default":0},"taxable":{"description":"Order's taxable amount.","type":"number"},"sequenceId":{"description":"Sequence ID.","type":"integer","default":0},"inclusive":{"description":"Inclusive flag.","type":"boolean","default":false}},"required":["amount","currency","sequenceId","inclusive"]},"taxTotal":{"title":"Tax total","description":"The tax total tax amount.","type":"object","properties":{"amount":{"description":"Total tax amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"inclusive":{"description":"Total tax inclusive flag.","default":false,"type":"boolean"}},"required":["amount","currency","inclusive"]}}}}
```

## The shippingTax object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"shippingTax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"},"rate":{"description":"The rate of the shipping tax","type":"number"}},"required":["total"]},"taxLine":{"title":"taxLine","description":"Tax line details.","type":"object","properties":{"amount":{"description":"Tax line amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Tax code.","type":"string"},"name":{"description":"Tax name.","type":"string"},"rate":{"description":"Tax rate.","type":"number","default":0},"taxable":{"description":"Order's taxable amount.","type":"number"},"sequenceId":{"description":"Sequence ID.","type":"integer","default":0},"inclusive":{"description":"Inclusive flag.","type":"boolean","default":false}},"required":["amount","currency","sequenceId","inclusive"]},"taxTotal":{"title":"Tax total","description":"The tax total tax amount.","type":"object","properties":{"amount":{"description":"Total tax amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"inclusive":{"description":"Total tax inclusive flag.","default":false,"type":"boolean"}},"required":["amount","currency","inclusive"]}}}}
```

## The taxLine object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"taxLine":{"title":"taxLine","description":"Tax line details.","type":"object","properties":{"amount":{"description":"Tax line amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Tax code.","type":"string"},"name":{"description":"Tax name.","type":"string"},"rate":{"description":"Tax rate.","type":"number","default":0},"taxable":{"description":"Order's taxable amount.","type":"number"},"sequenceId":{"description":"Sequence ID.","type":"integer","default":0},"inclusive":{"description":"Inclusive flag.","type":"boolean","default":false}},"required":["amount","currency","sequenceId","inclusive"]}}}}
```

## The taxTotal object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"taxTotal":{"title":"Tax total","description":"The tax total tax amount.","type":"object","properties":{"amount":{"description":"Total tax amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"inclusive":{"description":"Total tax inclusive flag.","default":false,"type":"boolean"}},"required":["amount","currency","inclusive"]}}}}
```

## The product object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"product":{"title":"Product","description":"Product details.","type":"object","properties":{"id":{"description":"Unique identifier of a product.","type":"string"},"sku":{"description":"Product sku.","type":"string"},"code":{"description":"Unique code of a product.","type":"string"},"name":{"description":"Unique name of a product.","type":"string"},"localizedName":{"description":"A product's name represented as a map, with language as the key and the corresponding translated name as the value","type":"object","additionalProperties":{"type":"string"}},"description":{"description":"Product description.","type":"string"},"published":{"description":"Product published flag.","type":"boolean"},"productType":{"description":"Type of the product (BASIC, VARIANT, BUNDLE).","type":"string","enum":["BASIC","VARIANT","BUNDLE"]},"bundledProducts":{"description":"The collection of products assigned to the bundle.","type":"array","items":{"$ref":"#/components/schemas/bundleProduct"}},"images":{"description":"Product images.","type":"array","items":{"$ref":"#/components/schemas/media"}},"vendor":{"$ref":"#/components/schemas/vendor"},"mixins":{"description":"Product additional information.","type":"object","additionalProperties":true},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"The metadata of the product."}]}}},"bundleProduct":{"title":"Bundle Product","description":"Represents the product used in a bundle.","type":"object","properties":{"amount":{"description":"The number of given products assigned to the bundle.","type":"number"},"productId":{"description":"Id of the product assigned to the bundle.","type":"string"}}},"media":{"title":"Media","description":"The media.","type":"object","properties":{"id":{"description":"Unique identifier of a media file.","type":"string"},"url":{"description":"Media URL.","type":"string"},"stored":{"description":"Media stored flag.","type":"boolean","default":false}}},"vendor":{"type":"object","properties":{"id":{"type":"string","description":"An identifier of a vendor"},"name":{"type":"string","description":"vendor name"}},"required":["id"]},"mixinsMetadata":{"title":"Product Metadata","description":"Product Metadata","type":"object","additionalProperties":true,"properties":{"mixins":{"description":"A key-value map of mixins, where the mixin name is a key and schema url is a value","type":"object","additionalProperties":true},"version":{"description":"The document version number.","type":"integer"}}}}}}
```

## The bundleProduct object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"bundleProduct":{"title":"Bundle Product","description":"Represents the product used in a bundle.","type":"object","properties":{"amount":{"description":"The number of given products assigned to the bundle.","type":"number"},"productId":{"description":"Id of the product assigned to the bundle.","type":"string"}}}}}}
```

## The price object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"price":{"title":"Price","description":"Price details.","type":"object","properties":{"priceId":{"description":"Id of the price related to order entry.","type":"string"},"priceListId":{"type":"string","description":"Identifier of price list. The field should be populated only in case when the returned prices belongs to any price list."},"effectiveAmount":{"description":"Effective amount is a calculated average item price after a discount.","type":"number"},"originalAmount":{"description":"Oryginal amount is a price set by the merchant.","type":"number"},"currency":{"description":"Currency of the entry price.","type":"string"},"salePrice":{"allOf":[{"$ref":"#/components/schemas/salePrice"},{"type":"object","description":"Attributes of the sale price."}]}}},"salePrice":{"title":"Sale Price","description":"The sale price.","type":"object","properties":{"discountAmount":{"description":"Amount of the discount for sale price promotion.","type":"number"},"discountRate":{"description":"Rate of the discount for sale price promotion.","type":"number"},"description":{"description":"The sale price description.","type":"string"}}}}}}
```

## The media object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"media":{"title":"Media","description":"The media.","type":"object","properties":{"id":{"description":"Unique identifier of a media file.","type":"string"},"url":{"description":"Media URL.","type":"string"},"stored":{"description":"Media stored flag.","type":"boolean","default":false}}}}}}
```

## The salePrice object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"salePrice":{"title":"Sale Price","description":"The sale price.","type":"object","properties":{"discountAmount":{"description":"Amount of the discount for sale price promotion.","type":"number"},"discountRate":{"description":"Rate of the discount for sale price promotion.","type":"number"},"description":{"description":"The sale price description.","type":"string"}}}}}}
```

## The metadata object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"metadata":{"title":"Metadata","description":"Metadata","type":"object","properties":{"createdAt":{"description":"The creation date.","type":"string"},"modifiedAt":{"description":"The modification date.","type":"string"},"version":{"description":"The document version number.","type":"integer"}}}}}}
```

## The mixinsMetadata object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"mixinsMetadata":{"title":"Product Metadata","description":"Product Metadata","type":"object","additionalProperties":true,"properties":{"mixins":{"description":"A key-value map of mixins, where the mixin name is a key and schema url is a value","type":"object","additionalProperties":true},"version":{"description":"The document version number.","type":"integer"}}}}}}
```

## The measurementUnit object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"measurementUnit":{"title":"Measurement Unit","description":"The entry measurement unit","type":"object","properties":{"unit":{"description":"Code of the unit, like `kg` or `l`.","type":"string"},"value":{"description":"Quantity of given unit.","type":"number"}},"required":["value"]}}}}
```

## The resourceLocation object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"resourceLocation":{"title":"Resource location","description":"Resource location is a response object which contains ID and link to created resource.","type":"object","properties":{"id":{"description":"Unique identifier of the created resource.","type":"string"},"yrn":{"$ref":"#/components/schemas/YRN"}}},"YRN":{"type":"string","title":"YRN","description":"In YaaS, a global resource identifier is a Uniform Resource Name (URN) with a custom YaaS schema and is called a YaaS Resource Name, or YRN.\n\nIt is a unique identifier, which stores information about a resource, such as its type, ID or name of the tenant.","minLength":1}}}}
```

## The salesOrders object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"salesOrders":{"title":"Sales Orders","description":"The collection of orders created by employees.","type":"array","items":{"$ref":"#/components/schemas/salesOrder"}},"salesOrder":{"allOf":[{"type":"object","properties":{"id":{"description":"Order's unique identifier.","type":"string"},"quoteId":{"description":"Identifier of the quote from which the order has been created","type":"string"},"createdBy":{"description":"Order's creator name.","type":"string"},"assistedBuying":{"$ref":"#/components/schemas/assistedBuying"},"checkout":{"type":"boolean","description":"Indicates whether this order was created through checkout. Available in tenant-managed responses only.\n\nWhen set to `true`, only one order can be created per cart ID — enforcing that a checkout cart results in a single order.\nOrders created through the checkout flow have this flag set to `true` by default.\n"}}},{"$ref":"#/components/schemas/orderUpdateDto"}]},"assistedBuying":{"title":"assistedBuying","type":"object","properties":{"entries":{"type":"array","description":"List of operations done by an employee on behalf of a customer.","items":{"$ref":"#/components/schemas/assistedBuyingEntry"}}},"description":"The field is populated only if an assisted buying operation was performed. The field is read-only. There is no possibility to update it by PUT/PATCH operation."},"assistedBuyingEntry":{"title":"AssistedBuyingEntry","type":"object","properties":{"employeeId":{"type":"string","description":"Identifier of an employee who performed an action on behalf of a customer."},"operation":{"type":"string","description":"'Indicates an operation type done by an employee on behalf of a customer. Available options: `CREATE` and `UPDATE_STATUS`'","enum":["CREATE","UPDATE_STATUS"]},"timestamp":{"type":"string","description":"Indicates a timestamp when an operation was performed."}}},"orderUpdateDto":{"title":"Order Update DTO","type":"object","allOf":[{"type":"object","properties":{"channel":{"$ref":"#/components/schemas/channel"},"created":{"description":"Order's creation date.","type":"string"},"completed":{"description":"Order's completion date.","type":"string"},"lastStatusChange":{"description":"Order last status change date.","type":"string"},"shipments":{"description":"Shipment list.","type":"array","items":{"$ref":"#/components/schemas/shipment"}}}},{"$ref":"#/components/schemas/orderCommonDto"}]},"channel":{"title":"Channel","type":"object","properties":{"name":{"type":"string"},"source":{"type":"string"}}},"shipment":{"title":"Shipment","description":"Shippment details.","type":"object","properties":{"shippedDate":{"description":"Shipped date.","type":"string"},"carrier":{"description":"Carrier.","type":"string"},"trackingNumber":{"description":"Tracking number.","type":"string"},"expectDeliveryOn":{"description":"Expected delivery date.","type":"string"}},"required":["shippedDate","carrier"]},"orderCommonDto":{"title":"Order Common DTO","description":"The base order fields. This object is inherited by all of other order objects as Order Creation DTO, Order Update DTO etc.","type":"object","properties":{"restriction":{"$ref":"#/components/schemas/restriction"},"feeYrnAggregate":{"allOf":[{"$ref":"#/components/schemas/aggregateFee"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.totalFees` and `entries[].calculatedPrice.fees` instead. These fields provide the same values with updated functionality."}],"deprecated":true},"status":{"$ref":"#/components/schemas/orderStatus"},"cartId":{"type":"string","description":"The identifier of a cart that was used to create this order."},"vendor":{"$ref":"#/components/schemas/vendor"},"orderType":{"$ref":"#/components/schemas/splitOrderType"},"masterOrder":{"type":"string","description":"The identifier of a master order. Available on suborders that have been created after splitting the master order."},"splitInfo":{"$ref":"#/components/schemas/splitInfo"},"subOrders":{"type":"array","description":"A list of string IDs for suborders created after a split. Available only on the master order from which the split originated."},"entries":{"description":"Ordered item list.","type":"array","minItems":1,"items":{"$ref":"#/components/schemas/orderEntry"}},"discounts":{"description":"Discount list.","type":"array","items":{"$ref":"#/components/schemas/discount"}},"customer":{"$ref":"#/components/schemas/customer"},"siteCode":{"description":"Site's unique identifier. A site is a specific shop.","type":"string"},"countryCode":{"description":"Two-letter country code, compliant with the ISO 3166 standard.","type":"string"},"billingAddress":{"$ref":"#/components/schemas/address"},"shippingAddress":{"$ref":"#/components/schemas/address"},"payments":{"description":"Payment list.","type":"array","items":{"$ref":"#/components/schemas/payment"}},"shipping":{"allOf":[{"$ref":"#/components/schemas/shipping"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.totalShipping` instead. The `unitPrice` field provides the same value with updated functionality."}],"deprecated":true},"tax":{"allOf":[{"$ref":"#/components/schemas/tax"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.finalPrice.taxAggregate` instead. The `calculatedPrice.finalPrice.taxAggregate` field provides the same value with updated functionality."}],"deprecated":true},"subTotalPrice":{"type":"number","deprecated":true,"description":"Order sub total price. **This field is deprecated**. Please use `calculatedPrice.price` or `calculatedPrice.discountedPrice` instead. These fields provide the same value with updated functionality."},"totalPrice":{"type":"number","deprecated":true,"description":"Order total price. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality."},"totalAuthorizedAmount":{"type":"number","description":"The amount that should be authorized with payment provider. It's a sum of `calculatedPrice.finalPrice.grossValue` and `calculatedPrice.upliftValue.grossValue`."},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"orderCycle":{"description":"Order cycle date.\n\n***NOTE***\nThis attribute is DEPRECATED, please use the `deliveryWindow.deliveryCycle` attribute","deprecated":true,"type":"string"},"deliveryWindowId":{"description":"Delivery window's unique identifier.\n\n***NOTE***\nThis attribute is DEPRECATED, please use the `deliveryWindow.id` attribute","type":"string","deprecated":true},"deliveryWindow":{"$ref":"#/components/schemas/deliveryWindow"},"metadata":{"$ref":"#/components/schemas/metadataMixins"},"mixins":{"type":"object"},"calculatedPrice":{"allOf":[{"$ref":"#/components/schemas/orderCalculatedPrice"},{"type":"object","description":"A breakdown of the total price calculated from all line items, including detailed pricing components. Can be skipped if deprecated`totalPrice` is provided to preserve backward compatibility"}]},"legalEntityId":{"type":"string","description":"The identifier of the legal entity on whose behalf the order was placed."}},"required":["entries","customer","calculatedPrice"]},"restriction":{"type":"string","nullable":true,"description":"Access control identifier that determines who can view or manage the order.\n\n**Purpose**: Restricts order visibility based on scope permissions. Only users/applications \nwith matching restriction scopes can access orders with a specific restriction value.\n\n**Access Control**:\n- *Reading*: Users can only query and view orders with the `restriction` value that matches one of their authorized restrictions.\n\n**Validation**: The value must exist in the tenant's configured list of valid restrictions.\n\n**Site Synchronization**: If the `restriction` property is not set with tenant configuration property `enableSyncBetweenRestrictionsAndSiteCodes` set to `true`, the `restriction` field automatically syncs with `siteCode` property.\n"},"aggregateFee":{"type":"object","title":"Aggregate Fee","properties":{"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"elements":{"type":"array","items":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"},{"type":"object","description":"Fee name."}]},"yrn":{"type":"string","description":"Unique identifier of the fee."},"taxCode":{"type":"string","description":"Tax code of the fee."},"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"taxValues":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the tax."},"value":{"type":"number","description":"Value of the tax."},"rate":{"type":"number","description":"Rate of the tax."}}}}}}}},"required":["total"]},"localizedValue":{"description":"Localized value which can have different structure which depends on provided `Content-Language` header.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}]},"orderStatus":{"type":"string","enum":["IN_CHECKOUT","CREATED","CONFIRMED","DECLINED","SHIPPED","COMPLETED"],"description":"Status of the order. Supported order statuses are `IN_CHECKOUT`, `CREATED`, `CONFIRMED`, `DECLINED`, `SHIPPED`, `COMPLETED`'. Customers can only change the order status from `CREATED` to `DECLINED`."},"vendor":{"type":"object","properties":{"id":{"type":"string","description":"An identifier of a vendor"},"name":{"type":"string","description":"vendor name"}},"required":["id"]},"splitOrderType":{"type":"string","enum":["MASTER_ORDER","SUB_ORDER"],"description":"Available on orders that have been split. For standard orders, the value is `null`. For the original order that was split, the value is `MASTER_ORDER`s, and for the created suborders, the value is `SUB_ORDER`."},"splitInfo":{"type":"object","properties":{"splitBy":{"$ref":"#/components/schemas/splitBy"},"uniqueValue":{"type":"string","description":"A unique value used to split the entries of a master order into separate suborders. Available only on suborders that had uniqueValue for the split. Not available on master order."}},"description":"Information about how the order was split from the master order."},"splitBy":{"type":"string","enum":["VENDOR_ID"],"description":"Specifies the criteria used to split a master order into suborders. Currently, only `VENDOR_ID` is supported."},"orderEntry":{"title":"Order entry","description":"The ordered item.","type":"object","properties":{"id":{"description":"The ordered item ID.","type":"string"},"itemYrn":{"$ref":"#/components/schemas/YRN"},"fees":{"allOf":[{"$ref":"#/components/schemas/aggregateFee"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.fees` instead. The `calculatedPrice.fees` field provides the same value with updated functionality."}],"deprecated":true},"amount":{"description":"The amount of items.","type":"integer"},"orderedAmount":{"description":"The ordered amount of items.","type":"integer"},"packedAmountInPc":{"description":"The packed amount of items.","type":"integer"},"effectiveQuantity":{"description":"Effective quantity is q calculated average quantity customer is paying for.","type":"number","format":"double"},"originalAmount":{"description":"The original amount. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.","type":"number","deprecated":true},"originalPrice":{"description":"The original price. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.","type":"number","deprecated":true},"unitPrice":{"type":"number","deprecated":true,"description":"**This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality."},"calculatedUnitPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Product's unit price with tax values, can be skipped if deprecated `unitPrice` is provided for backward compatibility."}]},"measurementUnit":{"$ref":"#/components/schemas/measurementUnit"},"link":{"description":"Link to product.","type":"string"},"discounts":{"deprecated":true,"description":"The discount list. **This field is deprecated**. Please use `calculatedPrice.totalDiscount` instead. The `calculatedPrice.totalDiscount` field provides the same value with updated functionality."},"totalPrice":{"type":"number","deprecated":true,"description":"The total price of items. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality."},"authorizedAmount":{"description":"The authorized amount. **This field is deprecated**. Please use `calculatedPrice.upliftValue` instead. The `calculatedPrice.upliftValue` field how much payment authorization should be increased for given item.","deprecated":true,"type":"number"},"product":{"$ref":"#/components/schemas/product"},"tax":{"allOf":[{"$ref":"#/components/schemas/tax"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.price` instead. The `calculatedPrice.price` field provides the same value with updated functionality."}],"deprecated":true},"price":{"$ref":"#/components/schemas/price"},"metadata":{"$ref":"#/components/schemas/mixinsMetadata"},"mixins":{"type":"object"},"calculatedPrice":{"allOf":[{"$ref":"#/components/schemas/orderEntryCalculatedPrice"},{"type":"object","description":"Detailed price calculation for a single line item with all pricing components. Can be skipped if deprecated `totalPrice` is provided for backward compatibility."}]},"priceMatchDetails":{"$ref":"#/components/schemas/priceMatchDetails"},"externalDiscounts":{"type":"array","description":"External discounts applied to this order entry.","items":{"$ref":"#/components/schemas/externalDiscount"}},"externalFees":{"type":"array","description":"External fees applied to this order entry.","items":{"$ref":"#/components/schemas/externalFee"}}},"required":["amount","calculatedUnitPrice","calculatedPrice"]},"YRN":{"type":"string","title":"YRN","description":"In YaaS, a global resource identifier is a Uniform Resource Name (URN) with a custom YaaS schema and is called a YaaS Resource Name, or YRN.\n\nIt is a unique identifier, which stores information about a resource, such as its type, ID or name of the tenant.","minLength":1},"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]},"measurementUnit":{"title":"Measurement Unit","description":"The entry measurement unit","type":"object","properties":{"unit":{"description":"Code of the unit, like `kg` or `l`.","type":"string"},"value":{"description":"Quantity of given unit.","type":"number"}},"required":["value"]},"product":{"title":"Product","description":"Product details.","type":"object","properties":{"id":{"description":"Unique identifier of a product.","type":"string"},"sku":{"description":"Product sku.","type":"string"},"code":{"description":"Unique code of a product.","type":"string"},"name":{"description":"Unique name of a product.","type":"string"},"localizedName":{"description":"A product's name represented as a map, with language as the key and the corresponding translated name as the value","type":"object","additionalProperties":{"type":"string"}},"description":{"description":"Product description.","type":"string"},"published":{"description":"Product published flag.","type":"boolean"},"productType":{"description":"Type of the product (BASIC, VARIANT, BUNDLE).","type":"string","enum":["BASIC","VARIANT","BUNDLE"]},"bundledProducts":{"description":"The collection of products assigned to the bundle.","type":"array","items":{"$ref":"#/components/schemas/bundleProduct"}},"images":{"description":"Product images.","type":"array","items":{"$ref":"#/components/schemas/media"}},"vendor":{"$ref":"#/components/schemas/vendor"},"mixins":{"description":"Product additional information.","type":"object","additionalProperties":true},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"The metadata of the product."}]}}},"bundleProduct":{"title":"Bundle Product","description":"Represents the product used in a bundle.","type":"object","properties":{"amount":{"description":"The number of given products assigned to the bundle.","type":"number"},"productId":{"description":"Id of the product assigned to the bundle.","type":"string"}}},"media":{"title":"Media","description":"The media.","type":"object","properties":{"id":{"description":"Unique identifier of a media file.","type":"string"},"url":{"description":"Media URL.","type":"string"},"stored":{"description":"Media stored flag.","type":"boolean","default":false}}},"mixinsMetadata":{"title":"Product Metadata","description":"Product Metadata","type":"object","additionalProperties":true,"properties":{"mixins":{"description":"A key-value map of mixins, where the mixin name is a key and schema url is a value","type":"object","additionalProperties":true},"version":{"description":"The document version number.","type":"integer"}}},"tax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"}},"required":["total"]},"taxLine":{"title":"taxLine","description":"Tax line details.","type":"object","properties":{"amount":{"description":"Tax line amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Tax code.","type":"string"},"name":{"description":"Tax name.","type":"string"},"rate":{"description":"Tax rate.","type":"number","default":0},"taxable":{"description":"Order's taxable amount.","type":"number"},"sequenceId":{"description":"Sequence ID.","type":"integer","default":0},"inclusive":{"description":"Inclusive flag.","type":"boolean","default":false}},"required":["amount","currency","sequenceId","inclusive"]},"taxTotal":{"title":"Tax total","description":"The tax total tax amount.","type":"object","properties":{"amount":{"description":"Total tax amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"inclusive":{"description":"Total tax inclusive flag.","default":false,"type":"boolean"}},"required":["amount","currency","inclusive"]},"price":{"title":"Price","description":"Price details.","type":"object","properties":{"priceId":{"description":"Id of the price related to order entry.","type":"string"},"priceListId":{"type":"string","description":"Identifier of price list. The field should be populated only in case when the returned prices belongs to any price list."},"effectiveAmount":{"description":"Effective amount is a calculated average item price after a discount.","type":"number"},"originalAmount":{"description":"Oryginal amount is a price set by the merchant.","type":"number"},"currency":{"description":"Currency of the entry price.","type":"string"},"salePrice":{"allOf":[{"$ref":"#/components/schemas/salePrice"},{"type":"object","description":"Attributes of the sale price."}]}}},"salePrice":{"title":"Sale Price","description":"The sale price.","type":"object","properties":{"discountAmount":{"description":"Amount of the discount for sale price promotion.","type":"number"},"discountRate":{"description":"Rate of the discount for sale price promotion.","type":"number"},"description":{"description":"The sale price description.","type":"string"}}},"orderEntryCalculatedPrice":{"type":"object","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The price is calculated by multiplying the unit price (taken from priceMatch) by the quantity."},{"properties":{"calculated":{"type":"string","description":"Indicates how the line item price was determined. - `INTERNAL` — Calculated by Emporix using unit price × quantity. - `EXTERNAL` — Provided externally with `lineTax`.","enum":["INTERNAL","EXTERNAL"]}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Maximum additional amount authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for an item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to uplift amount, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"fees":{"type":"array","description":"A list of fees applied to the line item. If there are no fees on the item line, it's not returned in the response.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedFee"},{"type":"object","properties":{"id":{"type":"string","description":"Fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"PERCENT for fee percentage of the item's line `price.netValue` - unit price x quantity. ABSOLUTE for the absolute amount assigned to the item line. ABSOLUTE_MULTIPLY_ITEMQUANTITY for the monetary amount multiplied by the item quantity and assigned to the item line."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"INTERNAL defined in commerce engine, EXTERNAL specified when an item is added to the order."},"name":{"type":"object","description":"Fee name."},"price":{"type":"object","description":"The calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"Monetary amount of the fee, depends on the fee type."},"grossValue":{"type":"number","format":"double","description":"Value calculated based on the `taxCode` and the `taxRate` if `taxable=true`."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the provided `taxCode` at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"Tax code defined on the fee level, for example STANDARD. The value should match the available tax codes in the system configuration."}}},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Refers to `fees[].price.taxRate`."},"taxCode":{"type":"string","description":"Refers to `fees[].price.taxCode`."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Monetary amount of the discount applied to the price for the given discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]}}}]}},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"Sum of all fees applied to the item. It's calculated by summarizing `fees[].discountedPrice` if any discounts were applied to the fee, or `fees[].price` for an pre-discounted fee. If there are no fees applied to the line item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, which results in the same `taxRate`, then the value is present. Otherwise, the field is not returned."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode`, then the value is present. Otherwise, the field is not returned."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Sum of all `fees[].discountedPrice.appliedDiscounts[].value` grouped by `discount.id`"},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The final price is the sum of the `discountedPrice` or the original price, depending on whether any discounts were applied to the line item, and the `totalFee`, which includes all fees applied to the line item. Since the total fee already includes the discounted prices of fees, the sum is calculated at the `totalFee` level.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."}}}]}},"required":["finalPrice"]},"calculatedPriceWithDiscounts":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","properties":{"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}}]},"calculatedAppliedDiscount":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the applied discount."},"value":{"type":"number","format":"double","description":"The calculated value of the discount."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Applied discount's price. When discount is applied before tax the value equals `price.netValue` and `price.grossValue` for discount applied after tax."}]},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"The discount type which shows how the discount was calculated."},"origin":{"type":"string","enum":["INTERNAL","EXTERNAL"],"description":"Indicates whether the discount is from internal coupon (INTERNAL) or external discount (EXTERNAL)."}}},"calculatedFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"origin of the fee, `INTERNAL` defined in commerce engine, `EXTERNAL` specified when item is added to the cart."},"price":{"$ref":"#/components/schemas/calculatedPrice"},"discountedPrice":{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"}}},"calculatedTotalDiscount":{"type":"object","description":"The total combined value of all applied discounts.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were calculated using net or gross price values."},"value":{"type":"number","format":"double","description":"The calculated amount of all discounts."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Total discounts price. When discounts are applied before tax the value equals `price.netValue` and `price.grossValue` for discounts applied after tax."}]},"appliedDiscounts":{"type":"array","description":"All applied discounts that are parts of the sum.","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}},"priceMatchDetails":{"title":"priceMatchDetails","type":"object","properties":{"netValue":{"type":"number","format":"double","description":"The net value of the matched price"},"grossValue":{"type":"number","format":"double","description":"The gross value of the matched price"},"taxValue":{"type":"number","format":"double","description":"The calculated tax value"},"taxCode":{"type":"string","description":"The applied tax code"},"taxRate":{"type":"number","format":"double","description":"The applied tax rate"},"taxCountry":{"type":"string","description":"The tax country for which the price was matched"}},"description":"This model represents the price value retrieved from the price service"},"externalDiscount":{"type":"object","description":"External discount that was applied to order items.","properties":{"id":{"type":"string","description":"Unique identifier of the external discount."},"discountType":{"$ref":"#/components/schemas/externalDiscountType"},"value":{"type":"number","format":"double","minimum":0,"maximum":100,"description":"Value of the discount (percentage e.g 15.00 -> 15% or absolute amount e.g 10.00 -> 10 EUR depending on the discountType). For discountType=`PERCENT`, maximum is 100.0; for ABSOLUTE, there is no limit."},"includeFees":{"type":"boolean","description":"Flag indicating whether the discount is also applied to fees."},"sequence":{"type":"integer","description":"Sequence number determining the order in which discounts are applied. The lowest sequence number is applied first."}},"required":["id","discountType","value"]},"externalDiscountType":{"type":"string","description":"Type of the external discount.","enum":["PERCENT","ABSOLUTE"]},"externalFee":{"type":"object","required":["feeType"],"properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"}],"description":"Fee name."},"feeType":{"type":"string","description":"Type of the fee.","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"]},"feePercentage":{"type":"number","description":"Value of the fee as percentage. It must be provided when feeType equals `PERCENT`."},"feeAbsolute":{"type":"object","description":"Value of the fee as absolute. It must be provided when feeType equals `ABSOLUTE` or `ABSOLUTE_MULTIPLY_ITEMQUANTITY`.","required":["currency","amount"],"properties":{"currency":{"type":"string","description":"Currency of the fee absolute."},"amount":{"type":"number","description":"Value of the fee absolute."}}},"taxable":{"type":"boolean","description":"It marks whether tax should be included to the fee or not. A taxable fee must have the `taxCode` attribute provided."},"taxCode":{"type":"string","description":"Tax code of the fee."}}},"discount":{"title":"Discount","properties":{"code":{"description":"Discount's code.","type":"string"},"amount":{"description":"Amount of discount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"name":{"description":"Discount's name.","type":"string"},"discountRate":{"description":"Discount's rate.","type":"number"},"calculationType":{"description":"Discount's code.calculation type.","type":"string"},"discountCalculationType":{"description":"Determines whether the coupon is applied to the total or subtotal value of the order.","type":"string","enum":["SUBTOTAL","TOTAL"]},"discountType":{"description":"Discount's type.","type":"string"},"sequenceId":{"description":"Discount's unique sequence ID identifier.","type":"integer"},"link":{"allOf":[{"$ref":"#/components/schemas/reference"},{"type":"object","description":"Link to discount."}]},"categoryRestricted":{"description":"This flag indicates if discount is category restricted.","type":"boolean"},"restrictions":{"allOf":[{"$ref":"#/components/schemas/discountRestrictions"},{"type":"object","description":"The restrictions based on which the discount can be applied."}]}},"required":["code","currency"]},"reference":{"title":"Link","properties":{"id":{"description":"Unique identifier of a link.","type":"string"},"type":{"description":"Link type.","type":"string"},"url":{"description":"URL of the link.","type":"string"}},"required":["id","type","url"]},"discountRestrictions":{"title":"Discount Restrictions","properties":{"validFrom":{"description":"The date from which the discount restriction is valid.","type":"string"},"validUntil":{"description":"The date from which the discount restriction is valid.","type":"string"},"minOrderValue":{"allOf":[{"$ref":"#/components/schemas/discountRestrictionsPrice"},{"type":"object","description":"The minimum order price for which the discount is valid."}]},"includedCategories":{"description":"List of included categories.","type":"array","items":{"type":"string"}},"excludedCategories":{"description":"List of excluded categories.","type":"array","items":{"type":"string"}}}},"discountRestrictionsPrice":{"title":"Discount Restrictions Price","properties":{"amount":{"description":"The amount of discount price","type":"number"},"currency":{"description":"The currency of the price","type":"string"}}},"customer":{"title":"Customer","description":"Customer data. \n\nOne of these properties needs to be provided:\n- `name` for business customers (B2B)\n- `firstName` and `lastName` for individual customers (B2C)\n","properties":{"id":{"description":"Customer's unique identifier.","type":"string","default":"ANONYMOUS"},"name":{"description":"Customer's name.","type":"string"},"title":{"description":"Customer's title.","type":"string"},"firstName":{"description":"Customer's first name.","type":"string"},"middleName":{"description":"Customer's middle name.","type":"string"},"lastName":{"description":"Customer's last name.","type":"string"},"company":{"description":"Company name.","type":"string"},"email":{"description":"Customer's email address.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"Metadata."}]},"mixins":{"description":"Customer additional information.","type":"object","additionalProperties":true}},"required":["email"]},"address":{"title":"Address","description":"Customer's address.","type":"object","properties":{"contactName":{"description":"Customer's name.","type":"string"},"companyName":{"description":"Company name.","type":"string"},"street":{"description":"Street name.","type":"string"},"streetNumber":{"description":"Street number.","type":"string"},"streetAppendix":{"description":"Street appendix.","type":"string"},"extraLine1":{"description":"Additional address information.","type":"string"},"extraLine2":{"description":"Additional address information.","type":"string"},"extraLine3":{"description":"Additional address information.","type":"string"},"extraLine4":{"description":"Additional address information.","type":"string"},"zipCode":{"description":"Customer's address - zip code.","type":"string"},"city":{"description":"City name.","type":"string"},"state":{"description":"State name.","type":"string"},"country":{"description":"Country name.","type":"string"},"contactPhone":{"description":"Customer's contact phone.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"Metadata."}]},"mixins":{"description":"Additional address information.","type":"object","additionalProperties":true}},"required":["contactName","street","city","zipCode","country"]},"payment":{"title":"Payment","description":"Payment details.","type":"object","properties":{"method":{"description":"Payment method.","type":"string"},"status":{"description":"Payment status.","allOf":[{"$ref":"#/components/schemas/paymentStatus"}]},"paymentResponse":{"description":"Payment response.","type":"string"},"paidAmount":{"description":"Paid amount.","type":"number"},"refundAmount":{"description":"Refund amount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"transactionId":{"description":"The ID of the payment transaction.","type":"string"},"redirectUrl":{"description":"Redirect url.","type":"string"},"authorizedAmount":{"description":"Authorized amount.","type":"number"},"provider":{"description":"Payment provider.","type":"string"}},"required":["method","paidAmount","currency"]},"paymentStatus":{"type":"string","enum":["PENDING","AUTHORIZATION_SUCCESS","AUTHORIZATION_FAILURE","CAPTURE_SUCCESS","CAPTURE_FAILURE","SUCCESS","FAILURE","CANCELLATION_SUCCESS","CANCELLATION_FAILURE","REFUND_SUCCESS","REFUND_FAILURE"],"default":"PENDING","description":"Status of the payment."},"shipping":{"description":"Shipping details.","title":"Shipping","type":"object","properties":{"total":{"description":"Total shipping amount.","type":"object","properties":{"amount":{"type":"number","description":"Shipping amount.","default":0},"currency":{"type":"string","description":"Currency of the shipping amount."}}},"lines":{"description":"Shipping line list.","type":"array","items":{"$ref":"#/components/schemas/shippingLine"}}},"required":["total"]},"shippingLine":{"title":"Shipping line","description":"Shipping line.","type":"object","properties":{"amount":{"type":"number","description":"Shipping line amount.","default":0},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Shipping line code.","type":"string"},"name":{"description":"Shipping line name.","type":"string"},"localizedName":{"description":"Shipping line name in a form of a map of translations.","type":"object","additionalProperties":{"type":"string"}},"discounts":{"description":"Shipping line discount.","type":"array","items":{"$ref":"#/components/schemas/discount"}},"tax":{"$ref":"#/components/schemas/shippingTax"},"link":{"$ref":"#/components/schemas/reference"},"shippingTaxCode":{"type":"string"}},"required":["code"]},"shippingTax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"},"rate":{"description":"The rate of the shipping tax","type":"number"}},"required":["total"]},"deliveryWindow":{"title":"Delivery Window","type":"object","properties":{"id":{"type":"string","description":"Id of the delivery window"},"deliveryDate":{"type":"string","format":"date","description":"Delivery date."},"slotId":{"type":"string","description":"ID of the delivery slot"},"deliveryTimeRange":{"$ref":"#/components/schemas/deliveryTimeRange"},"deliveryCycle":{"type":"string","description":"Delivery cycle to which the order is assigned (containing date)"},"deliveryCycleName":{"type":"string","description":"Delivery cycle name to which the order is assigned"}}},"deliveryTimeRange":{"title":"Delivery Time Range","type":"object","properties":{"timeFrom":{"type":"string","format":"time","description":"Start Time"},"timeTo":{"type":"string","format":"time","description":"End Time"}}},"metadataMixins":{"title":"Metadata DTO","type":"object","additionalProperties":true,"properties":{"mixins":{"type":"object","additionalProperties":true},"version":{"type":"integer"}}},"orderCalculatedPrice":{"type":"object","description":"A breakdown of the total price calculated from all line items, including detailed pricing components.","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all line item price values, it means unit prices multiplied by quantity - `entries[].calculatedPrice.price`.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all line item uplift values. Uplift value is the maximum additional amount to be authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for any item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the uplift amount, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The sum of all line item prices after discounts are calculated. It's included in the response if at least one line item has a discounted price. It's the total amount of discounted prices for items with applied discounts and the original prices for items without discounts. It reflects the total cost of all line items after discounts.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"paymentFees":{"type":"array","description":"The list of payment fees applied to an order. Payment fees are not changed and are not discounted, even when a discount or coupon is applied to the total.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedPaymentFee"},{"type":"object","properties":{"id":{"type":"string","description":"Payment fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the payment fee. PERCENT for the fee’s `feePercentage`` multiplied by sum of line items `finalPrice` plus shipping cost. ABSOLUTE - monetary amount that is assigned to the payment method."},"price":{"description":"Calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"The monetary amount of the fee, depending on the fee type. ABSOLUTE for the value of defined fee’s `feeAbsolute.amount` attribute. The amount is treated as `netValue`. PERCENT, when defined on fee level percentage, `feePercentage` attribute, of sum of all item line’s `finalPrice.netValue` plus cart’s `calculatedPrice.totalShipping.netValue`. If the fee is taxable and has a tax code, the gross value is calculated. Otherwise, `grossValue` is equal to `netValue`."},"grossValue":{"type":"number","format":"double","description":"For a fee where `taxable=true` and a valid `taxCode` is provided, the tax rate associated with that tax code is used to calculate `grossValue`. If the fee is not taxable, `netValue` is equal to `grossValue`."},"taxValue":{"type":"number","format":"double","description":"Tax value of the payment fee, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the `taxCode` provided at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"The tax code defined at the fee level, for example STANDARD. The value must correspond to the available tax codes in the system configuration."}}}}}]}},"fees":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all fees applied on the line items plus the payment fee *before discounts*."}]},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The sum of all fees applied on the line items plus the payment fee. It's calculated by summing `entries[].calculatedPrice.totalFee` with `paymentFee`. **The `totalFee` is the value *after all the discounts*, if any discounts were applied.**","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the total fee, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the total fee, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the total fee, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, resulting in the same `taxRate`, the value is present. Otherwise, the field is not returned in the response."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode` defined, the value is present. Otherwise, the field is not returned in the response."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to on the line item fees. The payment fee itself is not discountable.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalFee[].appliedDiscounts[].value` grouped by `discount.id`."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the fee."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"shipping":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The total shipping cost is calculated by summing `items[].calculatedPrice.price.grossValue` for shipping estimation. `GrossValue` is used because, even for zero-tax items, it remains equal to `netValue`. The `shipping` is the value *before discounts*, use totalShipping to get the value after discounts."}]},"totalShipping":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total shipping cost is calculated by summing `entries[].calculatedPrice.price.grossValue` for shipping estimation. `GrossValue` is used because, even for zero-tax items, it remains equal to `netValue`. **The `totalShipping` is the value *after all the discounts(, if any discounts were applied.**","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxCode":{"type":"string","description":"Tax code applied to the shipping cost, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the shipping cost, it's the percentage at which an individual or business is taxed."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to shipping.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithTaxAggregate"},{"type":"object","description":"The final price is the sum of `entries[].finalPrice`, `totalShipping`, and `paymentFee`, without the uplift value.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."},"taxAggregate":{"properties":{"lines":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A list of tax values grouped by `taxCode` and `taxRate`. It includes the sum of `item[].calculatedPrice.discountedPrice` or `item[].calculatedPrice.price`, `item[].calculatedPrice.fees[].discountedPrice` or `item[].calculatedPrice.fees[].price`, `calculatedPrice.totalShipping` and `calculatedPrice.paymentFees`. If any of these values have the same `taxRate` but different `taxCode`, they are listed separately. The aggregation also includes items that do not have a `taxRate` or `taxCode` defined.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the tax, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the tax, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the tax, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the tax, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the tax, it's the percentage at which an individual or business is taxed."}}}]}}}}}]}}},"calculatedPaymentFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"price":{"$ref":"#/components/schemas/calculatedPrice"}},"title":"calculatedPaymentFee"},"calculatedPriceWithTaxAggregate":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A price calculation model that includes tax aggregate information.","properties":{"taxAggregate":{"$ref":"#/components/schemas/calculatedTaxAggregate"}}}]},"calculatedTaxAggregate":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/calculatedPrice"},"description":"List of tax calculations grouped by taxCode and taxRate"}},"description":"Aggregated tax information showing detailed tax calculations"}}}}
```

## The vendor object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"vendor":{"type":"object","properties":{"id":{"type":"string","description":"An identifier of a vendor"},"name":{"type":"string","description":"vendor name"}},"required":["id"]}}}}
```

## The orderCommonDto object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"orderCommonDto":{"title":"Order Common DTO","description":"The base order fields. This object is inherited by all of other order objects as Order Creation DTO, Order Update DTO etc.","type":"object","properties":{"restriction":{"$ref":"#/components/schemas/restriction"},"feeYrnAggregate":{"allOf":[{"$ref":"#/components/schemas/aggregateFee"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.totalFees` and `entries[].calculatedPrice.fees` instead. These fields provide the same values with updated functionality."}],"deprecated":true},"status":{"$ref":"#/components/schemas/orderStatus"},"cartId":{"type":"string","description":"The identifier of a cart that was used to create this order."},"vendor":{"$ref":"#/components/schemas/vendor"},"orderType":{"$ref":"#/components/schemas/splitOrderType"},"masterOrder":{"type":"string","description":"The identifier of a master order. Available on suborders that have been created after splitting the master order."},"splitInfo":{"$ref":"#/components/schemas/splitInfo"},"subOrders":{"type":"array","description":"A list of string IDs for suborders created after a split. Available only on the master order from which the split originated."},"entries":{"description":"Ordered item list.","type":"array","minItems":1,"items":{"$ref":"#/components/schemas/orderEntry"}},"discounts":{"description":"Discount list.","type":"array","items":{"$ref":"#/components/schemas/discount"}},"customer":{"$ref":"#/components/schemas/customer"},"siteCode":{"description":"Site's unique identifier. A site is a specific shop.","type":"string"},"countryCode":{"description":"Two-letter country code, compliant with the ISO 3166 standard.","type":"string"},"billingAddress":{"$ref":"#/components/schemas/address"},"shippingAddress":{"$ref":"#/components/schemas/address"},"payments":{"description":"Payment list.","type":"array","items":{"$ref":"#/components/schemas/payment"}},"shipping":{"allOf":[{"$ref":"#/components/schemas/shipping"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.totalShipping` instead. The `unitPrice` field provides the same value with updated functionality."}],"deprecated":true},"tax":{"allOf":[{"$ref":"#/components/schemas/tax"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.finalPrice.taxAggregate` instead. The `calculatedPrice.finalPrice.taxAggregate` field provides the same value with updated functionality."}],"deprecated":true},"subTotalPrice":{"type":"number","deprecated":true,"description":"Order sub total price. **This field is deprecated**. Please use `calculatedPrice.price` or `calculatedPrice.discountedPrice` instead. These fields provide the same value with updated functionality."},"totalPrice":{"type":"number","deprecated":true,"description":"Order total price. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality."},"totalAuthorizedAmount":{"type":"number","description":"The amount that should be authorized with payment provider. It's a sum of `calculatedPrice.finalPrice.grossValue` and `calculatedPrice.upliftValue.grossValue`."},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"orderCycle":{"description":"Order cycle date.\n\n***NOTE***\nThis attribute is DEPRECATED, please use the `deliveryWindow.deliveryCycle` attribute","deprecated":true,"type":"string"},"deliveryWindowId":{"description":"Delivery window's unique identifier.\n\n***NOTE***\nThis attribute is DEPRECATED, please use the `deliveryWindow.id` attribute","type":"string","deprecated":true},"deliveryWindow":{"$ref":"#/components/schemas/deliveryWindow"},"metadata":{"$ref":"#/components/schemas/metadataMixins"},"mixins":{"type":"object"},"calculatedPrice":{"allOf":[{"$ref":"#/components/schemas/orderCalculatedPrice"},{"type":"object","description":"A breakdown of the total price calculated from all line items, including detailed pricing components. Can be skipped if deprecated`totalPrice` is provided to preserve backward compatibility"}]},"legalEntityId":{"type":"string","description":"The identifier of the legal entity on whose behalf the order was placed."}},"required":["entries","customer","calculatedPrice"]},"restriction":{"type":"string","nullable":true,"description":"Access control identifier that determines who can view or manage the order.\n\n**Purpose**: Restricts order visibility based on scope permissions. Only users/applications \nwith matching restriction scopes can access orders with a specific restriction value.\n\n**Access Control**:\n- *Reading*: Users can only query and view orders with the `restriction` value that matches one of their authorized restrictions.\n\n**Validation**: The value must exist in the tenant's configured list of valid restrictions.\n\n**Site Synchronization**: If the `restriction` property is not set with tenant configuration property `enableSyncBetweenRestrictionsAndSiteCodes` set to `true`, the `restriction` field automatically syncs with `siteCode` property.\n"},"aggregateFee":{"type":"object","title":"Aggregate Fee","properties":{"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"elements":{"type":"array","items":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"},{"type":"object","description":"Fee name."}]},"yrn":{"type":"string","description":"Unique identifier of the fee."},"taxCode":{"type":"string","description":"Tax code of the fee."},"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"taxValues":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the tax."},"value":{"type":"number","description":"Value of the tax."},"rate":{"type":"number","description":"Rate of the tax."}}}}}}}},"required":["total"]},"localizedValue":{"description":"Localized value which can have different structure which depends on provided `Content-Language` header.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}]},"orderStatus":{"type":"string","enum":["IN_CHECKOUT","CREATED","CONFIRMED","DECLINED","SHIPPED","COMPLETED"],"description":"Status of the order. Supported order statuses are `IN_CHECKOUT`, `CREATED`, `CONFIRMED`, `DECLINED`, `SHIPPED`, `COMPLETED`'. Customers can only change the order status from `CREATED` to `DECLINED`."},"vendor":{"type":"object","properties":{"id":{"type":"string","description":"An identifier of a vendor"},"name":{"type":"string","description":"vendor name"}},"required":["id"]},"splitOrderType":{"type":"string","enum":["MASTER_ORDER","SUB_ORDER"],"description":"Available on orders that have been split. For standard orders, the value is `null`. For the original order that was split, the value is `MASTER_ORDER`s, and for the created suborders, the value is `SUB_ORDER`."},"splitInfo":{"type":"object","properties":{"splitBy":{"$ref":"#/components/schemas/splitBy"},"uniqueValue":{"type":"string","description":"A unique value used to split the entries of a master order into separate suborders. Available only on suborders that had uniqueValue for the split. Not available on master order."}},"description":"Information about how the order was split from the master order."},"splitBy":{"type":"string","enum":["VENDOR_ID"],"description":"Specifies the criteria used to split a master order into suborders. Currently, only `VENDOR_ID` is supported."},"orderEntry":{"title":"Order entry","description":"The ordered item.","type":"object","properties":{"id":{"description":"The ordered item ID.","type":"string"},"itemYrn":{"$ref":"#/components/schemas/YRN"},"fees":{"allOf":[{"$ref":"#/components/schemas/aggregateFee"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.fees` instead. The `calculatedPrice.fees` field provides the same value with updated functionality."}],"deprecated":true},"amount":{"description":"The amount of items.","type":"integer"},"orderedAmount":{"description":"The ordered amount of items.","type":"integer"},"packedAmountInPc":{"description":"The packed amount of items.","type":"integer"},"effectiveQuantity":{"description":"Effective quantity is q calculated average quantity customer is paying for.","type":"number","format":"double"},"originalAmount":{"description":"The original amount. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.","type":"number","deprecated":true},"originalPrice":{"description":"The original price. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.","type":"number","deprecated":true},"unitPrice":{"type":"number","deprecated":true,"description":"**This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality."},"calculatedUnitPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Product's unit price with tax values, can be skipped if deprecated `unitPrice` is provided for backward compatibility."}]},"measurementUnit":{"$ref":"#/components/schemas/measurementUnit"},"link":{"description":"Link to product.","type":"string"},"discounts":{"deprecated":true,"description":"The discount list. **This field is deprecated**. Please use `calculatedPrice.totalDiscount` instead. The `calculatedPrice.totalDiscount` field provides the same value with updated functionality."},"totalPrice":{"type":"number","deprecated":true,"description":"The total price of items. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality."},"authorizedAmount":{"description":"The authorized amount. **This field is deprecated**. Please use `calculatedPrice.upliftValue` instead. The `calculatedPrice.upliftValue` field how much payment authorization should be increased for given item.","deprecated":true,"type":"number"},"product":{"$ref":"#/components/schemas/product"},"tax":{"allOf":[{"$ref":"#/components/schemas/tax"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.price` instead. The `calculatedPrice.price` field provides the same value with updated functionality."}],"deprecated":true},"price":{"$ref":"#/components/schemas/price"},"metadata":{"$ref":"#/components/schemas/mixinsMetadata"},"mixins":{"type":"object"},"calculatedPrice":{"allOf":[{"$ref":"#/components/schemas/orderEntryCalculatedPrice"},{"type":"object","description":"Detailed price calculation for a single line item with all pricing components. Can be skipped if deprecated `totalPrice` is provided for backward compatibility."}]},"priceMatchDetails":{"$ref":"#/components/schemas/priceMatchDetails"},"externalDiscounts":{"type":"array","description":"External discounts applied to this order entry.","items":{"$ref":"#/components/schemas/externalDiscount"}},"externalFees":{"type":"array","description":"External fees applied to this order entry.","items":{"$ref":"#/components/schemas/externalFee"}}},"required":["amount","calculatedUnitPrice","calculatedPrice"]},"YRN":{"type":"string","title":"YRN","description":"In YaaS, a global resource identifier is a Uniform Resource Name (URN) with a custom YaaS schema and is called a YaaS Resource Name, or YRN.\n\nIt is a unique identifier, which stores information about a resource, such as its type, ID or name of the tenant.","minLength":1},"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]},"measurementUnit":{"title":"Measurement Unit","description":"The entry measurement unit","type":"object","properties":{"unit":{"description":"Code of the unit, like `kg` or `l`.","type":"string"},"value":{"description":"Quantity of given unit.","type":"number"}},"required":["value"]},"product":{"title":"Product","description":"Product details.","type":"object","properties":{"id":{"description":"Unique identifier of a product.","type":"string"},"sku":{"description":"Product sku.","type":"string"},"code":{"description":"Unique code of a product.","type":"string"},"name":{"description":"Unique name of a product.","type":"string"},"localizedName":{"description":"A product's name represented as a map, with language as the key and the corresponding translated name as the value","type":"object","additionalProperties":{"type":"string"}},"description":{"description":"Product description.","type":"string"},"published":{"description":"Product published flag.","type":"boolean"},"productType":{"description":"Type of the product (BASIC, VARIANT, BUNDLE).","type":"string","enum":["BASIC","VARIANT","BUNDLE"]},"bundledProducts":{"description":"The collection of products assigned to the bundle.","type":"array","items":{"$ref":"#/components/schemas/bundleProduct"}},"images":{"description":"Product images.","type":"array","items":{"$ref":"#/components/schemas/media"}},"vendor":{"$ref":"#/components/schemas/vendor"},"mixins":{"description":"Product additional information.","type":"object","additionalProperties":true},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"The metadata of the product."}]}}},"bundleProduct":{"title":"Bundle Product","description":"Represents the product used in a bundle.","type":"object","properties":{"amount":{"description":"The number of given products assigned to the bundle.","type":"number"},"productId":{"description":"Id of the product assigned to the bundle.","type":"string"}}},"media":{"title":"Media","description":"The media.","type":"object","properties":{"id":{"description":"Unique identifier of a media file.","type":"string"},"url":{"description":"Media URL.","type":"string"},"stored":{"description":"Media stored flag.","type":"boolean","default":false}}},"mixinsMetadata":{"title":"Product Metadata","description":"Product Metadata","type":"object","additionalProperties":true,"properties":{"mixins":{"description":"A key-value map of mixins, where the mixin name is a key and schema url is a value","type":"object","additionalProperties":true},"version":{"description":"The document version number.","type":"integer"}}},"tax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"}},"required":["total"]},"taxLine":{"title":"taxLine","description":"Tax line details.","type":"object","properties":{"amount":{"description":"Tax line amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Tax code.","type":"string"},"name":{"description":"Tax name.","type":"string"},"rate":{"description":"Tax rate.","type":"number","default":0},"taxable":{"description":"Order's taxable amount.","type":"number"},"sequenceId":{"description":"Sequence ID.","type":"integer","default":0},"inclusive":{"description":"Inclusive flag.","type":"boolean","default":false}},"required":["amount","currency","sequenceId","inclusive"]},"taxTotal":{"title":"Tax total","description":"The tax total tax amount.","type":"object","properties":{"amount":{"description":"Total tax amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"inclusive":{"description":"Total tax inclusive flag.","default":false,"type":"boolean"}},"required":["amount","currency","inclusive"]},"price":{"title":"Price","description":"Price details.","type":"object","properties":{"priceId":{"description":"Id of the price related to order entry.","type":"string"},"priceListId":{"type":"string","description":"Identifier of price list. The field should be populated only in case when the returned prices belongs to any price list."},"effectiveAmount":{"description":"Effective amount is a calculated average item price after a discount.","type":"number"},"originalAmount":{"description":"Oryginal amount is a price set by the merchant.","type":"number"},"currency":{"description":"Currency of the entry price.","type":"string"},"salePrice":{"allOf":[{"$ref":"#/components/schemas/salePrice"},{"type":"object","description":"Attributes of the sale price."}]}}},"salePrice":{"title":"Sale Price","description":"The sale price.","type":"object","properties":{"discountAmount":{"description":"Amount of the discount for sale price promotion.","type":"number"},"discountRate":{"description":"Rate of the discount for sale price promotion.","type":"number"},"description":{"description":"The sale price description.","type":"string"}}},"orderEntryCalculatedPrice":{"type":"object","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The price is calculated by multiplying the unit price (taken from priceMatch) by the quantity."},{"properties":{"calculated":{"type":"string","description":"Indicates how the line item price was determined. - `INTERNAL` — Calculated by Emporix using unit price × quantity. - `EXTERNAL` — Provided externally with `lineTax`.","enum":["INTERNAL","EXTERNAL"]}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Maximum additional amount authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for an item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to uplift amount, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"fees":{"type":"array","description":"A list of fees applied to the line item. If there are no fees on the item line, it's not returned in the response.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedFee"},{"type":"object","properties":{"id":{"type":"string","description":"Fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"PERCENT for fee percentage of the item's line `price.netValue` - unit price x quantity. ABSOLUTE for the absolute amount assigned to the item line. ABSOLUTE_MULTIPLY_ITEMQUANTITY for the monetary amount multiplied by the item quantity and assigned to the item line."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"INTERNAL defined in commerce engine, EXTERNAL specified when an item is added to the order."},"name":{"type":"object","description":"Fee name."},"price":{"type":"object","description":"The calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"Monetary amount of the fee, depends on the fee type."},"grossValue":{"type":"number","format":"double","description":"Value calculated based on the `taxCode` and the `taxRate` if `taxable=true`."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the provided `taxCode` at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"Tax code defined on the fee level, for example STANDARD. The value should match the available tax codes in the system configuration."}}},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Refers to `fees[].price.taxRate`."},"taxCode":{"type":"string","description":"Refers to `fees[].price.taxCode`."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Monetary amount of the discount applied to the price for the given discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]}}}]}},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"Sum of all fees applied to the item. It's calculated by summarizing `fees[].discountedPrice` if any discounts were applied to the fee, or `fees[].price` for an pre-discounted fee. If there are no fees applied to the line item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, which results in the same `taxRate`, then the value is present. Otherwise, the field is not returned."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode`, then the value is present. Otherwise, the field is not returned."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Sum of all `fees[].discountedPrice.appliedDiscounts[].value` grouped by `discount.id`"},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The final price is the sum of the `discountedPrice` or the original price, depending on whether any discounts were applied to the line item, and the `totalFee`, which includes all fees applied to the line item. Since the total fee already includes the discounted prices of fees, the sum is calculated at the `totalFee` level.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."}}}]}},"required":["finalPrice"]},"calculatedPriceWithDiscounts":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","properties":{"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}}]},"calculatedAppliedDiscount":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the applied discount."},"value":{"type":"number","format":"double","description":"The calculated value of the discount."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Applied discount's price. When discount is applied before tax the value equals `price.netValue` and `price.grossValue` for discount applied after tax."}]},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"The discount type which shows how the discount was calculated."},"origin":{"type":"string","enum":["INTERNAL","EXTERNAL"],"description":"Indicates whether the discount is from internal coupon (INTERNAL) or external discount (EXTERNAL)."}}},"calculatedFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"origin of the fee, `INTERNAL` defined in commerce engine, `EXTERNAL` specified when item is added to the cart."},"price":{"$ref":"#/components/schemas/calculatedPrice"},"discountedPrice":{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"}}},"calculatedTotalDiscount":{"type":"object","description":"The total combined value of all applied discounts.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were calculated using net or gross price values."},"value":{"type":"number","format":"double","description":"The calculated amount of all discounts."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Total discounts price. When discounts are applied before tax the value equals `price.netValue` and `price.grossValue` for discounts applied after tax."}]},"appliedDiscounts":{"type":"array","description":"All applied discounts that are parts of the sum.","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}},"priceMatchDetails":{"title":"priceMatchDetails","type":"object","properties":{"netValue":{"type":"number","format":"double","description":"The net value of the matched price"},"grossValue":{"type":"number","format":"double","description":"The gross value of the matched price"},"taxValue":{"type":"number","format":"double","description":"The calculated tax value"},"taxCode":{"type":"string","description":"The applied tax code"},"taxRate":{"type":"number","format":"double","description":"The applied tax rate"},"taxCountry":{"type":"string","description":"The tax country for which the price was matched"}},"description":"This model represents the price value retrieved from the price service"},"externalDiscount":{"type":"object","description":"External discount that was applied to order items.","properties":{"id":{"type":"string","description":"Unique identifier of the external discount."},"discountType":{"$ref":"#/components/schemas/externalDiscountType"},"value":{"type":"number","format":"double","minimum":0,"maximum":100,"description":"Value of the discount (percentage e.g 15.00 -> 15% or absolute amount e.g 10.00 -> 10 EUR depending on the discountType). For discountType=`PERCENT`, maximum is 100.0; for ABSOLUTE, there is no limit."},"includeFees":{"type":"boolean","description":"Flag indicating whether the discount is also applied to fees."},"sequence":{"type":"integer","description":"Sequence number determining the order in which discounts are applied. The lowest sequence number is applied first."}},"required":["id","discountType","value"]},"externalDiscountType":{"type":"string","description":"Type of the external discount.","enum":["PERCENT","ABSOLUTE"]},"externalFee":{"type":"object","required":["feeType"],"properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"}],"description":"Fee name."},"feeType":{"type":"string","description":"Type of the fee.","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"]},"feePercentage":{"type":"number","description":"Value of the fee as percentage. It must be provided when feeType equals `PERCENT`."},"feeAbsolute":{"type":"object","description":"Value of the fee as absolute. It must be provided when feeType equals `ABSOLUTE` or `ABSOLUTE_MULTIPLY_ITEMQUANTITY`.","required":["currency","amount"],"properties":{"currency":{"type":"string","description":"Currency of the fee absolute."},"amount":{"type":"number","description":"Value of the fee absolute."}}},"taxable":{"type":"boolean","description":"It marks whether tax should be included to the fee or not. A taxable fee must have the `taxCode` attribute provided."},"taxCode":{"type":"string","description":"Tax code of the fee."}}},"discount":{"title":"Discount","properties":{"code":{"description":"Discount's code.","type":"string"},"amount":{"description":"Amount of discount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"name":{"description":"Discount's name.","type":"string"},"discountRate":{"description":"Discount's rate.","type":"number"},"calculationType":{"description":"Discount's code.calculation type.","type":"string"},"discountCalculationType":{"description":"Determines whether the coupon is applied to the total or subtotal value of the order.","type":"string","enum":["SUBTOTAL","TOTAL"]},"discountType":{"description":"Discount's type.","type":"string"},"sequenceId":{"description":"Discount's unique sequence ID identifier.","type":"integer"},"link":{"allOf":[{"$ref":"#/components/schemas/reference"},{"type":"object","description":"Link to discount."}]},"categoryRestricted":{"description":"This flag indicates if discount is category restricted.","type":"boolean"},"restrictions":{"allOf":[{"$ref":"#/components/schemas/discountRestrictions"},{"type":"object","description":"The restrictions based on which the discount can be applied."}]}},"required":["code","currency"]},"reference":{"title":"Link","properties":{"id":{"description":"Unique identifier of a link.","type":"string"},"type":{"description":"Link type.","type":"string"},"url":{"description":"URL of the link.","type":"string"}},"required":["id","type","url"]},"discountRestrictions":{"title":"Discount Restrictions","properties":{"validFrom":{"description":"The date from which the discount restriction is valid.","type":"string"},"validUntil":{"description":"The date from which the discount restriction is valid.","type":"string"},"minOrderValue":{"allOf":[{"$ref":"#/components/schemas/discountRestrictionsPrice"},{"type":"object","description":"The minimum order price for which the discount is valid."}]},"includedCategories":{"description":"List of included categories.","type":"array","items":{"type":"string"}},"excludedCategories":{"description":"List of excluded categories.","type":"array","items":{"type":"string"}}}},"discountRestrictionsPrice":{"title":"Discount Restrictions Price","properties":{"amount":{"description":"The amount of discount price","type":"number"},"currency":{"description":"The currency of the price","type":"string"}}},"customer":{"title":"Customer","description":"Customer data. \n\nOne of these properties needs to be provided:\n- `name` for business customers (B2B)\n- `firstName` and `lastName` for individual customers (B2C)\n","properties":{"id":{"description":"Customer's unique identifier.","type":"string","default":"ANONYMOUS"},"name":{"description":"Customer's name.","type":"string"},"title":{"description":"Customer's title.","type":"string"},"firstName":{"description":"Customer's first name.","type":"string"},"middleName":{"description":"Customer's middle name.","type":"string"},"lastName":{"description":"Customer's last name.","type":"string"},"company":{"description":"Company name.","type":"string"},"email":{"description":"Customer's email address.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"Metadata."}]},"mixins":{"description":"Customer additional information.","type":"object","additionalProperties":true}},"required":["email"]},"address":{"title":"Address","description":"Customer's address.","type":"object","properties":{"contactName":{"description":"Customer's name.","type":"string"},"companyName":{"description":"Company name.","type":"string"},"street":{"description":"Street name.","type":"string"},"streetNumber":{"description":"Street number.","type":"string"},"streetAppendix":{"description":"Street appendix.","type":"string"},"extraLine1":{"description":"Additional address information.","type":"string"},"extraLine2":{"description":"Additional address information.","type":"string"},"extraLine3":{"description":"Additional address information.","type":"string"},"extraLine4":{"description":"Additional address information.","type":"string"},"zipCode":{"description":"Customer's address - zip code.","type":"string"},"city":{"description":"City name.","type":"string"},"state":{"description":"State name.","type":"string"},"country":{"description":"Country name.","type":"string"},"contactPhone":{"description":"Customer's contact phone.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"Metadata."}]},"mixins":{"description":"Additional address information.","type":"object","additionalProperties":true}},"required":["contactName","street","city","zipCode","country"]},"payment":{"title":"Payment","description":"Payment details.","type":"object","properties":{"method":{"description":"Payment method.","type":"string"},"status":{"description":"Payment status.","allOf":[{"$ref":"#/components/schemas/paymentStatus"}]},"paymentResponse":{"description":"Payment response.","type":"string"},"paidAmount":{"description":"Paid amount.","type":"number"},"refundAmount":{"description":"Refund amount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"transactionId":{"description":"The ID of the payment transaction.","type":"string"},"redirectUrl":{"description":"Redirect url.","type":"string"},"authorizedAmount":{"description":"Authorized amount.","type":"number"},"provider":{"description":"Payment provider.","type":"string"}},"required":["method","paidAmount","currency"]},"paymentStatus":{"type":"string","enum":["PENDING","AUTHORIZATION_SUCCESS","AUTHORIZATION_FAILURE","CAPTURE_SUCCESS","CAPTURE_FAILURE","SUCCESS","FAILURE","CANCELLATION_SUCCESS","CANCELLATION_FAILURE","REFUND_SUCCESS","REFUND_FAILURE"],"default":"PENDING","description":"Status of the payment."},"shipping":{"description":"Shipping details.","title":"Shipping","type":"object","properties":{"total":{"description":"Total shipping amount.","type":"object","properties":{"amount":{"type":"number","description":"Shipping amount.","default":0},"currency":{"type":"string","description":"Currency of the shipping amount."}}},"lines":{"description":"Shipping line list.","type":"array","items":{"$ref":"#/components/schemas/shippingLine"}}},"required":["total"]},"shippingLine":{"title":"Shipping line","description":"Shipping line.","type":"object","properties":{"amount":{"type":"number","description":"Shipping line amount.","default":0},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Shipping line code.","type":"string"},"name":{"description":"Shipping line name.","type":"string"},"localizedName":{"description":"Shipping line name in a form of a map of translations.","type":"object","additionalProperties":{"type":"string"}},"discounts":{"description":"Shipping line discount.","type":"array","items":{"$ref":"#/components/schemas/discount"}},"tax":{"$ref":"#/components/schemas/shippingTax"},"link":{"$ref":"#/components/schemas/reference"},"shippingTaxCode":{"type":"string"}},"required":["code"]},"shippingTax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"},"rate":{"description":"The rate of the shipping tax","type":"number"}},"required":["total"]},"deliveryWindow":{"title":"Delivery Window","type":"object","properties":{"id":{"type":"string","description":"Id of the delivery window"},"deliveryDate":{"type":"string","format":"date","description":"Delivery date."},"slotId":{"type":"string","description":"ID of the delivery slot"},"deliveryTimeRange":{"$ref":"#/components/schemas/deliveryTimeRange"},"deliveryCycle":{"type":"string","description":"Delivery cycle to which the order is assigned (containing date)"},"deliveryCycleName":{"type":"string","description":"Delivery cycle name to which the order is assigned"}}},"deliveryTimeRange":{"title":"Delivery Time Range","type":"object","properties":{"timeFrom":{"type":"string","format":"time","description":"Start Time"},"timeTo":{"type":"string","format":"time","description":"End Time"}}},"metadataMixins":{"title":"Metadata DTO","type":"object","additionalProperties":true,"properties":{"mixins":{"type":"object","additionalProperties":true},"version":{"type":"integer"}}},"orderCalculatedPrice":{"type":"object","description":"A breakdown of the total price calculated from all line items, including detailed pricing components.","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all line item price values, it means unit prices multiplied by quantity - `entries[].calculatedPrice.price`.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all line item uplift values. Uplift value is the maximum additional amount to be authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for any item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the uplift amount, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The sum of all line item prices after discounts are calculated. It's included in the response if at least one line item has a discounted price. It's the total amount of discounted prices for items with applied discounts and the original prices for items without discounts. It reflects the total cost of all line items after discounts.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"paymentFees":{"type":"array","description":"The list of payment fees applied to an order. Payment fees are not changed and are not discounted, even when a discount or coupon is applied to the total.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedPaymentFee"},{"type":"object","properties":{"id":{"type":"string","description":"Payment fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the payment fee. PERCENT for the fee’s `feePercentage`` multiplied by sum of line items `finalPrice` plus shipping cost. ABSOLUTE - monetary amount that is assigned to the payment method."},"price":{"description":"Calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"The monetary amount of the fee, depending on the fee type. ABSOLUTE for the value of defined fee’s `feeAbsolute.amount` attribute. The amount is treated as `netValue`. PERCENT, when defined on fee level percentage, `feePercentage` attribute, of sum of all item line’s `finalPrice.netValue` plus cart’s `calculatedPrice.totalShipping.netValue`. If the fee is taxable and has a tax code, the gross value is calculated. Otherwise, `grossValue` is equal to `netValue`."},"grossValue":{"type":"number","format":"double","description":"For a fee where `taxable=true` and a valid `taxCode` is provided, the tax rate associated with that tax code is used to calculate `grossValue`. If the fee is not taxable, `netValue` is equal to `grossValue`."},"taxValue":{"type":"number","format":"double","description":"Tax value of the payment fee, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the `taxCode` provided at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"The tax code defined at the fee level, for example STANDARD. The value must correspond to the available tax codes in the system configuration."}}}}}]}},"fees":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all fees applied on the line items plus the payment fee *before discounts*."}]},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The sum of all fees applied on the line items plus the payment fee. It's calculated by summing `entries[].calculatedPrice.totalFee` with `paymentFee`. **The `totalFee` is the value *after all the discounts*, if any discounts were applied.**","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the total fee, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the total fee, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the total fee, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, resulting in the same `taxRate`, the value is present. Otherwise, the field is not returned in the response."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode` defined, the value is present. Otherwise, the field is not returned in the response."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to on the line item fees. The payment fee itself is not discountable.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalFee[].appliedDiscounts[].value` grouped by `discount.id`."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the fee."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"shipping":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The total shipping cost is calculated by summing `items[].calculatedPrice.price.grossValue` for shipping estimation. `GrossValue` is used because, even for zero-tax items, it remains equal to `netValue`. The `shipping` is the value *before discounts*, use totalShipping to get the value after discounts."}]},"totalShipping":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total shipping cost is calculated by summing `entries[].calculatedPrice.price.grossValue` for shipping estimation. `GrossValue` is used because, even for zero-tax items, it remains equal to `netValue`. **The `totalShipping` is the value *after all the discounts(, if any discounts were applied.**","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxCode":{"type":"string","description":"Tax code applied to the shipping cost, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the shipping cost, it's the percentage at which an individual or business is taxed."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to shipping.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithTaxAggregate"},{"type":"object","description":"The final price is the sum of `entries[].finalPrice`, `totalShipping`, and `paymentFee`, without the uplift value.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."},"taxAggregate":{"properties":{"lines":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A list of tax values grouped by `taxCode` and `taxRate`. It includes the sum of `item[].calculatedPrice.discountedPrice` or `item[].calculatedPrice.price`, `item[].calculatedPrice.fees[].discountedPrice` or `item[].calculatedPrice.fees[].price`, `calculatedPrice.totalShipping` and `calculatedPrice.paymentFees`. If any of these values have the same `taxRate` but different `taxCode`, they are listed separately. The aggregation also includes items that do not have a `taxRate` or `taxCode` defined.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the tax, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the tax, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the tax, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the tax, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the tax, it's the percentage at which an individual or business is taxed."}}}]}}}}}]}}},"calculatedPaymentFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"price":{"$ref":"#/components/schemas/calculatedPrice"}},"title":"calculatedPaymentFee"},"calculatedPriceWithTaxAggregate":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A price calculation model that includes tax aggregate information.","properties":{"taxAggregate":{"$ref":"#/components/schemas/calculatedTaxAggregate"}}}]},"calculatedTaxAggregate":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/calculatedPrice"},"description":"List of tax calculations grouped by taxCode and taxRate"}},"description":"Aggregated tax information showing detailed tax calculations"}}}}
```

## The order object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"order":{"title":"Order","allOf":[{"type":"object","description":"The order visible for a customer, which includes all ordered items, customer addresses, information about ordered products etc.","properties":{"id":{"description":"Order's unique identifier.","type":"string"},"status":{"$ref":"#/components/schemas/orderStatus"},"created":{"description":"Order's creation date.","type":"string","format":"date-time"},"completed":{"description":"Order's completion date.","type":"string","format":"date-time"},"lastStatusChange":{"description":"Order last status change date.","type":"string","format":"date-time"},"shipments":{"description":"Shipment list.","type":"array","items":{"$ref":"#/components/schemas/shipment"}}}},{"$ref":"#/components/schemas/orderCommonDto"}]},"orderStatus":{"type":"string","enum":["IN_CHECKOUT","CREATED","CONFIRMED","DECLINED","SHIPPED","COMPLETED"],"description":"Status of the order. Supported order statuses are `IN_CHECKOUT`, `CREATED`, `CONFIRMED`, `DECLINED`, `SHIPPED`, `COMPLETED`'. Customers can only change the order status from `CREATED` to `DECLINED`."},"shipment":{"title":"Shipment","description":"Shippment details.","type":"object","properties":{"shippedDate":{"description":"Shipped date.","type":"string"},"carrier":{"description":"Carrier.","type":"string"},"trackingNumber":{"description":"Tracking number.","type":"string"},"expectDeliveryOn":{"description":"Expected delivery date.","type":"string"}},"required":["shippedDate","carrier"]},"orderCommonDto":{"title":"Order Common DTO","description":"The base order fields. This object is inherited by all of other order objects as Order Creation DTO, Order Update DTO etc.","type":"object","properties":{"restriction":{"$ref":"#/components/schemas/restriction"},"feeYrnAggregate":{"allOf":[{"$ref":"#/components/schemas/aggregateFee"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.totalFees` and `entries[].calculatedPrice.fees` instead. These fields provide the same values with updated functionality."}],"deprecated":true},"status":{"$ref":"#/components/schemas/orderStatus"},"cartId":{"type":"string","description":"The identifier of a cart that was used to create this order."},"vendor":{"$ref":"#/components/schemas/vendor"},"orderType":{"$ref":"#/components/schemas/splitOrderType"},"masterOrder":{"type":"string","description":"The identifier of a master order. Available on suborders that have been created after splitting the master order."},"splitInfo":{"$ref":"#/components/schemas/splitInfo"},"subOrders":{"type":"array","description":"A list of string IDs for suborders created after a split. Available only on the master order from which the split originated."},"entries":{"description":"Ordered item list.","type":"array","minItems":1,"items":{"$ref":"#/components/schemas/orderEntry"}},"discounts":{"description":"Discount list.","type":"array","items":{"$ref":"#/components/schemas/discount"}},"customer":{"$ref":"#/components/schemas/customer"},"siteCode":{"description":"Site's unique identifier. A site is a specific shop.","type":"string"},"countryCode":{"description":"Two-letter country code, compliant with the ISO 3166 standard.","type":"string"},"billingAddress":{"$ref":"#/components/schemas/address"},"shippingAddress":{"$ref":"#/components/schemas/address"},"payments":{"description":"Payment list.","type":"array","items":{"$ref":"#/components/schemas/payment"}},"shipping":{"allOf":[{"$ref":"#/components/schemas/shipping"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.totalShipping` instead. The `unitPrice` field provides the same value with updated functionality."}],"deprecated":true},"tax":{"allOf":[{"$ref":"#/components/schemas/tax"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.finalPrice.taxAggregate` instead. The `calculatedPrice.finalPrice.taxAggregate` field provides the same value with updated functionality."}],"deprecated":true},"subTotalPrice":{"type":"number","deprecated":true,"description":"Order sub total price. **This field is deprecated**. Please use `calculatedPrice.price` or `calculatedPrice.discountedPrice` instead. These fields provide the same value with updated functionality."},"totalPrice":{"type":"number","deprecated":true,"description":"Order total price. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality."},"totalAuthorizedAmount":{"type":"number","description":"The amount that should be authorized with payment provider. It's a sum of `calculatedPrice.finalPrice.grossValue` and `calculatedPrice.upliftValue.grossValue`."},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"orderCycle":{"description":"Order cycle date.\n\n***NOTE***\nThis attribute is DEPRECATED, please use the `deliveryWindow.deliveryCycle` attribute","deprecated":true,"type":"string"},"deliveryWindowId":{"description":"Delivery window's unique identifier.\n\n***NOTE***\nThis attribute is DEPRECATED, please use the `deliveryWindow.id` attribute","type":"string","deprecated":true},"deliveryWindow":{"$ref":"#/components/schemas/deliveryWindow"},"metadata":{"$ref":"#/components/schemas/metadataMixins"},"mixins":{"type":"object"},"calculatedPrice":{"allOf":[{"$ref":"#/components/schemas/orderCalculatedPrice"},{"type":"object","description":"A breakdown of the total price calculated from all line items, including detailed pricing components. Can be skipped if deprecated`totalPrice` is provided to preserve backward compatibility"}]},"legalEntityId":{"type":"string","description":"The identifier of the legal entity on whose behalf the order was placed."}},"required":["entries","customer","calculatedPrice"]},"restriction":{"type":"string","nullable":true,"description":"Access control identifier that determines who can view or manage the order.\n\n**Purpose**: Restricts order visibility based on scope permissions. Only users/applications \nwith matching restriction scopes can access orders with a specific restriction value.\n\n**Access Control**:\n- *Reading*: Users can only query and view orders with the `restriction` value that matches one of their authorized restrictions.\n\n**Validation**: The value must exist in the tenant's configured list of valid restrictions.\n\n**Site Synchronization**: If the `restriction` property is not set with tenant configuration property `enableSyncBetweenRestrictionsAndSiteCodes` set to `true`, the `restriction` field automatically syncs with `siteCode` property.\n"},"aggregateFee":{"type":"object","title":"Aggregate Fee","properties":{"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"elements":{"type":"array","items":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"},{"type":"object","description":"Fee name."}]},"yrn":{"type":"string","description":"Unique identifier of the fee."},"taxCode":{"type":"string","description":"Tax code of the fee."},"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"taxValues":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the tax."},"value":{"type":"number","description":"Value of the tax."},"rate":{"type":"number","description":"Rate of the tax."}}}}}}}},"required":["total"]},"localizedValue":{"description":"Localized value which can have different structure which depends on provided `Content-Language` header.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}]},"vendor":{"type":"object","properties":{"id":{"type":"string","description":"An identifier of a vendor"},"name":{"type":"string","description":"vendor name"}},"required":["id"]},"splitOrderType":{"type":"string","enum":["MASTER_ORDER","SUB_ORDER"],"description":"Available on orders that have been split. For standard orders, the value is `null`. For the original order that was split, the value is `MASTER_ORDER`s, and for the created suborders, the value is `SUB_ORDER`."},"splitInfo":{"type":"object","properties":{"splitBy":{"$ref":"#/components/schemas/splitBy"},"uniqueValue":{"type":"string","description":"A unique value used to split the entries of a master order into separate suborders. Available only on suborders that had uniqueValue for the split. Not available on master order."}},"description":"Information about how the order was split from the master order."},"splitBy":{"type":"string","enum":["VENDOR_ID"],"description":"Specifies the criteria used to split a master order into suborders. Currently, only `VENDOR_ID` is supported."},"orderEntry":{"title":"Order entry","description":"The ordered item.","type":"object","properties":{"id":{"description":"The ordered item ID.","type":"string"},"itemYrn":{"$ref":"#/components/schemas/YRN"},"fees":{"allOf":[{"$ref":"#/components/schemas/aggregateFee"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.fees` instead. The `calculatedPrice.fees` field provides the same value with updated functionality."}],"deprecated":true},"amount":{"description":"The amount of items.","type":"integer"},"orderedAmount":{"description":"The ordered amount of items.","type":"integer"},"packedAmountInPc":{"description":"The packed amount of items.","type":"integer"},"effectiveQuantity":{"description":"Effective quantity is q calculated average quantity customer is paying for.","type":"number","format":"double"},"originalAmount":{"description":"The original amount. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.","type":"number","deprecated":true},"originalPrice":{"description":"The original price. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.","type":"number","deprecated":true},"unitPrice":{"type":"number","deprecated":true,"description":"**This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality."},"calculatedUnitPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Product's unit price with tax values, can be skipped if deprecated `unitPrice` is provided for backward compatibility."}]},"measurementUnit":{"$ref":"#/components/schemas/measurementUnit"},"link":{"description":"Link to product.","type":"string"},"discounts":{"deprecated":true,"description":"The discount list. **This field is deprecated**. Please use `calculatedPrice.totalDiscount` instead. The `calculatedPrice.totalDiscount` field provides the same value with updated functionality."},"totalPrice":{"type":"number","deprecated":true,"description":"The total price of items. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality."},"authorizedAmount":{"description":"The authorized amount. **This field is deprecated**. Please use `calculatedPrice.upliftValue` instead. The `calculatedPrice.upliftValue` field how much payment authorization should be increased for given item.","deprecated":true,"type":"number"},"product":{"$ref":"#/components/schemas/product"},"tax":{"allOf":[{"$ref":"#/components/schemas/tax"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.price` instead. The `calculatedPrice.price` field provides the same value with updated functionality."}],"deprecated":true},"price":{"$ref":"#/components/schemas/price"},"metadata":{"$ref":"#/components/schemas/mixinsMetadata"},"mixins":{"type":"object"},"calculatedPrice":{"allOf":[{"$ref":"#/components/schemas/orderEntryCalculatedPrice"},{"type":"object","description":"Detailed price calculation for a single line item with all pricing components. Can be skipped if deprecated `totalPrice` is provided for backward compatibility."}]},"priceMatchDetails":{"$ref":"#/components/schemas/priceMatchDetails"},"externalDiscounts":{"type":"array","description":"External discounts applied to this order entry.","items":{"$ref":"#/components/schemas/externalDiscount"}},"externalFees":{"type":"array","description":"External fees applied to this order entry.","items":{"$ref":"#/components/schemas/externalFee"}}},"required":["amount","calculatedUnitPrice","calculatedPrice"]},"YRN":{"type":"string","title":"YRN","description":"In YaaS, a global resource identifier is a Uniform Resource Name (URN) with a custom YaaS schema and is called a YaaS Resource Name, or YRN.\n\nIt is a unique identifier, which stores information about a resource, such as its type, ID or name of the tenant.","minLength":1},"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]},"measurementUnit":{"title":"Measurement Unit","description":"The entry measurement unit","type":"object","properties":{"unit":{"description":"Code of the unit, like `kg` or `l`.","type":"string"},"value":{"description":"Quantity of given unit.","type":"number"}},"required":["value"]},"product":{"title":"Product","description":"Product details.","type":"object","properties":{"id":{"description":"Unique identifier of a product.","type":"string"},"sku":{"description":"Product sku.","type":"string"},"code":{"description":"Unique code of a product.","type":"string"},"name":{"description":"Unique name of a product.","type":"string"},"localizedName":{"description":"A product's name represented as a map, with language as the key and the corresponding translated name as the value","type":"object","additionalProperties":{"type":"string"}},"description":{"description":"Product description.","type":"string"},"published":{"description":"Product published flag.","type":"boolean"},"productType":{"description":"Type of the product (BASIC, VARIANT, BUNDLE).","type":"string","enum":["BASIC","VARIANT","BUNDLE"]},"bundledProducts":{"description":"The collection of products assigned to the bundle.","type":"array","items":{"$ref":"#/components/schemas/bundleProduct"}},"images":{"description":"Product images.","type":"array","items":{"$ref":"#/components/schemas/media"}},"vendor":{"$ref":"#/components/schemas/vendor"},"mixins":{"description":"Product additional information.","type":"object","additionalProperties":true},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"The metadata of the product."}]}}},"bundleProduct":{"title":"Bundle Product","description":"Represents the product used in a bundle.","type":"object","properties":{"amount":{"description":"The number of given products assigned to the bundle.","type":"number"},"productId":{"description":"Id of the product assigned to the bundle.","type":"string"}}},"media":{"title":"Media","description":"The media.","type":"object","properties":{"id":{"description":"Unique identifier of a media file.","type":"string"},"url":{"description":"Media URL.","type":"string"},"stored":{"description":"Media stored flag.","type":"boolean","default":false}}},"mixinsMetadata":{"title":"Product Metadata","description":"Product Metadata","type":"object","additionalProperties":true,"properties":{"mixins":{"description":"A key-value map of mixins, where the mixin name is a key and schema url is a value","type":"object","additionalProperties":true},"version":{"description":"The document version number.","type":"integer"}}},"tax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"}},"required":["total"]},"taxLine":{"title":"taxLine","description":"Tax line details.","type":"object","properties":{"amount":{"description":"Tax line amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Tax code.","type":"string"},"name":{"description":"Tax name.","type":"string"},"rate":{"description":"Tax rate.","type":"number","default":0},"taxable":{"description":"Order's taxable amount.","type":"number"},"sequenceId":{"description":"Sequence ID.","type":"integer","default":0},"inclusive":{"description":"Inclusive flag.","type":"boolean","default":false}},"required":["amount","currency","sequenceId","inclusive"]},"taxTotal":{"title":"Tax total","description":"The tax total tax amount.","type":"object","properties":{"amount":{"description":"Total tax amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"inclusive":{"description":"Total tax inclusive flag.","default":false,"type":"boolean"}},"required":["amount","currency","inclusive"]},"price":{"title":"Price","description":"Price details.","type":"object","properties":{"priceId":{"description":"Id of the price related to order entry.","type":"string"},"priceListId":{"type":"string","description":"Identifier of price list. The field should be populated only in case when the returned prices belongs to any price list."},"effectiveAmount":{"description":"Effective amount is a calculated average item price after a discount.","type":"number"},"originalAmount":{"description":"Oryginal amount is a price set by the merchant.","type":"number"},"currency":{"description":"Currency of the entry price.","type":"string"},"salePrice":{"allOf":[{"$ref":"#/components/schemas/salePrice"},{"type":"object","description":"Attributes of the sale price."}]}}},"salePrice":{"title":"Sale Price","description":"The sale price.","type":"object","properties":{"discountAmount":{"description":"Amount of the discount for sale price promotion.","type":"number"},"discountRate":{"description":"Rate of the discount for sale price promotion.","type":"number"},"description":{"description":"The sale price description.","type":"string"}}},"orderEntryCalculatedPrice":{"type":"object","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The price is calculated by multiplying the unit price (taken from priceMatch) by the quantity."},{"properties":{"calculated":{"type":"string","description":"Indicates how the line item price was determined. - `INTERNAL` — Calculated by Emporix using unit price × quantity. - `EXTERNAL` — Provided externally with `lineTax`.","enum":["INTERNAL","EXTERNAL"]}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Maximum additional amount authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for an item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to uplift amount, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"fees":{"type":"array","description":"A list of fees applied to the line item. If there are no fees on the item line, it's not returned in the response.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedFee"},{"type":"object","properties":{"id":{"type":"string","description":"Fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"PERCENT for fee percentage of the item's line `price.netValue` - unit price x quantity. ABSOLUTE for the absolute amount assigned to the item line. ABSOLUTE_MULTIPLY_ITEMQUANTITY for the monetary amount multiplied by the item quantity and assigned to the item line."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"INTERNAL defined in commerce engine, EXTERNAL specified when an item is added to the order."},"name":{"type":"object","description":"Fee name."},"price":{"type":"object","description":"The calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"Monetary amount of the fee, depends on the fee type."},"grossValue":{"type":"number","format":"double","description":"Value calculated based on the `taxCode` and the `taxRate` if `taxable=true`."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the provided `taxCode` at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"Tax code defined on the fee level, for example STANDARD. The value should match the available tax codes in the system configuration."}}},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Refers to `fees[].price.taxRate`."},"taxCode":{"type":"string","description":"Refers to `fees[].price.taxCode`."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Monetary amount of the discount applied to the price for the given discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]}}}]}},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"Sum of all fees applied to the item. It's calculated by summarizing `fees[].discountedPrice` if any discounts were applied to the fee, or `fees[].price` for an pre-discounted fee. If there are no fees applied to the line item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, which results in the same `taxRate`, then the value is present. Otherwise, the field is not returned."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode`, then the value is present. Otherwise, the field is not returned."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Sum of all `fees[].discountedPrice.appliedDiscounts[].value` grouped by `discount.id`"},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The final price is the sum of the `discountedPrice` or the original price, depending on whether any discounts were applied to the line item, and the `totalFee`, which includes all fees applied to the line item. Since the total fee already includes the discounted prices of fees, the sum is calculated at the `totalFee` level.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."}}}]}},"required":["finalPrice"]},"calculatedPriceWithDiscounts":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","properties":{"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}}]},"calculatedAppliedDiscount":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the applied discount."},"value":{"type":"number","format":"double","description":"The calculated value of the discount."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Applied discount's price. When discount is applied before tax the value equals `price.netValue` and `price.grossValue` for discount applied after tax."}]},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"The discount type which shows how the discount was calculated."},"origin":{"type":"string","enum":["INTERNAL","EXTERNAL"],"description":"Indicates whether the discount is from internal coupon (INTERNAL) or external discount (EXTERNAL)."}}},"calculatedFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"origin of the fee, `INTERNAL` defined in commerce engine, `EXTERNAL` specified when item is added to the cart."},"price":{"$ref":"#/components/schemas/calculatedPrice"},"discountedPrice":{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"}}},"calculatedTotalDiscount":{"type":"object","description":"The total combined value of all applied discounts.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were calculated using net or gross price values."},"value":{"type":"number","format":"double","description":"The calculated amount of all discounts."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Total discounts price. When discounts are applied before tax the value equals `price.netValue` and `price.grossValue` for discounts applied after tax."}]},"appliedDiscounts":{"type":"array","description":"All applied discounts that are parts of the sum.","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}},"priceMatchDetails":{"title":"priceMatchDetails","type":"object","properties":{"netValue":{"type":"number","format":"double","description":"The net value of the matched price"},"grossValue":{"type":"number","format":"double","description":"The gross value of the matched price"},"taxValue":{"type":"number","format":"double","description":"The calculated tax value"},"taxCode":{"type":"string","description":"The applied tax code"},"taxRate":{"type":"number","format":"double","description":"The applied tax rate"},"taxCountry":{"type":"string","description":"The tax country for which the price was matched"}},"description":"This model represents the price value retrieved from the price service"},"externalDiscount":{"type":"object","description":"External discount that was applied to order items.","properties":{"id":{"type":"string","description":"Unique identifier of the external discount."},"discountType":{"$ref":"#/components/schemas/externalDiscountType"},"value":{"type":"number","format":"double","minimum":0,"maximum":100,"description":"Value of the discount (percentage e.g 15.00 -> 15% or absolute amount e.g 10.00 -> 10 EUR depending on the discountType). For discountType=`PERCENT`, maximum is 100.0; for ABSOLUTE, there is no limit."},"includeFees":{"type":"boolean","description":"Flag indicating whether the discount is also applied to fees."},"sequence":{"type":"integer","description":"Sequence number determining the order in which discounts are applied. The lowest sequence number is applied first."}},"required":["id","discountType","value"]},"externalDiscountType":{"type":"string","description":"Type of the external discount.","enum":["PERCENT","ABSOLUTE"]},"externalFee":{"type":"object","required":["feeType"],"properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"}],"description":"Fee name."},"feeType":{"type":"string","description":"Type of the fee.","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"]},"feePercentage":{"type":"number","description":"Value of the fee as percentage. It must be provided when feeType equals `PERCENT`."},"feeAbsolute":{"type":"object","description":"Value of the fee as absolute. It must be provided when feeType equals `ABSOLUTE` or `ABSOLUTE_MULTIPLY_ITEMQUANTITY`.","required":["currency","amount"],"properties":{"currency":{"type":"string","description":"Currency of the fee absolute."},"amount":{"type":"number","description":"Value of the fee absolute."}}},"taxable":{"type":"boolean","description":"It marks whether tax should be included to the fee or not. A taxable fee must have the `taxCode` attribute provided."},"taxCode":{"type":"string","description":"Tax code of the fee."}}},"discount":{"title":"Discount","properties":{"code":{"description":"Discount's code.","type":"string"},"amount":{"description":"Amount of discount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"name":{"description":"Discount's name.","type":"string"},"discountRate":{"description":"Discount's rate.","type":"number"},"calculationType":{"description":"Discount's code.calculation type.","type":"string"},"discountCalculationType":{"description":"Determines whether the coupon is applied to the total or subtotal value of the order.","type":"string","enum":["SUBTOTAL","TOTAL"]},"discountType":{"description":"Discount's type.","type":"string"},"sequenceId":{"description":"Discount's unique sequence ID identifier.","type":"integer"},"link":{"allOf":[{"$ref":"#/components/schemas/reference"},{"type":"object","description":"Link to discount."}]},"categoryRestricted":{"description":"This flag indicates if discount is category restricted.","type":"boolean"},"restrictions":{"allOf":[{"$ref":"#/components/schemas/discountRestrictions"},{"type":"object","description":"The restrictions based on which the discount can be applied."}]}},"required":["code","currency"]},"reference":{"title":"Link","properties":{"id":{"description":"Unique identifier of a link.","type":"string"},"type":{"description":"Link type.","type":"string"},"url":{"description":"URL of the link.","type":"string"}},"required":["id","type","url"]},"discountRestrictions":{"title":"Discount Restrictions","properties":{"validFrom":{"description":"The date from which the discount restriction is valid.","type":"string"},"validUntil":{"description":"The date from which the discount restriction is valid.","type":"string"},"minOrderValue":{"allOf":[{"$ref":"#/components/schemas/discountRestrictionsPrice"},{"type":"object","description":"The minimum order price for which the discount is valid."}]},"includedCategories":{"description":"List of included categories.","type":"array","items":{"type":"string"}},"excludedCategories":{"description":"List of excluded categories.","type":"array","items":{"type":"string"}}}},"discountRestrictionsPrice":{"title":"Discount Restrictions Price","properties":{"amount":{"description":"The amount of discount price","type":"number"},"currency":{"description":"The currency of the price","type":"string"}}},"customer":{"title":"Customer","description":"Customer data. \n\nOne of these properties needs to be provided:\n- `name` for business customers (B2B)\n- `firstName` and `lastName` for individual customers (B2C)\n","properties":{"id":{"description":"Customer's unique identifier.","type":"string","default":"ANONYMOUS"},"name":{"description":"Customer's name.","type":"string"},"title":{"description":"Customer's title.","type":"string"},"firstName":{"description":"Customer's first name.","type":"string"},"middleName":{"description":"Customer's middle name.","type":"string"},"lastName":{"description":"Customer's last name.","type":"string"},"company":{"description":"Company name.","type":"string"},"email":{"description":"Customer's email address.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"Metadata."}]},"mixins":{"description":"Customer additional information.","type":"object","additionalProperties":true}},"required":["email"]},"address":{"title":"Address","description":"Customer's address.","type":"object","properties":{"contactName":{"description":"Customer's name.","type":"string"},"companyName":{"description":"Company name.","type":"string"},"street":{"description":"Street name.","type":"string"},"streetNumber":{"description":"Street number.","type":"string"},"streetAppendix":{"description":"Street appendix.","type":"string"},"extraLine1":{"description":"Additional address information.","type":"string"},"extraLine2":{"description":"Additional address information.","type":"string"},"extraLine3":{"description":"Additional address information.","type":"string"},"extraLine4":{"description":"Additional address information.","type":"string"},"zipCode":{"description":"Customer's address - zip code.","type":"string"},"city":{"description":"City name.","type":"string"},"state":{"description":"State name.","type":"string"},"country":{"description":"Country name.","type":"string"},"contactPhone":{"description":"Customer's contact phone.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"Metadata."}]},"mixins":{"description":"Additional address information.","type":"object","additionalProperties":true}},"required":["contactName","street","city","zipCode","country"]},"payment":{"title":"Payment","description":"Payment details.","type":"object","properties":{"method":{"description":"Payment method.","type":"string"},"status":{"description":"Payment status.","allOf":[{"$ref":"#/components/schemas/paymentStatus"}]},"paymentResponse":{"description":"Payment response.","type":"string"},"paidAmount":{"description":"Paid amount.","type":"number"},"refundAmount":{"description":"Refund amount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"transactionId":{"description":"The ID of the payment transaction.","type":"string"},"redirectUrl":{"description":"Redirect url.","type":"string"},"authorizedAmount":{"description":"Authorized amount.","type":"number"},"provider":{"description":"Payment provider.","type":"string"}},"required":["method","paidAmount","currency"]},"paymentStatus":{"type":"string","enum":["PENDING","AUTHORIZATION_SUCCESS","AUTHORIZATION_FAILURE","CAPTURE_SUCCESS","CAPTURE_FAILURE","SUCCESS","FAILURE","CANCELLATION_SUCCESS","CANCELLATION_FAILURE","REFUND_SUCCESS","REFUND_FAILURE"],"default":"PENDING","description":"Status of the payment."},"shipping":{"description":"Shipping details.","title":"Shipping","type":"object","properties":{"total":{"description":"Total shipping amount.","type":"object","properties":{"amount":{"type":"number","description":"Shipping amount.","default":0},"currency":{"type":"string","description":"Currency of the shipping amount."}}},"lines":{"description":"Shipping line list.","type":"array","items":{"$ref":"#/components/schemas/shippingLine"}}},"required":["total"]},"shippingLine":{"title":"Shipping line","description":"Shipping line.","type":"object","properties":{"amount":{"type":"number","description":"Shipping line amount.","default":0},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Shipping line code.","type":"string"},"name":{"description":"Shipping line name.","type":"string"},"localizedName":{"description":"Shipping line name in a form of a map of translations.","type":"object","additionalProperties":{"type":"string"}},"discounts":{"description":"Shipping line discount.","type":"array","items":{"$ref":"#/components/schemas/discount"}},"tax":{"$ref":"#/components/schemas/shippingTax"},"link":{"$ref":"#/components/schemas/reference"},"shippingTaxCode":{"type":"string"}},"required":["code"]},"shippingTax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"},"rate":{"description":"The rate of the shipping tax","type":"number"}},"required":["total"]},"deliveryWindow":{"title":"Delivery Window","type":"object","properties":{"id":{"type":"string","description":"Id of the delivery window"},"deliveryDate":{"type":"string","format":"date","description":"Delivery date."},"slotId":{"type":"string","description":"ID of the delivery slot"},"deliveryTimeRange":{"$ref":"#/components/schemas/deliveryTimeRange"},"deliveryCycle":{"type":"string","description":"Delivery cycle to which the order is assigned (containing date)"},"deliveryCycleName":{"type":"string","description":"Delivery cycle name to which the order is assigned"}}},"deliveryTimeRange":{"title":"Delivery Time Range","type":"object","properties":{"timeFrom":{"type":"string","format":"time","description":"Start Time"},"timeTo":{"type":"string","format":"time","description":"End Time"}}},"metadataMixins":{"title":"Metadata DTO","type":"object","additionalProperties":true,"properties":{"mixins":{"type":"object","additionalProperties":true},"version":{"type":"integer"}}},"orderCalculatedPrice":{"type":"object","description":"A breakdown of the total price calculated from all line items, including detailed pricing components.","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all line item price values, it means unit prices multiplied by quantity - `entries[].calculatedPrice.price`.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all line item uplift values. Uplift value is the maximum additional amount to be authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for any item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the uplift amount, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The sum of all line item prices after discounts are calculated. It's included in the response if at least one line item has a discounted price. It's the total amount of discounted prices for items with applied discounts and the original prices for items without discounts. It reflects the total cost of all line items after discounts.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"paymentFees":{"type":"array","description":"The list of payment fees applied to an order. Payment fees are not changed and are not discounted, even when a discount or coupon is applied to the total.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedPaymentFee"},{"type":"object","properties":{"id":{"type":"string","description":"Payment fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the payment fee. PERCENT for the fee’s `feePercentage`` multiplied by sum of line items `finalPrice` plus shipping cost. ABSOLUTE - monetary amount that is assigned to the payment method."},"price":{"description":"Calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"The monetary amount of the fee, depending on the fee type. ABSOLUTE for the value of defined fee’s `feeAbsolute.amount` attribute. The amount is treated as `netValue`. PERCENT, when defined on fee level percentage, `feePercentage` attribute, of sum of all item line’s `finalPrice.netValue` plus cart’s `calculatedPrice.totalShipping.netValue`. If the fee is taxable and has a tax code, the gross value is calculated. Otherwise, `grossValue` is equal to `netValue`."},"grossValue":{"type":"number","format":"double","description":"For a fee where `taxable=true` and a valid `taxCode` is provided, the tax rate associated with that tax code is used to calculate `grossValue`. If the fee is not taxable, `netValue` is equal to `grossValue`."},"taxValue":{"type":"number","format":"double","description":"Tax value of the payment fee, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the `taxCode` provided at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"The tax code defined at the fee level, for example STANDARD. The value must correspond to the available tax codes in the system configuration."}}}}}]}},"fees":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all fees applied on the line items plus the payment fee *before discounts*."}]},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The sum of all fees applied on the line items plus the payment fee. It's calculated by summing `entries[].calculatedPrice.totalFee` with `paymentFee`. **The `totalFee` is the value *after all the discounts*, if any discounts were applied.**","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the total fee, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the total fee, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the total fee, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, resulting in the same `taxRate`, the value is present. Otherwise, the field is not returned in the response."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode` defined, the value is present. Otherwise, the field is not returned in the response."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to on the line item fees. The payment fee itself is not discountable.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalFee[].appliedDiscounts[].value` grouped by `discount.id`."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the fee."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"shipping":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The total shipping cost is calculated by summing `items[].calculatedPrice.price.grossValue` for shipping estimation. `GrossValue` is used because, even for zero-tax items, it remains equal to `netValue`. The `shipping` is the value *before discounts*, use totalShipping to get the value after discounts."}]},"totalShipping":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total shipping cost is calculated by summing `entries[].calculatedPrice.price.grossValue` for shipping estimation. `GrossValue` is used because, even for zero-tax items, it remains equal to `netValue`. **The `totalShipping` is the value *after all the discounts(, if any discounts were applied.**","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxCode":{"type":"string","description":"Tax code applied to the shipping cost, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the shipping cost, it's the percentage at which an individual or business is taxed."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to shipping.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithTaxAggregate"},{"type":"object","description":"The final price is the sum of `entries[].finalPrice`, `totalShipping`, and `paymentFee`, without the uplift value.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."},"taxAggregate":{"properties":{"lines":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A list of tax values grouped by `taxCode` and `taxRate`. It includes the sum of `item[].calculatedPrice.discountedPrice` or `item[].calculatedPrice.price`, `item[].calculatedPrice.fees[].discountedPrice` or `item[].calculatedPrice.fees[].price`, `calculatedPrice.totalShipping` and `calculatedPrice.paymentFees`. If any of these values have the same `taxRate` but different `taxCode`, they are listed separately. The aggregation also includes items that do not have a `taxRate` or `taxCode` defined.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the tax, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the tax, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the tax, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the tax, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the tax, it's the percentage at which an individual or business is taxed."}}}]}}}}}]}}},"calculatedPaymentFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"price":{"$ref":"#/components/schemas/calculatedPrice"}},"title":"calculatedPaymentFee"},"calculatedPriceWithTaxAggregate":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A price calculation model that includes tax aggregate information.","properties":{"taxAggregate":{"$ref":"#/components/schemas/calculatedTaxAggregate"}}}]},"calculatedTaxAggregate":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/calculatedPrice"},"description":"List of tax calculations grouped by taxCode and taxRate"}},"description":"Aggregated tax information showing detailed tax calculations"}}}}
```

## The salesOrder object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"salesOrder":{"allOf":[{"type":"object","properties":{"id":{"description":"Order's unique identifier.","type":"string"},"quoteId":{"description":"Identifier of the quote from which the order has been created","type":"string"},"createdBy":{"description":"Order's creator name.","type":"string"},"assistedBuying":{"$ref":"#/components/schemas/assistedBuying"},"checkout":{"type":"boolean","description":"Indicates whether this order was created through checkout. Available in tenant-managed responses only.\n\nWhen set to `true`, only one order can be created per cart ID — enforcing that a checkout cart results in a single order.\nOrders created through the checkout flow have this flag set to `true` by default.\n"}}},{"$ref":"#/components/schemas/orderUpdateDto"}]},"assistedBuying":{"title":"assistedBuying","type":"object","properties":{"entries":{"type":"array","description":"List of operations done by an employee on behalf of a customer.","items":{"$ref":"#/components/schemas/assistedBuyingEntry"}}},"description":"The field is populated only if an assisted buying operation was performed. The field is read-only. There is no possibility to update it by PUT/PATCH operation."},"assistedBuyingEntry":{"title":"AssistedBuyingEntry","type":"object","properties":{"employeeId":{"type":"string","description":"Identifier of an employee who performed an action on behalf of a customer."},"operation":{"type":"string","description":"'Indicates an operation type done by an employee on behalf of a customer. Available options: `CREATE` and `UPDATE_STATUS`'","enum":["CREATE","UPDATE_STATUS"]},"timestamp":{"type":"string","description":"Indicates a timestamp when an operation was performed."}}},"orderUpdateDto":{"title":"Order Update DTO","type":"object","allOf":[{"type":"object","properties":{"channel":{"$ref":"#/components/schemas/channel"},"created":{"description":"Order's creation date.","type":"string"},"completed":{"description":"Order's completion date.","type":"string"},"lastStatusChange":{"description":"Order last status change date.","type":"string"},"shipments":{"description":"Shipment list.","type":"array","items":{"$ref":"#/components/schemas/shipment"}}}},{"$ref":"#/components/schemas/orderCommonDto"}]},"channel":{"title":"Channel","type":"object","properties":{"name":{"type":"string"},"source":{"type":"string"}}},"shipment":{"title":"Shipment","description":"Shippment details.","type":"object","properties":{"shippedDate":{"description":"Shipped date.","type":"string"},"carrier":{"description":"Carrier.","type":"string"},"trackingNumber":{"description":"Tracking number.","type":"string"},"expectDeliveryOn":{"description":"Expected delivery date.","type":"string"}},"required":["shippedDate","carrier"]},"orderCommonDto":{"title":"Order Common DTO","description":"The base order fields. This object is inherited by all of other order objects as Order Creation DTO, Order Update DTO etc.","type":"object","properties":{"restriction":{"$ref":"#/components/schemas/restriction"},"feeYrnAggregate":{"allOf":[{"$ref":"#/components/schemas/aggregateFee"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.totalFees` and `entries[].calculatedPrice.fees` instead. These fields provide the same values with updated functionality."}],"deprecated":true},"status":{"$ref":"#/components/schemas/orderStatus"},"cartId":{"type":"string","description":"The identifier of a cart that was used to create this order."},"vendor":{"$ref":"#/components/schemas/vendor"},"orderType":{"$ref":"#/components/schemas/splitOrderType"},"masterOrder":{"type":"string","description":"The identifier of a master order. Available on suborders that have been created after splitting the master order."},"splitInfo":{"$ref":"#/components/schemas/splitInfo"},"subOrders":{"type":"array","description":"A list of string IDs for suborders created after a split. Available only on the master order from which the split originated."},"entries":{"description":"Ordered item list.","type":"array","minItems":1,"items":{"$ref":"#/components/schemas/orderEntry"}},"discounts":{"description":"Discount list.","type":"array","items":{"$ref":"#/components/schemas/discount"}},"customer":{"$ref":"#/components/schemas/customer"},"siteCode":{"description":"Site's unique identifier. A site is a specific shop.","type":"string"},"countryCode":{"description":"Two-letter country code, compliant with the ISO 3166 standard.","type":"string"},"billingAddress":{"$ref":"#/components/schemas/address"},"shippingAddress":{"$ref":"#/components/schemas/address"},"payments":{"description":"Payment list.","type":"array","items":{"$ref":"#/components/schemas/payment"}},"shipping":{"allOf":[{"$ref":"#/components/schemas/shipping"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.totalShipping` instead. The `unitPrice` field provides the same value with updated functionality."}],"deprecated":true},"tax":{"allOf":[{"$ref":"#/components/schemas/tax"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.finalPrice.taxAggregate` instead. The `calculatedPrice.finalPrice.taxAggregate` field provides the same value with updated functionality."}],"deprecated":true},"subTotalPrice":{"type":"number","deprecated":true,"description":"Order sub total price. **This field is deprecated**. Please use `calculatedPrice.price` or `calculatedPrice.discountedPrice` instead. These fields provide the same value with updated functionality."},"totalPrice":{"type":"number","deprecated":true,"description":"Order total price. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality."},"totalAuthorizedAmount":{"type":"number","description":"The amount that should be authorized with payment provider. It's a sum of `calculatedPrice.finalPrice.grossValue` and `calculatedPrice.upliftValue.grossValue`."},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"orderCycle":{"description":"Order cycle date.\n\n***NOTE***\nThis attribute is DEPRECATED, please use the `deliveryWindow.deliveryCycle` attribute","deprecated":true,"type":"string"},"deliveryWindowId":{"description":"Delivery window's unique identifier.\n\n***NOTE***\nThis attribute is DEPRECATED, please use the `deliveryWindow.id` attribute","type":"string","deprecated":true},"deliveryWindow":{"$ref":"#/components/schemas/deliveryWindow"},"metadata":{"$ref":"#/components/schemas/metadataMixins"},"mixins":{"type":"object"},"calculatedPrice":{"allOf":[{"$ref":"#/components/schemas/orderCalculatedPrice"},{"type":"object","description":"A breakdown of the total price calculated from all line items, including detailed pricing components. Can be skipped if deprecated`totalPrice` is provided to preserve backward compatibility"}]},"legalEntityId":{"type":"string","description":"The identifier of the legal entity on whose behalf the order was placed."}},"required":["entries","customer","calculatedPrice"]},"restriction":{"type":"string","nullable":true,"description":"Access control identifier that determines who can view or manage the order.\n\n**Purpose**: Restricts order visibility based on scope permissions. Only users/applications \nwith matching restriction scopes can access orders with a specific restriction value.\n\n**Access Control**:\n- *Reading*: Users can only query and view orders with the `restriction` value that matches one of their authorized restrictions.\n\n**Validation**: The value must exist in the tenant's configured list of valid restrictions.\n\n**Site Synchronization**: If the `restriction` property is not set with tenant configuration property `enableSyncBetweenRestrictionsAndSiteCodes` set to `true`, the `restriction` field automatically syncs with `siteCode` property.\n"},"aggregateFee":{"type":"object","title":"Aggregate Fee","properties":{"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"elements":{"type":"array","items":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"},{"type":"object","description":"Fee name."}]},"yrn":{"type":"string","description":"Unique identifier of the fee."},"taxCode":{"type":"string","description":"Tax code of the fee."},"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"taxValues":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the tax."},"value":{"type":"number","description":"Value of the tax."},"rate":{"type":"number","description":"Rate of the tax."}}}}}}}},"required":["total"]},"localizedValue":{"description":"Localized value which can have different structure which depends on provided `Content-Language` header.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}]},"orderStatus":{"type":"string","enum":["IN_CHECKOUT","CREATED","CONFIRMED","DECLINED","SHIPPED","COMPLETED"],"description":"Status of the order. Supported order statuses are `IN_CHECKOUT`, `CREATED`, `CONFIRMED`, `DECLINED`, `SHIPPED`, `COMPLETED`'. Customers can only change the order status from `CREATED` to `DECLINED`."},"vendor":{"type":"object","properties":{"id":{"type":"string","description":"An identifier of a vendor"},"name":{"type":"string","description":"vendor name"}},"required":["id"]},"splitOrderType":{"type":"string","enum":["MASTER_ORDER","SUB_ORDER"],"description":"Available on orders that have been split. For standard orders, the value is `null`. For the original order that was split, the value is `MASTER_ORDER`s, and for the created suborders, the value is `SUB_ORDER`."},"splitInfo":{"type":"object","properties":{"splitBy":{"$ref":"#/components/schemas/splitBy"},"uniqueValue":{"type":"string","description":"A unique value used to split the entries of a master order into separate suborders. Available only on suborders that had uniqueValue for the split. Not available on master order."}},"description":"Information about how the order was split from the master order."},"splitBy":{"type":"string","enum":["VENDOR_ID"],"description":"Specifies the criteria used to split a master order into suborders. Currently, only `VENDOR_ID` is supported."},"orderEntry":{"title":"Order entry","description":"The ordered item.","type":"object","properties":{"id":{"description":"The ordered item ID.","type":"string"},"itemYrn":{"$ref":"#/components/schemas/YRN"},"fees":{"allOf":[{"$ref":"#/components/schemas/aggregateFee"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.fees` instead. The `calculatedPrice.fees` field provides the same value with updated functionality."}],"deprecated":true},"amount":{"description":"The amount of items.","type":"integer"},"orderedAmount":{"description":"The ordered amount of items.","type":"integer"},"packedAmountInPc":{"description":"The packed amount of items.","type":"integer"},"effectiveQuantity":{"description":"Effective quantity is q calculated average quantity customer is paying for.","type":"number","format":"double"},"originalAmount":{"description":"The original amount. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.","type":"number","deprecated":true},"originalPrice":{"description":"The original price. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.","type":"number","deprecated":true},"unitPrice":{"type":"number","deprecated":true,"description":"**This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality."},"calculatedUnitPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Product's unit price with tax values, can be skipped if deprecated `unitPrice` is provided for backward compatibility."}]},"measurementUnit":{"$ref":"#/components/schemas/measurementUnit"},"link":{"description":"Link to product.","type":"string"},"discounts":{"deprecated":true,"description":"The discount list. **This field is deprecated**. Please use `calculatedPrice.totalDiscount` instead. The `calculatedPrice.totalDiscount` field provides the same value with updated functionality."},"totalPrice":{"type":"number","deprecated":true,"description":"The total price of items. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality."},"authorizedAmount":{"description":"The authorized amount. **This field is deprecated**. Please use `calculatedPrice.upliftValue` instead. The `calculatedPrice.upliftValue` field how much payment authorization should be increased for given item.","deprecated":true,"type":"number"},"product":{"$ref":"#/components/schemas/product"},"tax":{"allOf":[{"$ref":"#/components/schemas/tax"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.price` instead. The `calculatedPrice.price` field provides the same value with updated functionality."}],"deprecated":true},"price":{"$ref":"#/components/schemas/price"},"metadata":{"$ref":"#/components/schemas/mixinsMetadata"},"mixins":{"type":"object"},"calculatedPrice":{"allOf":[{"$ref":"#/components/schemas/orderEntryCalculatedPrice"},{"type":"object","description":"Detailed price calculation for a single line item with all pricing components. Can be skipped if deprecated `totalPrice` is provided for backward compatibility."}]},"priceMatchDetails":{"$ref":"#/components/schemas/priceMatchDetails"},"externalDiscounts":{"type":"array","description":"External discounts applied to this order entry.","items":{"$ref":"#/components/schemas/externalDiscount"}},"externalFees":{"type":"array","description":"External fees applied to this order entry.","items":{"$ref":"#/components/schemas/externalFee"}}},"required":["amount","calculatedUnitPrice","calculatedPrice"]},"YRN":{"type":"string","title":"YRN","description":"In YaaS, a global resource identifier is a Uniform Resource Name (URN) with a custom YaaS schema and is called a YaaS Resource Name, or YRN.\n\nIt is a unique identifier, which stores information about a resource, such as its type, ID or name of the tenant.","minLength":1},"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]},"measurementUnit":{"title":"Measurement Unit","description":"The entry measurement unit","type":"object","properties":{"unit":{"description":"Code of the unit, like `kg` or `l`.","type":"string"},"value":{"description":"Quantity of given unit.","type":"number"}},"required":["value"]},"product":{"title":"Product","description":"Product details.","type":"object","properties":{"id":{"description":"Unique identifier of a product.","type":"string"},"sku":{"description":"Product sku.","type":"string"},"code":{"description":"Unique code of a product.","type":"string"},"name":{"description":"Unique name of a product.","type":"string"},"localizedName":{"description":"A product's name represented as a map, with language as the key and the corresponding translated name as the value","type":"object","additionalProperties":{"type":"string"}},"description":{"description":"Product description.","type":"string"},"published":{"description":"Product published flag.","type":"boolean"},"productType":{"description":"Type of the product (BASIC, VARIANT, BUNDLE).","type":"string","enum":["BASIC","VARIANT","BUNDLE"]},"bundledProducts":{"description":"The collection of products assigned to the bundle.","type":"array","items":{"$ref":"#/components/schemas/bundleProduct"}},"images":{"description":"Product images.","type":"array","items":{"$ref":"#/components/schemas/media"}},"vendor":{"$ref":"#/components/schemas/vendor"},"mixins":{"description":"Product additional information.","type":"object","additionalProperties":true},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"The metadata of the product."}]}}},"bundleProduct":{"title":"Bundle Product","description":"Represents the product used in a bundle.","type":"object","properties":{"amount":{"description":"The number of given products assigned to the bundle.","type":"number"},"productId":{"description":"Id of the product assigned to the bundle.","type":"string"}}},"media":{"title":"Media","description":"The media.","type":"object","properties":{"id":{"description":"Unique identifier of a media file.","type":"string"},"url":{"description":"Media URL.","type":"string"},"stored":{"description":"Media stored flag.","type":"boolean","default":false}}},"mixinsMetadata":{"title":"Product Metadata","description":"Product Metadata","type":"object","additionalProperties":true,"properties":{"mixins":{"description":"A key-value map of mixins, where the mixin name is a key and schema url is a value","type":"object","additionalProperties":true},"version":{"description":"The document version number.","type":"integer"}}},"tax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"}},"required":["total"]},"taxLine":{"title":"taxLine","description":"Tax line details.","type":"object","properties":{"amount":{"description":"Tax line amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Tax code.","type":"string"},"name":{"description":"Tax name.","type":"string"},"rate":{"description":"Tax rate.","type":"number","default":0},"taxable":{"description":"Order's taxable amount.","type":"number"},"sequenceId":{"description":"Sequence ID.","type":"integer","default":0},"inclusive":{"description":"Inclusive flag.","type":"boolean","default":false}},"required":["amount","currency","sequenceId","inclusive"]},"taxTotal":{"title":"Tax total","description":"The tax total tax amount.","type":"object","properties":{"amount":{"description":"Total tax amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"inclusive":{"description":"Total tax inclusive flag.","default":false,"type":"boolean"}},"required":["amount","currency","inclusive"]},"price":{"title":"Price","description":"Price details.","type":"object","properties":{"priceId":{"description":"Id of the price related to order entry.","type":"string"},"priceListId":{"type":"string","description":"Identifier of price list. The field should be populated only in case when the returned prices belongs to any price list."},"effectiveAmount":{"description":"Effective amount is a calculated average item price after a discount.","type":"number"},"originalAmount":{"description":"Oryginal amount is a price set by the merchant.","type":"number"},"currency":{"description":"Currency of the entry price.","type":"string"},"salePrice":{"allOf":[{"$ref":"#/components/schemas/salePrice"},{"type":"object","description":"Attributes of the sale price."}]}}},"salePrice":{"title":"Sale Price","description":"The sale price.","type":"object","properties":{"discountAmount":{"description":"Amount of the discount for sale price promotion.","type":"number"},"discountRate":{"description":"Rate of the discount for sale price promotion.","type":"number"},"description":{"description":"The sale price description.","type":"string"}}},"orderEntryCalculatedPrice":{"type":"object","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The price is calculated by multiplying the unit price (taken from priceMatch) by the quantity."},{"properties":{"calculated":{"type":"string","description":"Indicates how the line item price was determined. - `INTERNAL` — Calculated by Emporix using unit price × quantity. - `EXTERNAL` — Provided externally with `lineTax`.","enum":["INTERNAL","EXTERNAL"]}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Maximum additional amount authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for an item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to uplift amount, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"fees":{"type":"array","description":"A list of fees applied to the line item. If there are no fees on the item line, it's not returned in the response.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedFee"},{"type":"object","properties":{"id":{"type":"string","description":"Fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"PERCENT for fee percentage of the item's line `price.netValue` - unit price x quantity. ABSOLUTE for the absolute amount assigned to the item line. ABSOLUTE_MULTIPLY_ITEMQUANTITY for the monetary amount multiplied by the item quantity and assigned to the item line."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"INTERNAL defined in commerce engine, EXTERNAL specified when an item is added to the order."},"name":{"type":"object","description":"Fee name."},"price":{"type":"object","description":"The calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"Monetary amount of the fee, depends on the fee type."},"grossValue":{"type":"number","format":"double","description":"Value calculated based on the `taxCode` and the `taxRate` if `taxable=true`."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the provided `taxCode` at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"Tax code defined on the fee level, for example STANDARD. The value should match the available tax codes in the system configuration."}}},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Refers to `fees[].price.taxRate`."},"taxCode":{"type":"string","description":"Refers to `fees[].price.taxCode`."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Monetary amount of the discount applied to the price for the given discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]}}}]}},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"Sum of all fees applied to the item. It's calculated by summarizing `fees[].discountedPrice` if any discounts were applied to the fee, or `fees[].price` for an pre-discounted fee. If there are no fees applied to the line item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, which results in the same `taxRate`, then the value is present. Otherwise, the field is not returned."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode`, then the value is present. Otherwise, the field is not returned."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Sum of all `fees[].discountedPrice.appliedDiscounts[].value` grouped by `discount.id`"},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The final price is the sum of the `discountedPrice` or the original price, depending on whether any discounts were applied to the line item, and the `totalFee`, which includes all fees applied to the line item. Since the total fee already includes the discounted prices of fees, the sum is calculated at the `totalFee` level.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."}}}]}},"required":["finalPrice"]},"calculatedPriceWithDiscounts":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","properties":{"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}}]},"calculatedAppliedDiscount":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the applied discount."},"value":{"type":"number","format":"double","description":"The calculated value of the discount."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Applied discount's price. When discount is applied before tax the value equals `price.netValue` and `price.grossValue` for discount applied after tax."}]},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"The discount type which shows how the discount was calculated."},"origin":{"type":"string","enum":["INTERNAL","EXTERNAL"],"description":"Indicates whether the discount is from internal coupon (INTERNAL) or external discount (EXTERNAL)."}}},"calculatedFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"origin of the fee, `INTERNAL` defined in commerce engine, `EXTERNAL` specified when item is added to the cart."},"price":{"$ref":"#/components/schemas/calculatedPrice"},"discountedPrice":{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"}}},"calculatedTotalDiscount":{"type":"object","description":"The total combined value of all applied discounts.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were calculated using net or gross price values."},"value":{"type":"number","format":"double","description":"The calculated amount of all discounts."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Total discounts price. When discounts are applied before tax the value equals `price.netValue` and `price.grossValue` for discounts applied after tax."}]},"appliedDiscounts":{"type":"array","description":"All applied discounts that are parts of the sum.","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}},"priceMatchDetails":{"title":"priceMatchDetails","type":"object","properties":{"netValue":{"type":"number","format":"double","description":"The net value of the matched price"},"grossValue":{"type":"number","format":"double","description":"The gross value of the matched price"},"taxValue":{"type":"number","format":"double","description":"The calculated tax value"},"taxCode":{"type":"string","description":"The applied tax code"},"taxRate":{"type":"number","format":"double","description":"The applied tax rate"},"taxCountry":{"type":"string","description":"The tax country for which the price was matched"}},"description":"This model represents the price value retrieved from the price service"},"externalDiscount":{"type":"object","description":"External discount that was applied to order items.","properties":{"id":{"type":"string","description":"Unique identifier of the external discount."},"discountType":{"$ref":"#/components/schemas/externalDiscountType"},"value":{"type":"number","format":"double","minimum":0,"maximum":100,"description":"Value of the discount (percentage e.g 15.00 -> 15% or absolute amount e.g 10.00 -> 10 EUR depending on the discountType). For discountType=`PERCENT`, maximum is 100.0; for ABSOLUTE, there is no limit."},"includeFees":{"type":"boolean","description":"Flag indicating whether the discount is also applied to fees."},"sequence":{"type":"integer","description":"Sequence number determining the order in which discounts are applied. The lowest sequence number is applied first."}},"required":["id","discountType","value"]},"externalDiscountType":{"type":"string","description":"Type of the external discount.","enum":["PERCENT","ABSOLUTE"]},"externalFee":{"type":"object","required":["feeType"],"properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"}],"description":"Fee name."},"feeType":{"type":"string","description":"Type of the fee.","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"]},"feePercentage":{"type":"number","description":"Value of the fee as percentage. It must be provided when feeType equals `PERCENT`."},"feeAbsolute":{"type":"object","description":"Value of the fee as absolute. It must be provided when feeType equals `ABSOLUTE` or `ABSOLUTE_MULTIPLY_ITEMQUANTITY`.","required":["currency","amount"],"properties":{"currency":{"type":"string","description":"Currency of the fee absolute."},"amount":{"type":"number","description":"Value of the fee absolute."}}},"taxable":{"type":"boolean","description":"It marks whether tax should be included to the fee or not. A taxable fee must have the `taxCode` attribute provided."},"taxCode":{"type":"string","description":"Tax code of the fee."}}},"discount":{"title":"Discount","properties":{"code":{"description":"Discount's code.","type":"string"},"amount":{"description":"Amount of discount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"name":{"description":"Discount's name.","type":"string"},"discountRate":{"description":"Discount's rate.","type":"number"},"calculationType":{"description":"Discount's code.calculation type.","type":"string"},"discountCalculationType":{"description":"Determines whether the coupon is applied to the total or subtotal value of the order.","type":"string","enum":["SUBTOTAL","TOTAL"]},"discountType":{"description":"Discount's type.","type":"string"},"sequenceId":{"description":"Discount's unique sequence ID identifier.","type":"integer"},"link":{"allOf":[{"$ref":"#/components/schemas/reference"},{"type":"object","description":"Link to discount."}]},"categoryRestricted":{"description":"This flag indicates if discount is category restricted.","type":"boolean"},"restrictions":{"allOf":[{"$ref":"#/components/schemas/discountRestrictions"},{"type":"object","description":"The restrictions based on which the discount can be applied."}]}},"required":["code","currency"]},"reference":{"title":"Link","properties":{"id":{"description":"Unique identifier of a link.","type":"string"},"type":{"description":"Link type.","type":"string"},"url":{"description":"URL of the link.","type":"string"}},"required":["id","type","url"]},"discountRestrictions":{"title":"Discount Restrictions","properties":{"validFrom":{"description":"The date from which the discount restriction is valid.","type":"string"},"validUntil":{"description":"The date from which the discount restriction is valid.","type":"string"},"minOrderValue":{"allOf":[{"$ref":"#/components/schemas/discountRestrictionsPrice"},{"type":"object","description":"The minimum order price for which the discount is valid."}]},"includedCategories":{"description":"List of included categories.","type":"array","items":{"type":"string"}},"excludedCategories":{"description":"List of excluded categories.","type":"array","items":{"type":"string"}}}},"discountRestrictionsPrice":{"title":"Discount Restrictions Price","properties":{"amount":{"description":"The amount of discount price","type":"number"},"currency":{"description":"The currency of the price","type":"string"}}},"customer":{"title":"Customer","description":"Customer data. \n\nOne of these properties needs to be provided:\n- `name` for business customers (B2B)\n- `firstName` and `lastName` for individual customers (B2C)\n","properties":{"id":{"description":"Customer's unique identifier.","type":"string","default":"ANONYMOUS"},"name":{"description":"Customer's name.","type":"string"},"title":{"description":"Customer's title.","type":"string"},"firstName":{"description":"Customer's first name.","type":"string"},"middleName":{"description":"Customer's middle name.","type":"string"},"lastName":{"description":"Customer's last name.","type":"string"},"company":{"description":"Company name.","type":"string"},"email":{"description":"Customer's email address.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"Metadata."}]},"mixins":{"description":"Customer additional information.","type":"object","additionalProperties":true}},"required":["email"]},"address":{"title":"Address","description":"Customer's address.","type":"object","properties":{"contactName":{"description":"Customer's name.","type":"string"},"companyName":{"description":"Company name.","type":"string"},"street":{"description":"Street name.","type":"string"},"streetNumber":{"description":"Street number.","type":"string"},"streetAppendix":{"description":"Street appendix.","type":"string"},"extraLine1":{"description":"Additional address information.","type":"string"},"extraLine2":{"description":"Additional address information.","type":"string"},"extraLine3":{"description":"Additional address information.","type":"string"},"extraLine4":{"description":"Additional address information.","type":"string"},"zipCode":{"description":"Customer's address - zip code.","type":"string"},"city":{"description":"City name.","type":"string"},"state":{"description":"State name.","type":"string"},"country":{"description":"Country name.","type":"string"},"contactPhone":{"description":"Customer's contact phone.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"Metadata."}]},"mixins":{"description":"Additional address information.","type":"object","additionalProperties":true}},"required":["contactName","street","city","zipCode","country"]},"payment":{"title":"Payment","description":"Payment details.","type":"object","properties":{"method":{"description":"Payment method.","type":"string"},"status":{"description":"Payment status.","allOf":[{"$ref":"#/components/schemas/paymentStatus"}]},"paymentResponse":{"description":"Payment response.","type":"string"},"paidAmount":{"description":"Paid amount.","type":"number"},"refundAmount":{"description":"Refund amount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"transactionId":{"description":"The ID of the payment transaction.","type":"string"},"redirectUrl":{"description":"Redirect url.","type":"string"},"authorizedAmount":{"description":"Authorized amount.","type":"number"},"provider":{"description":"Payment provider.","type":"string"}},"required":["method","paidAmount","currency"]},"paymentStatus":{"type":"string","enum":["PENDING","AUTHORIZATION_SUCCESS","AUTHORIZATION_FAILURE","CAPTURE_SUCCESS","CAPTURE_FAILURE","SUCCESS","FAILURE","CANCELLATION_SUCCESS","CANCELLATION_FAILURE","REFUND_SUCCESS","REFUND_FAILURE"],"default":"PENDING","description":"Status of the payment."},"shipping":{"description":"Shipping details.","title":"Shipping","type":"object","properties":{"total":{"description":"Total shipping amount.","type":"object","properties":{"amount":{"type":"number","description":"Shipping amount.","default":0},"currency":{"type":"string","description":"Currency of the shipping amount."}}},"lines":{"description":"Shipping line list.","type":"array","items":{"$ref":"#/components/schemas/shippingLine"}}},"required":["total"]},"shippingLine":{"title":"Shipping line","description":"Shipping line.","type":"object","properties":{"amount":{"type":"number","description":"Shipping line amount.","default":0},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Shipping line code.","type":"string"},"name":{"description":"Shipping line name.","type":"string"},"localizedName":{"description":"Shipping line name in a form of a map of translations.","type":"object","additionalProperties":{"type":"string"}},"discounts":{"description":"Shipping line discount.","type":"array","items":{"$ref":"#/components/schemas/discount"}},"tax":{"$ref":"#/components/schemas/shippingTax"},"link":{"$ref":"#/components/schemas/reference"},"shippingTaxCode":{"type":"string"}},"required":["code"]},"shippingTax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"},"rate":{"description":"The rate of the shipping tax","type":"number"}},"required":["total"]},"deliveryWindow":{"title":"Delivery Window","type":"object","properties":{"id":{"type":"string","description":"Id of the delivery window"},"deliveryDate":{"type":"string","format":"date","description":"Delivery date."},"slotId":{"type":"string","description":"ID of the delivery slot"},"deliveryTimeRange":{"$ref":"#/components/schemas/deliveryTimeRange"},"deliveryCycle":{"type":"string","description":"Delivery cycle to which the order is assigned (containing date)"},"deliveryCycleName":{"type":"string","description":"Delivery cycle name to which the order is assigned"}}},"deliveryTimeRange":{"title":"Delivery Time Range","type":"object","properties":{"timeFrom":{"type":"string","format":"time","description":"Start Time"},"timeTo":{"type":"string","format":"time","description":"End Time"}}},"metadataMixins":{"title":"Metadata DTO","type":"object","additionalProperties":true,"properties":{"mixins":{"type":"object","additionalProperties":true},"version":{"type":"integer"}}},"orderCalculatedPrice":{"type":"object","description":"A breakdown of the total price calculated from all line items, including detailed pricing components.","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all line item price values, it means unit prices multiplied by quantity - `entries[].calculatedPrice.price`.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all line item uplift values. Uplift value is the maximum additional amount to be authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for any item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the uplift amount, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The sum of all line item prices after discounts are calculated. It's included in the response if at least one line item has a discounted price. It's the total amount of discounted prices for items with applied discounts and the original prices for items without discounts. It reflects the total cost of all line items after discounts.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"paymentFees":{"type":"array","description":"The list of payment fees applied to an order. Payment fees are not changed and are not discounted, even when a discount or coupon is applied to the total.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedPaymentFee"},{"type":"object","properties":{"id":{"type":"string","description":"Payment fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the payment fee. PERCENT for the fee’s `feePercentage`` multiplied by sum of line items `finalPrice` plus shipping cost. ABSOLUTE - monetary amount that is assigned to the payment method."},"price":{"description":"Calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"The monetary amount of the fee, depending on the fee type. ABSOLUTE for the value of defined fee’s `feeAbsolute.amount` attribute. The amount is treated as `netValue`. PERCENT, when defined on fee level percentage, `feePercentage` attribute, of sum of all item line’s `finalPrice.netValue` plus cart’s `calculatedPrice.totalShipping.netValue`. If the fee is taxable and has a tax code, the gross value is calculated. Otherwise, `grossValue` is equal to `netValue`."},"grossValue":{"type":"number","format":"double","description":"For a fee where `taxable=true` and a valid `taxCode` is provided, the tax rate associated with that tax code is used to calculate `grossValue`. If the fee is not taxable, `netValue` is equal to `grossValue`."},"taxValue":{"type":"number","format":"double","description":"Tax value of the payment fee, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the `taxCode` provided at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"The tax code defined at the fee level, for example STANDARD. The value must correspond to the available tax codes in the system configuration."}}}}}]}},"fees":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all fees applied on the line items plus the payment fee *before discounts*."}]},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The sum of all fees applied on the line items plus the payment fee. It's calculated by summing `entries[].calculatedPrice.totalFee` with `paymentFee`. **The `totalFee` is the value *after all the discounts*, if any discounts were applied.**","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the total fee, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the total fee, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the total fee, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, resulting in the same `taxRate`, the value is present. Otherwise, the field is not returned in the response."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode` defined, the value is present. Otherwise, the field is not returned in the response."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to on the line item fees. The payment fee itself is not discountable.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalFee[].appliedDiscounts[].value` grouped by `discount.id`."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the fee."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"shipping":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The total shipping cost is calculated by summing `items[].calculatedPrice.price.grossValue` for shipping estimation. `GrossValue` is used because, even for zero-tax items, it remains equal to `netValue`. The `shipping` is the value *before discounts*, use totalShipping to get the value after discounts."}]},"totalShipping":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total shipping cost is calculated by summing `entries[].calculatedPrice.price.grossValue` for shipping estimation. `GrossValue` is used because, even for zero-tax items, it remains equal to `netValue`. **The `totalShipping` is the value *after all the discounts(, if any discounts were applied.**","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxCode":{"type":"string","description":"Tax code applied to the shipping cost, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the shipping cost, it's the percentage at which an individual or business is taxed."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to shipping.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithTaxAggregate"},{"type":"object","description":"The final price is the sum of `entries[].finalPrice`, `totalShipping`, and `paymentFee`, without the uplift value.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."},"taxAggregate":{"properties":{"lines":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A list of tax values grouped by `taxCode` and `taxRate`. It includes the sum of `item[].calculatedPrice.discountedPrice` or `item[].calculatedPrice.price`, `item[].calculatedPrice.fees[].discountedPrice` or `item[].calculatedPrice.fees[].price`, `calculatedPrice.totalShipping` and `calculatedPrice.paymentFees`. If any of these values have the same `taxRate` but different `taxCode`, they are listed separately. The aggregation also includes items that do not have a `taxRate` or `taxCode` defined.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the tax, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the tax, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the tax, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the tax, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the tax, it's the percentage at which an individual or business is taxed."}}}]}}}}}]}}},"calculatedPaymentFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"price":{"$ref":"#/components/schemas/calculatedPrice"}},"title":"calculatedPaymentFee"},"calculatedPriceWithTaxAggregate":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A price calculation model that includes tax aggregate information.","properties":{"taxAggregate":{"$ref":"#/components/schemas/calculatedTaxAggregate"}}}]},"calculatedTaxAggregate":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/calculatedPrice"},"description":"List of tax calculations grouped by taxCode and taxRate"}},"description":"Aggregated tax information showing detailed tax calculations"}}}}
```

## The salesOrderCreationDto object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"salesOrderCreationDto":{"title":"Order Creation DTO","allOf":[{"type":"object","description":"The order creation DTO.","properties":{"quoteId":{"description":"Identifier of the quote from which the order has been created","type":"string"},"checkout":{"type":"boolean","description":"Indicates whether this order was created through checkout. Can only be provided when creating an order.\n\nWhen set to `true`, only one order can be created per cart ID — enforcing that a checkout cart results in a single order.\nOrders created through the checkout flow have this flag set to `true` by default.\n"}}},{"$ref":"#/components/schemas/orderCreationDto"}]},"orderCreationDto":{"title":"Order Creation DTO","allOf":[{"type":"object","description":"The order creation DTO.","properties":{"channel":{"$ref":"#/components/schemas/channel"}}},{"$ref":"#/components/schemas/orderCommonDto"}]},"channel":{"title":"Channel","type":"object","properties":{"name":{"type":"string"},"source":{"type":"string"}}},"orderCommonDto":{"title":"Order Common DTO","description":"The base order fields. This object is inherited by all of other order objects as Order Creation DTO, Order Update DTO etc.","type":"object","properties":{"restriction":{"$ref":"#/components/schemas/restriction"},"feeYrnAggregate":{"allOf":[{"$ref":"#/components/schemas/aggregateFee"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.totalFees` and `entries[].calculatedPrice.fees` instead. These fields provide the same values with updated functionality."}],"deprecated":true},"status":{"$ref":"#/components/schemas/orderStatus"},"cartId":{"type":"string","description":"The identifier of a cart that was used to create this order."},"vendor":{"$ref":"#/components/schemas/vendor"},"orderType":{"$ref":"#/components/schemas/splitOrderType"},"masterOrder":{"type":"string","description":"The identifier of a master order. Available on suborders that have been created after splitting the master order."},"splitInfo":{"$ref":"#/components/schemas/splitInfo"},"subOrders":{"type":"array","description":"A list of string IDs for suborders created after a split. Available only on the master order from which the split originated."},"entries":{"description":"Ordered item list.","type":"array","minItems":1,"items":{"$ref":"#/components/schemas/orderEntry"}},"discounts":{"description":"Discount list.","type":"array","items":{"$ref":"#/components/schemas/discount"}},"customer":{"$ref":"#/components/schemas/customer"},"siteCode":{"description":"Site's unique identifier. A site is a specific shop.","type":"string"},"countryCode":{"description":"Two-letter country code, compliant with the ISO 3166 standard.","type":"string"},"billingAddress":{"$ref":"#/components/schemas/address"},"shippingAddress":{"$ref":"#/components/schemas/address"},"payments":{"description":"Payment list.","type":"array","items":{"$ref":"#/components/schemas/payment"}},"shipping":{"allOf":[{"$ref":"#/components/schemas/shipping"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.totalShipping` instead. The `unitPrice` field provides the same value with updated functionality."}],"deprecated":true},"tax":{"allOf":[{"$ref":"#/components/schemas/tax"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.finalPrice.taxAggregate` instead. The `calculatedPrice.finalPrice.taxAggregate` field provides the same value with updated functionality."}],"deprecated":true},"subTotalPrice":{"type":"number","deprecated":true,"description":"Order sub total price. **This field is deprecated**. Please use `calculatedPrice.price` or `calculatedPrice.discountedPrice` instead. These fields provide the same value with updated functionality."},"totalPrice":{"type":"number","deprecated":true,"description":"Order total price. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality."},"totalAuthorizedAmount":{"type":"number","description":"The amount that should be authorized with payment provider. It's a sum of `calculatedPrice.finalPrice.grossValue` and `calculatedPrice.upliftValue.grossValue`."},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"orderCycle":{"description":"Order cycle date.\n\n***NOTE***\nThis attribute is DEPRECATED, please use the `deliveryWindow.deliveryCycle` attribute","deprecated":true,"type":"string"},"deliveryWindowId":{"description":"Delivery window's unique identifier.\n\n***NOTE***\nThis attribute is DEPRECATED, please use the `deliveryWindow.id` attribute","type":"string","deprecated":true},"deliveryWindow":{"$ref":"#/components/schemas/deliveryWindow"},"metadata":{"$ref":"#/components/schemas/metadataMixins"},"mixins":{"type":"object"},"calculatedPrice":{"allOf":[{"$ref":"#/components/schemas/orderCalculatedPrice"},{"type":"object","description":"A breakdown of the total price calculated from all line items, including detailed pricing components. Can be skipped if deprecated`totalPrice` is provided to preserve backward compatibility"}]},"legalEntityId":{"type":"string","description":"The identifier of the legal entity on whose behalf the order was placed."}},"required":["entries","customer","calculatedPrice"]},"restriction":{"type":"string","nullable":true,"description":"Access control identifier that determines who can view or manage the order.\n\n**Purpose**: Restricts order visibility based on scope permissions. Only users/applications \nwith matching restriction scopes can access orders with a specific restriction value.\n\n**Access Control**:\n- *Reading*: Users can only query and view orders with the `restriction` value that matches one of their authorized restrictions.\n\n**Validation**: The value must exist in the tenant's configured list of valid restrictions.\n\n**Site Synchronization**: If the `restriction` property is not set with tenant configuration property `enableSyncBetweenRestrictionsAndSiteCodes` set to `true`, the `restriction` field automatically syncs with `siteCode` property.\n"},"aggregateFee":{"type":"object","title":"Aggregate Fee","properties":{"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"elements":{"type":"array","items":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"},{"type":"object","description":"Fee name."}]},"yrn":{"type":"string","description":"Unique identifier of the fee."},"taxCode":{"type":"string","description":"Tax code of the fee."},"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"taxValues":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the tax."},"value":{"type":"number","description":"Value of the tax."},"rate":{"type":"number","description":"Rate of the tax."}}}}}}}},"required":["total"]},"localizedValue":{"description":"Localized value which can have different structure which depends on provided `Content-Language` header.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}]},"orderStatus":{"type":"string","enum":["IN_CHECKOUT","CREATED","CONFIRMED","DECLINED","SHIPPED","COMPLETED"],"description":"Status of the order. Supported order statuses are `IN_CHECKOUT`, `CREATED`, `CONFIRMED`, `DECLINED`, `SHIPPED`, `COMPLETED`'. Customers can only change the order status from `CREATED` to `DECLINED`."},"vendor":{"type":"object","properties":{"id":{"type":"string","description":"An identifier of a vendor"},"name":{"type":"string","description":"vendor name"}},"required":["id"]},"splitOrderType":{"type":"string","enum":["MASTER_ORDER","SUB_ORDER"],"description":"Available on orders that have been split. For standard orders, the value is `null`. For the original order that was split, the value is `MASTER_ORDER`s, and for the created suborders, the value is `SUB_ORDER`."},"splitInfo":{"type":"object","properties":{"splitBy":{"$ref":"#/components/schemas/splitBy"},"uniqueValue":{"type":"string","description":"A unique value used to split the entries of a master order into separate suborders. Available only on suborders that had uniqueValue for the split. Not available on master order."}},"description":"Information about how the order was split from the master order."},"splitBy":{"type":"string","enum":["VENDOR_ID"],"description":"Specifies the criteria used to split a master order into suborders. Currently, only `VENDOR_ID` is supported."},"orderEntry":{"title":"Order entry","description":"The ordered item.","type":"object","properties":{"id":{"description":"The ordered item ID.","type":"string"},"itemYrn":{"$ref":"#/components/schemas/YRN"},"fees":{"allOf":[{"$ref":"#/components/schemas/aggregateFee"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.fees` instead. The `calculatedPrice.fees` field provides the same value with updated functionality."}],"deprecated":true},"amount":{"description":"The amount of items.","type":"integer"},"orderedAmount":{"description":"The ordered amount of items.","type":"integer"},"packedAmountInPc":{"description":"The packed amount of items.","type":"integer"},"effectiveQuantity":{"description":"Effective quantity is q calculated average quantity customer is paying for.","type":"number","format":"double"},"originalAmount":{"description":"The original amount. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.","type":"number","deprecated":true},"originalPrice":{"description":"The original price. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.","type":"number","deprecated":true},"unitPrice":{"type":"number","deprecated":true,"description":"**This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality."},"calculatedUnitPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Product's unit price with tax values, can be skipped if deprecated `unitPrice` is provided for backward compatibility."}]},"measurementUnit":{"$ref":"#/components/schemas/measurementUnit"},"link":{"description":"Link to product.","type":"string"},"discounts":{"deprecated":true,"description":"The discount list. **This field is deprecated**. Please use `calculatedPrice.totalDiscount` instead. The `calculatedPrice.totalDiscount` field provides the same value with updated functionality."},"totalPrice":{"type":"number","deprecated":true,"description":"The total price of items. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality."},"authorizedAmount":{"description":"The authorized amount. **This field is deprecated**. Please use `calculatedPrice.upliftValue` instead. The `calculatedPrice.upliftValue` field how much payment authorization should be increased for given item.","deprecated":true,"type":"number"},"product":{"$ref":"#/components/schemas/product"},"tax":{"allOf":[{"$ref":"#/components/schemas/tax"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.price` instead. The `calculatedPrice.price` field provides the same value with updated functionality."}],"deprecated":true},"price":{"$ref":"#/components/schemas/price"},"metadata":{"$ref":"#/components/schemas/mixinsMetadata"},"mixins":{"type":"object"},"calculatedPrice":{"allOf":[{"$ref":"#/components/schemas/orderEntryCalculatedPrice"},{"type":"object","description":"Detailed price calculation for a single line item with all pricing components. Can be skipped if deprecated `totalPrice` is provided for backward compatibility."}]},"priceMatchDetails":{"$ref":"#/components/schemas/priceMatchDetails"},"externalDiscounts":{"type":"array","description":"External discounts applied to this order entry.","items":{"$ref":"#/components/schemas/externalDiscount"}},"externalFees":{"type":"array","description":"External fees applied to this order entry.","items":{"$ref":"#/components/schemas/externalFee"}}},"required":["amount","calculatedUnitPrice","calculatedPrice"]},"YRN":{"type":"string","title":"YRN","description":"In YaaS, a global resource identifier is a Uniform Resource Name (URN) with a custom YaaS schema and is called a YaaS Resource Name, or YRN.\n\nIt is a unique identifier, which stores information about a resource, such as its type, ID or name of the tenant.","minLength":1},"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]},"measurementUnit":{"title":"Measurement Unit","description":"The entry measurement unit","type":"object","properties":{"unit":{"description":"Code of the unit, like `kg` or `l`.","type":"string"},"value":{"description":"Quantity of given unit.","type":"number"}},"required":["value"]},"product":{"title":"Product","description":"Product details.","type":"object","properties":{"id":{"description":"Unique identifier of a product.","type":"string"},"sku":{"description":"Product sku.","type":"string"},"code":{"description":"Unique code of a product.","type":"string"},"name":{"description":"Unique name of a product.","type":"string"},"localizedName":{"description":"A product's name represented as a map, with language as the key and the corresponding translated name as the value","type":"object","additionalProperties":{"type":"string"}},"description":{"description":"Product description.","type":"string"},"published":{"description":"Product published flag.","type":"boolean"},"productType":{"description":"Type of the product (BASIC, VARIANT, BUNDLE).","type":"string","enum":["BASIC","VARIANT","BUNDLE"]},"bundledProducts":{"description":"The collection of products assigned to the bundle.","type":"array","items":{"$ref":"#/components/schemas/bundleProduct"}},"images":{"description":"Product images.","type":"array","items":{"$ref":"#/components/schemas/media"}},"vendor":{"$ref":"#/components/schemas/vendor"},"mixins":{"description":"Product additional information.","type":"object","additionalProperties":true},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"The metadata of the product."}]}}},"bundleProduct":{"title":"Bundle Product","description":"Represents the product used in a bundle.","type":"object","properties":{"amount":{"description":"The number of given products assigned to the bundle.","type":"number"},"productId":{"description":"Id of the product assigned to the bundle.","type":"string"}}},"media":{"title":"Media","description":"The media.","type":"object","properties":{"id":{"description":"Unique identifier of a media file.","type":"string"},"url":{"description":"Media URL.","type":"string"},"stored":{"description":"Media stored flag.","type":"boolean","default":false}}},"mixinsMetadata":{"title":"Product Metadata","description":"Product Metadata","type":"object","additionalProperties":true,"properties":{"mixins":{"description":"A key-value map of mixins, where the mixin name is a key and schema url is a value","type":"object","additionalProperties":true},"version":{"description":"The document version number.","type":"integer"}}},"tax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"}},"required":["total"]},"taxLine":{"title":"taxLine","description":"Tax line details.","type":"object","properties":{"amount":{"description":"Tax line amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Tax code.","type":"string"},"name":{"description":"Tax name.","type":"string"},"rate":{"description":"Tax rate.","type":"number","default":0},"taxable":{"description":"Order's taxable amount.","type":"number"},"sequenceId":{"description":"Sequence ID.","type":"integer","default":0},"inclusive":{"description":"Inclusive flag.","type":"boolean","default":false}},"required":["amount","currency","sequenceId","inclusive"]},"taxTotal":{"title":"Tax total","description":"The tax total tax amount.","type":"object","properties":{"amount":{"description":"Total tax amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"inclusive":{"description":"Total tax inclusive flag.","default":false,"type":"boolean"}},"required":["amount","currency","inclusive"]},"price":{"title":"Price","description":"Price details.","type":"object","properties":{"priceId":{"description":"Id of the price related to order entry.","type":"string"},"priceListId":{"type":"string","description":"Identifier of price list. The field should be populated only in case when the returned prices belongs to any price list."},"effectiveAmount":{"description":"Effective amount is a calculated average item price after a discount.","type":"number"},"originalAmount":{"description":"Oryginal amount is a price set by the merchant.","type":"number"},"currency":{"description":"Currency of the entry price.","type":"string"},"salePrice":{"allOf":[{"$ref":"#/components/schemas/salePrice"},{"type":"object","description":"Attributes of the sale price."}]}}},"salePrice":{"title":"Sale Price","description":"The sale price.","type":"object","properties":{"discountAmount":{"description":"Amount of the discount for sale price promotion.","type":"number"},"discountRate":{"description":"Rate of the discount for sale price promotion.","type":"number"},"description":{"description":"The sale price description.","type":"string"}}},"orderEntryCalculatedPrice":{"type":"object","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The price is calculated by multiplying the unit price (taken from priceMatch) by the quantity."},{"properties":{"calculated":{"type":"string","description":"Indicates how the line item price was determined. - `INTERNAL` — Calculated by Emporix using unit price × quantity. - `EXTERNAL` — Provided externally with `lineTax`.","enum":["INTERNAL","EXTERNAL"]}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Maximum additional amount authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for an item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to uplift amount, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"fees":{"type":"array","description":"A list of fees applied to the line item. If there are no fees on the item line, it's not returned in the response.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedFee"},{"type":"object","properties":{"id":{"type":"string","description":"Fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"PERCENT for fee percentage of the item's line `price.netValue` - unit price x quantity. ABSOLUTE for the absolute amount assigned to the item line. ABSOLUTE_MULTIPLY_ITEMQUANTITY for the monetary amount multiplied by the item quantity and assigned to the item line."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"INTERNAL defined in commerce engine, EXTERNAL specified when an item is added to the order."},"name":{"type":"object","description":"Fee name."},"price":{"type":"object","description":"The calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"Monetary amount of the fee, depends on the fee type."},"grossValue":{"type":"number","format":"double","description":"Value calculated based on the `taxCode` and the `taxRate` if `taxable=true`."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the provided `taxCode` at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"Tax code defined on the fee level, for example STANDARD. The value should match the available tax codes in the system configuration."}}},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Refers to `fees[].price.taxRate`."},"taxCode":{"type":"string","description":"Refers to `fees[].price.taxCode`."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Monetary amount of the discount applied to the price for the given discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]}}}]}},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"Sum of all fees applied to the item. It's calculated by summarizing `fees[].discountedPrice` if any discounts were applied to the fee, or `fees[].price` for an pre-discounted fee. If there are no fees applied to the line item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, which results in the same `taxRate`, then the value is present. Otherwise, the field is not returned."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode`, then the value is present. Otherwise, the field is not returned."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Sum of all `fees[].discountedPrice.appliedDiscounts[].value` grouped by `discount.id`"},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The final price is the sum of the `discountedPrice` or the original price, depending on whether any discounts were applied to the line item, and the `totalFee`, which includes all fees applied to the line item. Since the total fee already includes the discounted prices of fees, the sum is calculated at the `totalFee` level.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."}}}]}},"required":["finalPrice"]},"calculatedPriceWithDiscounts":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","properties":{"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}}]},"calculatedAppliedDiscount":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the applied discount."},"value":{"type":"number","format":"double","description":"The calculated value of the discount."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Applied discount's price. When discount is applied before tax the value equals `price.netValue` and `price.grossValue` for discount applied after tax."}]},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"The discount type which shows how the discount was calculated."},"origin":{"type":"string","enum":["INTERNAL","EXTERNAL"],"description":"Indicates whether the discount is from internal coupon (INTERNAL) or external discount (EXTERNAL)."}}},"calculatedFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"origin of the fee, `INTERNAL` defined in commerce engine, `EXTERNAL` specified when item is added to the cart."},"price":{"$ref":"#/components/schemas/calculatedPrice"},"discountedPrice":{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"}}},"calculatedTotalDiscount":{"type":"object","description":"The total combined value of all applied discounts.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were calculated using net or gross price values."},"value":{"type":"number","format":"double","description":"The calculated amount of all discounts."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Total discounts price. When discounts are applied before tax the value equals `price.netValue` and `price.grossValue` for discounts applied after tax."}]},"appliedDiscounts":{"type":"array","description":"All applied discounts that are parts of the sum.","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}},"priceMatchDetails":{"title":"priceMatchDetails","type":"object","properties":{"netValue":{"type":"number","format":"double","description":"The net value of the matched price"},"grossValue":{"type":"number","format":"double","description":"The gross value of the matched price"},"taxValue":{"type":"number","format":"double","description":"The calculated tax value"},"taxCode":{"type":"string","description":"The applied tax code"},"taxRate":{"type":"number","format":"double","description":"The applied tax rate"},"taxCountry":{"type":"string","description":"The tax country for which the price was matched"}},"description":"This model represents the price value retrieved from the price service"},"externalDiscount":{"type":"object","description":"External discount that was applied to order items.","properties":{"id":{"type":"string","description":"Unique identifier of the external discount."},"discountType":{"$ref":"#/components/schemas/externalDiscountType"},"value":{"type":"number","format":"double","minimum":0,"maximum":100,"description":"Value of the discount (percentage e.g 15.00 -> 15% or absolute amount e.g 10.00 -> 10 EUR depending on the discountType). For discountType=`PERCENT`, maximum is 100.0; for ABSOLUTE, there is no limit."},"includeFees":{"type":"boolean","description":"Flag indicating whether the discount is also applied to fees."},"sequence":{"type":"integer","description":"Sequence number determining the order in which discounts are applied. The lowest sequence number is applied first."}},"required":["id","discountType","value"]},"externalDiscountType":{"type":"string","description":"Type of the external discount.","enum":["PERCENT","ABSOLUTE"]},"externalFee":{"type":"object","required":["feeType"],"properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"}],"description":"Fee name."},"feeType":{"type":"string","description":"Type of the fee.","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"]},"feePercentage":{"type":"number","description":"Value of the fee as percentage. It must be provided when feeType equals `PERCENT`."},"feeAbsolute":{"type":"object","description":"Value of the fee as absolute. It must be provided when feeType equals `ABSOLUTE` or `ABSOLUTE_MULTIPLY_ITEMQUANTITY`.","required":["currency","amount"],"properties":{"currency":{"type":"string","description":"Currency of the fee absolute."},"amount":{"type":"number","description":"Value of the fee absolute."}}},"taxable":{"type":"boolean","description":"It marks whether tax should be included to the fee or not. A taxable fee must have the `taxCode` attribute provided."},"taxCode":{"type":"string","description":"Tax code of the fee."}}},"discount":{"title":"Discount","properties":{"code":{"description":"Discount's code.","type":"string"},"amount":{"description":"Amount of discount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"name":{"description":"Discount's name.","type":"string"},"discountRate":{"description":"Discount's rate.","type":"number"},"calculationType":{"description":"Discount's code.calculation type.","type":"string"},"discountCalculationType":{"description":"Determines whether the coupon is applied to the total or subtotal value of the order.","type":"string","enum":["SUBTOTAL","TOTAL"]},"discountType":{"description":"Discount's type.","type":"string"},"sequenceId":{"description":"Discount's unique sequence ID identifier.","type":"integer"},"link":{"allOf":[{"$ref":"#/components/schemas/reference"},{"type":"object","description":"Link to discount."}]},"categoryRestricted":{"description":"This flag indicates if discount is category restricted.","type":"boolean"},"restrictions":{"allOf":[{"$ref":"#/components/schemas/discountRestrictions"},{"type":"object","description":"The restrictions based on which the discount can be applied."}]}},"required":["code","currency"]},"reference":{"title":"Link","properties":{"id":{"description":"Unique identifier of a link.","type":"string"},"type":{"description":"Link type.","type":"string"},"url":{"description":"URL of the link.","type":"string"}},"required":["id","type","url"]},"discountRestrictions":{"title":"Discount Restrictions","properties":{"validFrom":{"description":"The date from which the discount restriction is valid.","type":"string"},"validUntil":{"description":"The date from which the discount restriction is valid.","type":"string"},"minOrderValue":{"allOf":[{"$ref":"#/components/schemas/discountRestrictionsPrice"},{"type":"object","description":"The minimum order price for which the discount is valid."}]},"includedCategories":{"description":"List of included categories.","type":"array","items":{"type":"string"}},"excludedCategories":{"description":"List of excluded categories.","type":"array","items":{"type":"string"}}}},"discountRestrictionsPrice":{"title":"Discount Restrictions Price","properties":{"amount":{"description":"The amount of discount price","type":"number"},"currency":{"description":"The currency of the price","type":"string"}}},"customer":{"title":"Customer","description":"Customer data. \n\nOne of these properties needs to be provided:\n- `name` for business customers (B2B)\n- `firstName` and `lastName` for individual customers (B2C)\n","properties":{"id":{"description":"Customer's unique identifier.","type":"string","default":"ANONYMOUS"},"name":{"description":"Customer's name.","type":"string"},"title":{"description":"Customer's title.","type":"string"},"firstName":{"description":"Customer's first name.","type":"string"},"middleName":{"description":"Customer's middle name.","type":"string"},"lastName":{"description":"Customer's last name.","type":"string"},"company":{"description":"Company name.","type":"string"},"email":{"description":"Customer's email address.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"Metadata."}]},"mixins":{"description":"Customer additional information.","type":"object","additionalProperties":true}},"required":["email"]},"address":{"title":"Address","description":"Customer's address.","type":"object","properties":{"contactName":{"description":"Customer's name.","type":"string"},"companyName":{"description":"Company name.","type":"string"},"street":{"description":"Street name.","type":"string"},"streetNumber":{"description":"Street number.","type":"string"},"streetAppendix":{"description":"Street appendix.","type":"string"},"extraLine1":{"description":"Additional address information.","type":"string"},"extraLine2":{"description":"Additional address information.","type":"string"},"extraLine3":{"description":"Additional address information.","type":"string"},"extraLine4":{"description":"Additional address information.","type":"string"},"zipCode":{"description":"Customer's address - zip code.","type":"string"},"city":{"description":"City name.","type":"string"},"state":{"description":"State name.","type":"string"},"country":{"description":"Country name.","type":"string"},"contactPhone":{"description":"Customer's contact phone.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"Metadata."}]},"mixins":{"description":"Additional address information.","type":"object","additionalProperties":true}},"required":["contactName","street","city","zipCode","country"]},"payment":{"title":"Payment","description":"Payment details.","type":"object","properties":{"method":{"description":"Payment method.","type":"string"},"status":{"description":"Payment status.","allOf":[{"$ref":"#/components/schemas/paymentStatus"}]},"paymentResponse":{"description":"Payment response.","type":"string"},"paidAmount":{"description":"Paid amount.","type":"number"},"refundAmount":{"description":"Refund amount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"transactionId":{"description":"The ID of the payment transaction.","type":"string"},"redirectUrl":{"description":"Redirect url.","type":"string"},"authorizedAmount":{"description":"Authorized amount.","type":"number"},"provider":{"description":"Payment provider.","type":"string"}},"required":["method","paidAmount","currency"]},"paymentStatus":{"type":"string","enum":["PENDING","AUTHORIZATION_SUCCESS","AUTHORIZATION_FAILURE","CAPTURE_SUCCESS","CAPTURE_FAILURE","SUCCESS","FAILURE","CANCELLATION_SUCCESS","CANCELLATION_FAILURE","REFUND_SUCCESS","REFUND_FAILURE"],"default":"PENDING","description":"Status of the payment."},"shipping":{"description":"Shipping details.","title":"Shipping","type":"object","properties":{"total":{"description":"Total shipping amount.","type":"object","properties":{"amount":{"type":"number","description":"Shipping amount.","default":0},"currency":{"type":"string","description":"Currency of the shipping amount."}}},"lines":{"description":"Shipping line list.","type":"array","items":{"$ref":"#/components/schemas/shippingLine"}}},"required":["total"]},"shippingLine":{"title":"Shipping line","description":"Shipping line.","type":"object","properties":{"amount":{"type":"number","description":"Shipping line amount.","default":0},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Shipping line code.","type":"string"},"name":{"description":"Shipping line name.","type":"string"},"localizedName":{"description":"Shipping line name in a form of a map of translations.","type":"object","additionalProperties":{"type":"string"}},"discounts":{"description":"Shipping line discount.","type":"array","items":{"$ref":"#/components/schemas/discount"}},"tax":{"$ref":"#/components/schemas/shippingTax"},"link":{"$ref":"#/components/schemas/reference"},"shippingTaxCode":{"type":"string"}},"required":["code"]},"shippingTax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"},"rate":{"description":"The rate of the shipping tax","type":"number"}},"required":["total"]},"deliveryWindow":{"title":"Delivery Window","type":"object","properties":{"id":{"type":"string","description":"Id of the delivery window"},"deliveryDate":{"type":"string","format":"date","description":"Delivery date."},"slotId":{"type":"string","description":"ID of the delivery slot"},"deliveryTimeRange":{"$ref":"#/components/schemas/deliveryTimeRange"},"deliveryCycle":{"type":"string","description":"Delivery cycle to which the order is assigned (containing date)"},"deliveryCycleName":{"type":"string","description":"Delivery cycle name to which the order is assigned"}}},"deliveryTimeRange":{"title":"Delivery Time Range","type":"object","properties":{"timeFrom":{"type":"string","format":"time","description":"Start Time"},"timeTo":{"type":"string","format":"time","description":"End Time"}}},"metadataMixins":{"title":"Metadata DTO","type":"object","additionalProperties":true,"properties":{"mixins":{"type":"object","additionalProperties":true},"version":{"type":"integer"}}},"orderCalculatedPrice":{"type":"object","description":"A breakdown of the total price calculated from all line items, including detailed pricing components.","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all line item price values, it means unit prices multiplied by quantity - `entries[].calculatedPrice.price`.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all line item uplift values. Uplift value is the maximum additional amount to be authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for any item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the uplift amount, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The sum of all line item prices after discounts are calculated. It's included in the response if at least one line item has a discounted price. It's the total amount of discounted prices for items with applied discounts and the original prices for items without discounts. It reflects the total cost of all line items after discounts.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"paymentFees":{"type":"array","description":"The list of payment fees applied to an order. Payment fees are not changed and are not discounted, even when a discount or coupon is applied to the total.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedPaymentFee"},{"type":"object","properties":{"id":{"type":"string","description":"Payment fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the payment fee. PERCENT for the fee’s `feePercentage`` multiplied by sum of line items `finalPrice` plus shipping cost. ABSOLUTE - monetary amount that is assigned to the payment method."},"price":{"description":"Calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"The monetary amount of the fee, depending on the fee type. ABSOLUTE for the value of defined fee’s `feeAbsolute.amount` attribute. The amount is treated as `netValue`. PERCENT, when defined on fee level percentage, `feePercentage` attribute, of sum of all item line’s `finalPrice.netValue` plus cart’s `calculatedPrice.totalShipping.netValue`. If the fee is taxable and has a tax code, the gross value is calculated. Otherwise, `grossValue` is equal to `netValue`."},"grossValue":{"type":"number","format":"double","description":"For a fee where `taxable=true` and a valid `taxCode` is provided, the tax rate associated with that tax code is used to calculate `grossValue`. If the fee is not taxable, `netValue` is equal to `grossValue`."},"taxValue":{"type":"number","format":"double","description":"Tax value of the payment fee, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the `taxCode` provided at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"The tax code defined at the fee level, for example STANDARD. The value must correspond to the available tax codes in the system configuration."}}}}}]}},"fees":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all fees applied on the line items plus the payment fee *before discounts*."}]},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The sum of all fees applied on the line items plus the payment fee. It's calculated by summing `entries[].calculatedPrice.totalFee` with `paymentFee`. **The `totalFee` is the value *after all the discounts*, if any discounts were applied.**","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the total fee, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the total fee, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the total fee, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, resulting in the same `taxRate`, the value is present. Otherwise, the field is not returned in the response."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode` defined, the value is present. Otherwise, the field is not returned in the response."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to on the line item fees. The payment fee itself is not discountable.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalFee[].appliedDiscounts[].value` grouped by `discount.id`."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the fee."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"shipping":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The total shipping cost is calculated by summing `items[].calculatedPrice.price.grossValue` for shipping estimation. `GrossValue` is used because, even for zero-tax items, it remains equal to `netValue`. The `shipping` is the value *before discounts*, use totalShipping to get the value after discounts."}]},"totalShipping":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total shipping cost is calculated by summing `entries[].calculatedPrice.price.grossValue` for shipping estimation. `GrossValue` is used because, even for zero-tax items, it remains equal to `netValue`. **The `totalShipping` is the value *after all the discounts(, if any discounts were applied.**","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxCode":{"type":"string","description":"Tax code applied to the shipping cost, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the shipping cost, it's the percentage at which an individual or business is taxed."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to shipping.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithTaxAggregate"},{"type":"object","description":"The final price is the sum of `entries[].finalPrice`, `totalShipping`, and `paymentFee`, without the uplift value.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."},"taxAggregate":{"properties":{"lines":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A list of tax values grouped by `taxCode` and `taxRate`. It includes the sum of `item[].calculatedPrice.discountedPrice` or `item[].calculatedPrice.price`, `item[].calculatedPrice.fees[].discountedPrice` or `item[].calculatedPrice.fees[].price`, `calculatedPrice.totalShipping` and `calculatedPrice.paymentFees`. If any of these values have the same `taxRate` but different `taxCode`, they are listed separately. The aggregation also includes items that do not have a `taxRate` or `taxCode` defined.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the tax, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the tax, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the tax, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the tax, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the tax, it's the percentage at which an individual or business is taxed."}}}]}}}}}]}}},"calculatedPaymentFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"price":{"$ref":"#/components/schemas/calculatedPrice"}},"title":"calculatedPaymentFee"},"calculatedPriceWithTaxAggregate":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A price calculation model that includes tax aggregate information.","properties":{"taxAggregate":{"$ref":"#/components/schemas/calculatedTaxAggregate"}}}]},"calculatedTaxAggregate":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/calculatedPrice"},"description":"List of tax calculations grouped by taxCode and taxRate"}},"description":"Aggregated tax information showing detailed tax calculations"}}}}
```

## The searchRequest object

```json
{"openapi":"3.0.0","info":{"title":"Order 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 orderCreationDto object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"orderCreationDto":{"title":"Order Creation DTO","allOf":[{"type":"object","description":"The order creation DTO.","properties":{"channel":{"$ref":"#/components/schemas/channel"}}},{"$ref":"#/components/schemas/orderCommonDto"}]},"channel":{"title":"Channel","type":"object","properties":{"name":{"type":"string"},"source":{"type":"string"}}},"orderCommonDto":{"title":"Order Common DTO","description":"The base order fields. This object is inherited by all of other order objects as Order Creation DTO, Order Update DTO etc.","type":"object","properties":{"restriction":{"$ref":"#/components/schemas/restriction"},"feeYrnAggregate":{"allOf":[{"$ref":"#/components/schemas/aggregateFee"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.totalFees` and `entries[].calculatedPrice.fees` instead. These fields provide the same values with updated functionality."}],"deprecated":true},"status":{"$ref":"#/components/schemas/orderStatus"},"cartId":{"type":"string","description":"The identifier of a cart that was used to create this order."},"vendor":{"$ref":"#/components/schemas/vendor"},"orderType":{"$ref":"#/components/schemas/splitOrderType"},"masterOrder":{"type":"string","description":"The identifier of a master order. Available on suborders that have been created after splitting the master order."},"splitInfo":{"$ref":"#/components/schemas/splitInfo"},"subOrders":{"type":"array","description":"A list of string IDs for suborders created after a split. Available only on the master order from which the split originated."},"entries":{"description":"Ordered item list.","type":"array","minItems":1,"items":{"$ref":"#/components/schemas/orderEntry"}},"discounts":{"description":"Discount list.","type":"array","items":{"$ref":"#/components/schemas/discount"}},"customer":{"$ref":"#/components/schemas/customer"},"siteCode":{"description":"Site's unique identifier. A site is a specific shop.","type":"string"},"countryCode":{"description":"Two-letter country code, compliant with the ISO 3166 standard.","type":"string"},"billingAddress":{"$ref":"#/components/schemas/address"},"shippingAddress":{"$ref":"#/components/schemas/address"},"payments":{"description":"Payment list.","type":"array","items":{"$ref":"#/components/schemas/payment"}},"shipping":{"allOf":[{"$ref":"#/components/schemas/shipping"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.totalShipping` instead. The `unitPrice` field provides the same value with updated functionality."}],"deprecated":true},"tax":{"allOf":[{"$ref":"#/components/schemas/tax"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.finalPrice.taxAggregate` instead. The `calculatedPrice.finalPrice.taxAggregate` field provides the same value with updated functionality."}],"deprecated":true},"subTotalPrice":{"type":"number","deprecated":true,"description":"Order sub total price. **This field is deprecated**. Please use `calculatedPrice.price` or `calculatedPrice.discountedPrice` instead. These fields provide the same value with updated functionality."},"totalPrice":{"type":"number","deprecated":true,"description":"Order total price. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality."},"totalAuthorizedAmount":{"type":"number","description":"The amount that should be authorized with payment provider. It's a sum of `calculatedPrice.finalPrice.grossValue` and `calculatedPrice.upliftValue.grossValue`."},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"orderCycle":{"description":"Order cycle date.\n\n***NOTE***\nThis attribute is DEPRECATED, please use the `deliveryWindow.deliveryCycle` attribute","deprecated":true,"type":"string"},"deliveryWindowId":{"description":"Delivery window's unique identifier.\n\n***NOTE***\nThis attribute is DEPRECATED, please use the `deliveryWindow.id` attribute","type":"string","deprecated":true},"deliveryWindow":{"$ref":"#/components/schemas/deliveryWindow"},"metadata":{"$ref":"#/components/schemas/metadataMixins"},"mixins":{"type":"object"},"calculatedPrice":{"allOf":[{"$ref":"#/components/schemas/orderCalculatedPrice"},{"type":"object","description":"A breakdown of the total price calculated from all line items, including detailed pricing components. Can be skipped if deprecated`totalPrice` is provided to preserve backward compatibility"}]},"legalEntityId":{"type":"string","description":"The identifier of the legal entity on whose behalf the order was placed."}},"required":["entries","customer","calculatedPrice"]},"restriction":{"type":"string","nullable":true,"description":"Access control identifier that determines who can view or manage the order.\n\n**Purpose**: Restricts order visibility based on scope permissions. Only users/applications \nwith matching restriction scopes can access orders with a specific restriction value.\n\n**Access Control**:\n- *Reading*: Users can only query and view orders with the `restriction` value that matches one of their authorized restrictions.\n\n**Validation**: The value must exist in the tenant's configured list of valid restrictions.\n\n**Site Synchronization**: If the `restriction` property is not set with tenant configuration property `enableSyncBetweenRestrictionsAndSiteCodes` set to `true`, the `restriction` field automatically syncs with `siteCode` property.\n"},"aggregateFee":{"type":"object","title":"Aggregate Fee","properties":{"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"elements":{"type":"array","items":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"},{"type":"object","description":"Fee name."}]},"yrn":{"type":"string","description":"Unique identifier of the fee."},"taxCode":{"type":"string","description":"Tax code of the fee."},"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"taxValues":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the tax."},"value":{"type":"number","description":"Value of the tax."},"rate":{"type":"number","description":"Rate of the tax."}}}}}}}},"required":["total"]},"localizedValue":{"description":"Localized value which can have different structure which depends on provided `Content-Language` header.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}]},"orderStatus":{"type":"string","enum":["IN_CHECKOUT","CREATED","CONFIRMED","DECLINED","SHIPPED","COMPLETED"],"description":"Status of the order. Supported order statuses are `IN_CHECKOUT`, `CREATED`, `CONFIRMED`, `DECLINED`, `SHIPPED`, `COMPLETED`'. Customers can only change the order status from `CREATED` to `DECLINED`."},"vendor":{"type":"object","properties":{"id":{"type":"string","description":"An identifier of a vendor"},"name":{"type":"string","description":"vendor name"}},"required":["id"]},"splitOrderType":{"type":"string","enum":["MASTER_ORDER","SUB_ORDER"],"description":"Available on orders that have been split. For standard orders, the value is `null`. For the original order that was split, the value is `MASTER_ORDER`s, and for the created suborders, the value is `SUB_ORDER`."},"splitInfo":{"type":"object","properties":{"splitBy":{"$ref":"#/components/schemas/splitBy"},"uniqueValue":{"type":"string","description":"A unique value used to split the entries of a master order into separate suborders. Available only on suborders that had uniqueValue for the split. Not available on master order."}},"description":"Information about how the order was split from the master order."},"splitBy":{"type":"string","enum":["VENDOR_ID"],"description":"Specifies the criteria used to split a master order into suborders. Currently, only `VENDOR_ID` is supported."},"orderEntry":{"title":"Order entry","description":"The ordered item.","type":"object","properties":{"id":{"description":"The ordered item ID.","type":"string"},"itemYrn":{"$ref":"#/components/schemas/YRN"},"fees":{"allOf":[{"$ref":"#/components/schemas/aggregateFee"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.fees` instead. The `calculatedPrice.fees` field provides the same value with updated functionality."}],"deprecated":true},"amount":{"description":"The amount of items.","type":"integer"},"orderedAmount":{"description":"The ordered amount of items.","type":"integer"},"packedAmountInPc":{"description":"The packed amount of items.","type":"integer"},"effectiveQuantity":{"description":"Effective quantity is q calculated average quantity customer is paying for.","type":"number","format":"double"},"originalAmount":{"description":"The original amount. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.","type":"number","deprecated":true},"originalPrice":{"description":"The original price. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.","type":"number","deprecated":true},"unitPrice":{"type":"number","deprecated":true,"description":"**This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality."},"calculatedUnitPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Product's unit price with tax values, can be skipped if deprecated `unitPrice` is provided for backward compatibility."}]},"measurementUnit":{"$ref":"#/components/schemas/measurementUnit"},"link":{"description":"Link to product.","type":"string"},"discounts":{"deprecated":true,"description":"The discount list. **This field is deprecated**. Please use `calculatedPrice.totalDiscount` instead. The `calculatedPrice.totalDiscount` field provides the same value with updated functionality."},"totalPrice":{"type":"number","deprecated":true,"description":"The total price of items. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality."},"authorizedAmount":{"description":"The authorized amount. **This field is deprecated**. Please use `calculatedPrice.upliftValue` instead. The `calculatedPrice.upliftValue` field how much payment authorization should be increased for given item.","deprecated":true,"type":"number"},"product":{"$ref":"#/components/schemas/product"},"tax":{"allOf":[{"$ref":"#/components/schemas/tax"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.price` instead. The `calculatedPrice.price` field provides the same value with updated functionality."}],"deprecated":true},"price":{"$ref":"#/components/schemas/price"},"metadata":{"$ref":"#/components/schemas/mixinsMetadata"},"mixins":{"type":"object"},"calculatedPrice":{"allOf":[{"$ref":"#/components/schemas/orderEntryCalculatedPrice"},{"type":"object","description":"Detailed price calculation for a single line item with all pricing components. Can be skipped if deprecated `totalPrice` is provided for backward compatibility."}]},"priceMatchDetails":{"$ref":"#/components/schemas/priceMatchDetails"},"externalDiscounts":{"type":"array","description":"External discounts applied to this order entry.","items":{"$ref":"#/components/schemas/externalDiscount"}},"externalFees":{"type":"array","description":"External fees applied to this order entry.","items":{"$ref":"#/components/schemas/externalFee"}}},"required":["amount","calculatedUnitPrice","calculatedPrice"]},"YRN":{"type":"string","title":"YRN","description":"In YaaS, a global resource identifier is a Uniform Resource Name (URN) with a custom YaaS schema and is called a YaaS Resource Name, or YRN.\n\nIt is a unique identifier, which stores information about a resource, such as its type, ID or name of the tenant.","minLength":1},"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]},"measurementUnit":{"title":"Measurement Unit","description":"The entry measurement unit","type":"object","properties":{"unit":{"description":"Code of the unit, like `kg` or `l`.","type":"string"},"value":{"description":"Quantity of given unit.","type":"number"}},"required":["value"]},"product":{"title":"Product","description":"Product details.","type":"object","properties":{"id":{"description":"Unique identifier of a product.","type":"string"},"sku":{"description":"Product sku.","type":"string"},"code":{"description":"Unique code of a product.","type":"string"},"name":{"description":"Unique name of a product.","type":"string"},"localizedName":{"description":"A product's name represented as a map, with language as the key and the corresponding translated name as the value","type":"object","additionalProperties":{"type":"string"}},"description":{"description":"Product description.","type":"string"},"published":{"description":"Product published flag.","type":"boolean"},"productType":{"description":"Type of the product (BASIC, VARIANT, BUNDLE).","type":"string","enum":["BASIC","VARIANT","BUNDLE"]},"bundledProducts":{"description":"The collection of products assigned to the bundle.","type":"array","items":{"$ref":"#/components/schemas/bundleProduct"}},"images":{"description":"Product images.","type":"array","items":{"$ref":"#/components/schemas/media"}},"vendor":{"$ref":"#/components/schemas/vendor"},"mixins":{"description":"Product additional information.","type":"object","additionalProperties":true},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"The metadata of the product."}]}}},"bundleProduct":{"title":"Bundle Product","description":"Represents the product used in a bundle.","type":"object","properties":{"amount":{"description":"The number of given products assigned to the bundle.","type":"number"},"productId":{"description":"Id of the product assigned to the bundle.","type":"string"}}},"media":{"title":"Media","description":"The media.","type":"object","properties":{"id":{"description":"Unique identifier of a media file.","type":"string"},"url":{"description":"Media URL.","type":"string"},"stored":{"description":"Media stored flag.","type":"boolean","default":false}}},"mixinsMetadata":{"title":"Product Metadata","description":"Product Metadata","type":"object","additionalProperties":true,"properties":{"mixins":{"description":"A key-value map of mixins, where the mixin name is a key and schema url is a value","type":"object","additionalProperties":true},"version":{"description":"The document version number.","type":"integer"}}},"tax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"}},"required":["total"]},"taxLine":{"title":"taxLine","description":"Tax line details.","type":"object","properties":{"amount":{"description":"Tax line amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Tax code.","type":"string"},"name":{"description":"Tax name.","type":"string"},"rate":{"description":"Tax rate.","type":"number","default":0},"taxable":{"description":"Order's taxable amount.","type":"number"},"sequenceId":{"description":"Sequence ID.","type":"integer","default":0},"inclusive":{"description":"Inclusive flag.","type":"boolean","default":false}},"required":["amount","currency","sequenceId","inclusive"]},"taxTotal":{"title":"Tax total","description":"The tax total tax amount.","type":"object","properties":{"amount":{"description":"Total tax amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"inclusive":{"description":"Total tax inclusive flag.","default":false,"type":"boolean"}},"required":["amount","currency","inclusive"]},"price":{"title":"Price","description":"Price details.","type":"object","properties":{"priceId":{"description":"Id of the price related to order entry.","type":"string"},"priceListId":{"type":"string","description":"Identifier of price list. The field should be populated only in case when the returned prices belongs to any price list."},"effectiveAmount":{"description":"Effective amount is a calculated average item price after a discount.","type":"number"},"originalAmount":{"description":"Oryginal amount is a price set by the merchant.","type":"number"},"currency":{"description":"Currency of the entry price.","type":"string"},"salePrice":{"allOf":[{"$ref":"#/components/schemas/salePrice"},{"type":"object","description":"Attributes of the sale price."}]}}},"salePrice":{"title":"Sale Price","description":"The sale price.","type":"object","properties":{"discountAmount":{"description":"Amount of the discount for sale price promotion.","type":"number"},"discountRate":{"description":"Rate of the discount for sale price promotion.","type":"number"},"description":{"description":"The sale price description.","type":"string"}}},"orderEntryCalculatedPrice":{"type":"object","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The price is calculated by multiplying the unit price (taken from priceMatch) by the quantity."},{"properties":{"calculated":{"type":"string","description":"Indicates how the line item price was determined. - `INTERNAL` — Calculated by Emporix using unit price × quantity. - `EXTERNAL` — Provided externally with `lineTax`.","enum":["INTERNAL","EXTERNAL"]}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Maximum additional amount authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for an item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to uplift amount, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"fees":{"type":"array","description":"A list of fees applied to the line item. If there are no fees on the item line, it's not returned in the response.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedFee"},{"type":"object","properties":{"id":{"type":"string","description":"Fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"PERCENT for fee percentage of the item's line `price.netValue` - unit price x quantity. ABSOLUTE for the absolute amount assigned to the item line. ABSOLUTE_MULTIPLY_ITEMQUANTITY for the monetary amount multiplied by the item quantity and assigned to the item line."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"INTERNAL defined in commerce engine, EXTERNAL specified when an item is added to the order."},"name":{"type":"object","description":"Fee name."},"price":{"type":"object","description":"The calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"Monetary amount of the fee, depends on the fee type."},"grossValue":{"type":"number","format":"double","description":"Value calculated based on the `taxCode` and the `taxRate` if `taxable=true`."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the provided `taxCode` at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"Tax code defined on the fee level, for example STANDARD. The value should match the available tax codes in the system configuration."}}},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Refers to `fees[].price.taxRate`."},"taxCode":{"type":"string","description":"Refers to `fees[].price.taxCode`."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Monetary amount of the discount applied to the price for the given discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]}}}]}},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"Sum of all fees applied to the item. It's calculated by summarizing `fees[].discountedPrice` if any discounts were applied to the fee, or `fees[].price` for an pre-discounted fee. If there are no fees applied to the line item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, which results in the same `taxRate`, then the value is present. Otherwise, the field is not returned."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode`, then the value is present. Otherwise, the field is not returned."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Sum of all `fees[].discountedPrice.appliedDiscounts[].value` grouped by `discount.id`"},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The final price is the sum of the `discountedPrice` or the original price, depending on whether any discounts were applied to the line item, and the `totalFee`, which includes all fees applied to the line item. Since the total fee already includes the discounted prices of fees, the sum is calculated at the `totalFee` level.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."}}}]}},"required":["finalPrice"]},"calculatedPriceWithDiscounts":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","properties":{"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}}]},"calculatedAppliedDiscount":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the applied discount."},"value":{"type":"number","format":"double","description":"The calculated value of the discount."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Applied discount's price. When discount is applied before tax the value equals `price.netValue` and `price.grossValue` for discount applied after tax."}]},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"The discount type which shows how the discount was calculated."},"origin":{"type":"string","enum":["INTERNAL","EXTERNAL"],"description":"Indicates whether the discount is from internal coupon (INTERNAL) or external discount (EXTERNAL)."}}},"calculatedFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"origin of the fee, `INTERNAL` defined in commerce engine, `EXTERNAL` specified when item is added to the cart."},"price":{"$ref":"#/components/schemas/calculatedPrice"},"discountedPrice":{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"}}},"calculatedTotalDiscount":{"type":"object","description":"The total combined value of all applied discounts.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were calculated using net or gross price values."},"value":{"type":"number","format":"double","description":"The calculated amount of all discounts."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Total discounts price. When discounts are applied before tax the value equals `price.netValue` and `price.grossValue` for discounts applied after tax."}]},"appliedDiscounts":{"type":"array","description":"All applied discounts that are parts of the sum.","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}},"priceMatchDetails":{"title":"priceMatchDetails","type":"object","properties":{"netValue":{"type":"number","format":"double","description":"The net value of the matched price"},"grossValue":{"type":"number","format":"double","description":"The gross value of the matched price"},"taxValue":{"type":"number","format":"double","description":"The calculated tax value"},"taxCode":{"type":"string","description":"The applied tax code"},"taxRate":{"type":"number","format":"double","description":"The applied tax rate"},"taxCountry":{"type":"string","description":"The tax country for which the price was matched"}},"description":"This model represents the price value retrieved from the price service"},"externalDiscount":{"type":"object","description":"External discount that was applied to order items.","properties":{"id":{"type":"string","description":"Unique identifier of the external discount."},"discountType":{"$ref":"#/components/schemas/externalDiscountType"},"value":{"type":"number","format":"double","minimum":0,"maximum":100,"description":"Value of the discount (percentage e.g 15.00 -> 15% or absolute amount e.g 10.00 -> 10 EUR depending on the discountType). For discountType=`PERCENT`, maximum is 100.0; for ABSOLUTE, there is no limit."},"includeFees":{"type":"boolean","description":"Flag indicating whether the discount is also applied to fees."},"sequence":{"type":"integer","description":"Sequence number determining the order in which discounts are applied. The lowest sequence number is applied first."}},"required":["id","discountType","value"]},"externalDiscountType":{"type":"string","description":"Type of the external discount.","enum":["PERCENT","ABSOLUTE"]},"externalFee":{"type":"object","required":["feeType"],"properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"}],"description":"Fee name."},"feeType":{"type":"string","description":"Type of the fee.","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"]},"feePercentage":{"type":"number","description":"Value of the fee as percentage. It must be provided when feeType equals `PERCENT`."},"feeAbsolute":{"type":"object","description":"Value of the fee as absolute. It must be provided when feeType equals `ABSOLUTE` or `ABSOLUTE_MULTIPLY_ITEMQUANTITY`.","required":["currency","amount"],"properties":{"currency":{"type":"string","description":"Currency of the fee absolute."},"amount":{"type":"number","description":"Value of the fee absolute."}}},"taxable":{"type":"boolean","description":"It marks whether tax should be included to the fee or not. A taxable fee must have the `taxCode` attribute provided."},"taxCode":{"type":"string","description":"Tax code of the fee."}}},"discount":{"title":"Discount","properties":{"code":{"description":"Discount's code.","type":"string"},"amount":{"description":"Amount of discount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"name":{"description":"Discount's name.","type":"string"},"discountRate":{"description":"Discount's rate.","type":"number"},"calculationType":{"description":"Discount's code.calculation type.","type":"string"},"discountCalculationType":{"description":"Determines whether the coupon is applied to the total or subtotal value of the order.","type":"string","enum":["SUBTOTAL","TOTAL"]},"discountType":{"description":"Discount's type.","type":"string"},"sequenceId":{"description":"Discount's unique sequence ID identifier.","type":"integer"},"link":{"allOf":[{"$ref":"#/components/schemas/reference"},{"type":"object","description":"Link to discount."}]},"categoryRestricted":{"description":"This flag indicates if discount is category restricted.","type":"boolean"},"restrictions":{"allOf":[{"$ref":"#/components/schemas/discountRestrictions"},{"type":"object","description":"The restrictions based on which the discount can be applied."}]}},"required":["code","currency"]},"reference":{"title":"Link","properties":{"id":{"description":"Unique identifier of a link.","type":"string"},"type":{"description":"Link type.","type":"string"},"url":{"description":"URL of the link.","type":"string"}},"required":["id","type","url"]},"discountRestrictions":{"title":"Discount Restrictions","properties":{"validFrom":{"description":"The date from which the discount restriction is valid.","type":"string"},"validUntil":{"description":"The date from which the discount restriction is valid.","type":"string"},"minOrderValue":{"allOf":[{"$ref":"#/components/schemas/discountRestrictionsPrice"},{"type":"object","description":"The minimum order price for which the discount is valid."}]},"includedCategories":{"description":"List of included categories.","type":"array","items":{"type":"string"}},"excludedCategories":{"description":"List of excluded categories.","type":"array","items":{"type":"string"}}}},"discountRestrictionsPrice":{"title":"Discount Restrictions Price","properties":{"amount":{"description":"The amount of discount price","type":"number"},"currency":{"description":"The currency of the price","type":"string"}}},"customer":{"title":"Customer","description":"Customer data. \n\nOne of these properties needs to be provided:\n- `name` for business customers (B2B)\n- `firstName` and `lastName` for individual customers (B2C)\n","properties":{"id":{"description":"Customer's unique identifier.","type":"string","default":"ANONYMOUS"},"name":{"description":"Customer's name.","type":"string"},"title":{"description":"Customer's title.","type":"string"},"firstName":{"description":"Customer's first name.","type":"string"},"middleName":{"description":"Customer's middle name.","type":"string"},"lastName":{"description":"Customer's last name.","type":"string"},"company":{"description":"Company name.","type":"string"},"email":{"description":"Customer's email address.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"Metadata."}]},"mixins":{"description":"Customer additional information.","type":"object","additionalProperties":true}},"required":["email"]},"address":{"title":"Address","description":"Customer's address.","type":"object","properties":{"contactName":{"description":"Customer's name.","type":"string"},"companyName":{"description":"Company name.","type":"string"},"street":{"description":"Street name.","type":"string"},"streetNumber":{"description":"Street number.","type":"string"},"streetAppendix":{"description":"Street appendix.","type":"string"},"extraLine1":{"description":"Additional address information.","type":"string"},"extraLine2":{"description":"Additional address information.","type":"string"},"extraLine3":{"description":"Additional address information.","type":"string"},"extraLine4":{"description":"Additional address information.","type":"string"},"zipCode":{"description":"Customer's address - zip code.","type":"string"},"city":{"description":"City name.","type":"string"},"state":{"description":"State name.","type":"string"},"country":{"description":"Country name.","type":"string"},"contactPhone":{"description":"Customer's contact phone.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"Metadata."}]},"mixins":{"description":"Additional address information.","type":"object","additionalProperties":true}},"required":["contactName","street","city","zipCode","country"]},"payment":{"title":"Payment","description":"Payment details.","type":"object","properties":{"method":{"description":"Payment method.","type":"string"},"status":{"description":"Payment status.","allOf":[{"$ref":"#/components/schemas/paymentStatus"}]},"paymentResponse":{"description":"Payment response.","type":"string"},"paidAmount":{"description":"Paid amount.","type":"number"},"refundAmount":{"description":"Refund amount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"transactionId":{"description":"The ID of the payment transaction.","type":"string"},"redirectUrl":{"description":"Redirect url.","type":"string"},"authorizedAmount":{"description":"Authorized amount.","type":"number"},"provider":{"description":"Payment provider.","type":"string"}},"required":["method","paidAmount","currency"]},"paymentStatus":{"type":"string","enum":["PENDING","AUTHORIZATION_SUCCESS","AUTHORIZATION_FAILURE","CAPTURE_SUCCESS","CAPTURE_FAILURE","SUCCESS","FAILURE","CANCELLATION_SUCCESS","CANCELLATION_FAILURE","REFUND_SUCCESS","REFUND_FAILURE"],"default":"PENDING","description":"Status of the payment."},"shipping":{"description":"Shipping details.","title":"Shipping","type":"object","properties":{"total":{"description":"Total shipping amount.","type":"object","properties":{"amount":{"type":"number","description":"Shipping amount.","default":0},"currency":{"type":"string","description":"Currency of the shipping amount."}}},"lines":{"description":"Shipping line list.","type":"array","items":{"$ref":"#/components/schemas/shippingLine"}}},"required":["total"]},"shippingLine":{"title":"Shipping line","description":"Shipping line.","type":"object","properties":{"amount":{"type":"number","description":"Shipping line amount.","default":0},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Shipping line code.","type":"string"},"name":{"description":"Shipping line name.","type":"string"},"localizedName":{"description":"Shipping line name in a form of a map of translations.","type":"object","additionalProperties":{"type":"string"}},"discounts":{"description":"Shipping line discount.","type":"array","items":{"$ref":"#/components/schemas/discount"}},"tax":{"$ref":"#/components/schemas/shippingTax"},"link":{"$ref":"#/components/schemas/reference"},"shippingTaxCode":{"type":"string"}},"required":["code"]},"shippingTax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"},"rate":{"description":"The rate of the shipping tax","type":"number"}},"required":["total"]},"deliveryWindow":{"title":"Delivery Window","type":"object","properties":{"id":{"type":"string","description":"Id of the delivery window"},"deliveryDate":{"type":"string","format":"date","description":"Delivery date."},"slotId":{"type":"string","description":"ID of the delivery slot"},"deliveryTimeRange":{"$ref":"#/components/schemas/deliveryTimeRange"},"deliveryCycle":{"type":"string","description":"Delivery cycle to which the order is assigned (containing date)"},"deliveryCycleName":{"type":"string","description":"Delivery cycle name to which the order is assigned"}}},"deliveryTimeRange":{"title":"Delivery Time Range","type":"object","properties":{"timeFrom":{"type":"string","format":"time","description":"Start Time"},"timeTo":{"type":"string","format":"time","description":"End Time"}}},"metadataMixins":{"title":"Metadata DTO","type":"object","additionalProperties":true,"properties":{"mixins":{"type":"object","additionalProperties":true},"version":{"type":"integer"}}},"orderCalculatedPrice":{"type":"object","description":"A breakdown of the total price calculated from all line items, including detailed pricing components.","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all line item price values, it means unit prices multiplied by quantity - `entries[].calculatedPrice.price`.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all line item uplift values. Uplift value is the maximum additional amount to be authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for any item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the uplift amount, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The sum of all line item prices after discounts are calculated. It's included in the response if at least one line item has a discounted price. It's the total amount of discounted prices for items with applied discounts and the original prices for items without discounts. It reflects the total cost of all line items after discounts.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"paymentFees":{"type":"array","description":"The list of payment fees applied to an order. Payment fees are not changed and are not discounted, even when a discount or coupon is applied to the total.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedPaymentFee"},{"type":"object","properties":{"id":{"type":"string","description":"Payment fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the payment fee. PERCENT for the fee’s `feePercentage`` multiplied by sum of line items `finalPrice` plus shipping cost. ABSOLUTE - monetary amount that is assigned to the payment method."},"price":{"description":"Calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"The monetary amount of the fee, depending on the fee type. ABSOLUTE for the value of defined fee’s `feeAbsolute.amount` attribute. The amount is treated as `netValue`. PERCENT, when defined on fee level percentage, `feePercentage` attribute, of sum of all item line’s `finalPrice.netValue` plus cart’s `calculatedPrice.totalShipping.netValue`. If the fee is taxable and has a tax code, the gross value is calculated. Otherwise, `grossValue` is equal to `netValue`."},"grossValue":{"type":"number","format":"double","description":"For a fee where `taxable=true` and a valid `taxCode` is provided, the tax rate associated with that tax code is used to calculate `grossValue`. If the fee is not taxable, `netValue` is equal to `grossValue`."},"taxValue":{"type":"number","format":"double","description":"Tax value of the payment fee, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the `taxCode` provided at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"The tax code defined at the fee level, for example STANDARD. The value must correspond to the available tax codes in the system configuration."}}}}}]}},"fees":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all fees applied on the line items plus the payment fee *before discounts*."}]},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The sum of all fees applied on the line items plus the payment fee. It's calculated by summing `entries[].calculatedPrice.totalFee` with `paymentFee`. **The `totalFee` is the value *after all the discounts*, if any discounts were applied.**","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the total fee, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the total fee, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the total fee, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, resulting in the same `taxRate`, the value is present. Otherwise, the field is not returned in the response."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode` defined, the value is present. Otherwise, the field is not returned in the response."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to on the line item fees. The payment fee itself is not discountable.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalFee[].appliedDiscounts[].value` grouped by `discount.id`."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the fee."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"shipping":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The total shipping cost is calculated by summing `items[].calculatedPrice.price.grossValue` for shipping estimation. `GrossValue` is used because, even for zero-tax items, it remains equal to `netValue`. The `shipping` is the value *before discounts*, use totalShipping to get the value after discounts."}]},"totalShipping":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total shipping cost is calculated by summing `entries[].calculatedPrice.price.grossValue` for shipping estimation. `GrossValue` is used because, even for zero-tax items, it remains equal to `netValue`. **The `totalShipping` is the value *after all the discounts(, if any discounts were applied.**","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxCode":{"type":"string","description":"Tax code applied to the shipping cost, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the shipping cost, it's the percentage at which an individual or business is taxed."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to shipping.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithTaxAggregate"},{"type":"object","description":"The final price is the sum of `entries[].finalPrice`, `totalShipping`, and `paymentFee`, without the uplift value.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."},"taxAggregate":{"properties":{"lines":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A list of tax values grouped by `taxCode` and `taxRate`. It includes the sum of `item[].calculatedPrice.discountedPrice` or `item[].calculatedPrice.price`, `item[].calculatedPrice.fees[].discountedPrice` or `item[].calculatedPrice.fees[].price`, `calculatedPrice.totalShipping` and `calculatedPrice.paymentFees`. If any of these values have the same `taxRate` but different `taxCode`, they are listed separately. The aggregation also includes items that do not have a `taxRate` or `taxCode` defined.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the tax, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the tax, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the tax, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the tax, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the tax, it's the percentage at which an individual or business is taxed."}}}]}}}}}]}}},"calculatedPaymentFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"price":{"$ref":"#/components/schemas/calculatedPrice"}},"title":"calculatedPaymentFee"},"calculatedPriceWithTaxAggregate":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A price calculation model that includes tax aggregate information.","properties":{"taxAggregate":{"$ref":"#/components/schemas/calculatedTaxAggregate"}}}]},"calculatedTaxAggregate":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/calculatedPrice"},"description":"List of tax calculations grouped by taxCode and taxRate"}},"description":"Aggregated tax information showing detailed tax calculations"}}}}
```

## The orderUpdateDto object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"orderUpdateDto":{"title":"Order Update DTO","type":"object","allOf":[{"type":"object","properties":{"channel":{"$ref":"#/components/schemas/channel"},"created":{"description":"Order's creation date.","type":"string"},"completed":{"description":"Order's completion date.","type":"string"},"lastStatusChange":{"description":"Order last status change date.","type":"string"},"shipments":{"description":"Shipment list.","type":"array","items":{"$ref":"#/components/schemas/shipment"}}}},{"$ref":"#/components/schemas/orderCommonDto"}]},"channel":{"title":"Channel","type":"object","properties":{"name":{"type":"string"},"source":{"type":"string"}}},"shipment":{"title":"Shipment","description":"Shippment details.","type":"object","properties":{"shippedDate":{"description":"Shipped date.","type":"string"},"carrier":{"description":"Carrier.","type":"string"},"trackingNumber":{"description":"Tracking number.","type":"string"},"expectDeliveryOn":{"description":"Expected delivery date.","type":"string"}},"required":["shippedDate","carrier"]},"orderCommonDto":{"title":"Order Common DTO","description":"The base order fields. This object is inherited by all of other order objects as Order Creation DTO, Order Update DTO etc.","type":"object","properties":{"restriction":{"$ref":"#/components/schemas/restriction"},"feeYrnAggregate":{"allOf":[{"$ref":"#/components/schemas/aggregateFee"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.totalFees` and `entries[].calculatedPrice.fees` instead. These fields provide the same values with updated functionality."}],"deprecated":true},"status":{"$ref":"#/components/schemas/orderStatus"},"cartId":{"type":"string","description":"The identifier of a cart that was used to create this order."},"vendor":{"$ref":"#/components/schemas/vendor"},"orderType":{"$ref":"#/components/schemas/splitOrderType"},"masterOrder":{"type":"string","description":"The identifier of a master order. Available on suborders that have been created after splitting the master order."},"splitInfo":{"$ref":"#/components/schemas/splitInfo"},"subOrders":{"type":"array","description":"A list of string IDs for suborders created after a split. Available only on the master order from which the split originated."},"entries":{"description":"Ordered item list.","type":"array","minItems":1,"items":{"$ref":"#/components/schemas/orderEntry"}},"discounts":{"description":"Discount list.","type":"array","items":{"$ref":"#/components/schemas/discount"}},"customer":{"$ref":"#/components/schemas/customer"},"siteCode":{"description":"Site's unique identifier. A site is a specific shop.","type":"string"},"countryCode":{"description":"Two-letter country code, compliant with the ISO 3166 standard.","type":"string"},"billingAddress":{"$ref":"#/components/schemas/address"},"shippingAddress":{"$ref":"#/components/schemas/address"},"payments":{"description":"Payment list.","type":"array","items":{"$ref":"#/components/schemas/payment"}},"shipping":{"allOf":[{"$ref":"#/components/schemas/shipping"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.totalShipping` instead. The `unitPrice` field provides the same value with updated functionality."}],"deprecated":true},"tax":{"allOf":[{"$ref":"#/components/schemas/tax"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.finalPrice.taxAggregate` instead. The `calculatedPrice.finalPrice.taxAggregate` field provides the same value with updated functionality."}],"deprecated":true},"subTotalPrice":{"type":"number","deprecated":true,"description":"Order sub total price. **This field is deprecated**. Please use `calculatedPrice.price` or `calculatedPrice.discountedPrice` instead. These fields provide the same value with updated functionality."},"totalPrice":{"type":"number","deprecated":true,"description":"Order total price. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality."},"totalAuthorizedAmount":{"type":"number","description":"The amount that should be authorized with payment provider. It's a sum of `calculatedPrice.finalPrice.grossValue` and `calculatedPrice.upliftValue.grossValue`."},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"orderCycle":{"description":"Order cycle date.\n\n***NOTE***\nThis attribute is DEPRECATED, please use the `deliveryWindow.deliveryCycle` attribute","deprecated":true,"type":"string"},"deliveryWindowId":{"description":"Delivery window's unique identifier.\n\n***NOTE***\nThis attribute is DEPRECATED, please use the `deliveryWindow.id` attribute","type":"string","deprecated":true},"deliveryWindow":{"$ref":"#/components/schemas/deliveryWindow"},"metadata":{"$ref":"#/components/schemas/metadataMixins"},"mixins":{"type":"object"},"calculatedPrice":{"allOf":[{"$ref":"#/components/schemas/orderCalculatedPrice"},{"type":"object","description":"A breakdown of the total price calculated from all line items, including detailed pricing components. Can be skipped if deprecated`totalPrice` is provided to preserve backward compatibility"}]},"legalEntityId":{"type":"string","description":"The identifier of the legal entity on whose behalf the order was placed."}},"required":["entries","customer","calculatedPrice"]},"restriction":{"type":"string","nullable":true,"description":"Access control identifier that determines who can view or manage the order.\n\n**Purpose**: Restricts order visibility based on scope permissions. Only users/applications \nwith matching restriction scopes can access orders with a specific restriction value.\n\n**Access Control**:\n- *Reading*: Users can only query and view orders with the `restriction` value that matches one of their authorized restrictions.\n\n**Validation**: The value must exist in the tenant's configured list of valid restrictions.\n\n**Site Synchronization**: If the `restriction` property is not set with tenant configuration property `enableSyncBetweenRestrictionsAndSiteCodes` set to `true`, the `restriction` field automatically syncs with `siteCode` property.\n"},"aggregateFee":{"type":"object","title":"Aggregate Fee","properties":{"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"elements":{"type":"array","items":{"type":"object","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"},{"type":"object","description":"Fee name."}]},"yrn":{"type":"string","description":"Unique identifier of the fee."},"taxCode":{"type":"string","description":"Tax code of the fee."},"total":{"type":"object","properties":{"subTotal":{"type":"number"},"totalTax":{"type":"number"},"total":{"type":"number"}}},"taxValues":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the tax."},"value":{"type":"number","description":"Value of the tax."},"rate":{"type":"number","description":"Rate of the tax."}}}}}}}},"required":["total"]},"localizedValue":{"description":"Localized value which can have different structure which depends on provided `Content-Language` header.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}]},"orderStatus":{"type":"string","enum":["IN_CHECKOUT","CREATED","CONFIRMED","DECLINED","SHIPPED","COMPLETED"],"description":"Status of the order. Supported order statuses are `IN_CHECKOUT`, `CREATED`, `CONFIRMED`, `DECLINED`, `SHIPPED`, `COMPLETED`'. Customers can only change the order status from `CREATED` to `DECLINED`."},"vendor":{"type":"object","properties":{"id":{"type":"string","description":"An identifier of a vendor"},"name":{"type":"string","description":"vendor name"}},"required":["id"]},"splitOrderType":{"type":"string","enum":["MASTER_ORDER","SUB_ORDER"],"description":"Available on orders that have been split. For standard orders, the value is `null`. For the original order that was split, the value is `MASTER_ORDER`s, and for the created suborders, the value is `SUB_ORDER`."},"splitInfo":{"type":"object","properties":{"splitBy":{"$ref":"#/components/schemas/splitBy"},"uniqueValue":{"type":"string","description":"A unique value used to split the entries of a master order into separate suborders. Available only on suborders that had uniqueValue for the split. Not available on master order."}},"description":"Information about how the order was split from the master order."},"splitBy":{"type":"string","enum":["VENDOR_ID"],"description":"Specifies the criteria used to split a master order into suborders. Currently, only `VENDOR_ID` is supported."},"orderEntry":{"title":"Order entry","description":"The ordered item.","type":"object","properties":{"id":{"description":"The ordered item ID.","type":"string"},"itemYrn":{"$ref":"#/components/schemas/YRN"},"fees":{"allOf":[{"$ref":"#/components/schemas/aggregateFee"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.fees` instead. The `calculatedPrice.fees` field provides the same value with updated functionality."}],"deprecated":true},"amount":{"description":"The amount of items.","type":"integer"},"orderedAmount":{"description":"The ordered amount of items.","type":"integer"},"packedAmountInPc":{"description":"The packed amount of items.","type":"integer"},"effectiveQuantity":{"description":"Effective quantity is q calculated average quantity customer is paying for.","type":"number","format":"double"},"originalAmount":{"description":"The original amount. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.","type":"number","deprecated":true},"originalPrice":{"description":"The original price. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.","type":"number","deprecated":true},"unitPrice":{"type":"number","deprecated":true,"description":"**This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality."},"calculatedUnitPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Product's unit price with tax values, can be skipped if deprecated `unitPrice` is provided for backward compatibility."}]},"measurementUnit":{"$ref":"#/components/schemas/measurementUnit"},"link":{"description":"Link to product.","type":"string"},"discounts":{"deprecated":true,"description":"The discount list. **This field is deprecated**. Please use `calculatedPrice.totalDiscount` instead. The `calculatedPrice.totalDiscount` field provides the same value with updated functionality."},"totalPrice":{"type":"number","deprecated":true,"description":"The total price of items. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality."},"authorizedAmount":{"description":"The authorized amount. **This field is deprecated**. Please use `calculatedPrice.upliftValue` instead. The `calculatedPrice.upliftValue` field how much payment authorization should be increased for given item.","deprecated":true,"type":"number"},"product":{"$ref":"#/components/schemas/product"},"tax":{"allOf":[{"$ref":"#/components/schemas/tax"},{"type":"object","description":"**This field is deprecated**. Please use `calculatedPrice.price` instead. The `calculatedPrice.price` field provides the same value with updated functionality."}],"deprecated":true},"price":{"$ref":"#/components/schemas/price"},"metadata":{"$ref":"#/components/schemas/mixinsMetadata"},"mixins":{"type":"object"},"calculatedPrice":{"allOf":[{"$ref":"#/components/schemas/orderEntryCalculatedPrice"},{"type":"object","description":"Detailed price calculation for a single line item with all pricing components. Can be skipped if deprecated `totalPrice` is provided for backward compatibility."}]},"priceMatchDetails":{"$ref":"#/components/schemas/priceMatchDetails"},"externalDiscounts":{"type":"array","description":"External discounts applied to this order entry.","items":{"$ref":"#/components/schemas/externalDiscount"}},"externalFees":{"type":"array","description":"External fees applied to this order entry.","items":{"$ref":"#/components/schemas/externalFee"}}},"required":["amount","calculatedUnitPrice","calculatedPrice"]},"YRN":{"type":"string","title":"YRN","description":"In YaaS, a global resource identifier is a Uniform Resource Name (URN) with a custom YaaS schema and is called a YaaS Resource Name, or YRN.\n\nIt is a unique identifier, which stores information about a resource, such as its type, ID or name of the tenant.","minLength":1},"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]},"measurementUnit":{"title":"Measurement Unit","description":"The entry measurement unit","type":"object","properties":{"unit":{"description":"Code of the unit, like `kg` or `l`.","type":"string"},"value":{"description":"Quantity of given unit.","type":"number"}},"required":["value"]},"product":{"title":"Product","description":"Product details.","type":"object","properties":{"id":{"description":"Unique identifier of a product.","type":"string"},"sku":{"description":"Product sku.","type":"string"},"code":{"description":"Unique code of a product.","type":"string"},"name":{"description":"Unique name of a product.","type":"string"},"localizedName":{"description":"A product's name represented as a map, with language as the key and the corresponding translated name as the value","type":"object","additionalProperties":{"type":"string"}},"description":{"description":"Product description.","type":"string"},"published":{"description":"Product published flag.","type":"boolean"},"productType":{"description":"Type of the product (BASIC, VARIANT, BUNDLE).","type":"string","enum":["BASIC","VARIANT","BUNDLE"]},"bundledProducts":{"description":"The collection of products assigned to the bundle.","type":"array","items":{"$ref":"#/components/schemas/bundleProduct"}},"images":{"description":"Product images.","type":"array","items":{"$ref":"#/components/schemas/media"}},"vendor":{"$ref":"#/components/schemas/vendor"},"mixins":{"description":"Product additional information.","type":"object","additionalProperties":true},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"The metadata of the product."}]}}},"bundleProduct":{"title":"Bundle Product","description":"Represents the product used in a bundle.","type":"object","properties":{"amount":{"description":"The number of given products assigned to the bundle.","type":"number"},"productId":{"description":"Id of the product assigned to the bundle.","type":"string"}}},"media":{"title":"Media","description":"The media.","type":"object","properties":{"id":{"description":"Unique identifier of a media file.","type":"string"},"url":{"description":"Media URL.","type":"string"},"stored":{"description":"Media stored flag.","type":"boolean","default":false}}},"mixinsMetadata":{"title":"Product Metadata","description":"Product Metadata","type":"object","additionalProperties":true,"properties":{"mixins":{"description":"A key-value map of mixins, where the mixin name is a key and schema url is a value","type":"object","additionalProperties":true},"version":{"description":"The document version number.","type":"integer"}}},"tax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"}},"required":["total"]},"taxLine":{"title":"taxLine","description":"Tax line details.","type":"object","properties":{"amount":{"description":"Tax line amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Tax code.","type":"string"},"name":{"description":"Tax name.","type":"string"},"rate":{"description":"Tax rate.","type":"number","default":0},"taxable":{"description":"Order's taxable amount.","type":"number"},"sequenceId":{"description":"Sequence ID.","type":"integer","default":0},"inclusive":{"description":"Inclusive flag.","type":"boolean","default":false}},"required":["amount","currency","sequenceId","inclusive"]},"taxTotal":{"title":"Tax total","description":"The tax total tax amount.","type":"object","properties":{"amount":{"description":"Total tax amount.","default":0,"type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"inclusive":{"description":"Total tax inclusive flag.","default":false,"type":"boolean"}},"required":["amount","currency","inclusive"]},"price":{"title":"Price","description":"Price details.","type":"object","properties":{"priceId":{"description":"Id of the price related to order entry.","type":"string"},"priceListId":{"type":"string","description":"Identifier of price list. The field should be populated only in case when the returned prices belongs to any price list."},"effectiveAmount":{"description":"Effective amount is a calculated average item price after a discount.","type":"number"},"originalAmount":{"description":"Oryginal amount is a price set by the merchant.","type":"number"},"currency":{"description":"Currency of the entry price.","type":"string"},"salePrice":{"allOf":[{"$ref":"#/components/schemas/salePrice"},{"type":"object","description":"Attributes of the sale price."}]}}},"salePrice":{"title":"Sale Price","description":"The sale price.","type":"object","properties":{"discountAmount":{"description":"Amount of the discount for sale price promotion.","type":"number"},"discountRate":{"description":"Rate of the discount for sale price promotion.","type":"number"},"description":{"description":"The sale price description.","type":"string"}}},"orderEntryCalculatedPrice":{"type":"object","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The price is calculated by multiplying the unit price (taken from priceMatch) by the quantity."},{"properties":{"calculated":{"type":"string","description":"Indicates how the line item price was determined. - `INTERNAL` — Calculated by Emporix using unit price × quantity. - `EXTERNAL` — Provided externally with `lineTax`.","enum":["INTERNAL","EXTERNAL"]}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Maximum additional amount authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for an item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to uplift amount, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"fees":{"type":"array","description":"A list of fees applied to the line item. If there are no fees on the item line, it's not returned in the response.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedFee"},{"type":"object","properties":{"id":{"type":"string","description":"Fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"PERCENT for fee percentage of the item's line `price.netValue` - unit price x quantity. ABSOLUTE for the absolute amount assigned to the item line. ABSOLUTE_MULTIPLY_ITEMQUANTITY for the monetary amount multiplied by the item quantity and assigned to the item line."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"INTERNAL defined in commerce engine, EXTERNAL specified when an item is added to the order."},"name":{"type":"object","description":"Fee name."},"price":{"type":"object","description":"The calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"Monetary amount of the fee, depends on the fee type."},"grossValue":{"type":"number","format":"double","description":"Value calculated based on the `taxCode` and the `taxRate` if `taxable=true`."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the provided `taxCode` at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"Tax code defined on the fee level, for example STANDARD. The value should match the available tax codes in the system configuration."}}},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Refers to `fees[].price.taxRate`."},"taxCode":{"type":"string","description":"Refers to `fees[].price.taxCode`."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Monetary amount of the discount applied to the price for the given discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]}}}]}},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"Sum of all fees applied to the item. It's calculated by summarizing `fees[].discountedPrice` if any discounts were applied to the fee, or `fees[].price` for an pre-discounted fee. If there are no fees applied to the line item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, which results in the same `taxRate`, then the value is present. Otherwise, the field is not returned."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode`, then the value is present. Otherwise, the field is not returned."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Sum of all `fees[].discountedPrice.appliedDiscounts[].value` grouped by `discount.id`"},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The final price is the sum of the `discountedPrice` or the original price, depending on whether any discounts were applied to the line item, and the `totalFee`, which includes all fees applied to the line item. Since the total fee already includes the discounted prices of fees, the sum is calculated at the `totalFee` level.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."}}}]}},"required":["finalPrice"]},"calculatedPriceWithDiscounts":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","properties":{"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}}]},"calculatedAppliedDiscount":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the applied discount."},"value":{"type":"number","format":"double","description":"The calculated value of the discount."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Applied discount's price. When discount is applied before tax the value equals `price.netValue` and `price.grossValue` for discount applied after tax."}]},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"The discount type which shows how the discount was calculated."},"origin":{"type":"string","enum":["INTERNAL","EXTERNAL"],"description":"Indicates whether the discount is from internal coupon (INTERNAL) or external discount (EXTERNAL)."}}},"calculatedFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"origin of the fee, `INTERNAL` defined in commerce engine, `EXTERNAL` specified when item is added to the cart."},"price":{"$ref":"#/components/schemas/calculatedPrice"},"discountedPrice":{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"}}},"calculatedTotalDiscount":{"type":"object","description":"The total combined value of all applied discounts.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were calculated using net or gross price values."},"value":{"type":"number","format":"double","description":"The calculated amount of all discounts."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Total discounts price. When discounts are applied before tax the value equals `price.netValue` and `price.grossValue` for discounts applied after tax."}]},"appliedDiscounts":{"type":"array","description":"All applied discounts that are parts of the sum.","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}},"priceMatchDetails":{"title":"priceMatchDetails","type":"object","properties":{"netValue":{"type":"number","format":"double","description":"The net value of the matched price"},"grossValue":{"type":"number","format":"double","description":"The gross value of the matched price"},"taxValue":{"type":"number","format":"double","description":"The calculated tax value"},"taxCode":{"type":"string","description":"The applied tax code"},"taxRate":{"type":"number","format":"double","description":"The applied tax rate"},"taxCountry":{"type":"string","description":"The tax country for which the price was matched"}},"description":"This model represents the price value retrieved from the price service"},"externalDiscount":{"type":"object","description":"External discount that was applied to order items.","properties":{"id":{"type":"string","description":"Unique identifier of the external discount."},"discountType":{"$ref":"#/components/schemas/externalDiscountType"},"value":{"type":"number","format":"double","minimum":0,"maximum":100,"description":"Value of the discount (percentage e.g 15.00 -> 15% or absolute amount e.g 10.00 -> 10 EUR depending on the discountType). For discountType=`PERCENT`, maximum is 100.0; for ABSOLUTE, there is no limit."},"includeFees":{"type":"boolean","description":"Flag indicating whether the discount is also applied to fees."},"sequence":{"type":"integer","description":"Sequence number determining the order in which discounts are applied. The lowest sequence number is applied first."}},"required":["id","discountType","value"]},"externalDiscountType":{"type":"string","description":"Type of the external discount.","enum":["PERCENT","ABSOLUTE"]},"externalFee":{"type":"object","required":["feeType"],"properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"}],"description":"Fee name."},"feeType":{"type":"string","description":"Type of the fee.","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"]},"feePercentage":{"type":"number","description":"Value of the fee as percentage. It must be provided when feeType equals `PERCENT`."},"feeAbsolute":{"type":"object","description":"Value of the fee as absolute. It must be provided when feeType equals `ABSOLUTE` or `ABSOLUTE_MULTIPLY_ITEMQUANTITY`.","required":["currency","amount"],"properties":{"currency":{"type":"string","description":"Currency of the fee absolute."},"amount":{"type":"number","description":"Value of the fee absolute."}}},"taxable":{"type":"boolean","description":"It marks whether tax should be included to the fee or not. A taxable fee must have the `taxCode` attribute provided."},"taxCode":{"type":"string","description":"Tax code of the fee."}}},"discount":{"title":"Discount","properties":{"code":{"description":"Discount's code.","type":"string"},"amount":{"description":"Amount of discount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"name":{"description":"Discount's name.","type":"string"},"discountRate":{"description":"Discount's rate.","type":"number"},"calculationType":{"description":"Discount's code.calculation type.","type":"string"},"discountCalculationType":{"description":"Determines whether the coupon is applied to the total or subtotal value of the order.","type":"string","enum":["SUBTOTAL","TOTAL"]},"discountType":{"description":"Discount's type.","type":"string"},"sequenceId":{"description":"Discount's unique sequence ID identifier.","type":"integer"},"link":{"allOf":[{"$ref":"#/components/schemas/reference"},{"type":"object","description":"Link to discount."}]},"categoryRestricted":{"description":"This flag indicates if discount is category restricted.","type":"boolean"},"restrictions":{"allOf":[{"$ref":"#/components/schemas/discountRestrictions"},{"type":"object","description":"The restrictions based on which the discount can be applied."}]}},"required":["code","currency"]},"reference":{"title":"Link","properties":{"id":{"description":"Unique identifier of a link.","type":"string"},"type":{"description":"Link type.","type":"string"},"url":{"description":"URL of the link.","type":"string"}},"required":["id","type","url"]},"discountRestrictions":{"title":"Discount Restrictions","properties":{"validFrom":{"description":"The date from which the discount restriction is valid.","type":"string"},"validUntil":{"description":"The date from which the discount restriction is valid.","type":"string"},"minOrderValue":{"allOf":[{"$ref":"#/components/schemas/discountRestrictionsPrice"},{"type":"object","description":"The minimum order price for which the discount is valid."}]},"includedCategories":{"description":"List of included categories.","type":"array","items":{"type":"string"}},"excludedCategories":{"description":"List of excluded categories.","type":"array","items":{"type":"string"}}}},"discountRestrictionsPrice":{"title":"Discount Restrictions Price","properties":{"amount":{"description":"The amount of discount price","type":"number"},"currency":{"description":"The currency of the price","type":"string"}}},"customer":{"title":"Customer","description":"Customer data. \n\nOne of these properties needs to be provided:\n- `name` for business customers (B2B)\n- `firstName` and `lastName` for individual customers (B2C)\n","properties":{"id":{"description":"Customer's unique identifier.","type":"string","default":"ANONYMOUS"},"name":{"description":"Customer's name.","type":"string"},"title":{"description":"Customer's title.","type":"string"},"firstName":{"description":"Customer's first name.","type":"string"},"middleName":{"description":"Customer's middle name.","type":"string"},"lastName":{"description":"Customer's last name.","type":"string"},"company":{"description":"Company name.","type":"string"},"email":{"description":"Customer's email address.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"Metadata."}]},"mixins":{"description":"Customer additional information.","type":"object","additionalProperties":true}},"required":["email"]},"address":{"title":"Address","description":"Customer's address.","type":"object","properties":{"contactName":{"description":"Customer's name.","type":"string"},"companyName":{"description":"Company name.","type":"string"},"street":{"description":"Street name.","type":"string"},"streetNumber":{"description":"Street number.","type":"string"},"streetAppendix":{"description":"Street appendix.","type":"string"},"extraLine1":{"description":"Additional address information.","type":"string"},"extraLine2":{"description":"Additional address information.","type":"string"},"extraLine3":{"description":"Additional address information.","type":"string"},"extraLine4":{"description":"Additional address information.","type":"string"},"zipCode":{"description":"Customer's address - zip code.","type":"string"},"city":{"description":"City name.","type":"string"},"state":{"description":"State name.","type":"string"},"country":{"description":"Country name.","type":"string"},"contactPhone":{"description":"Customer's contact phone.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/mixinsMetadata"},{"type":"object","description":"Metadata."}]},"mixins":{"description":"Additional address information.","type":"object","additionalProperties":true}},"required":["contactName","street","city","zipCode","country"]},"payment":{"title":"Payment","description":"Payment details.","type":"object","properties":{"method":{"description":"Payment method.","type":"string"},"status":{"description":"Payment status.","allOf":[{"$ref":"#/components/schemas/paymentStatus"}]},"paymentResponse":{"description":"Payment response.","type":"string"},"paidAmount":{"description":"Paid amount.","type":"number"},"refundAmount":{"description":"Refund amount.","type":"number"},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"transactionId":{"description":"The ID of the payment transaction.","type":"string"},"redirectUrl":{"description":"Redirect url.","type":"string"},"authorizedAmount":{"description":"Authorized amount.","type":"number"},"provider":{"description":"Payment provider.","type":"string"}},"required":["method","paidAmount","currency"]},"paymentStatus":{"type":"string","enum":["PENDING","AUTHORIZATION_SUCCESS","AUTHORIZATION_FAILURE","CAPTURE_SUCCESS","CAPTURE_FAILURE","SUCCESS","FAILURE","CANCELLATION_SUCCESS","CANCELLATION_FAILURE","REFUND_SUCCESS","REFUND_FAILURE"],"default":"PENDING","description":"Status of the payment."},"shipping":{"description":"Shipping details.","title":"Shipping","type":"object","properties":{"total":{"description":"Total shipping amount.","type":"object","properties":{"amount":{"type":"number","description":"Shipping amount.","default":0},"currency":{"type":"string","description":"Currency of the shipping amount."}}},"lines":{"description":"Shipping line list.","type":"array","items":{"$ref":"#/components/schemas/shippingLine"}}},"required":["total"]},"shippingLine":{"title":"Shipping line","description":"Shipping line.","type":"object","properties":{"amount":{"type":"number","description":"Shipping line amount.","default":0},"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"code":{"description":"Shipping line code.","type":"string"},"name":{"description":"Shipping line name.","type":"string"},"localizedName":{"description":"Shipping line name in a form of a map of translations.","type":"object","additionalProperties":{"type":"string"}},"discounts":{"description":"Shipping line discount.","type":"array","items":{"$ref":"#/components/schemas/discount"}},"tax":{"$ref":"#/components/schemas/shippingTax"},"link":{"$ref":"#/components/schemas/reference"},"shippingTaxCode":{"type":"string"}},"required":["code"]},"shippingTax":{"title":"Tax","description":"Tax details.","type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/taxLine"}},"total":{"$ref":"#/components/schemas/taxTotal"},"rate":{"description":"The rate of the shipping tax","type":"number"}},"required":["total"]},"deliveryWindow":{"title":"Delivery Window","type":"object","properties":{"id":{"type":"string","description":"Id of the delivery window"},"deliveryDate":{"type":"string","format":"date","description":"Delivery date."},"slotId":{"type":"string","description":"ID of the delivery slot"},"deliveryTimeRange":{"$ref":"#/components/schemas/deliveryTimeRange"},"deliveryCycle":{"type":"string","description":"Delivery cycle to which the order is assigned (containing date)"},"deliveryCycleName":{"type":"string","description":"Delivery cycle name to which the order is assigned"}}},"deliveryTimeRange":{"title":"Delivery Time Range","type":"object","properties":{"timeFrom":{"type":"string","format":"time","description":"Start Time"},"timeTo":{"type":"string","format":"time","description":"End Time"}}},"metadataMixins":{"title":"Metadata DTO","type":"object","additionalProperties":true,"properties":{"mixins":{"type":"object","additionalProperties":true},"version":{"type":"integer"}}},"orderCalculatedPrice":{"type":"object","description":"A breakdown of the total price calculated from all line items, including detailed pricing components.","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all line item price values, it means unit prices multiplied by quantity - `entries[].calculatedPrice.price`.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all line item uplift values. Uplift value is the maximum additional amount to be authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for any item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the uplift amount, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The sum of all line item prices after discounts are calculated. It's included in the response if at least one line item has a discounted price. It's the total amount of discounted prices for items with applied discounts and the original prices for items without discounts. It reflects the total cost of all line items after discounts.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"paymentFees":{"type":"array","description":"The list of payment fees applied to an order. Payment fees are not changed and are not discounted, even when a discount or coupon is applied to the total.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedPaymentFee"},{"type":"object","properties":{"id":{"type":"string","description":"Payment fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the payment fee. PERCENT for the fee’s `feePercentage`` multiplied by sum of line items `finalPrice` plus shipping cost. ABSOLUTE - monetary amount that is assigned to the payment method."},"price":{"description":"Calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"The monetary amount of the fee, depending on the fee type. ABSOLUTE for the value of defined fee’s `feeAbsolute.amount` attribute. The amount is treated as `netValue`. PERCENT, when defined on fee level percentage, `feePercentage` attribute, of sum of all item line’s `finalPrice.netValue` plus cart’s `calculatedPrice.totalShipping.netValue`. If the fee is taxable and has a tax code, the gross value is calculated. Otherwise, `grossValue` is equal to `netValue`."},"grossValue":{"type":"number","format":"double","description":"For a fee where `taxable=true` and a valid `taxCode` is provided, the tax rate associated with that tax code is used to calculate `grossValue`. If the fee is not taxable, `netValue` is equal to `grossValue`."},"taxValue":{"type":"number","format":"double","description":"Tax value of the payment fee, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the `taxCode` provided at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"The tax code defined at the fee level, for example STANDARD. The value must correspond to the available tax codes in the system configuration."}}}}}]}},"fees":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all fees applied on the line items plus the payment fee *before discounts*."}]},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The sum of all fees applied on the line items plus the payment fee. It's calculated by summing `entries[].calculatedPrice.totalFee` with `paymentFee`. **The `totalFee` is the value *after all the discounts*, if any discounts were applied.**","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the total fee, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the total fee, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the total fee, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, resulting in the same `taxRate`, the value is present. Otherwise, the field is not returned in the response."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode` defined, the value is present. Otherwise, the field is not returned in the response."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to on the line item fees. The payment fee itself is not discountable.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalFee[].appliedDiscounts[].value` grouped by `discount.id`."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the fee."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"shipping":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The total shipping cost is calculated by summing `items[].calculatedPrice.price.grossValue` for shipping estimation. `GrossValue` is used because, even for zero-tax items, it remains equal to `netValue`. The `shipping` is the value *before discounts*, use totalShipping to get the value after discounts."}]},"totalShipping":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total shipping cost is calculated by summing `entries[].calculatedPrice.price.grossValue` for shipping estimation. `GrossValue` is used because, even for zero-tax items, it remains equal to `netValue`. **The `totalShipping` is the value *after all the discounts(, if any discounts were applied.**","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxCode":{"type":"string","description":"Tax code applied to the shipping cost, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the shipping cost, it's the percentage at which an individual or business is taxed."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to shipping.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithTaxAggregate"},{"type":"object","description":"The final price is the sum of `entries[].finalPrice`, `totalShipping`, and `paymentFee`, without the uplift value.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."},"taxAggregate":{"properties":{"lines":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A list of tax values grouped by `taxCode` and `taxRate`. It includes the sum of `item[].calculatedPrice.discountedPrice` or `item[].calculatedPrice.price`, `item[].calculatedPrice.fees[].discountedPrice` or `item[].calculatedPrice.fees[].price`, `calculatedPrice.totalShipping` and `calculatedPrice.paymentFees`. If any of these values have the same `taxRate` but different `taxCode`, they are listed separately. The aggregation also includes items that do not have a `taxRate` or `taxCode` defined.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the tax, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the tax, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the tax, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the tax, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the tax, it's the percentage at which an individual or business is taxed."}}}]}}}}}]}}},"calculatedPaymentFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"price":{"$ref":"#/components/schemas/calculatedPrice"}},"title":"calculatedPaymentFee"},"calculatedPriceWithTaxAggregate":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A price calculation model that includes tax aggregate information.","properties":{"taxAggregate":{"$ref":"#/components/schemas/calculatedTaxAggregate"}}}]},"calculatedTaxAggregate":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/calculatedPrice"},"description":"List of tax calculations grouped by taxCode and taxRate"}},"description":"Aggregated tax information showing detailed tax calculations"}}}}
```

## The orderStatus object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"orderStatus":{"type":"string","enum":["IN_CHECKOUT","CREATED","CONFIRMED","DECLINED","SHIPPED","COMPLETED"],"description":"Status of the order. Supported order statuses are `IN_CHECKOUT`, `CREATED`, `CONFIRMED`, `DECLINED`, `SHIPPED`, `COMPLETED`'. Customers can only change the order status from `CREATED` to `DECLINED`."}}}}
```

## The splitOrderType object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"splitOrderType":{"type":"string","enum":["MASTER_ORDER","SUB_ORDER"],"description":"Available on orders that have been split. For standard orders, the value is `null`. For the original order that was split, the value is `MASTER_ORDER`s, and for the created suborders, the value is `SUB_ORDER`."}}}}
```

## The splitBy object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"splitBy":{"type":"string","enum":["VENDOR_ID"],"description":"Specifies the criteria used to split a master order into suborders. Currently, only `VENDOR_ID` is supported."}}}}
```

## The splitInfo object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"splitInfo":{"type":"object","properties":{"splitBy":{"$ref":"#/components/schemas/splitBy"},"uniqueValue":{"type":"string","description":"A unique value used to split the entries of a master order into separate suborders. Available only on suborders that had uniqueValue for the split. Not available on master order."}},"description":"Information about how the order was split from the master order."},"splitBy":{"type":"string","enum":["VENDOR_ID"],"description":"Specifies the criteria used to split a master order into suborders. Currently, only `VENDOR_ID` is supported."}}}}
```

## The splitItemResponse object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"splitItemResponse":{"type":"object","properties":{"id":{"type":"string","description":"An ID of a suborder."},"uniqueValue":{"type":"string","description":"A unique value used to split the entries of a master order into separate suborders."}},"description":"Information about how the order was split from the master order."}}}}
```

## The orderSplitRequest object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"orderSplitRequest":{"type":"object","properties":{"splitBy":{"$ref":"#/components/schemas/splitBy"}}},"splitBy":{"type":"string","enum":["VENDOR_ID"],"description":"Specifies the criteria used to split a master order into suborders. Currently, only `VENDOR_ID` is supported."}}}}
```

## The orderSplitResponse object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"orderSplitResponse":{"type":"object","properties":{"masterOrder":{"type":"string","description":"ID of the order that was split. The same as in the path."},"splitBy":{"$ref":"#/components/schemas/splitBy"},"subOrders":{"type":"array","items":{"$ref":"#/components/schemas/splitItemResponse"}}}},"splitBy":{"type":"string","enum":["VENDOR_ID"],"description":"Specifies the criteria used to split a master order into suborders. Currently, only `VENDOR_ID` is supported."},"splitItemResponse":{"type":"object","properties":{"id":{"type":"string","description":"An ID of a suborder."},"uniqueValue":{"type":"string","description":"A unique value used to split the entries of a master order into separate suborders."}},"description":"Information about how the order was split from the master order."}}}}
```

## The paymentStatus object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"paymentStatus":{"type":"string","enum":["PENDING","AUTHORIZATION_SUCCESS","AUTHORIZATION_FAILURE","CAPTURE_SUCCESS","CAPTURE_FAILURE","SUCCESS","FAILURE","CANCELLATION_SUCCESS","CANCELLATION_FAILURE","REFUND_SUCCESS","REFUND_FAILURE"],"default":"PENDING","description":"Status of the payment."}}}}
```

## The transitions object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"transitions":{"title":"Transitions","description":"Order status transition list.","type":"array","items":{"$ref":"#/components/schemas/transition"}},"transition":{"title":"Transition","description":"Order status transition.","type":"object","properties":{"status":{"$ref":"#/components/schemas/orderStatus"}}},"orderStatus":{"type":"string","enum":["IN_CHECKOUT","CREATED","CONFIRMED","DECLINED","SHIPPED","COMPLETED"],"description":"Status of the order. Supported order statuses are `IN_CHECKOUT`, `CREATED`, `CONFIRMED`, `DECLINED`, `SHIPPED`, `COMPLETED`'. Customers can only change the order status from `CREATED` to `DECLINED`."}}}}
```

## The transition object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"transition":{"title":"Transition","description":"Order status transition.","type":"object","properties":{"status":{"$ref":"#/components/schemas/orderStatus"}}},"orderStatus":{"type":"string","enum":["IN_CHECKOUT","CREATED","CONFIRMED","DECLINED","SHIPPED","COMPLETED"],"description":"Status of the order. Supported order statuses are `IN_CHECKOUT`, `CREATED`, `CONFIRMED`, `DECLINED`, `SHIPPED`, `COMPLETED`'. Customers can only change the order status from `CREATED` to `DECLINED`."}}}}
```

## The metadataMixins object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"metadataMixins":{"title":"Metadata DTO","type":"object","additionalProperties":true,"properties":{"mixins":{"type":"object","additionalProperties":true},"version":{"type":"integer"}}}}}}
```

## The YRN object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"YRN":{"type":"string","title":"YRN","description":"In YaaS, a global resource identifier is a Uniform Resource Name (URN) with a custom YaaS schema and is called a YaaS Resource Name, or YRN.\n\nIt is a unique identifier, which stores information about a resource, such as its type, ID or name of the tenant.","minLength":1}}}}
```

## The assistedBuyingEntry object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"assistedBuyingEntry":{"title":"AssistedBuyingEntry","type":"object","properties":{"employeeId":{"type":"string","description":"Identifier of an employee who performed an action on behalf of a customer."},"operation":{"type":"string","description":"'Indicates an operation type done by an employee on behalf of a customer. Available options: `CREATE` and `UPDATE_STATUS`'","enum":["CREATE","UPDATE_STATUS"]},"timestamp":{"type":"string","description":"Indicates a timestamp when an operation was performed."}}}}}}
```

## The assistedBuying object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"assistedBuying":{"title":"assistedBuying","type":"object","properties":{"entries":{"type":"array","description":"List of operations done by an employee on behalf of a customer.","items":{"$ref":"#/components/schemas/assistedBuyingEntry"}}},"description":"The field is populated only if an assisted buying operation was performed. The field is read-only. There is no possibility to update it by PUT/PATCH operation."},"assistedBuyingEntry":{"title":"AssistedBuyingEntry","type":"object","properties":{"employeeId":{"type":"string","description":"Identifier of an employee who performed an action on behalf of a customer."},"operation":{"type":"string","description":"'Indicates an operation type done by an employee on behalf of a customer. Available options: `CREATE` and `UPDATE_STATUS`'","enum":["CREATE","UPDATE_STATUS"]},"timestamp":{"type":"string","description":"Indicates a timestamp when an operation was performed."}}}}}}
```

## The orderCalculatedPrice object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"orderCalculatedPrice":{"type":"object","description":"A breakdown of the total price calculated from all line items, including detailed pricing components.","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all line item price values, it means unit prices multiplied by quantity - `entries[].calculatedPrice.price`.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all line item uplift values. Uplift value is the maximum additional amount to be authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for any item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the uplift amount, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The sum of all line item prices after discounts are calculated. It's included in the response if at least one line item has a discounted price. It's the total amount of discounted prices for items with applied discounts and the original prices for items without discounts. It reflects the total cost of all line items after discounts.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned."}}}]},"paymentFees":{"type":"array","description":"The list of payment fees applied to an order. Payment fees are not changed and are not discounted, even when a discount or coupon is applied to the total.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedPaymentFee"},{"type":"object","properties":{"id":{"type":"string","description":"Payment fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the payment fee. PERCENT for the fee’s `feePercentage`` multiplied by sum of line items `finalPrice` plus shipping cost. ABSOLUTE - monetary amount that is assigned to the payment method."},"price":{"description":"Calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"The monetary amount of the fee, depending on the fee type. ABSOLUTE for the value of defined fee’s `feeAbsolute.amount` attribute. The amount is treated as `netValue`. PERCENT, when defined on fee level percentage, `feePercentage` attribute, of sum of all item line’s `finalPrice.netValue` plus cart’s `calculatedPrice.totalShipping.netValue`. If the fee is taxable and has a tax code, the gross value is calculated. Otherwise, `grossValue` is equal to `netValue`."},"grossValue":{"type":"number","format":"double","description":"For a fee where `taxable=true` and a valid `taxCode` is provided, the tax rate associated with that tax code is used to calculate `grossValue`. If the fee is not taxable, `netValue` is equal to `grossValue`."},"taxValue":{"type":"number","format":"double","description":"Tax value of the payment fee, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the `taxCode` provided at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"The tax code defined at the fee level, for example STANDARD. The value must correspond to the available tax codes in the system configuration."}}}}}]}},"fees":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The sum of all fees applied on the line items plus the payment fee *before discounts*."}]},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The sum of all fees applied on the line items plus the payment fee. It's calculated by summing `entries[].calculatedPrice.totalFee` with `paymentFee`. **The `totalFee` is the value *after all the discounts*, if any discounts were applied.**","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the total fee, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the total fee, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the total fee, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, resulting in the same `taxRate`, the value is present. Otherwise, the field is not returned in the response."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode` defined, the value is present. Otherwise, the field is not returned in the response."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to on the line item fees. The payment fee itself is not discountable.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalFee[].appliedDiscounts[].value` grouped by `discount.id`."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the fee."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"shipping":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The total shipping cost is calculated by summing `items[].calculatedPrice.price.grossValue` for shipping estimation. `GrossValue` is used because, even for zero-tax items, it remains equal to `netValue`. The `shipping` is the value *before discounts*, use totalShipping to get the value after discounts."}]},"totalShipping":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total shipping cost is calculated by summing `entries[].calculatedPrice.price.grossValue` for shipping estimation. `GrossValue` is used because, even for zero-tax items, it remains equal to `netValue`. **The `totalShipping` is the value *after all the discounts(, if any discounts were applied.**","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxCode":{"type":"string","description":"Tax code applied to the shipping cost, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the shipping cost, it's the percentage at which an individual or business is taxed."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to shipping.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithTaxAggregate"},{"type":"object","description":"The final price is the sum of `entries[].finalPrice`, `totalShipping`, and `paymentFee`, without the uplift value.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."},"taxAggregate":{"properties":{"lines":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A list of tax values grouped by `taxCode` and `taxRate`. It includes the sum of `item[].calculatedPrice.discountedPrice` or `item[].calculatedPrice.price`, `item[].calculatedPrice.fees[].discountedPrice` or `item[].calculatedPrice.fees[].price`, `calculatedPrice.totalShipping` and `calculatedPrice.paymentFees`. If any of these values have the same `taxRate` but different `taxCode`, they are listed separately. The aggregation also includes items that do not have a `taxRate` or `taxCode` defined.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the tax, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the tax, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the tax, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to the tax, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the tax, it's the percentage at which an individual or business is taxed."}}}]}}}}}]}}},"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]},"calculatedPriceWithDiscounts":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","properties":{"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}}]},"calculatedAppliedDiscount":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the applied discount."},"value":{"type":"number","format":"double","description":"The calculated value of the discount."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Applied discount's price. When discount is applied before tax the value equals `price.netValue` and `price.grossValue` for discount applied after tax."}]},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"The discount type which shows how the discount was calculated."},"origin":{"type":"string","enum":["INTERNAL","EXTERNAL"],"description":"Indicates whether the discount is from internal coupon (INTERNAL) or external discount (EXTERNAL)."}}},"calculatedPaymentFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"price":{"$ref":"#/components/schemas/calculatedPrice"}},"title":"calculatedPaymentFee"},"calculatedTotalDiscount":{"type":"object","description":"The total combined value of all applied discounts.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were calculated using net or gross price values."},"value":{"type":"number","format":"double","description":"The calculated amount of all discounts."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Total discounts price. When discounts are applied before tax the value equals `price.netValue` and `price.grossValue` for discounts applied after tax."}]},"appliedDiscounts":{"type":"array","description":"All applied discounts that are parts of the sum.","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}},"calculatedPriceWithTaxAggregate":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A price calculation model that includes tax aggregate information.","properties":{"taxAggregate":{"$ref":"#/components/schemas/calculatedTaxAggregate"}}}]},"calculatedTaxAggregate":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/calculatedPrice"},"description":"List of tax calculations grouped by taxCode and taxRate"}},"description":"Aggregated tax information showing detailed tax calculations"}}}}
```

## The calculatedPrice object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]}}}}
```

## The calculatedPriceWithTaxAggregate object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"calculatedPriceWithTaxAggregate":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"A price calculation model that includes tax aggregate information.","properties":{"taxAggregate":{"$ref":"#/components/schemas/calculatedTaxAggregate"}}}]},"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]},"calculatedTaxAggregate":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/calculatedPrice"},"description":"List of tax calculations grouped by taxCode and taxRate"}},"description":"Aggregated tax information showing detailed tax calculations"}}}}
```

## The calculatedTaxAggregate object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"calculatedTaxAggregate":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/calculatedPrice"},"description":"List of tax calculations grouped by taxCode and taxRate"}},"description":"Aggregated tax information showing detailed tax calculations"},"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]}}}}
```

## The calculatedFee object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"calculatedFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"origin of the fee, `INTERNAL` defined in commerce engine, `EXTERNAL` specified when item is added to the cart."},"price":{"$ref":"#/components/schemas/calculatedPrice"},"discountedPrice":{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"}}},"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]},"calculatedPriceWithDiscounts":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","properties":{"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}}]},"calculatedAppliedDiscount":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the applied discount."},"value":{"type":"number","format":"double","description":"The calculated value of the discount."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Applied discount's price. When discount is applied before tax the value equals `price.netValue` and `price.grossValue` for discount applied after tax."}]},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"The discount type which shows how the discount was calculated."},"origin":{"type":"string","enum":["INTERNAL","EXTERNAL"],"description":"Indicates whether the discount is from internal coupon (INTERNAL) or external discount (EXTERNAL)."}}}}}}
```

## The calculatedPaymentFee object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"calculatedPaymentFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"price":{"$ref":"#/components/schemas/calculatedPrice"}},"title":"calculatedPaymentFee"},"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]}}}}
```

## The calculatedPriceWithDiscounts object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"calculatedPriceWithDiscounts":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","properties":{"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}}]},"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]},"calculatedAppliedDiscount":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the applied discount."},"value":{"type":"number","format":"double","description":"The calculated value of the discount."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Applied discount's price. When discount is applied before tax the value equals `price.netValue` and `price.grossValue` for discount applied after tax."}]},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"The discount type which shows how the discount was calculated."},"origin":{"type":"string","enum":["INTERNAL","EXTERNAL"],"description":"Indicates whether the discount is from internal coupon (INTERNAL) or external discount (EXTERNAL)."}}}}}}
```

## The calculatedAppliedDiscount object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"calculatedAppliedDiscount":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the applied discount."},"value":{"type":"number","format":"double","description":"The calculated value of the discount."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Applied discount's price. When discount is applied before tax the value equals `price.netValue` and `price.grossValue` for discount applied after tax."}]},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"The discount type which shows how the discount was calculated."},"origin":{"type":"string","enum":["INTERNAL","EXTERNAL"],"description":"Indicates whether the discount is from internal coupon (INTERNAL) or external discount (EXTERNAL)."}}},"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]}}}}
```

## The calculatedTotalDiscount object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"calculatedTotalDiscount":{"type":"object","description":"The total combined value of all applied discounts.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were calculated using net or gross price values."},"value":{"type":"number","format":"double","description":"The calculated amount of all discounts."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Total discounts price. When discounts are applied before tax the value equals `price.netValue` and `price.grossValue` for discounts applied after tax."}]},"appliedDiscounts":{"type":"array","description":"All applied discounts that are parts of the sum.","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}},"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]},"calculatedAppliedDiscount":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the applied discount."},"value":{"type":"number","format":"double","description":"The calculated value of the discount."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Applied discount's price. When discount is applied before tax the value equals `price.netValue` and `price.grossValue` for discount applied after tax."}]},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"The discount type which shows how the discount was calculated."},"origin":{"type":"string","enum":["INTERNAL","EXTERNAL"],"description":"Indicates whether the discount is from internal coupon (INTERNAL) or external discount (EXTERNAL)."}}}}}}
```

## The orderEntryCalculatedPrice object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"orderEntryCalculatedPrice":{"type":"object","properties":{"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The price is calculated by multiplying the unit price (taken from priceMatch) by the quantity."},{"properties":{"calculated":{"type":"string","description":"Indicates how the line item price was determined. - `INTERNAL` — Calculated by Emporix using unit price × quantity. - `EXTERNAL` — Provided externally with `lineTax`.","enum":["INTERNAL","EXTERNAL"]}}}]},"upliftValue":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Maximum additional amount authorized for payment to cover potential price adjustments during packaging of weight-based products. For example, if the item’s `price.netValue=12`, the `upliftValue.netValue=1,2`, with 10% uplift configured. If the uplift value is not configured for an item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the uplift amount, value without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the uplift amount, value with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the uplift amount, it's the actual amount of tax that has to be paid."},"taxCode":{"type":"string","description":"Tax code applied to uplift amount, a tax code is a country's set of tax rules."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed."}}}]},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed."},"taxCode":{"type":"string","description":"Tax code applied to the discounted price, a tax code is a country's set of tax rules."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Value of the discount that was applied."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"fees":{"type":"array","description":"A list of fees applied to the line item. If there are no fees on the item line, it's not returned in the response.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedFee"},{"type":"object","properties":{"id":{"type":"string","description":"Fee identifier."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"PERCENT for fee percentage of the item's line `price.netValue` - unit price x quantity. ABSOLUTE for the absolute amount assigned to the item line. ABSOLUTE_MULTIPLY_ITEMQUANTITY for the monetary amount multiplied by the item quantity and assigned to the item line."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"INTERNAL defined in commerce engine, EXTERNAL specified when an item is added to the order."},"name":{"type":"object","description":"Fee name."},"price":{"type":"object","description":"The calculated price of the fee.","properties":{"netValue":{"type":"number","format":"double","description":"Monetary amount of the fee, depends on the fee type."},"grossValue":{"type":"number","format":"double","description":"Value calculated based on the `taxCode` and the `taxRate` if `taxable=true`."},"taxRate":{"type":"number","format":"double","description":"If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the provided `taxCode` at the fee level. A taxable fee must have a defined `taxCode`."},"taxCode":{"type":"string","description":"Tax code defined on the fee level, for example STANDARD. The value should match the available tax codes in the system configuration."}}},"discountedPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"The total price for the item line calculated by multiplying the unit price by the quantity, with applied discounts. If there are no applied discounts to the given line item, the attribute is not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"The net value after applying discounts, calculated if `includesTax=false`."},"grossValue":{"type":"number","format":"double","description":"The gross value after applying discounts, calculated if `includesTax=true`."},"taxValue":{"type":"number","format":"double","description":"The difference between `grossValue` and `netValue`."},"taxRate":{"type":"number","format":"double","description":"Refers to `fees[].price.taxRate`."},"taxCode":{"type":"string","description":"Refers to `fees[].price.taxCode`."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Monetary amount of the discount applied to the price for the given discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]}}}]}},"totalFee":{"allOf":[{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"},{"type":"object","description":"Sum of all fees applied to the item. It's calculated by summarizing `fees[].discountedPrice` if any discounts were applied to the fee, or `fees[].price` for an pre-discounted fee. If there are no fees applied to the line item, it's not returned in the response.","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price, price without tax."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price, price with tax."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price, it's the actual amount of tax that has to be paid."},"taxRate":{"type":"number","format":"double","description":"If all fees have the same `taxCode` defined, which results in the same `taxRate`, then the value is present. Otherwise, the field is not returned."},"taxCode":{"type":"string","description":"If all fees have the same `taxCode`, then the value is present. Otherwise, the field is not returned."},"appliedDiscounts":{"type":"array","description":"A list of discounts applied to the line item.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"Sum of all `fees[].discountedPrice.appliedDiscounts[].value` grouped by `discount.id`"},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item."}}}]}}}}]},"totalDiscount":{"allOf":[{"$ref":"#/components/schemas/calculatedTotalDiscount"},{"type":"object","description":"A summary of all discounts applied to the line, including discounts on both the line item's price and its fees. If there are no discounts applied on to the line item, it's not returned in the response.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were applied to net or gross values."},"value":{"type":"number","format":"double","description":"Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`."},"appliedDiscounts":{"type":"array","description":"A list of the applied discounts.","items":{"allOf":[{"$ref":"#/components/schemas/calculatedAppliedDiscount"},{"type":"object","properties":{"id":{"type":"string","description":"Discount identifier."},"value":{"type":"number","format":"double","description":"The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID."},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted."}}}]}}}}]},"finalPrice":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"The final price is the sum of the `discountedPrice` or the original price, depending on whether any discounts were applied to the line item, and the `totalFee`, which includes all fees applied to the line item. Since the total fee already includes the discounted prices of fees, the sum is calculated at the `totalFee` level.","properties":{"netValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`."},"grossValue":{"type":"number","format":"double","description":"The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`."},"taxValue":{"type":"number","format":"double","description":"The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices."},"taxRate":{"type":"number","format":"double","description":"If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response."},"taxCode":{"type":"string","description":"The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty."}}}]}},"required":["finalPrice"]},"calculatedPrice":{"type":"object","properties":{"netValue":{"type":"number","format":"double","description":"Net value of the price."},"grossValue":{"type":"number","format":"double","description":"Gross value of the price."},"taxValue":{"type":"number","format":"double","description":"Tax value of the price."},"taxCode":{"type":"string","description":"Tax code applied to the price."},"taxRate":{"type":"number","format":"double","description":"Tax rate applied to the price."}},"description":"A price calculation model containing net and gross amounts along with their associated tax details.","required":["netValue","grossValue","taxValue"]},"calculatedPriceWithDiscounts":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","properties":{"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}}]},"calculatedAppliedDiscount":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the applied discount."},"value":{"type":"number","format":"double","description":"The calculated value of the discount."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Applied discount's price. When discount is applied before tax the value equals `price.netValue` and `price.grossValue` for discount applied after tax."}]},"discountType":{"type":"string","enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"The discount type which shows how the discount was calculated."},"origin":{"type":"string","enum":["INTERNAL","EXTERNAL"],"description":"Indicates whether the discount is from internal coupon (INTERNAL) or external discount (EXTERNAL)."}}},"calculatedFee":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"type":{"type":"string","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"],"description":"Type of the fee."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized names of the fee."},"origin":{"enum":["INTERNAL","EXTERNAL"],"description":"origin of the fee, `INTERNAL` defined in commerce engine, `EXTERNAL` specified when item is added to the cart."},"price":{"$ref":"#/components/schemas/calculatedPrice"},"discountedPrice":{"$ref":"#/components/schemas/calculatedPriceWithDiscounts"}}},"calculatedTotalDiscount":{"type":"object","description":"The total combined value of all applied discounts.","properties":{"calculationType":{"type":"string","enum":["ApplyDiscountBeforeTax","ApplyDiscountAfterTax"],"description":"Indicates whether discounts were calculated using net or gross price values."},"value":{"type":"number","format":"double","description":"The calculated amount of all discounts."},"price":{"allOf":[{"$ref":"#/components/schemas/calculatedPrice"},{"type":"object","description":"Total discounts price. When discounts are applied before tax the value equals `price.netValue` and `price.grossValue` for discounts applied after tax."}]},"appliedDiscounts":{"type":"array","description":"All applied discounts that are parts of the sum.","items":{"$ref":"#/components/schemas/calculatedAppliedDiscount"}}}}}}}
```

## The externalDiscountType object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"externalDiscountType":{"type":"string","description":"Type of the external discount.","enum":["PERCENT","ABSOLUTE"]}}}}
```

## The externalDiscount object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"externalDiscount":{"type":"object","description":"External discount that was applied to order items.","properties":{"id":{"type":"string","description":"Unique identifier of the external discount."},"discountType":{"$ref":"#/components/schemas/externalDiscountType"},"value":{"type":"number","format":"double","minimum":0,"maximum":100,"description":"Value of the discount (percentage e.g 15.00 -> 15% or absolute amount e.g 10.00 -> 10 EUR depending on the discountType). For discountType=`PERCENT`, maximum is 100.0; for ABSOLUTE, there is no limit."},"includeFees":{"type":"boolean","description":"Flag indicating whether the discount is also applied to fees."},"sequence":{"type":"integer","description":"Sequence number determining the order in which discounts are applied. The lowest sequence number is applied first."}},"required":["id","discountType","value"]},"externalDiscountType":{"type":"string","description":"Type of the external discount.","enum":["PERCENT","ABSOLUTE"]}}}}
```

## The externalFee object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"externalFee":{"type":"object","required":["feeType"],"properties":{"id":{"type":"string","description":"Unique identifier of the fee."},"name":{"allOf":[{"$ref":"#/components/schemas/localizedValue"}],"description":"Fee name."},"feeType":{"type":"string","description":"Type of the fee.","enum":["PERCENT","ABSOLUTE","ABSOLUTE_MULTIPLY_ITEMQUANTITY"]},"feePercentage":{"type":"number","description":"Value of the fee as percentage. It must be provided when feeType equals `PERCENT`."},"feeAbsolute":{"type":"object","description":"Value of the fee as absolute. It must be provided when feeType equals `ABSOLUTE` or `ABSOLUTE_MULTIPLY_ITEMQUANTITY`.","required":["currency","amount"],"properties":{"currency":{"type":"string","description":"Currency of the fee absolute."},"amount":{"type":"number","description":"Value of the fee absolute."}}},"taxable":{"type":"boolean","description":"It marks whether tax should be included to the fee or not. A taxable fee must have the `taxCode` attribute provided."},"taxCode":{"type":"string","description":"Tax code of the fee."}}},"localizedValue":{"description":"Localized value which can have different structure which depends on provided `Content-Language` header.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}]}}}}
```

## The priceMatchDetails object

```json
{"openapi":"3.0.0","info":{"title":"Order Service","version":"0.0.1"},"components":{"schemas":{"priceMatchDetails":{"title":"priceMatchDetails","type":"object","properties":{"netValue":{"type":"number","format":"double","description":"The net value of the matched price"},"grossValue":{"type":"number","format":"double","description":"The gross value of the matched price"},"taxValue":{"type":"number","format":"double","description":"The calculated tax value"},"taxCode":{"type":"string","description":"The applied tax code"},"taxRate":{"type":"number","format":"double","description":"The applied tax rate"},"taxCountry":{"type":"string","description":"The tax country for which the price was matched"}},"description":"This model represents the price value retrieved from the price service"}}}}
```
