BETA

Quote Requests

With Quote Requests, Buyers can request a Quote from the Seller.

Representations

QuoteRequest

id
String

Unique identifier of the QuoteRequest.

version
Int

Current version of the QuoteRequest.

key
String

User-defined unique identifier of the QuoteRequest.

MinLength: 2MaxLength: 256Pattern: ^[A-Za-z0-9_-]+$
quoteRequestState

Indicates the current state of the Quote Request in the negotiation process.

comment
String

Message from the Buyer included in the Quote Request.

customer

The Buyer who raised the request.

customerGroup

Set automatically when customer is set and the Customer is a member of a Customer Group. Used for Product Variant price selection.

The Store to which the Buyer belongs.

lineItems
Array of LineItem

The Line Items for which a Quote is requested.

customLineItems
Array of CustomLineItem

The Custom Line Items for which a Quote is requested.

totalPrice

Sum of all totalPrice fields of the lineItems and customLineItems, as well as the price field of shippingInfo (if it exists). totalPrice may or may not include the taxes: it depends on the taxRate.includedInPrice property of each price.

taxedPrice

Not set until the shipping address is set. Will be set automatically in the Platform TaxMode. For the External tax mode it will be set as soon as the external tax rates for all line items, custom line items, and shipping in the cart are set.

shippingAddress

Used to determine the eligible ShippingMethods and rates as well as the tax rate of the Line Items.

billingAddress

Address used for invoicing.

inventoryMode

Inventory mode of the Cart referenced in the QuoteRequestDraft.

taxMode

Tax mode of the Cart referenced in the QuoteRequestDraft.

taxRoundingMode

When calculating taxes for taxedPrice, the selected mode is used for rounding.

taxCalculationMode

When calculating taxes for taxedPrice, the selected mode is used for calculating the price with LineItemLevel (horizontally) or UnitPriceLevel (vertically) calculation mode.

country

Used for Product Variant price selection.

Pattern: ^[A-Z]{2}$
shippingInfo

Set automatically once the ShippingMethod is set.

paymentInfo

Log of payment transactions related to the Quote.

shippingRateInput

Used to select a ShippingRatePriceTier.

itemShippingAddresses
Array of Address

Contains addresses for carts with multiple shipping addresses. Line items reference these addresses under their shippingDetails. The addresses captured here are not used to determine eligible shipping methods or the applicable tax rate. Only the cart's shippingAddress is used for this.

directDiscounts
Array of DirectDiscount

Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.

state

State of the Quote Request. This reference can point to a State in a custom workflow.

businessUnitBETA

The BusinessUnit for the Quote Request.

custom

Custom Fields of the Quote Request.

createdAt

Date and time (UTC) the QuoteRequest was initially created.

createdByBETA

Present on resources created after 1 February 2019 except for events not tracked.

lastModifiedAt

Date and time (UTC) the QuoteRequest was last updated.

lastModifiedByBETA

Present on resources created after 1 February 2019 except for events not tracked.

QuoteRequestDraft

key
String

User-defined unique identifier for the QuoteRequest.

MinLength: 2MaxLength: 256Pattern: ^[A-Za-z0-9_-]+$

Cart for which a Quote is requested. Anonymous Carts, Carts with Discount Codes, or Carts with a Multiple ShippingMode are not supported.

cartVersion
Int

Current version of the referenced Cart.

comment
String

Message from the Buyer included in the Quote Request.

state

State of this Quote Request. This reference can point to a State in a custom workflow.

custom

Custom Fields to be added to the Quote Request.

QuoteRequestPagedQueryResponse

PagedQueryResult with results containing an array of QuoteRequest.

limit
Int
offset
Int

Number of elements skipped.

count
Int

Actual number of results returned.

total
Int

Total number of results matching the query. This number is an estimation that is not strongly consistent. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false. When the results are filtered with a Query Predicate, total is subject to a limit.

results
Array of QuoteRequest

Quote Requests matching the query.

QuoteRequestReference

id
String

Unique ID of the referenced resource.

typeId
String
"quote-request"

