# Models

## The Restriction object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"Restriction":{"type":"string","nullable":true,"description":"Access control identifier that determines who can view or manage the quotes.\n\n**Purpose**: Restricts quote visibility based on scope permissions. Only users/applications \nwith matching restriction scopes can access quotes with a specific restriction value.\n\n**Access Control**:\n- *Reading*: Users can only query and view quotes 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**Restriction Synchronization**:\n- If quote is created by a customer (based on a cart) and `restriction` property is not set, the `restriction` value of quote is inherited from customer's restriction.\n- If a quote is created by an employee and the `restriction` property is not set with tenant configuration property `enableSyncBetweenRestrictionsAndSiteCodes` set to `true`, the `restriction` field automatically syncs with quote's siteCode property.\n"}}}}
```

## The QuoteItemUpdatePriceRow object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"QuoteItemUpdatePriceRow":{"type":"object","description":"Price details","properties":{"priceId":{"type":"string","description":"The ID of the matched price"},"unitePrice":{"minimum":0,"type":"number","description":"The effective unit price of the product"},"totalNetValue":{"minimum":0,"type":"number","description":"The total net value for the entire quantity of the item."},"tax":{"type":"object","description":"The tax information of the item.","required":["taxClass"],"properties":{"taxClass":{"type":"string","description":"The matched tax class of the item."},"taxRate":{"type":"number","description":"The tax rate of the item."}}}},"required":["tax"]}}}}
```

## The QuoteUpdateStatus object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"QuoteUpdateStatus":{"type":"object","description":"Quote status.","properties":{"value":{"type":"string","description":"The status value of the code."},"comment":{"type":"string","description":"The comment to the status."},"quoteReasonId":{"type":"string","description":"The ID of the quote reason. Can be provided only in following scenarios:\n- when changing state from OPEN to IN_PROGRESS - quote reason has to be of CHANGE type\n- when changing state from OPEN to DECLINED - quote reason has to be of DECLINE type\n- when changing state from IN_PROGRESS to DECLINED_BY_MERCHANT - quote reason has to be of DECLINE type"}},"required":["value"]}}}}
```

## The ErrorResponse object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"ErrorResponse":{"required":["code","message","status"],"type":"object","properties":{"resourceId":{"type":"string","nullable":true},"code":{"type":"integer","format":"int32"},"status":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}}}}}}
```

## The QuoteIdResponse object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"QuoteIdResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of the generated document."}},"description":"ID of the generated quote."}}}}
```

## The QuoteReasonIdResponse object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"QuoteReasonIdResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of the generated document."}},"description":"ID of the generated quote reason."}}}}
```

## The QuoteItemUpdatePrice object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"QuoteItemUpdatePrice":{"type":"object","description":"TotalNetValue item model.","properties":{"totalNetValue":{"type":"number"}}}}}}
```

## The QuoteItemUpdate object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"QuoteItemUpdate":{"type":"object","description":"Quote item model.","properties":{"quantity":{"type":"object","properties":{"quantity":{"type":"number"},"unitCode":{"type":"string"}}},"price":{"$ref":"#/components/schemas/QuoteItemUpdatePriceRow"},"product":{"type":"object","properties":{"productId":{"type":"string"}}}},"required":["itemType","quantity","price","product"]},"QuoteItemUpdatePriceRow":{"type":"object","description":"Price details","properties":{"priceId":{"type":"string","description":"The ID of the matched price"},"unitePrice":{"minimum":0,"type":"number","description":"The effective unit price of the product"},"totalNetValue":{"minimum":0,"type":"number","description":"The total net value for the entire quantity of the item."},"tax":{"type":"object","description":"The tax information of the item.","required":["taxClass"],"properties":{"taxClass":{"type":"string","description":"The matched tax class of the item."},"taxRate":{"type":"number","description":"The tax rate of the item."}}}},"required":["tax"]}}}}
```

