Skip to main content

Quotes

The durable quote store. A quote is priced and saved, can be retrieved by any channel allowed to see it, revalidated, and accepted, which freezes its commercial conditions for the order engine.

OperationEndpoint
Price alternative transport connections for a quotePOST /quote-store/connections/alternatives
Price and save a quotePOST /quote-store/quotes
Retrieve a quoteGET /quote-store/quotes/{reference}
Accept a quote and freeze its conditionsPOST /quote-store/quotes/{reference}/accept
Read the frozen conditions of an accepted quoteGET /quote-store/quotes/{reference}/frozen-conditions
Update a supplier price on a quote linePOST /quote-store/quotes/{reference}/lines/{lineId}/supplier-price
Revalidate a quote against current pricesPOST /quote-store/quotes/{reference}/revalidate

Price alternative transport connections for a quote​

POST/quote-store/connections/alternatives

Headers: Idempotency-Key, plus X-Request-Id.

Request body

FieldTypeRequiredNotes
actorstringmin 1 chars
agency_refstringmin 1 chars
attributesmap of string
candidatesarray of objectyesat least 1; at most 50
candidates[].attributesmap of string
candidates[].availablebooleandefault true
candidates[].componentmap of objectyes
candidates[].product_idstringyesmin 1 chars
candidates[].product_typestringmin 1 chars
channelstringyesmin 1 chars
currencystringyespattern ^[A-Z]{3}$
customer_refstringmin 1 chars
itemsarray of objectyesat least 1; at most 200
items[].attributesmap of string
items[].componentmap of object
items[].external_priceobject
items[].external_price.amountnumberyes≥ 0
items[].external_price.keystringyesmin 1 chars
items[].external_price.supplier_refstringyesmin 1 chars
items[].external_price.valid_untilstring (date-time)yes
items[].inventory_refstringmin 1 chars
items[].line_idstringyes1–100 chars
items[].nightsinteger≥ 0; default 0
items[].offerobject
items[].offer.idstringyesmin 1 chars
items[].offer.versionintegeryes> 0
items[].passengersinteger> 0; default 1
items[].product_idstringyesmin 1 chars
items[].product_typestringmin 1 chars; default "default"
items[].quantityinteger> 0; default 1
marketstringyesmin 1 chars
replace_line_idstringyesmin 1 chars
selling_conditionsarray of object
selling_conditions[].codestringyesmin 1 chars
selling_conditions[].labelstring
selling_conditions[].versionintegeryes> 0
signalsmap of object
store_versioninteger> 0

Schema: apps/journeys/src/quote-store/contracts.ts (ConnectionAlternativesRequestSchema)

Response 200

{ connections }: the candidates priced; nothing is saved.

Errors
StatusCodeMeaning
400invalid_requestThe request failed validation. The message names the first failing field; oms-ops and group surfaces also return every issue in details.
401unauthenticatedThe bearer token is missing, invalid, expired or minted for another purpose.
404quote_store_not_enabledThe quote store is not enabled for the tenant.
409idempotency_in_progressA request with this Idempotency-Key is still running. Retry after the Retry-After interval.
422idempotency_key_reusedThe Idempotency-Key was used for a different request.
500internalUnexpected failure. Retry with the same Idempotency-Key.

Price and save a quote​

POST/quote-store/quotes

Prices the items with the tenant's pricing layers, promotions and selling conditions, and saves the quote with a reference. Field names on the quote store are snake_case.

Headers: Idempotency-Key, plus X-Request-Id.

Request body

FieldTypeRequiredNotes
actorstringyesmin 1 chars
agency_refstringmin 1 chars
attributesmap of string
channelstringyesmin 1 chars
currencystringyespattern ^[A-Z]{3}$
customer_refstringmin 1 chars
itemsarray of objectyesat least 1; at most 200
items[].attributesmap of string
items[].componentmap of object
items[].external_priceobject
items[].external_price.amountnumberyes≥ 0
items[].external_price.keystringyesmin 1 chars
items[].external_price.supplier_refstringyesmin 1 chars
items[].external_price.valid_untilstring (date-time)yes
items[].inventory_refstringmin 1 chars
items[].line_idstringyes1–100 chars
items[].nightsinteger≥ 0; default 0
items[].offerobject
items[].offer.idstringyesmin 1 chars
items[].offer.versionintegeryes> 0
items[].passengersinteger> 0; default 1
items[].product_idstringyesmin 1 chars
items[].product_typestringmin 1 chars; default "default"
items[].quantityinteger> 0; default 1
marketstringyesmin 1 chars
selling_conditionsarray of object
selling_conditions[].codestringyesmin 1 chars
selling_conditions[].labelstring
selling_conditions[].versionintegeryes> 0
signalsmap of object
store_versioninteger> 0

Schema: apps/journeys/src/quote-store/contracts.ts (SaveQuoteRequestSchema)

Response 201

{ quote } with reference, status (open, accepted, expired), lines, totals, versions, sellingConditions, validUntil and retainUntil.

Errors
StatusCodeMeaning
400invalid_requestThe request failed validation. The message names the first failing field; oms-ops and group surfaces also return every issue in details.
400tenant_requiredNo tenant could be resolved from the token or the request.
401unauthenticatedThe bearer token is missing, invalid, expired or minted for another purpose.
403channel_not_allowedThe channel may not read or write this quote.
404quote_store_not_enabledThe quote store is not enabled for the tenant.
409idempotency_in_progressA request with this Idempotency-Key is still running. Retry after the Retry-After interval.
422idempotency_key_reusedThe Idempotency-Key was used for a different request.
500internalUnexpected failure. Retry with the same Idempotency-Key.

Retrieve a quote​

GET/quote-store/quotes/{reference}

