My Quote Requests
The My Quote Requests API creates and provides access to Quote Requests scoped to a specific Customer.
The API requires an access token from the password flow.
Representations
MyQuoteRequestDraft
cartIdString |
|
cartVersionInt | Current version of the Cart. |
commentString | Message from the Buyer included in the Quote Request. |
Get My QuoteRequest
Get My QuoteRequest by ID
manage_my_quote_requests:{projectKey}customer_id:{id}regionString | Region in which the Project is hosted. |
projectKeyString |
|
idString |
|
expand | The parameter can be passed multiple times. |
application/jsoncurl --get https://api.{region}.commercetools.com/{projectKey}/me/quote-requests/{id} -i \--header "Authorization: Bearer ${BEARER_TOKEN}"
{"id": "2a3baa00-44fa-4ab8-bec7-933c31e18dcc","version": 1,"createdAt": "2022-09-22T15:36:17.510Z","lastModifiedAt": "2022-09-22T15:41:55.816Z","quoteRequestState": "Submitted","comment": "Give me 10% discount","customer": {"typeId": "customer","id": "92f5a867-bf19-47ab-982c-6720a03a3921"},"businessUnit": {"key": "bu-345-france","typeId": "business-unit"},"lineItems": [{"id": "b925a817-d5ad-48bb-a407-29ad8e0649b5","productId": "9f10dcfb-5cc9-4a18-843a-c07f7e22d01f","name": {"en": "SAPPHIRE"},"productType": {"typeId": "product-type","id": "2543e1d8-4915-4f72-a3c9-1df9b1b0082d","version": 8},"productSlug": {"en": "sapphire1421832124423"},"variant": {"id": 1,"sku": "sku_SAPPHIRE_variant1_1421832124423","prices": [{"value": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 2800},"id": "8da659ef-9e54-447d-9c36-84912db1848f"}],"images": [{"url": "https://www.commercetools.com/cli/data/252542005_1.jpg","dimensions": {"w": 1400,"h": 1400}}],"attributes": [],"assets": []},"price": {"value": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 2800},"id": "8da659ef-9e54-447d-9c36-84912db1848f"},"quantity": 2,"discountedPricePerQuantity": [],"state": [{"quantity": 2,"state": {"typeId": "state","id": "7c2e2694-aefe-43d7-888e-6a99514caaca"}}],"priceMode": "Platform","lineItemMode": "Standard","totalPrice": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 5600},"perMethodTaxRate": [],"taxedPricePortions": []}],"totalPrice": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 5600},"customLineItems": [],"directDiscounts": [],"inventoryMode": "None","taxMode": "Platform","taxRoundingMode": "HalfEven","taxCalculationMode": "LineItemLevel"}
Get My QuoteRequest by Key
manage_my_quote_requests:{projectKey}customer_id:{id}regionString | Region in which the Project is hosted. |
projectKeyString |
|
keyString |
|
expand | The parameter can be passed multiple times. |
application/jsoncurl --get https://api.{region}.commercetools.com/{projectKey}/me/quote-requests/key={key} -i \--header "Authorization: Bearer ${BEARER_TOKEN}"
{"id": "2a3baa00-44fa-4ab8-bec7-933c31e18dcc","version": 1,"createdAt": "2022-09-22T15:36:17.510Z","lastModifiedAt": "2022-09-22T15:41:55.816Z","quoteRequestState": "Submitted","comment": "Give me 10% discount","customer": {"typeId": "customer","id": "92f5a867-bf19-47ab-982c-6720a03a3921"},"businessUnit": {"key": "bu-345-france","typeId": "business-unit"},"lineItems": [{"id": "b925a817-d5ad-48bb-a407-29ad8e0649b5","productId": "9f10dcfb-5cc9-4a18-843a-c07f7e22d01f","name": {"en": "SAPPHIRE"},"productType": {"typeId": "product-type","id": "2543e1d8-4915-4f72-a3c9-1df9b1b0082d","version": 8},"productSlug": {"en": "sapphire1421832124423"},"variant": {"id": 1,"sku": "sku_SAPPHIRE_variant1_1421832124423","prices": [{"value": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 2800},"id": "8da659ef-9e54-447d-9c36-84912db1848f"}],"images": [{"url": "https://www.commercetools.com/cli/data/252542005_1.jpg","dimensions": {"w": 1400,"h": 1400}}],"attributes": [],"assets": []},"price": {"value": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 2800},"id": "8da659ef-9e54-447d-9c36-84912db1848f"},"quantity": 2,"discountedPricePerQuantity": [],"state": [{"quantity": 2,"state": {"typeId": "state","id": "7c2e2694-aefe-43d7-888e-6a99514caaca"}}],"priceMode": "Platform","lineItemMode": "Standard","totalPrice": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 5600},"perMethodTaxRate": [],"taxedPricePortions": []}],"totalPrice": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 5600},"customLineItems": [],"directDiscounts": [],"inventoryMode": "None","taxMode": "Platform","taxRoundingMode": "HalfEven","taxCalculationMode": "LineItemLevel"}
Query My QuoteRequests
Returns all Quote Requests that match a given Query Predicate. Returns a 200 OK status if successful.
manage_my_quote_requests:{projectKey}customer_id:{id}regionString | Region in which the Project is hosted. |
projectKeyString |
|
where | The parameter can be passed multiple times. |
sort | The parameter can be passed multiple times. |
expand | The parameter can be passed multiple times. |
limitInt | Number of results requested. Default: 20 |
offsetInt | Number of elements skipped. Default: 0 |
withTotalBoolean | Controls the calculation of the total number of query results. Set to Default: true |
var.<varName>String | Predicate parameter values. The parameter can be passed multiple times. |
application/jsoncurl --get https://api.{region}.commercetools.com/{projectKey}/me/quote-requests -i \--header "Authorization: Bearer ${BEARER_TOKEN}"
{"limit": 20,"offset": 0,"count": 1,"total": 1,"results": [{"id": "2a3baa00-44fa-4ab8-bec7-933c31e18dcc","version": 1,"createdAt": "2022-09-22T15:36:17.510Z","lastModifiedAt": "2022-09-22T15:41:55.816Z","quoteRequestState": "Submitted","comment": "Give me 10% discount","customer": {"typeId": "customer","id": "92f5a867-bf19-47ab-982c-6720a03a3921"},"businessUnit": {"key": "bu-345-france","typeId": "business-unit"},"lineItems": [{"id": "b925a817-d5ad-48bb-a407-29ad8e0649b5","productId": "9f10dcfb-5cc9-4a18-843a-c07f7e22d01f","name": {"en": "SAPPHIRE"},"productType": {"typeId": "product-type","id": "2543e1d8-4915-4f72-a3c9-1df9b1b0082d","version": 8},"productSlug": {"en": "sapphire1421832124423"},"variant": {"id": 1,"sku": "sku_SAPPHIRE_variant1_1421832124423","prices": [{"value": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 2800},"id": "8da659ef-9e54-447d-9c36-84912db1848f"}],"images": [{"url": "https://www.commercetools.com/cli/data/252542005_1.jpg","dimensions": {"w": 1400,"h": 1400}}],"attributes": [],"assets": []},"price": {"value": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 2800},"id": "8da659ef-9e54-447d-9c36-84912db1848f"},"quantity": 2,"discountedPricePerQuantity": [],"state": [{"quantity": 2,"state": {"typeId": "state","id": "7c2e2694-aefe-43d7-888e-6a99514caaca"}}],"priceMode": "Platform","lineItemMode": "Standard","totalPrice": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 5600},"perMethodTaxRate": [],"taxedPricePortions": []}],"totalPrice": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 5600},"customLineItems": [],"directDiscounts": [],"inventoryMode": "None","taxMode": "Platform","taxRoundingMode": "HalfEven","taxCalculationMode": "LineItemLevel"}]}
Check if My QuoteRequest exists
Check if My QuoteRequest exists by ID
Checks if a QuoteRequest exists for a given id. Returns a 200 OK status if the QuoteRequest exists or a 404 Not Found otherwise.
view_quote_requests:{projectKey}regionString | Region in which the Project is hosted. |
projectKeyString |
|
idString |
|
curl --head https://api.{region}.commercetools.com/{projectKey}/quote-requests/{id} -i \--header "Authorization: Bearer ${BEARER_TOKEN}"
Check if My QuoteRequest exists by Key
Checks if a QuoteRequest exists for a given key. Returns a 200 OK status if the QuoteRequest exists or a 404 Not Found otherwise.
view_quote_requests:{projectKey}regionString | Region in which the Project is hosted. |
projectKeyString |
|
keyString |
|
curl --head https://api.{region}.commercetools.com/{projectKey}/quote-requests/key={key} -i \--header "Authorization: Bearer ${BEARER_TOKEN}"
Check if My QuoteRequest exists by Query Predicate
Checks if a QuoteRequest exists for a given Query Predicate. Returns a 200 OK status if any QuoteRequests match the Query Predicate or a 404 Not Found otherwise.
view_quote_requests:{projectKey}regionString | Region in which the Project is hosted. |
projectKeyString |
|
where | The parameter can be passed multiple times. |
curl --head https://api.{region}.commercetools.com/{projectKey}/quote-requests -i \--header "Authorization: Bearer ${BEARER_TOKEN}"
Create My QuoteRequest
When creating B2B Quote Requests, the Customer must have the CreateMyQuoteRequestsFromMyCarts Permission. If the required Permission is missing, an AssociateMissingPermission error is returned.
manage_my_quote_requests:{projectKey}customer_id:{id}regionString | Region in which the Project is hosted. |
projectKeyString |
|
expand | The parameter can be passed multiple times. |
application/jsonapplication/jsoncurl https://api.{region}.commercetools.com/{projectKey}/me/quote-requests -i \--header "Authorization: Bearer ${BEARER_TOKEN}" \--header 'Content-Type: application/json' \--data-binary @- << DATA{"cartId" : "168e5783-73c8-4f2d-91f4-3c90b872c708","cartVersion" : 1,"comment" : "Give me 10% discount"}DATA
{"id": "2a3baa00-44fa-4ab8-bec7-933c31e18dcc","version": 1,"createdAt": "2022-09-22T15:36:17.510Z","lastModifiedAt": "2022-09-22T15:41:55.816Z","quoteRequestState": "Submitted","comment": "Give me 10% discount","customer": {"typeId": "customer","id": "92f5a867-bf19-47ab-982c-6720a03a3921"},"businessUnit": {"key": "bu-345-france","typeId": "business-unit"},"lineItems": [{"id": "b925a817-d5ad-48bb-a407-29ad8e0649b5","productId": "9f10dcfb-5cc9-4a18-843a-c07f7e22d01f","name": {"en": "SAPPHIRE"},"productType": {"typeId": "product-type","id": "2543e1d8-4915-4f72-a3c9-1df9b1b0082d","version": 8},"productSlug": {"en": "sapphire1421832124423"},"variant": {"id": 1,"sku": "sku_SAPPHIRE_variant1_1421832124423","prices": [{"value": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 2800},"id": "8da659ef-9e54-447d-9c36-84912db1848f"}],"images": [{"url": "https://www.commercetools.com/cli/data/252542005_1.jpg","dimensions": {"w": 1400,"h": 1400}}],"attributes": [],"assets": []},"price": {"value": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 2800},"id": "8da659ef-9e54-447d-9c36-84912db1848f"},"quantity": 2,"discountedPricePerQuantity": [],"state": [{"quantity": 2,"state": {"typeId": "state","id": "7c2e2694-aefe-43d7-888e-6a99514caaca"}}],"priceMode": "Platform","lineItemMode": "Standard","totalPrice": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 5600},"perMethodTaxRate": [],"taxedPricePortions": []}],"totalPrice": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 5600},"customLineItems": [],"directDiscounts": [],"inventoryMode": "None","taxMode": "Platform","taxRoundingMode": "HalfEven","taxCalculationMode": "LineItemLevel"}
Update My QuoteRequest
When updating B2B Quote Requests, the Customer must have the UpdateMyQuoteRequests Permission. If the required Permission is missing, an AssociateMissingPermission error is returned.
Update My QuoteRequest by ID
manage_my_quote_requests:{projectKey}customer_id:{id}regionString | Region in which the Project is hosted. |
projectKeyString |
|
idString |
|
expand | The parameter can be passed multiple times. |
application/jsonversionInt | |
actionsArray of MyQuoteRequestUpdateAction |
application/jsoncurl https://api.{region}.commercetools.com/{projectKey}/me/quote-requests/{id} -i \--header "Authorization: Bearer ${BEARER_TOKEN}" \--header 'Content-Type: application/json' \--data-binary @- << DATA{"version" : 1,"actions" : [ {"action" : "cancelQuoteRequest"} ]}DATA
{"id": "2a3baa00-44fa-4ab8-bec7-933c31e18dcc","version": 1,"createdAt": "2022-09-22T15:36:17.510Z","lastModifiedAt": "2022-09-22T15:41:55.816Z","quoteRequestState": "Cancelled","comment": "Give me 10% discount","customer": {"typeId": "customer","id": "92f5a867-bf19-47ab-982c-6720a03a3921"},"lineItems": [{"id": "b925a817-d5ad-48bb-a407-29ad8e0649b5","productId": "9f10dcfb-5cc9-4a18-843a-c07f7e22d01f","name": {"en": "SAPPHIRE"},"productType": {"typeId": "product-type","id": "2543e1d8-4915-4f72-a3c9-1df9b1b0082d","version": 8},"productSlug": {"en": "sapphire1421832124423"},"variant": {"id": 1,"sku": "sku_SAPPHIRE_variant1_1421832124423","prices": [{"value": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 2800},"id": "8da659ef-9e54-447d-9c36-84912db1848f"}],"images": [{"url": "https://www.commercetools.com/cli/data/252542005_1.jpg","dimensions": {"w": 1400,"h": 1400}}],"attributes": [],"assets": []},"price": {"value": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 2800},"id": "8da659ef-9e54-447d-9c36-84912db1848f"},"quantity": 2,"discountedPricePerQuantity": [],"state": [{"quantity": 2,"state": {"typeId": "state","id": "7c2e2694-aefe-43d7-888e-6a99514caaca"}}],"priceMode": "Platform","lineItemMode": "Standard","totalPrice": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 5600},"perMethodTaxRate": [],"taxedPricePortions": []}],"totalPrice": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 5600},"customLineItems": [],"directDiscounts": [],"inventoryMode": "None","taxMode": "Platform","taxRoundingMode": "HalfEven","taxCalculationMode": "LineItemLevel"}
Update My QuoteRequest by Key
manage_my_quote_requests:{projectKey}customer_id:{id}regionString | Region in which the Project is hosted. |
projectKeyString |
|
keyString |
|
expand | The parameter can be passed multiple times. |
application/jsonversionInt | |
actionsArray of MyQuoteRequestUpdateAction |
application/jsoncurl https://api.{region}.commercetools.com/{projectKey}/me/quote-requests/key={key} -i \--header "Authorization: Bearer ${BEARER_TOKEN}" \--header 'Content-Type: application/json' \--data-binary @- << DATA{"version" : 1,"actions" : [ {"action" : "cancelQuoteRequest"} ]}DATA
{"id": "2a3baa00-44fa-4ab8-bec7-933c31e18dcc","version": 1,"createdAt": "2022-09-22T15:36:17.510Z","lastModifiedAt": "2022-09-22T15:41:55.816Z","quoteRequestState": "Cancelled","comment": "Give me 10% discount","customer": {"typeId": "customer","id": "92f5a867-bf19-47ab-982c-6720a03a3921"},"lineItems": [{"id": "b925a817-d5ad-48bb-a407-29ad8e0649b5","productId": "9f10dcfb-5cc9-4a18-843a-c07f7e22d01f","name": {"en": "SAPPHIRE"},"productType": {"typeId": "product-type","id": "2543e1d8-4915-4f72-a3c9-1df9b1b0082d","version": 8},"productSlug": {"en": "sapphire1421832124423"},"variant": {"id": 1,"sku": "sku_SAPPHIRE_variant1_1421832124423","prices": [{"value": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 2800},"id": "8da659ef-9e54-447d-9c36-84912db1848f"}],"images": [{"url": "https://www.commercetools.com/cli/data/252542005_1.jpg","dimensions": {"w": 1400,"h": 1400}}],"attributes": [],"assets": []},"price": {"value": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 2800},"id": "8da659ef-9e54-447d-9c36-84912db1848f"},"quantity": 2,"discountedPricePerQuantity": [],"state": [{"quantity": 2,"state": {"typeId": "state","id": "7c2e2694-aefe-43d7-888e-6a99514caaca"}}],"priceMode": "Platform","lineItemMode": "Standard","totalPrice": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 5600},"perMethodTaxRate": [],"taxedPricePortions": []}],"totalPrice": {"type": "centPrecision","fractionDigits": 2,"currencyCode": "EUR","centAmount": 5600},"customLineItems": [],"directDiscounts": [],"inventoryMode": "None","taxMode": "Platform","taxRoundingMode": "HalfEven","taxCalculationMode": "LineItemLevel"}
Update actions
Cancel Quote Request
Transitions the quoteRequestState of the Quote Request to Cancelled. Can only be used when the Quote Request is in state Submitted.
actionString | "cancelQuoteRequest" |
Set Custom Type
actionString | "setCustomType" |
type | Defines the Type that extends the QuoteRequest with Custom Fields. If absent, any existing Type and Custom Fields are removed from the QuoteRequest. |
fields | Sets the Custom Fields fields for the QuoteRequest. |
{"action": "setCustomType","type": {"id": "{{type-id}}","typeId": "type"},"fields": {"exampleStringField": "TextString"}}
Set Custom Field
actionString | "setCustomField" |
nameString | Name of the Custom Field. |
value | If |
{"action": "setCustomField","name": "exampleStringField","value": "TextString"}