Skip to main content

Groups

The order engine group umbrella that links individual trips, carries the negotiated conditions and enforces inherited constraints.

OperationEndpoint
Create a groupPOST /oms-ops/groups
Read a groupGET /oms-ops/groups/{groupId}
Update a groupPATCH /oms-ops/groups/{groupId}
Read the group's aggregate statusGET /oms-ops/groups/{groupId}/aggregate
Link a trip to a groupPOST /oms-ops/groups/{groupId}/trips
Record a member trip's statusPOST /oms-ops/groups/{groupId}/trips/{tripId}/status
Check a proposed trip change against group constraintsPOST /oms-ops/trips/{tripId}/group-check

Create a group​

POST/oms-ops/groups

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

Request body

FieldTypeRequiredNotes
actorobjectyes
actor.channelstringmax 60 chars
actor.idstringyes1–200 chars
actor.namestringmax 200 chars
actor.rolestringyes1–100 chars
agreementobjectyes
agreement.agreementRefstringyes1–200 chars
agreement.constraintsobject
agreement.constraints.allowedAdditionKindsarray of string
agreement.constraints.allowedValuesmap of array
agreement.constraints.constrainedProductKindsarray of string
agreement.constraints.inheritedmap of string
agreement.constraints.maxAdditionsPerTripinteger≥ 0
agreement.constraints.maxParticipantsinteger> 0
agreement.constraints.minParticipantsinteger≥ 0
agreement.constraints.promotionsOnTopboolean
agreement.constraints.ruleReasonsmap of string
agreement.contractRefstring1–200 chars
agreement.negotiatedConditionsobjectdefault {"terms":[]}
agreement.negotiatedConditions.currencystringpattern ^[A-Z]{3}$
agreement.negotiatedConditions.discountPercentnumber≥ 0; ≤ 100
agreement.negotiatedConditions.fixedPricesMinormap of integer
agreement.negotiatedConditions.priceListRefstring1–200 chars
agreement.negotiatedConditions.termsarray of string
agreement.paymentLogicobjectyes
agreement.paymentLogic.anchorenum: group, trip, purchase_orderyes
agreement.paymentLogic.depositPercentnumber≥ 0; ≤ 100
agreement.paymentLogic.instalmentsarray of object
agreement.paymentLogic.patternenum: agency_bulk, per_booking, instalments, deferredyes
agreement.paymentLogic.scenariostringyes1–60 chars
groupIdstring1–200 chars
groupTypestringyes1–60 chars
namestringyes1–200 chars
organiserobject
organiser.contactstringmax 320 chars
organiser.namestringmax 200 chars
organiser.refstringyes1–200 chars
statusenum: quoted, option, confirmed, closed, cancelleddefault "quoted"

Schema: apps/journeys/src/oms-ops/contracts.ts (CreateGroupSchema)

Response 201

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.
403scope_forbiddenThe token is scoped to an agency or an access scope; this surface requires an unscoped tenant token.
404oms_ops_not_enabledOrder operations are not enabled for the tenant.
409group_version_conflictThe group's expectedVersion does not match.
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 a group​

GET/oms-ops/groups/{groupId}

Parameters

NameInRequiredNotes
groupIdpathyes

Response 200

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.
403scope_forbiddenThe token is scoped to an agency or an access scope; this surface requires an unscoped tenant token.
404group_not_foundThe group does not exist.
404oms_ops_not_enabledOrder operations are not enabled for the tenant.
500internalUnexpected failure. Retry with the same Idempotency-Key.

Update a group​

PATCH/oms-ops/groups/{groupId}

Parameters

NameInRequiredNotes
groupIdpathyes

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

Request body