Returns the stored quote as the given channel may see it. Trade channels also see trade amounts.

Parameters

NameInRequiredNotes
referencepathyes
channelqueryyesThe channel reading the quote.

Response 200

{ quote }.

Errors
StatusCodeMeaning
400invalid_requestThe request failed validation. The message names the first failing field; oms-ops and group surfaces also return every issue in details.
400channel_requiredThe channel query parameter is required to read a quote.
401unauthenticatedThe bearer token is missing, invalid, expired or minted for another purpose.
403channel_not_allowedThe channel may not read or write this quote.
404quote_not_foundThe quote does not exist.
404quote_store_not_enabledThe quote store is not enabled for the tenant.
500internalUnexpected failure. Retry with the same Idempotency-Key.

Accept a quote and freeze its conditions​

POST/quote-store/quotes/{reference}/accept

Revalidates and accepts the quote. If revalidation found differences, pass their hash in acknowledged_differences_hash. The response carries the commercial handover the order engine converts from.

Parameters

NameInRequiredNotes
referencepathyes

Headers: Idempotency-Key, plus X-Request-Id.

Request body

FieldTypeRequiredNotes
acknowledged_differences_hashstringmin 1 chars
actorstringyesmin 1 chars
channelstringyesmin 1 chars

Schema: apps/journeys/src/quote-store/contracts.ts (AcceptQuoteRequestSchema)

Response 200

{ quote, handover, revalidation }. The handover has handoverId, the frozen lines, totals, selling conditions, versions and an integrity hash.

Errors
StatusCodeMeaning
400invalid_requestThe request failed validation. The message names the first failing field; oms-ops and group surfaces also return every issue in details.
401unauthenticatedThe bearer token is missing, invalid, expired or minted for another purpose.
404quote_not_foundThe quote does not exist.
404quote_store_not_enabledThe quote store is not enabled for the tenant.
409quote_not_openThe quote is no longer open.
409revalidation_blockingRevalidation found differences that block acceptance.
409differences_not_acknowledgedRevalidation found differences that must be acknowledged with their hash.
409idempotency_in_progressA request with this Idempotency-Key is still running. Retry after the Retry-After interval.
422idempotency_key_reusedThe Idempotency-Key was used for a different request.
500internalUnexpected failure. Retry with the same Idempotency-Key.

Read the frozen conditions of an accepted quote​

GET/quote-store/quotes/{reference}/frozen-conditions

The server's mapping of the accepted handover to the order engine's frozen-conditions document, after its integrity hash is checked. Pass this document to quotation convert or trip handover instead of building it on the client.

Parameters

NameInRequiredNotes
referencepathyes

Response 200

{ frozen }: quoteRef, quoteVersion, frozenAt, currency, market, channel, configVersion, storeVersion, customerRef, lines, promotions and totalMinor.

Errors
StatusCodeMeaning
400invalid_requestThe request failed validation. The message names the first failing field; oms-ops and group surfaces also return every issue in details.
401unauthenticatedThe bearer token is missing, invalid, expired or minted for another purpose.
404quote_not_foundThe quote does not exist.
404quote_store_not_enabledThe quote store is not enabled for the tenant.
409not_acceptedThe quote has not been accepted, so it has no frozen conditions.
409handover_tamperedThe stored handover failed its integrity check.
500internalUnexpected failure. Retry with the same Idempotency-Key.

Update a supplier price on a quote line​

POST/quote-store/quotes/{reference}/lines/{lineId}/supplier-price

Parameters

NameInRequiredNotes
referencepathyes
lineIdpathyes

Headers: Idempotency-Key, plus X-Request-Id.

Request body

FieldTypeRequiredNotes
amountnumberyes≥ 0
keystringyesmin 1 chars
supplier_refstringyesmin 1 chars
valid_untilstring (date-time)yes

Schema: apps/journeys/src/quote-store/contracts.ts (ExternalPriceInputSchema)

Response 200

{ supplierUpdate: { response, decision, delta, deltaPercent } }; decision is auto_accept or needs_confirmation.

Errors
StatusCodeMeaning
400invalid_requestThe request failed validation. The message names the first failing field; oms-ops and group surfaces also return every issue in details.
401unauthenticatedThe bearer token is missing, invalid, expired or minted for another purpose.
404quote_not_foundThe quote does not exist.
404quote_store_not_enabledThe quote store is not enabled for the tenant.
409quote_not_openThe quote is no longer open.
409idempotency_in_progressA request with this Idempotency-Key is still running. Retry after the Retry-After interval.
422idempotency_key_reusedThe Idempotency-Key was used for a different request.
500internalUnexpected failure. Retry with the same Idempotency-Key.

Revalidate a quote against current prices​

POST/quote-store/quotes/{reference}/revalidate

Parameters

NameInRequiredNotes
referencepathyes

Headers: Idempotency-Key, plus X-Request-Id.

Request body

FieldTypeRequiredNotes
channelstringyes

Response 200

reference, checkedAt, seen and current versions, differences, differencesHash, lines, totals and acceptable.

Errors
StatusCodeMeaning
400invalid_requestThe request failed validation. The message names the first failing field; oms-ops and group surfaces also return every issue in details.
400channel_requiredThe channel query parameter is required to read a quote.
401unauthenticatedThe bearer token is missing, invalid, expired or minted for another purpose.
404quote_not_foundThe quote does not exist.
404quote_store_not_enabledThe quote store is not enabled for the tenant.
409quote_not_openThe quote is no longer open.
409idempotency_in_progressA request with this Idempotency-Key is still running. Retry after the Retry-After interval.
422idempotency_key_reusedThe Idempotency-Key was used for a different request.
500internalUnexpected failure. Retry with the same Idempotency-Key.