# Quote history

## Retrieving quote history

> Retrieves changes related to a quote with a given ID. <br>

```json
{"openapi":"3.0.1","info":{"title":"Quote Service","version":"0.0.1"},"tags":[{"name":"Quote history"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["quote.quote_read"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"quote.quote_read":"Needed to retrieve quotes.","quote.quote_read_own":"Needed to retrieve own quotes by the customer.","quote.quote_manage":"Needed to manage quotes.","quote.quote_manage_own":"Needed to manage own quotes by the customer."}}}}},"parameters":{"X-Total-Count":{"name":"X-Total-Count","in":"header","required":false,"schema":{"type":"boolean","default":false},"description":"Flag indicating whether the total number of retrieved items should be returned.\n"}},"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"},"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"}}}}},"responses":{"Unathorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. It usually means that tenant from the token does not match tenant from path.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}}}},"paths":{"/quote/{tenant}/quotes/{quoteId}/history":{"get":{"tags":["Quote history"],"summary":"Retrieving quote history","description":"Retrieves changes related to a quote with a given ID. \n","operationId":"GET-quote-retrieve-quote-history","parameters":[{"name":"tenant","in":"path","description":"Your Emporix tenant name.\n\n**Note**: The tenant name should always be written in lowercase.\n","required":true,"schema":{"type":"string"}},{"name":"quoteId","in":"path","description":"Quote unique identifier generated when the quote is created.\n","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/X-Total-Count"}],"responses":{"200":{"description":"The request was successful. Quote details are returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteHistory"}}}},"401":{"$ref":"#/components/responses/Unathorized_401"},"403":{"description":"Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

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

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

```
GET https://developer.emporix.io/api-references-1/readme/api-reference-28/quote-history.md?ask=<question>
```

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

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