## The QuoteItemsReplaceUpdate object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"QuoteItemsReplaceUpdate":{"type":"array","description":"Quote item ID.","items":{"allOf":[{"$ref":"#/components/schemas/QuoteItemUpdate"},{"type":"object","properties":{"itemId":{"type":"string","description":"ID of the item. It's generated automatically when it's not provided."}}}]}},"QuoteItemUpdate":{"type":"object","description":"Quote item model.","properties":{"quantity":{"type":"object","properties":{"quantity":{"type":"number"},"unitCode":{"type":"string"}}},"price":{"$ref":"#/components/schemas/QuoteItemUpdatePriceRow"},"product":{"type":"object","properties":{"productId":{"type":"string"}}}},"required":["itemType","quantity","price","product"]},"QuoteItemUpdatePriceRow":{"type":"object","description":"Price details","properties":{"priceId":{"type":"string","description":"The ID of the matched price"},"unitePrice":{"minimum":0,"type":"number","description":"The effective unit price of the product"},"totalNetValue":{"minimum":0,"type":"number","description":"The total net value for the entire quantity of the item."},"tax":{"type":"object","description":"The tax information of the item.","required":["taxClass"],"properties":{"taxClass":{"type":"string","description":"The matched tax class of the item."},"taxRate":{"type":"number","description":"The tax rate of the item."}}}},"required":["tax"]}}}}
```

## The AddressResponse object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"AddressResponse":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the address."},"name":{"type":"string","description":"The name of the address."},"addressLine1":{"type":"string","description":"First line of the address."},"addressLine2":{"type":"string","description":"Second line of the address."},"city":{"type":"string","description":"City name."},"postcode":{"type":"string","description":"The postal code of the city."},"state":{"type":"string","description":"The state where the city is located."},"countryCode":{"type":"string","description":"The code of the country location."}}}}}}
```