FieldTypeRequiredNotes
actorobjectyes
actor.channelstringmax 60 chars
actor.idstringyes1–200 chars
actor.namestringmax 200 chars
actor.rolestringyes1–100 chars
agreementobject
agreement.agreementRefstringyes1–200 chars
agreement.constraintsobject
agreement.constraints.allowedAdditionKindsarray of string
agreement.constraints.allowedValuesmap of array
agreement.constraints.constrainedProductKindsarray of string
agreement.constraints.inheritedmap of string
agreement.constraints.maxAdditionsPerTripinteger≥ 0
agreement.constraints.maxParticipantsinteger> 0
agreement.constraints.minParticipantsinteger≥ 0
agreement.constraints.promotionsOnTopboolean
agreement.constraints.ruleReasonsmap of string
agreement.contractRefstring1–200 chars
agreement.negotiatedConditionsobjectdefault {"terms":[]}
agreement.negotiatedConditions.currencystringpattern ^[A-Z]{3}$
agreement.negotiatedConditions.discountPercentnumber≥ 0; ≤ 100
agreement.negotiatedConditions.fixedPricesMinormap of integer
agreement.negotiatedConditions.priceListRefstring1–200 chars
agreement.negotiatedConditions.termsarray of string
agreement.paymentLogicobjectyes
agreement.paymentLogic.anchorenum: group, trip, purchase_orderyes
agreement.paymentLogic.depositPercentnumber≥ 0; ≤ 100
agreement.paymentLogic.instalmentsarray of object
agreement.paymentLogic.patternenum: agency_bulk, per_booking, instalments, deferredyes
agreement.paymentLogic.scenariostringyes1–60 chars
expectedVersionintegeryes> 0
reasonstringmax 2000 chars
statusenum: quoted, option, confirmed, closed, cancelled

Schema: apps/journeys/src/oms-ops/contracts.ts (UpdateGroupSchema)

Response 200

{ group, violations }.

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.
403scope_forbiddenThe token is scoped to an agency or an access scope; this surface requires an unscoped tenant token.
404group_not_foundThe group does not exist.
404oms_ops_not_enabledOrder operations are not enabled for the tenant.
409group_version_conflictThe group's expectedVersion does not match.
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 group's aggregate status​

GET/oms-ops/groups/{groupId}/aggregate

Parameters

NameInRequiredNotes
groupIdpathyes

Response 200

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.
403scope_forbiddenThe token is scoped to an agency or an access scope; this surface requires an unscoped tenant token.
404group_not_foundThe group does not exist.
404oms_ops_not_enabledOrder operations are not enabled for the tenant.
500internalUnexpected failure. Retry with the same Idempotency-Key.

Link a trip to a group​

POST/oms-ops/groups/{groupId}/trips

Parameters

NameInRequiredNotes
groupIdpathyes

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

Request body

FieldTypeRequiredNotes
actorobjectyes
actor.channelstringmax 60 chars
actor.idstringyes1–200 chars
actor.namestringmax 200 chars
actor.rolestringyes1–100 chars
statusstring1–60 chars; default "quoted"
tripIdstringyes1–200 chars

Schema: apps/journeys/src/oms-ops/contracts.ts (LinkTripSchema)

Response 201

{ member, violations }.

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.
403scope_forbiddenThe token is scoped to an agency or an access scope; this surface requires an unscoped tenant token.
404oms_ops_not_enabledOrder operations are not enabled for the tenant.
409group_closedThe group is closed.
409group_fullThe group has reached its maximum participants.
409trip_already_groupedThe trip already belongs to a group.
409idempotency_in_progressA request with this Idempotency-Key is still running. Retry after the Retry-After interval.
422group_constraint_violationThe trip breaks a constraint the group imposes.
422idempotency_key_reusedThe Idempotency-Key was used for a different request.
500internalUnexpected failure. Retry with the same Idempotency-Key.

Record a member trip's status​

POST/oms-ops/groups/{groupId}/trips/{tripId}/status

Parameters

NameInRequiredNotes
groupIdpathyes
tripIdpathyes

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

Request body

FieldTypeRequiredNotes
expectedVersioninteger> 0
sourcestring1–100 chars; default "order_store"
statusstringyes1–60 chars

Schema: apps/journeys/src/oms-ops/contracts.ts (MemberStatusSchema)

Response 200

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.
403scope_forbiddenThe token is scoped to an agency or an access scope; this surface requires an unscoped tenant token.
404oms_ops_not_enabledOrder operations are 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.

Check a proposed trip change against group constraints​

POST/oms-ops/trips/{tripId}/group-check

Parameters

NameInRequiredNotes
tripIdpathyes

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

Request body

FieldTypeRequiredNotes
attributestringmin 1 chars
kindenum: add_line, change_attribute, apply_promotionyes
lineIdstring1–200 chars
productKindstringmin 1 chars
promotionRefstring1–200 chars
valuestring

Schema: apps/journeys/src/oms-ops/contracts.ts (ProposedTripChangeSchema)

Response 200

{ groupId, allowed, violations, inherited }.

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.
403scope_forbiddenThe token is scoped to an agency or an access scope; this surface requires an unscoped tenant token.
404oms_ops_not_enabledOrder operations are 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.