Staged Quotes
Representations
StagedQuote
idString | The unique ID of the StagedQuote. |
versionInt | Current version of the StagedQuote. |
keyString | User-specific unique identifier of the staged quote. |
stagedQuoteState | Predefined states tracking the status of the Staged Quote. |
customer | The Buyer who requested the Quote. |
quoteRequest | Quote Request related to the Staged Quote. |
quotationCart | Cart containing the offered items. May contain either DirectDiscounts or CartDiscounts. |
validTo | Expiration date for the Quote. |
sellerCommentString | Message from the Seller included in the offer. |
state | State of the Staged Quote. This reference can point to a State in a custom workflow. |
businessUnitBETA | The BusinessUnit for the Staged Quote. |
custom | Custom Fields of the Staged Quote. |
createdAt | Date and time (UTC) the StagedQuote was initially created. |
createdByBETA | Present on resources created after 1 February 2019 except for events not tracked. |
lastModifiedAt | Date and time (UTC) the StagedQuote was last updated. |
lastModifiedByBETA | Present on resources created after 1 February 2019 except for events not tracked. |
StagedQuoteDraft
keyString | User-defined unique identifier for the StagedQuote. MinLength:2MaxLength: 256Pattern: ^[A-Za-z0-9_-]+$ |
quoteRequest | QuoteRequest from which the StagedQuote is created. |
quoteRequestVersionInt | Current version of the QuoteRequest. |
quoteRequestStateToAcceptedBoolean | If false |
state | State of the Staged Quote. This reference can point to a State in a custom workflow. |
custom | Custom Fields to be added to the StagedQuote.
|
StagedQuotePagedQueryResponse
PagedQueryResult with results containing an array of StagedQuote.
limitInt | Number of results requested. |
offsetInt | Number of elements skipped. |
countInt | Actual number of results returned. |
totalInt | 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 |
resultsArray of StagedQuote | Staged Quotes matching the query. |
StagedQuoteReference
Reference to a StagedQuote.
idString | Unique ID of the referenced resource. |
typeIdString | "staged-quote"References a StagedQuote. |
obj | Contains the representation of the expanded StagedQuote. Only present in responses to requests with Reference Expansion for StagedQuote. |
StagedQuoteResourceIdentifier
idString | Unique identifier of the referenced resource. Required if |
keyString | User-defined unique identifier of the referenced resource. Required if |
typeIdString | "staged-quote"References a StagedQuote. |
StagedQuoteState
Get StagedQuote
Get StagedQuote by ID
view_staged_quotes:{projectKey}regionString | Region in which the Project is hosted. |
projectKeyString |
|
idString |
|
expand | The parameter can be passed multiple times. |
200StagedQuote
curl -X GET https://api.{region}.commercetools.com/{projectKey}/staged-quotes/{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","quotationCart" : {"typeId" : "cart","id" : "1a3faa00-55fa-4ab8-bee7-933c31e18dcc"},"quoteRequest" : {"typeId" : "quote-request","id" : "8a3faa00-33fa-4ab8-bee7-833f31e18dcc"},"customer" : {"typeId" : "customer","id" : "92f5a867-bf19-47ab-982c-6720a03a3921"},"stagedQuoteState" : "InProgress"}
Get StagedQuote by Key
view_staged_quotes:{projectKey}regionString | Region in which the Project is hosted. |
projectKeyString |
|
keyString |
|
expand | The parameter can be passed multiple times. |
200StagedQuote
curl -X GET https://api.{region}.commercetools.com/{projectKey}/staged-quotes/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","quotationCart" : {"typeId" : "cart","id" : "1a3faa00-55fa-4ab8-bee7-933c31e18dcc"},"quoteRequest" : {"typeId" : "quote-request","id" : "8a3faa00-33fa-4ab8-bee7-833f31e18dcc"},"customer" : {"typeId" : "customer","id" : "92f5a867-bf19-47ab-982c-6720a03a3921"},"stagedQuoteState" : "InProgress"}
Query StagedQuote
view_staged_quotes:{projectKey}regionString | Region in which the Project is hosted. |
projectKeyString |
|
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. |
limitInt | Number of results requested. |
offsetInt | Number of elements skipped. |
withTotalBoolean | Controls the calculation of the total number of query results. Set to |
curl -X GET https://api.{region}.commercetools.com/{projectKey}/staged-quotes -i \--header 'Authorization: Bearer ${BEARER_TOKEN}'
{"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","quotationCart" : {"typeId" : "cart","id" : "1a3faa00-55fa-4ab8-bee7-933c31e18dcc"},"quoteRequest" : {"typeId" : "quote-request","id" : "8a3faa00-33fa-4ab8-bee7-833f31e18dcc"},"customer" : {"typeId" : "customer","id" : "92f5a867-bf19-47ab-982c-6720a03a3921"},"stagedQuoteState" : "InProgress"}, {"id" : "668e5783-73c8-4f2d-91f4-3c90b872c700","version" : 1,"createdAt" : "2022-09-22T15:36:17.510Z","lastModifiedAt" : "2022-09-22T15:41:55.816Z","quotationCart" : {"typeId" : "cart","id" : "768e5783-73c8-3f2d-22f4-3c90b872c700"},"quoteRequest" : {"typeId" : "quote-request","id" : "2v3faa00-33fa-4ab8-bee7-833f31e18dcc"},"customer" : {"typeId" : "customer","id" : "82f2a767-bf19-47ab-982c-6720a03a3912"},"stagedQuoteState" : "Sent"} ]}
Create StagedQuote
manage_staged_quotes:{projectKey}regionString | Region in which the Project is hosted. |
projectKeyString |
|
expand | The parameter can be passed multiple times. |
201StagedQuote
curl -X POST https://api.{region}.commercetools.com/{projectKey}/staged-quotes -i \--header 'Authorization: Bearer ${BEARER_TOKEN}' \--header 'Content-Type: application/json' \--data-binary @- << DATA{"quoteRequest" : {"typeId" : "quote-request","id" : "168e5783-73c8-4f2d-91f4-3c90b872c708"},"quoteRequestVersion" : 1}DATA
{"id" : "2a3baa00-44fa-4ab8-bec7-933c31e18dcc","version" : 1,"createdAt" : "2022-09-22T15:36:17.510Z","lastModifiedAt" : "2022-09-22T15:41:55.816Z","quotationCart" : {"typeId" : "cart","id" : "1a3faa00-55fa-4ab8-bee7-933c31e18dcc"},"quoteRequest" : {"typeId" : "quote-request","id" : "8a3faa00-33fa-4ab8-bee7-833f31e18dcc"},"customer" : {"typeId" : "customer","id" : "92f5a867-bf19-47ab-982c-6720a03a3921"},"stagedQuoteState" : "InProgress"}
Update StagedQuote
Update StagedQuote by ID
manage_staged_quotes:{projectKey}regionString | Region in which the Project is hosted. |
projectKeyString |
|
idString |
|
expand | The parameter can be passed multiple times. |
versionInt | Expected version of the StagedQuote to which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict error will be returned. |
actionsArray of StagedQuoteUpdateAction | Update actions to be performed on the StagedQuote. |
200StagedQuote
curl -X POST https://api.{region}.commercetools.com/{projectKey}/staged-quotes/{id} -i \--header 'Authorization: Bearer ${BEARER_TOKEN}' \--header 'Content-Type: application/json' \--data-binary @- << DATA{"version" : 1,"actions" : [ {"action" : "changeStagedQuoteState","stagedQuoteState" : "Sent"} ]}DATA
{"id" : "2a3baa00-44fa-4ab8-bec7-933c31e18dcc","version" : 1,"createdAt" : "2022-09-22T15:36:17.510Z","lastModifiedAt" : "2022-09-22T15:41:55.816Z","quotationCart" : {"typeId" : "cart","id" : "1a3faa00-55fa-4ab8-bee7-933c31e18dcc"},"quoteRequest" : {"typeId" : "quote-request","id" : "8a3faa00-33fa-4ab8-bee7-833f31e18dcc"},"customer" : {"typeId" : "customer","id" : "92f5a867-bf19-47ab-982c-6720a03a3921"},"stagedQuoteState" : "InProgress"}
Update StagedQuote by Key
manage_staged_quotes:{projectKey}regionString | Region in which the Project is hosted. |
projectKeyString |
|
keyString |
|
expand | The parameter can be passed multiple times. |
versionInt | Expected version of the StagedQuote to which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict error will be returned. |
actionsArray of StagedQuoteUpdateAction | Update actions to be performed on the StagedQuote. |
200StagedQuote
curl -X POST https://api.{region}.commercetools.com/{projectKey}/staged-quotes/key={key} -i \--header 'Authorization: Bearer ${BEARER_TOKEN}' \--header 'Content-Type: application/json' \--data-binary @- << DATA{"version" : 1,"actions" : [ {"action" : "changeStagedQuoteState","stagedQuoteState" : "Sent"} ]}DATA
{"id" : "2a3baa00-44fa-4ab8-bec7-933c31e18dcc","version" : 1,"createdAt" : "2022-09-22T15:36:17.510Z","lastModifiedAt" : "2022-09-22T15:41:55.816Z","quotationCart" : {"typeId" : "cart","id" : "1a3faa00-55fa-4ab8-bee7-933c31e18dcc"},"quoteRequest" : {"typeId" : "quote-request","id" : "8a3faa00-33fa-4ab8-bee7-833f31e18dcc"},"customer" : {"typeId" : "customer","id" : "92f5a867-bf19-47ab-982c-6720a03a3921"},"stagedQuoteState" : "InProgress"}
Update actions
Change Staged Quote State
actionString | "changeStagedQuoteState" |
stagedQuoteState | New state to be set for the Staged Quote. |
{"action" : "changeStagedQuoteState","stagedQuoteState" : "Sent"}
Set Seller Comment
actionString | "setSellerComment" |
sellerCommentString | If |
{"action" : "setSellerComment","sellerComment" : "Please let me know if this matches your expectations"}
Set Valid To
actionString | "setValidTo" |
validTo | If |
{"action" : "setValidTo","validTo" : "2022-09-22T15:41:55.816Z"}
Set Custom Type
actionString | "setCustomType" |
type | Defines the Type that extends the StagedQuote with Custom Fields. If absent, any existing Type and Custom Fields are removed from the StagedQuote. |
fields | Sets the Custom Fields fields for the StagedQuote. |
{"action" : "setCustomType","type" : {"id" : "{{type-id}}","typeId" : "type"},"fields" : {"examplaryStringTypeField" : "TextString"}}
Set CustomField
actionString | "setCustomField" |
nameString | Name of the Custom Field. |
value | If |
{"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 Staged Quote State Transition Message.
actionString | "transitionState" |
state | Value to set. If there is no State yet, the new State must be an initial State. |
forceBoolean | Switch validations on or off. Default:false |
{"action" : "transitionState","state" : {"typeId" : "state","id" : "{{state-id}}"}}
Delete StagedQuote
Delete StagedQuote by ID
manage_staged_quotes:{projectKey}regionString | Region in which the Project is hosted. |
projectKeyString |
|
idString |
|
versionInt | Last seen version of the resource. |
expand | The parameter can be passed multiple times. |
dataErasureBoolean | Defaults to |
200StagedQuote
curl -X DELETE https://api.{region}.commercetools.com/{projectKey}/staged-quotes/{id}?version={version} -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","quotationCart" : {"typeId" : "cart","id" : "1a3faa00-55fa-4ab8-bee7-933c31e18dcc"},"quoteRequest" : {"typeId" : "quote-request","id" : "8a3faa00-33fa-4ab8-bee7-833f31e18dcc"},"customer" : {"typeId" : "customer","id" : "92f5a867-bf19-47ab-982c-6720a03a3921"},"stagedQuoteState" : "InProgress"}
Delete StagedQuote by Key
manage_staged_quotes:{projectKey}regionString | Region in which the Project is hosted. |
projectKeyString |
|
keyString |
|
versionInt | Last seen version of the resource. |
expand | The parameter can be passed multiple times. |
dataErasureBoolean | Defaults to |
200StagedQuote
curl -X DELETE https://api.{region}.commercetools.com/{projectKey}/staged-quotes/key={key}?version={version} -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","quotationCart" : {"typeId" : "cart","id" : "1a3faa00-55fa-4ab8-bee7-933c31e18dcc"},"quoteRequest" : {"typeId" : "quote-request","id" : "8a3faa00-33fa-4ab8-bee7-833f31e18dcc"},"customer" : {"typeId" : "customer","id" : "92f5a867-bf19-47ab-982c-6720a03a3921"},"stagedQuoteState" : "InProgress"}