References a QuoteRequest.

obj

Contains the representation of the expanded QuoteRequest. Only present in responses to requests with Reference Expansion for QuoteRequest.

QuoteRequestResourceIdentifier

id
String

Unique identifier of the referenced resource. Required if key is absent.

key
String

User-defined unique identifier of the referenced resource. Required if id is absent.

typeId
String
"quote-request"

References a QuoteRequest.

QuoteRequestState

Predefined states tracking the status of the Quote Request in the negotiation process.

Submitted

Initial state of the negotiation process. Indicates that the Quote Request has been submitted by the Buyer, but the Seller has not yet decided whether to accept or to reject the request.

Accepted

Indicates that the Quote Request has been accepted by the Seller and the negotiation process continues with preparing a Staged Quote for the Buyer.

Closed

Final state of the negotiation process. Indicates that the Quote Request had been accepted by the Seller and there is no further action that can be performed by any party.

Rejected

Indicates that the Quote Request has been rejected by the Seller and the negotiation process terminated.

Cancelled

Indicates that the Buyer has withdrawn the Quote Request.

Get QuoteRequest

Get QuoteRequest by ID

GET
https://api.{region}.commercetools.com/{projectKey}/quote-requests/{id}
OAuth 2.0 Scopes:
view_quote_requests:{projectKey}
Path parameters:
region
String

Region in which the Project is hosted.

projectKey
String

key of the Project.

id
String

id of the QuoteRequest.

Query parameters:
expand
The parameter can be passed multiple times.
Response:
Request Example:cURL
curl -X GET https://api.{region}.commercetools.com/{projectKey}/quote-requests/{id} -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'
200 Response Example: QuoteRequestjson
{
"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"
},
"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 QuoteRequest by Key

GET
https://api.{region}.commercetools.com/{projectKey}/quote-requests/key={key}
OAuth 2.0 Scopes:
view_quote_requests:{projectKey}
Path parameters:
region
String

Region in which the Project is hosted.

projectKey
String

key of the Project.

key
String

key of the QuoteRequest.

Query parameters:
expand
The parameter can be passed multiple times.
Response:
Request Example:cURL
curl -X GET https://api.{region}.commercetools.com/{projectKey}/quote-requests/key={key} -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'
200 Response Example: QuoteRequestjson
{
"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"
},
"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 QuoteRequests

GET
https://api.{region}.commercetools.com/{projectKey}/quote-requests
OAuth 2.0 Scopes:
view_quote_requests:{projectKey}
Path parameters:
region
String

Region in which the Project is hosted.

projectKey
String

key of the Project.

Query parameters:
where
The parameter can be passed multiple times.
/^var[.][a-zA-Z0-9]+$/
Any string parameter matching this regular expression

Predicate parameter values.

The parameter can be passed multiple times.
sort
The parameter can be passed multiple times.
expand
The parameter can be passed multiple times.
limit
Int
offset
Int

Number of elements skipped.

withTotal
Boolean

Controls the calculation of the total number of query results. Set to false to improve query performance when the total is not needed.

