draftDraft
An ordered, bounded set of provider-backed places represents current trip intent without claiming a valid route.
Discover provider-backed places, preserve their Mappls Pins in a versioned itinerary, preview the exact ordered route, invalidate stale plans on edits, and retain visit or skip progress through completion.
A state is not a UI label. It determines which actor may act, what evidence exists, what may be retried, and how recovery proceeds.
draftAn ordered, bounded set of provider-backed places represents current trip intent without claiming a valid route.
plannedA route revision is bound to the exact ordered stop identities, travel profile, provider response, and planning time.
activeThe traveller started the current route revision and each next stop receives an explicit visited or skipped outcome.
pausedAn attributable interruption stops progress without discarding saved stops, outcomes, or route identity.
completedterminalEvery stop is visited or explicitly skipped and the terminal itinerary, route revision, outcomes, and event history are retained.
cancelledterminalA named actor ended the itinerary with a reason while retaining all committed place, route, and progress evidence.
Commands express intent. The aggregate validates current state and invariants, commits one new version, and emits a fact in the same transaction.
create_tripTravellertrip.createdUse a client trip command ID before the first network attempt.
add_or_reorder_stopTravellerdraftplannedtrip.sequence_changedCompare trip version and bind every saved item to a unique Mappls Pin.
preview_routeMappls routing servicedrafttrip.route_previewedHash ordered pins, profile, constraints, departure intent, and aggregate version.
pause_tripTravelleractivetrip.pausedRecord the interruption reason once under a stable client command identity.
resume_tripTravellerpausedtrip.resumedBind resume to the paused aggregate and current route revision.
visit_or_skip_nextTravelleractivetrip.stop_completedGenerate one command identity per stop outcome; require a reason for skip.
complete_tripTravelleractivetrip.completedTerminal version and command ID identify one completion.
cancel_tripTravellerdraftplannedactivepausedtrip.cancelledOne command records actor, reason, previous state, and terminal version.
Keep provider responses, business identity, state, events, and side-effect delivery distinct so each can be reconciled safely.
Business identity, date, party, lifecycle, current route revision, and optimistic version.
tripIdstateversiondatepartySizerouteRevisionOrdered provider-backed place and progress outcome.
mapplsPinpositionproviderProvenancestatuscompletedAtskipReasonImmutable preview for one exact intent version.
routeIdrevisionorderedPinsprofilelegsdistancedurationplannedAtAttributable changes and reliable downstream collaboration or notification.
eventIdaggregateVersionactorcommandIdoutboxStatusEvery saved stop originated from provider-backed discovery and retains its Mappls Pin and provenance.
A Mappls Pin occurs at most once in an itinerary.
A route revision is valid only for the exact ordered stop list and constraints that produced it.
Only the next pending stop may receive a visit or skip outcome.
Completion is impossible while any stop remains pending.
Commands are idempotent and compare the expected trip version.
Recovery changes durable truth only through the same rules as normal operation. A timeout is an unknown outcome, not evidence that nothing happened.
Current stop identities or aggregate version differ from the route's intent version.
Invalidate the route, show the edit, and require a new preview before start.
The same ordered intent and request identity has no committed route revision.
Reconcile or repeat the same idempotent request; never attach a response to newer intent.
Traveller or fresh provider/business data marks the next stop unavailable.
Record an explicit skip with reason, then offer a newly versioned replan from current context.
A durable active aggregate exists without current client state.
Restore visit/skip progress and current revision, refresh stale operational data, and ask before resuming guidance.
Measure state age, event health, retries, reconciliation, and sensitive-data access alongside latency and error rate.
Only explicitly indexed evidence is linked. Empty sections are not backfilled with invented endpoints or package names.
8 labs · 5 hostile scenarios/api/places/search/json/{REST_KEY}/{resources}/{profile}/{geopositions}mappls-rest-apis8 verified tests