## The QuoteReasonResponse object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"QuoteReasonResponse":{"type":"object","properties":{"id":{"type":"string","description":"The quote reason ID."},"type":{"type":"string","enum":["CHANGE","DECLINE"],"description":"Type of the quote reason."},"message":{"oneOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"string"}],"description":"Localized message - can be either string or map with languages as map's keys accordingly to specified 'Accept-Language' header."},"code":{"type":"string","description":"Code of the reason for the quote status change."},"metadata":{"type":"object","description":"The Quote Reason metadata details.","properties":{"version":{"type":"integer","description":"Version of the quote reason that is used for the optimistic locking handling."},"createdAt":{"type":"string","format":"date-time","description":"The Quote Reason creation timestamp."},"modifiedAt":{"type":"string","format":"date-time","description":"The Quote Reason modification timestamp."}}}}}}}}
```

## The QuoteResponse object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"QuoteResponse":{"type":"object","properties":{"id":{"type":"string","description":"Quote ID\n\n**NOTE**:\nIf not specified during creation, this attribute is automatically generated. It is also possible to assign a custom ID."},"businessModel":{"type":"string","description":"Business model of the quote.","enum":["B2B","B2C"]},"customer":{"type":"object","description":"This attribute contains details about the customer for whom the quote was created.","properties":{"customerId":{"type":"string","description":"The ID of the customer for whom the quote was created."},"firstName":{"type":"string","description":"Customer's first name\n\n**NOTE**:\nThis attribute is filled automatically after the quote is created."},"lastName":{"type":"string","description":"Customer's last name\n\n**NOTE**:\nThis attribute is filled automatically after the quote is created."},"contactEmail":{"type":"string","description":"Customer's contact email\n\n**NOTE**:\nThis attribute is filled automatically after the quote is created."}}},"employee":{"type":"object","description":"This attribute contains details about the employee that is processing the quote.","properties":{"employeeId":{"type":"string","description":"The ID of the employee that is processing the quote."},"firstName":{"type":"string","description":"Employee's first name\n\n**NOTE**:\nThis attribute is filled automatically after the quote is created or the employee ID is updated."},"lastName":{"type":"string","description":"Employee's last name.\n\n**NOTE**:\nThis attribute is filled automatically after the quote is created or the employee ID is updated."}}},"cartId":{"type":"string","description":"The ID of the cart from which the quote was created (not available when the quote was created manually)"},"company":{"type":"object","description":"The company for which the quote was created.","properties":{"name":{"type":"string","description":"The company name for which the quote was created."}}},"siteCode":{"type":"string","description":"The site code for which the quote was created"},"orderId":{"type":"string","description":"The ID of the order which was created based on the quote. The order is created and assigned to the quote when status of the quote transitions to `ACCEPTED`."},"currency":{"type":"string","description":"The currency of the quote prices."},"status":{"type":"object","description":"The status of the quote.","properties":{"value":{"type":"string","description":"The status value of the quote."},"comment":{"type":"string","description":"Comment relating to the status."},"quoteReason":{"allOf":[{"$ref":"#/components/schemas/QuoteReasonResponse"},{"type":"object","description":"The reason for status change."}]}}},"validTo":{"type":"string","format":"date-time","description":"The date until which the quote is valid and can be accepted by the customer."},"comment":{"type":"object","description":"Employee and customer comments.","properties":{"employeeComment":{"type":"string","description":"Employee comment"}}},"billingAddress":{"$ref":"#/components/schemas/AddressResponse"},"shippingAddress":{"$ref":"#/components/schemas/AddressResponse"},"totalPrice":{"type":"object","description":"The calculated total price details.","properties":{"currency":{"type":"string","description":"Currency of the value."},"netValue":{"type":"number","description":"The total net value."},"grossValue":{"type":"number","description":"The total gross value."},"taxValue":{"type":"number","description":"The amount of the tax for the total price."}}},"subtotalPrice":{"type":"object","description":"The calculated quote subtotal price.","properties":{"currency":{"type":"string","description":"Currency of the value."},"netValue":{"type":"number","description":"The subtotal net value."},"grossValue":{"type":"number","description":"The subtotal gross value."},"taxValue":{"type":"number","description":"The subtotal tax value."}}},"taxAggregate":{"type":"object","description":"Tax aggregation of the total price.","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The tax code."},"amount":{"type":"number","description":"The amount of the tax."},"rate":{"type":"number","description":"The tax rate."},"taxable":{"type":"number","description":"The total taxable amount."}}}}}},"shipping":{"allOf":[{"$ref":"#/components/schemas/QuoteShipping"},{"type":"object","properties":{"grossValue":{"type":"number","description":"Gross value of the shipping cost."},"methodName":{"type":"object","description":"Localized name of the shipping method selected by the customer.","additionalProperties":{"type":"string"}}}}]},"items":{"type":"array","description":"A list of quote items.","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the quote item used for patch operations on the item."},"quantity":{"type":"object","description":"The attribute contains details about the item quantity.","properties":{"quantity":{"type":"number","description":"The quantity of the item that is used for the price calculation."},"unitCode":{"type":"string","description":"The unit code of the quantity (it must be one of the units defined in the Unit Handling Service)."}}},"price":{"type":"object","description":"Item price details.","properties":{"type":{"type":"string","description":"Defines if product is external or internal. If the product is internal, it's taken from the Emporix Product Service. If the price is external, it's a custom product from external system.","enum":["INTERNAL","EXTERNAL"]},"priceId":{"type":"string","description":"The ID of the price that was initially assigned to the item."},"unitPrice":{"type":"number","description":"The original unit price of the item that is copied from the initial price."},"newUnitPrice":{"type":"number","description":"The new unit price that is auto-calculated based on provided `quantity` and `totalNetValue` values."},"discount":{"type":"number","description":"The difference in percentage between `unitPrice` and `newUnitPrice`."},"totalNetValue":{"type":"number","description":"The total net price of the item that is initially based on the provided price, but it can be overridden to allow for a merchant discount."},"tax":{"type":"object","description":"This attribute contains information about the calculated item tax.","properties":{"taxClass":{"type":"string","description":"The tax class assigned to the item is initially copied from the initial price."},"taxRate":{"type":"number","description":"The tax rate that is copied from the initial price."},"prices":{"type":"object","description":"The auto-calculated item net and gross prices ","properties":{"grossValue":{"type":"number"},"netValue":{"type":"number"}}}}},"mixins":{"type":"object","description":"Mixins request.","additionalProperties":true},"metadata":{"type":"object","description":"Metadata request.","properties":{"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":true}}}}},"product":{"type":"object","description":"Product details.","properties":{"type":{"type":"string","description":"Defines if product is external or internal. If the product is internal, it's taken from the Emporix Product Service. If the price is external, it's a custom product from external system.","enum":["INTERNAL","EXTERNAL"]},"productId":{"type":"string","description":"The ID of the product or variant assigned to the quote item."},"name":{"type":"object","description":"This attribute contains the product name language map.\n\n**NOTE**:\nAfter the item has been added to the quote, the product name language map attribute is automatically populated."},"media":{"type":"object","description":"This attribute comprises the product media information and is automatically populated upon the creation of the quote.","properties":{"id":{"type":"string","description":"ID of the media."},"contentType":{"type":"string","description":"The content type of the media. For example: `image/jpg`."},"url":{"type":"string","description":"The url to the product media."}}},"taxClasses":{"type":"object","description":"Map of key-value pairs that associates tax classes with locations (countries)."},"mixins":{"type":"object","description":"Mixins request.","additionalProperties":true},"metadata":{"type":"object","description":"Metadata request.","properties":{"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":true}}}}}}}},"mixins":{"type":"object","description":"Mixins request.","additionalProperties":true},"metadata":{"type":"object","description":"Quote metadata details.","properties":{"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":true},"version":{"type":"integer","description":"Version of the quote that is used for the optimistic locking handling."},"createdAt":{"type":"string","format":"date-time","description":"Quote creation timestamp."},"modifiedAt":{"type":"string","format":"date-time","description":"Quote modification timestamp."}}},"restriction":{"$ref":"#/components/schemas/Restriction"}}},"QuoteReasonResponse":{"type":"object","properties":{"id":{"type":"string","description":"The quote reason ID."},"type":{"type":"string","enum":["CHANGE","DECLINE"],"description":"Type of the quote reason."},"message":{"oneOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"string"}],"description":"Localized message - can be either string or map with languages as map's keys accordingly to specified 'Accept-Language' header."},"code":{"type":"string","description":"Code of the reason for the quote status change."},"metadata":{"type":"object","description":"The Quote Reason metadata details.","properties":{"version":{"type":"integer","description":"Version of the quote reason that is used for the optimistic locking handling."},"createdAt":{"type":"string","format":"date-time","description":"The Quote Reason creation timestamp."},"modifiedAt":{"type":"string","format":"date-time","description":"The Quote Reason modification timestamp."}}}}},"AddressResponse":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the address."},"name":{"type":"string","description":"The name of the address."},"addressLine1":{"type":"string","description":"First line of the address."},"addressLine2":{"type":"string","description":"Second line of the address."},"city":{"type":"string","description":"City name."},"postcode":{"type":"string","description":"The postal code of the city."},"state":{"type":"string","description":"The state where the city is located."},"countryCode":{"type":"string","description":"The code of the country location."}}},"QuoteShipping":{"type":"object","description":"The shipping cost of the quote.","properties":{"value":{"type":"number","description":"Net value of the shipping cost."},"methodId":{"type":"string","description":"Shipping method's unique identifier."},"zoneId":{"type":"string","description":"Shipping zone identifier."},"shippingTaxCode":{"type":"string","description":"Tax code of the shipping method."}}},"Restriction":{"type":"string","nullable":true,"description":"Access control identifier that determines who can view or manage the quotes.\n\n**Purpose**: Restricts quote visibility based on scope permissions. Only users/applications \nwith matching restriction scopes can access quotes with a specific restriction value.\n\n**Access Control**:\n- *Reading*: Users can only query and view quotes 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**Restriction Synchronization**:\n- If quote is created by a customer (based on a cart) and `restriction` property is not set, the `restriction` value of quote is inherited from customer's restriction.\n- If a quote is created by an employee and the `restriction` property is not set with tenant configuration property `enableSyncBetweenRestrictionsAndSiteCodes` set to `true`, the `restriction` field automatically syncs with quote's siteCode property.\n"}}}}
```

