BETA

My Quotes

The My Quotes API provides access to Quotes scoped to a specific user.

The API requires an access token from the password flow or anonymous session flow.

Representations

MyQuoteState

QuoteStates that can be set using the Change My Quote State update action.

Declined

A state indicating that the Buyer has declined the Quote.

Accepted

A state indicating that the Buyer has accepted the Quote.

Get Quote

Get Quote by ID

GET
https://api.{region}.commercetools.com/{projectKey}/me/quotes/{id}
OAuth 2.0 Scopes:
manage_my_quotes:{projectKey}
Path parameters:
region
String

Region in which the Project is hosted.

projectKey
String

key of the Project.

id
String

id of the Quote.

Query parameters:
expand
The parameter can be passed multiple times.
Response:
Request Example:cURL
curl --get https://api.{region}.commercetools.com/{projectKey}/me/quotes/{id} -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'
200 Response Example: Quotejson
{
"id" : "2a3baa00-44fa-4ab8-bec7-933c31e18dcc",
"version" : 5,
"createdAt" : "2015-09-22T15:36:17.510Z",
"lastModifiedAt" : "2015-09-22T15:41:55.816Z",
"quoteState" : "Pending",
"quoteRequest" : {
"typeId" : "quote-request",
"id" : "8a3faa00-33fa-4ab8-bee7-833f31e18dcc"
},
"stagedQuote" : {
"typeId" : "staged-quote",
"id" : "8a3baa00-44fa-4ab8-bec7-933c31e18dcc"
},
"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 Quote by Key

GET
https://api.{region}.commercetools.com/{projectKey}/me/quotes/key={key}
OAuth 2.0 Scopes:
manage_my_quotes:{projectKey}
Path parameters:
region
String

Region in which the Project is hosted.

projectKey
String

key of the Project.

key
String

key of the Quote.

Query parameters:
expand
The parameter can be passed multiple times.
Response:
Request Example:cURL
curl --get https://api.{region}.commercetools.com/{projectKey}/me/quotes/key={key} -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'
200 Response Example: Quotejson
{
"id" : "2a3baa00-44fa-4ab8-bec7-933c31e18dcc",
"version" : 5,
"createdAt" : "2015-09-22T15:36:17.510Z",
"lastModifiedAt" : "2015-09-22T15:41:55.816Z",
"quoteState" : "Pending",
"quoteRequest" : {
"typeId" : "quote-request",
"id" : "8a3faa00-33fa-4ab8-bee7-833f31e18dcc"
},
"stagedQuote" : {
"typeId" : "staged-quote",
"id" : "8a3baa00-44fa-4ab8-bec7-933c31e18dcc"
},
"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 Quotes

GET
https://api.{region}.commercetools.com/{projectKey}/me/quotes
OAuth 2.0 Scopes:
manage_my_quotes:{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 --get https://api.{region}.commercetools.com/{projectKey}/me/quotes -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'
200 Response Example: QuotePagedQueryResponsejson
{
"limit" : 20,
"offset" : 0,
"count" : 2,
"total" : 2,
"results" : [ {
"id" : "2a3baa00-44fa-4ab8-bec7-933c31e18dcc",
"version" : 5,
"createdAt" : "2015-09-22T15:36:17.510Z",
"lastModifiedAt" : "2015-09-22T15:41:55.816Z",
"quoteState" : "Pending",
"quoteRequest" : {
"typeId" : "quote-request",
"id" : "8a3faa00-33fa-4ab8-bee7-833f31e18dcc"
},
"stagedQuote" : {
"typeId" : "staged-quote",
"id" : "8a3baa00-44fa-4ab8-bec7-933c31e18dcc"
},
"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" : 3,
"createdAt" : "2015-10-07T07:33:05.894Z",
"lastModifiedAt" : "2015-10-07T07:33:06.070Z",
"quoteState" : "Pending",
"quoteRequest" : {
"typeId" : "quote-request",
"id" : "2v3faa00-33fa-4ab8-bee7-833f31e18dcc"
},
"stagedQuote" : {
"typeId" : "staged-quote",
"id" : "868e5783-73c8-4f2d-91f4-3c90b872c700"
},
"customer" : {
"typeId" : "customer",
"id" : "82f2a767-bf19-47ab-982c-6720a03a3912"
},
"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"
} ]
}

Update Quote

Update Quote by ID

POST
https://api.{region}.commercetools.com/{projectKey}/me/quotes/{id}
OAuth 2.0 Scopes:
manage_my_quotes:{projectKey}
Path parameters:
region
String

Region in which the Project is hosted.

projectKey
String

key of the Project.

id
String

id of the Quote.

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

Expected version of the Quote 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 Quote.

Response:
200Quoteasapplication/json
Request Example:cURL
curl https://api.{region}.commercetools.com/{projectKey}/me/quotes/{id} -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}' \
--header 'Content-Type: application/json' \
--data-binary @- << DATA
{
"version" : 1,
"actions" : [ {
"action" : "changeMyQuoteState",
"quoteState" : "Accepted"
} ]
}
DATA
200 Response Example: Quotejson
{
"id" : "2a3baa00-44fa-4ab8-bec7-933c31e18dcc",
"version" : 5,
"createdAt" : "2015-09-22T15:36:17.510Z",
"lastModifiedAt" : "2015-09-22T15:41:55.816Z",
"quoteState" : "Pending",
"quoteRequest" : {
"typeId" : "quote-request",
"id" : "8a3faa00-33fa-4ab8-bee7-833f31e18dcc"
},
"stagedQuote" : {
"typeId" : "staged-quote",
"id" : "8a3baa00-44fa-4ab8-bec7-933c31e18dcc"
},
"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 Quote by Key

POST
https://api.{region}.commercetools.com/{projectKey}/me/quotes/key={key}
OAuth 2.0 Scopes:
manage_my_quotes:{projectKey}
Path parameters:
region
String

Region in which the Project is hosted.

projectKey
String

key of the Project.

key
String

key of the Quote.

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

Expected version of the Quote 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 Quote.

Response:
200Quoteasapplication/json
Request Example:cURL
curl https://api.{region}.commercetools.com/{projectKey}/me/quotes/key={key} -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}' \
--header 'Content-Type: application/json' \
--data-binary @- << DATA
{
"version" : 1,
"actions" : [ {
"action" : "changeMyQuoteState",
"quoteState" : "Accepted"
} ]
}
DATA
200 Response Example: Quotejson
{
"id" : "2a3baa00-44fa-4ab8-bec7-933c31e18dcc",
"version" : 5,
"createdAt" : "2015-09-22T15:36:17.510Z",
"lastModifiedAt" : "2015-09-22T15:41:55.816Z",
"quoteState" : "Pending",
"quoteRequest" : {
"typeId" : "quote-request",
"id" : "8a3faa00-33fa-4ab8-bee7-833f31e18dcc"
},
"stagedQuote" : {
"typeId" : "staged-quote",
"id" : "8a3baa00-44fa-4ab8-bec7-933c31e18dcc"
},
"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 My Quote State

action
String
"changeMyQuoteState"
quoteState

New state to be set for the Quote.

Example: json
{
"action" : "changeMyQuoteState",
"quoteState" : "Accepted"
}

Request Quote Renegotiation

Represents the Buyer requesting renegotiation for a Quote. Valid for Quotes in a Pending or Failed state.

action
String
"requestQuoteRenegotiation"
buyerComment
String

Message from the Buyer regarding the Quote renegotiation request.

Example: json
{
"action" : "requestQuoteRenegotiation",
"buyerComment" : "Please also give me a 10% discount on the red T-shirts."
}

Set Custom Type

action
String
"setCustomType"

Defines the Type that extends the Quote with Custom Fields. If absent, any existing Type and Custom Fields are removed from the Quote.

fields

Sets the Custom Fields fields for the Quote.

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

Set Custom Field

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"
}