Request Example:cURL
curl -X GET https://api.{region}.commercetools.com/{projectKey}/quote-requests -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'
200 Response Example: QuoteRequestPagedQueryResponsejson
{
"limit" : 20,
"offset" : 0,
"count" : 2,
"total" : 2,
"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"
},
"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"
}, {
"id" : "668e5783-73c8-4f2d-91f4-3c90b872c700",
"version" : 2,
"createdAt" : "2022-09-22T15:36:17.510Z",
"lastModifiedAt" : "2022-09-22T15:41:55.816Z",
"quoteRequestState" : "Rejected",
"comment" : "Give me 100€ off discount",
"customer" : {
"typeId" : "customer",
"id" : "92f5a867-bf19-47ab-982c-6720a03a3921"
},
"lineItems" : [ {
"id" : "90dff06c-272e-47fa-b8de-923dce092474",
"productId" : "7b1203f4-66c0-438c-9a30-f4fb6be79bdf",
"name" : {
"de" : "WB ATHLETIC PANZER",
"en" : "WB ATHLETIC TANK"
},
"productType" : {
"typeId" : "product-type",
"id" : "2543e1d8-4915-4f72-a3c9-1df9b1b0082d",
"version" : 8
},
"productSlug" : {
"en" : "wb-athletic-tank1421832124574"
},
"variant" : {
"id" : 1,
"sku" : "sku_WB_ATHLETIC_TANK_variant1_1421832124574",
"prices" : [ {
"value" : {
"type" : "centPrecision",
"fractionDigits" : 2,
"currencyCode" : "EUR",
"centAmount" : 8400
},
"id" : "37696f7c-8260-4941-a921-68e6aa76b4a3"
} ],
"images" : [ {
"url" : "https://www.commercetools.com/cli/data/253265444_1.jpg",
"dimensions" : {
"w" : 1400,
"h" : 1400
}
} ],
"attributes" : [ ],
"assets" : [ ]
},
"price" : {
"value" : {
"type" : "centPrecision",
"fractionDigits" : 2,
"currencyCode" : "EUR",
"centAmount" : 8400
},
"id" : "37696f7c-8260-4941-a921-68e6aa76b4a3"
},
"quantity" : 1,
"discountedPricePerQuantity" : [ ],
"state" : [ {
"quantity" : 1,
"state" : {
"typeId" : "state",
"id" : "7c2e2694-aefe-43d7-888e-6a99514caaca"
}
} ],
"priceMode" : "Platform",
"lineItemMode" : "Standard",
"totalPrice" : {
"type" : "centPrecision",
"fractionDigits" : 2,
"currencyCode" : "EUR",
"centAmount" : 8400
},
"custom" : {
"type" : {
"typeId" : "type",
"id" : "3ae9bcca-df23-443e-bd22-0c592f9694fa"
},
"fields" : {
"offer_name" : "SuperMax"
}
},
"perMethodTaxRate" : [ ],
"taxedPricePortions" : [ ]
} ],
"totalPrice" : {
"type" : "centPrecision",
"fractionDigits" : 2,
"currencyCode" : "EUR",
"centAmount" : 8400
},
"country" : "DE",
"customLineItems" : [ ],
"directDiscounts" : [ ],
"inventoryMode" : "None",
"taxMode" : "Platform",
"taxRoundingMode" : "HalfEven",
"taxCalculationMode" : "LineItemLevel"
} ]
}

Create QuoteRequest

POST
https://api.{region}.commercetools.com/{projectKey}/quote-requests
OAuth 2.0 Scopes:
manage_quote_requests:{projectKey}
Path parameters:
region
String

Region in which the Project is hosted.

projectKey
String

key of the Project.

Query parameters:
expand
The parameter can be passed multiple times.
Request Body:QuoteRequestDraft
Response:
Request Example:cURL
curl -X POST https://api.{region}.commercetools.com/{projectKey}/quote-requests -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}' \
--header 'Content-Type: application/json' \
--data-binary @- << DATA
{
"cart" : {
"typeId" : "cart",
"id" : "168e5783-73c8-4f2d-91f4-3c90b872c708"
},
"cartVersion" : 1,
"comment" : "Give me 10% discount"
}
DATA
201 Response Example: QuoteRequestjson
{
"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"
},
"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 QuoteRequest

Update QuoteRequest by ID

POST
https://api.{region}.commercetools.com/{projectKey}/quote-requests/{id}
OAuth 2.0 Scopes:
manage_quote_requests:{projectKey}
Path parameters:
region
String

Region in which the Project is hosted.

projectKey
String

key of the Project.

id
String

id of the QuoteRequest.

Query parameters:
expand
The parameter can be passed multiple times.
Request Body:
version
Int

Expected version of the QuoteRequest to which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict error will be returned.

actions

Update actions to be performed on the QuoteRequest.