## The QuoteReasonCreateRequest object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"QuoteReasonCreateRequest":{"type":"object","description":"The schema specifies the attributes that must be provided when creating a quote reason.","properties":{"id":{"type":"string","description":"The ID for a quote reason can either be manually provided at the time of the quote reason creation, or is automatically generated if not provided."},"type":{"type":"string","description":"Type of the quote reason.","enum":["CHANGE","DECLINE"]},"code":{"type":"string","description":"Code of the reason for the quote status change."},"message":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized message in the form of a map of translations."}},"required":["type","code","message"]}}}}
```

## The QuoteReasonUpdateRequest object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"QuoteReasonUpdateRequest":{"type":"object","description":"The schema specifies the attributes that must be provided when creating a quote reason.","properties":{"type":{"type":"string","description":"Type of the quote reason.","enum":["CHANGE","DECLINE"]},"code":{"type":"string","description":"Code of the reason for the quote status change."},"message":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized message in the form of a map of translations."},"metadata":{"type":"object","description":"The Quote Reason metadata details","properties":{"version":{"type":"integer","description":"Version of the quote reason that is used for the optimistic locking handling"}},"required":["version"]}},"required":["type","code","message","metadata"]}}}}
```

## The QuoteCreateRequest object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"QuoteCreateRequest":{"type":"object","description":"The schema specifies the attributes that must be provided when creating a quote manually.","properties":{"id":{"type":"string","description":"The ID for a quote can either be manually provided at the time of the quote creation, or is automatically generated if not provided."},"customerId":{"type":"string","description":"The customer ID for which the new quote is created. Either this attribute or the `customerEmail` attribute is required for the quote creation"},"employeeId":{"type":"string","description":"The employee ID for which the new quote is created. By default, the employeeId is taken from session token, but in case the session token is not provided, employeeId is taken from the payload. Default employee from the configuration will be assigned to the quote in case session token nor 'employeeId' is not provided."},"companyName":{"type":"string","description":"The name of the merchant company."},"siteCode":{"type":"string","description":"The site code for which the quote is created."},"currency":{"type":"string","description":"The currency for which the quote is created."},"billingAddressId":{"type":"string","description":"For B2B customers, it represents the location which should specify the billing address. For B2C customers, it represents identifier of customer's billing address."},"shippingAddressId":{"type":"string","description":"For B2B customers, it represents the location which should specify the shipping address. For B2C customers, it represents identifier of customer's shipping address."},"validTo":{"type":"string","format":"date-time","description":"The date until which the quote is valid for the customer. After this date, the quote cannot be approved and transformed into order by the customer."},"shipping":{"$ref":"#/components/schemas/QuoteShipping"},"items":{"type":"array","description":"Quote items.","items":{"type":"object","properties":{"itemId":{"type":"string","description":"ID of the item. It's generated automatically when it's not provided."},"quantity":{"type":"object","description":"The quantity of the quote item in a given unit.","properties":{"quantity":{"type":"number","description":"The quantity of quote items."},"unitCode":{"type":"string","description":"The unit of the quantity as defined in the Unit Handling Service."}},"required":["quantity","unitCode"]},"product":{"type":"object","description":"Product reference.","required":["productId"],"properties":{"type":{"type":"string","description":"Defines if product is external or internal. If the product is internal, it's taken from the Emporix Product Service. If the price is external, it's a custom product from external system.","enum":["INTERNAL","EXTERNAL"]},"productId":{"type":"string","description":"Product or variant ID."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized name of a product. Used for the `EXTERNAL` products as the `INTERNAL` ones are populated from the product catalog data."},"media":{"type":"object","description":"Media object that can be provided for an `EXTERNAL` product. `INTERNAL` products have media populated automatically and override the given value.","properties":{"id":{"type":"string","description":"ID of the media."},"contentType":{"type":"string","description":"The content type of the media. For example: `image/jpg`."},"url":{"type":"string","description":"The url to the product media."}}},"mixins":{"type":"object","description":"Mixins request.","additionalProperties":true},"metadata":{"type":"object","description":"Metadata request.","properties":{"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":true}}}}},"price":{"type":"object","description":"Matched price of the product.","properties":{"type":{"type":"string","description":"Defines if price is internal or external. If the price is internal, it's taken from the Emporix Price Service. If the price is external, it's a custom price from external system.","enum":["INTERNAL","EXTERNAL"]},"priceId":{"type":"string","description":"ID of the matched price. Required only for type=`INTERNAL`."},"priceListId":{"type":"string","description":"Identifier of price list. The field should be populated only in case when the price belongs to any price list."},"unitPrice":{"type":"number","description":"Effective unit price of the product."},"totalNetValue":{"type":"number","description":"Total net value for the entire quantity of the item."},"tax":{"type":"object","description":"Tax information of the item.","required":["taxClass","taxRate"],"properties":{"taxClass":{"type":"string","description":"Matched tax class of the item."},"taxRate":{"type":"number","description":"Tax rate of the item."}}}},"required":["priceId","unitPrice","totalNetValue","tax"]},"mixins":{"type":"object","description":"Mixins request.","additionalProperties":true},"metadata":{"type":"object","description":"Metadata request.","properties":{"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":true}}}},"required":["product"]}},"restriction":{"$ref":"#/components/schemas/Restriction"},"mixins":{"type":"object","description":"Mixins request.","additionalProperties":true},"metadata":{"type":"object","description":"Metadata request.","properties":{"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":true}}},"customerEmail":{"type":"string","description":"The contact email that identifies the customer. Either this attribute or the `customerId` attribute is mandatory for the quote creation request."}},"required":["customerId","siteCode","currency","billingAddressId","shippingAddressId"]},"QuoteShipping":{"type":"object","description":"The shipping cost of the quote.","properties":{"value":{"type":"number","description":"Net value of the shipping cost."},"methodId":{"type":"string","description":"Shipping method's unique identifier."},"zoneId":{"type":"string","description":"Shipping zone identifier."},"shippingTaxCode":{"type":"string","description":"Tax code of the shipping method."}}},"Restriction":{"type":"string","nullable":true,"description":"Access control identifier that determines who can view or manage the quotes.\n\n**Purpose**: Restricts quote visibility based on scope permissions. Only users/applications \nwith matching restriction scopes can access quotes with a specific restriction value.\n\n**Access Control**:\n- *Reading*: Users can only query and view quotes 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**Restriction Synchronization**:\n- If quote is created by a customer (based on a cart) and `restriction` property is not set, the `restriction` value of quote is inherited from customer's restriction.\n- If a quote is created by an employee and the `restriction` property is not set with tenant configuration property `enableSyncBetweenRestrictionsAndSiteCodes` set to `true`, the `restriction` field automatically syncs with quote's siteCode property.\n"}}}}
```

## The QuoteShipping object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"QuoteShipping":{"type":"object","description":"The shipping cost of the quote.","properties":{"value":{"type":"number","description":"Net value of the shipping cost."},"methodId":{"type":"string","description":"Shipping method's unique identifier."},"zoneId":{"type":"string","description":"Shipping zone identifier."},"shippingTaxCode":{"type":"string","description":"Tax code of the shipping method."}}}}}}
```

## The QuoteItemIds object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"QuoteItemIds":{"type":"array","description":"List of item IDs.","items":{"type":"object","properties":{"itemId":{"type":"string","description":"ID of the item."}}}}}}}
```

## The QuoteUpdateRequest object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"QuoteUpdateRequest":{"type":"array","description":"Quote update operation list.","items":{"type":"object","properties":{"op":{"type":"string","enum":["ADD","REMOVE","REPLACE"]},"path":{"type":"string","enum":["/status","/validTo","/comment","/billingAddressId","/shippingAddressId","/companyName","/customerId","/shipping","/restriction","/items","/items/{itemId}","/items/{itemId}/price","/items/{itemId}/mixins/{mixinsPath}","/items/{itemId}/metadata/mixins/{mixinsPath}","/items/{itemId}/product/mixins/{mixinsPath}","/items/{itemId}/product/metadata/mixins/{mixinsPath}","/mixins/{mixinsPath}","/metadata/{mixinsPath}"]},"value":{"$ref":"#/components/schemas/QuoteUpdateValues"}},"required":["op","path"]}},"QuoteUpdateValues":{"anyOf":[{"$ref":"#/components/schemas/QuoteItemUpdate"},{"$ref":"#/components/schemas/QuoteItemsReplaceUpdate"},{"$ref":"#/components/schemas/QuoteItemUpdatePrice"},{"$ref":"#/components/schemas/QuoteUpdateStatus"},{"$ref":"#/components/schemas/QuoteShipping"},{"$ref":"#/components/schemas/QuoteItemIds"},{"type":"string","description":"Value of the string type."},{"type":"object","description":"Mixin request."}]},"QuoteItemUpdate":{"type":"object","description":"Quote item model.","properties":{"quantity":{"type":"object","properties":{"quantity":{"type":"number"},"unitCode":{"type":"string"}}},"price":{"$ref":"#/components/schemas/QuoteItemUpdatePriceRow"},"product":{"type":"object","properties":{"productId":{"type":"string"}}}},"required":["itemType","quantity","price","product"]},"QuoteItemUpdatePriceRow":{"type":"object","description":"Price details","properties":{"priceId":{"type":"string","description":"The ID of the matched price"},"unitePrice":{"minimum":0,"type":"number","description":"The effective unit price of the product"},"totalNetValue":{"minimum":0,"type":"number","description":"The total net value for the entire quantity of the item."},"tax":{"type":"object","description":"The tax information of the item.","required":["taxClass"],"properties":{"taxClass":{"type":"string","description":"The matched tax class of the item."},"taxRate":{"type":"number","description":"The tax rate of the item."}}}},"required":["tax"]},"QuoteItemsReplaceUpdate":{"type":"array","description":"Quote item ID.","items":{"allOf":[{"$ref":"#/components/schemas/QuoteItemUpdate"},{"type":"object","properties":{"itemId":{"type":"string","description":"ID of the item. It's generated automatically when it's not provided."}}}]}},"QuoteItemUpdatePrice":{"type":"object","description":"TotalNetValue item model.","properties":{"totalNetValue":{"type":"number"}}},"QuoteUpdateStatus":{"type":"object","description":"Quote status.","properties":{"value":{"type":"string","description":"The status value of the code."},"comment":{"type":"string","description":"The comment to the status."},"quoteReasonId":{"type":"string","description":"The ID of the quote reason. Can be provided only in following scenarios:\n- when changing state from OPEN to IN_PROGRESS - quote reason has to be of CHANGE type\n- when changing state from OPEN to DECLINED - quote reason has to be of DECLINE type\n- when changing state from IN_PROGRESS to DECLINED_BY_MERCHANT - quote reason has to be of DECLINE type"}},"required":["value"]},"QuoteShipping":{"type":"object","description":"The shipping cost of the quote.","properties":{"value":{"type":"number","description":"Net value of the shipping cost."},"methodId":{"type":"string","description":"Shipping method's unique identifier."},"zoneId":{"type":"string","description":"Shipping zone identifier."},"shippingTaxCode":{"type":"string","description":"Tax code of the shipping method."}}},"QuoteItemIds":{"type":"array","description":"List of item IDs.","items":{"type":"object","properties":{"itemId":{"type":"string","description":"ID of the item."}}}}}}}
```