Response:
Request Example:cURL
curl -X POST https://api.{region}.commercetools.com/{projectKey}/quote-requests/{id} -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}' \
--header 'Content-Type: application/json' \
--data-binary @- << DATA
{
"version" : 1,
"actions" : [ {
"action" : "changeQuoteRequestState",
"quoteRequestState" : "Cancelled"
} ]
}
DATA
200 Response Example: QuoteRequestjson
{
"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 QuoteRequest by Key

POST
https://api.{region}.commercetools.com/{projectKey}/quote-requests/key={key}
OAuth 2.0 Scopes:
manage_quote_requests:{projectKey}
Path parameters:
region
String

Region in which the Project is hosted.

projectKey
String

key of the Project.

key
String

key of the QuoteRequest.

Query parameters:
expand
The parameter can be passed multiple times.
Request Body:
version
Int

Expected version of the QuoteRequest to which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict error will be returned.

actions

Update actions to be performed on the QuoteRequest.

Response:
Request Example:cURL
curl -X POST https://api.{region}.commercetools.com/{projectKey}/quote-requests/key={key} -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}' \
--header 'Content-Type: application/json' \
--data-binary @- << DATA
{
"version" : 1,
"actions" : [ {
"action" : "changeQuoteRequestState",
"quoteRequestState" : "Cancelled"
} ]
}
DATA
200 Response Example: QuoteRequestjson
{
"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

Change Quote Request State

Transitions the Quote Request to a different state. A Buyer is only allowed to cancel a Quote Request when it is in Submitted state.

action
String
"changeQuoteRequestState"
quoteRequestState

New state to be set for the Quote Request.

Example: json
{
"action" : "changeQuoteRequestState",
"quoteRequestState" : "Rejected"
}

Set Custom Type

action
String
"setCustomType"

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.

Example: json
{
"action" : "setCustomType",
"type" : {
"id" : "{{type-id}}",
"typeId" : "type"
},
"fields" : {
"examplaryStringTypeField" : "TextString"
}
}

Set CustomField

action
String
"setCustomField"
name
String

Name of the Custom Field.

value

If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

Example: json
{
"action" : "setCustomField",
"name" : "ExamplaryStringTypeField",
"value" : "TextString"
}

Transition State

If the existing State has set transitions, there must be a direct transition to the new State. If transitions is not set, no validation is performed. This update action produces the Quote Request State Transition Message.

action
String
"transitionState"

Value to set. If there is no State yet, this must be an initial State.

force
Boolean

Switch validations on or off.

Default: false
Example: json
{
"action" : "transitionState",
"state" : {
"typeId" : "state",
"id" : "{{state-id}}"
}
}

Delete QuoteRequest

Delete QuoteRequest by ID

DELETE
https://api.{region}.commercetools.com/{projectKey}/quote-requests/{id}
OAuth 2.0 Scopes:
manage_quote_requests:{projectKey}
Path parameters:
region
String

Region in which the Project is hosted.

projectKey
String

key of the Project.

id
String

id of the QuoteRequest.

Query parameters:
version
Int

Last seen version of the resource.

expand
The parameter can be passed multiple times.
dataErasure
Boolean

Defaults to false. Set to true if you want to erase all related personal data in compliance with GDPR.

Response:
Request Example:cURL
curl -X DELETE https://api.{region}.commercetools.com/{projectKey}/quote-requests/{id}?version={version} -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'
200 Response Example: QuoteRequestjson
{
"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"
},
"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"
}

Delete QuoteRequest by Key

DELETE
https://api.{region}.commercetools.com/{projectKey}/quote-requests/key={key}
OAuth 2.0 Scopes:
manage_quote_requests:{projectKey}
Path parameters:
region
String

Region in which the Project is hosted.

projectKey
String

key of the Project.

key
String

key of the QuoteRequest.

Query parameters:
version
Int

Last seen version of the resource.

expand
The parameter can be passed multiple times.
dataErasure
Boolean

Defaults to false. Set to true if you want to erase all related personal data in compliance with GDPR.

Response:
Request Example:cURL
curl -X DELETE https://api.{region}.commercetools.com/{projectKey}/quote-requests/key={key}?version={version} -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'
200 Response Example: QuoteRequestjson
{
"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"
},
"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"
}