## The QuoteUpdateValues object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"QuoteUpdateValues":{"anyOf":[{"$ref":"#/components/schemas/QuoteItemUpdate"},{"$ref":"#/components/schemas/QuoteItemsReplaceUpdate"},{"$ref":"#/components/schemas/QuoteItemUpdatePrice"},{"$ref":"#/components/schemas/QuoteUpdateStatus"},{"$ref":"#/components/schemas/QuoteShipping"},{"$ref":"#/components/schemas/QuoteItemIds"},{"type":"string","description":"Value of the string type."},{"type":"object","description":"Mixin request."}]},"QuoteItemUpdate":{"type":"object","description":"Quote item model.","properties":{"quantity":{"type":"object","properties":{"quantity":{"type":"number"},"unitCode":{"type":"string"}}},"price":{"$ref":"#/components/schemas/QuoteItemUpdatePriceRow"},"product":{"type":"object","properties":{"productId":{"type":"string"}}}},"required":["itemType","quantity","price","product"]},"QuoteItemUpdatePriceRow":{"type":"object","description":"Price details","properties":{"priceId":{"type":"string","description":"The ID of the matched price"},"unitePrice":{"minimum":0,"type":"number","description":"The effective unit price of the product"},"totalNetValue":{"minimum":0,"type":"number","description":"The total net value for the entire quantity of the item."},"tax":{"type":"object","description":"The tax information of the item.","required":["taxClass"],"properties":{"taxClass":{"type":"string","description":"The matched tax class of the item."},"taxRate":{"type":"number","description":"The tax rate of the item."}}}},"required":["tax"]},"QuoteItemsReplaceUpdate":{"type":"array","description":"Quote item ID.","items":{"allOf":[{"$ref":"#/components/schemas/QuoteItemUpdate"},{"type":"object","properties":{"itemId":{"type":"string","description":"ID of the item. It's generated automatically when it's not provided."}}}]}},"QuoteItemUpdatePrice":{"type":"object","description":"TotalNetValue item model.","properties":{"totalNetValue":{"type":"number"}}},"QuoteUpdateStatus":{"type":"object","description":"Quote status.","properties":{"value":{"type":"string","description":"The status value of the code."},"comment":{"type":"string","description":"The comment to the status."},"quoteReasonId":{"type":"string","description":"The ID of the quote reason. Can be provided only in following scenarios:\n- when changing state from OPEN to IN_PROGRESS - quote reason has to be of CHANGE type\n- when changing state from OPEN to DECLINED - quote reason has to be of DECLINE type\n- when changing state from IN_PROGRESS to DECLINED_BY_MERCHANT - quote reason has to be of DECLINE type"}},"required":["value"]},"QuoteShipping":{"type":"object","description":"The shipping cost of the quote.","properties":{"value":{"type":"number","description":"Net value of the shipping cost."},"methodId":{"type":"string","description":"Shipping method's unique identifier."},"zoneId":{"type":"string","description":"Shipping zone identifier."},"shippingTaxCode":{"type":"string","description":"Tax code of the shipping method."}}},"QuoteItemIds":{"type":"array","description":"List of item IDs.","items":{"type":"object","properties":{"itemId":{"type":"string","description":"ID of the item."}}}}}}}
```

## The QuoteHistory object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"QuoteHistory":{"type":"array","description":"Quote update operation list.","items":{"type":"object","properties":{"id":{"description":"The unique ID of the audit log.","type":"string"},"op":{"description":"operation type","enum":["ADD","REMOVE","REPLACE","CREATE"],"type":"string"},"path":{"description":"Path that indicates on which element the update has been executed.","enum":["/quote","/status","/validTo","/comment","/billingAddressId","/shippingAddressId","/companyName","/customerId","/shipping","/restriction","/items","/items/{itemId}","/items/{itemId}/price","/items/{itemId}/mixins/{mixinsPath}","/items/{itemId}/metadata/mixins/{mixinsPath}","/items/{itemId}/product/mixins/{mixinsPath}","/items/{itemId}/product/metadata/mixins/{mixinsPath}","/mixins/{mixinsPath}","/metadata/{mixinsPath}"],"type":"string"},"newValue":{"allOf":[{"$ref":"#/components/schemas/QuoteUpdateValues"},{"type":"object","description":"New value after the update."}]},"previousValue":{"allOf":[{"$ref":"#/components/schemas/QuoteUpdateValues"},{"type":"object","description":"Value before update."}],"description":"Value before update."},"userId":{"type":"string","description":"ID of the user who modified the item."},"userFirstName":{"type":"string","description":"First name of the user who modified the item."},"userLastName":{"type":"string","description":"Last name of the user who modified the item."},"userType":{"enum":["EMPLOYEE","CUSTOMER","SYSTEM"],"type":"string"},"restriction":{"$ref":"#/components/schemas/Restriction"},"modifiedAt":{"type":"string","description":"Modification date."}}}},"QuoteUpdateValues":{"anyOf":[{"$ref":"#/components/schemas/QuoteItemUpdate"},{"$ref":"#/components/schemas/QuoteItemsReplaceUpdate"},{"$ref":"#/components/schemas/QuoteItemUpdatePrice"},{"$ref":"#/components/schemas/QuoteUpdateStatus"},{"$ref":"#/components/schemas/QuoteShipping"},{"$ref":"#/components/schemas/QuoteItemIds"},{"type":"string","description":"Value of the string type."},{"type":"object","description":"Mixin request."}]},"QuoteItemUpdate":{"type":"object","description":"Quote item model.","properties":{"quantity":{"type":"object","properties":{"quantity":{"type":"number"},"unitCode":{"type":"string"}}},"price":{"$ref":"#/components/schemas/QuoteItemUpdatePriceRow"},"product":{"type":"object","properties":{"productId":{"type":"string"}}}},"required":["itemType","quantity","price","product"]},"QuoteItemUpdatePriceRow":{"type":"object","description":"Price details","properties":{"priceId":{"type":"string","description":"The ID of the matched price"},"unitePrice":{"minimum":0,"type":"number","description":"The effective unit price of the product"},"totalNetValue":{"minimum":0,"type":"number","description":"The total net value for the entire quantity of the item."},"tax":{"type":"object","description":"The tax information of the item.","required":["taxClass"],"properties":{"taxClass":{"type":"string","description":"The matched tax class of the item."},"taxRate":{"type":"number","description":"The tax rate of the item."}}}},"required":["tax"]},"QuoteItemsReplaceUpdate":{"type":"array","description":"Quote item ID.","items":{"allOf":[{"$ref":"#/components/schemas/QuoteItemUpdate"},{"type":"object","properties":{"itemId":{"type":"string","description":"ID of the item. It's generated automatically when it's not provided."}}}]}},"QuoteItemUpdatePrice":{"type":"object","description":"TotalNetValue item model.","properties":{"totalNetValue":{"type":"number"}}},"QuoteUpdateStatus":{"type":"object","description":"Quote status.","properties":{"value":{"type":"string","description":"The status value of the code."},"comment":{"type":"string","description":"The comment to the status."},"quoteReasonId":{"type":"string","description":"The ID of the quote reason. Can be provided only in following scenarios:\n- when changing state from OPEN to IN_PROGRESS - quote reason has to be of CHANGE type\n- when changing state from OPEN to DECLINED - quote reason has to be of DECLINE type\n- when changing state from IN_PROGRESS to DECLINED_BY_MERCHANT - quote reason has to be of DECLINE type"}},"required":["value"]},"QuoteShipping":{"type":"object","description":"The shipping cost of the quote.","properties":{"value":{"type":"number","description":"Net value of the shipping cost."},"methodId":{"type":"string","description":"Shipping method's unique identifier."},"zoneId":{"type":"string","description":"Shipping zone identifier."},"shippingTaxCode":{"type":"string","description":"Tax code of the shipping method."}}},"QuoteItemIds":{"type":"array","description":"List of item IDs.","items":{"type":"object","properties":{"itemId":{"type":"string","description":"ID of the item."}}}},"Restriction":{"type":"string","nullable":true,"description":"Access control identifier that determines who can view or manage the quotes.\n\n**Purpose**: Restricts quote visibility based on scope permissions. Only users/applications \nwith matching restriction scopes can access quotes with a specific restriction value.\n\n**Access Control**:\n- *Reading*: Users can only query and view quotes 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**Restriction Synchronization**:\n- If quote is created by a customer (based on a cart) and `restriction` property is not set, the `restriction` value of quote is inherited from customer's restriction.\n- If a quote is created by an employee and the `restriction` property is not set with tenant configuration property `enableSyncBetweenRestrictionsAndSiteCodes` set to `true`, the `restriction` field automatically syncs with quote's siteCode property.\n"}}}}
```

## The QuoteCreateFromCartRequest object

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"components":{"schemas":{"QuoteCreateFromCartRequest":{"type":"object","description":"This schema includes the attributes that are required to be provided when creating a quote from the cart.","title":"QuoteCreateFromCartRequest","required":["cartId"],"properties":{"cartId":{"type":"string","description":"ID of the cart from which the new quote should be created."},"employeeId":{"type":"string","description":"The employee ID for which the new quote is created. By default, the employeeId is taken from the configuration, but in case the 'employeeId' property is provided, the employeeId from the request is assigned to the quote. Only user of EMPLOYEE type can assign employee to the quote."},"billingAddressId":{"type":"string","description":"For B2B customers, it represents the location which should specify the billing address. For B2C customers, it represents identifier of customer's billing address."},"shippingAddressId":{"type":"string","description":"For B2B customers, it represents the location which should specify the shipping address. For B2C customers, it represents identifier of customer's shipping address."},"shipping":{"$ref":"#/components/schemas/QuoteShipping"}}},"QuoteShipping":{"type":"object","description":"The shipping cost of the quote.","properties":{"value":{"type":"number","description":"Net value of the shipping cost."},"methodId":{"type":"string","description":"Shipping method's unique identifier."},"zoneId":{"type":"string","description":"Shipping zone identifier."},"shippingTaxCode":{"type":"string","description":"Tax code of the shipping method."}}}}}}
```
