foryn
FDeveloper PortalOcean API v1

BOOKING API

Qualification, identity and revisions

Foryn accepts carrier-confirmed commercial booking state, not every booking request or operational movement.

What qualifies

  • CARRIER_CONFIRMED is the default qualification milestone; confirmedAt and sourceEvidenceId are required.
  • EQUIVALENT_CONFIRMED is accepted only when the integration credential is explicitly authorized for equivalent milestones.
  • The API trusts a credentialed forwarder's source attestation; it does not independently verify a carrier's digital signature.
  • A booking request, EDI interchange acknowledgment, vessel departure or completed transport document is not automatically booking confirmation.

Stable identity

sourceBookingId is stable within the authenticated source system. carrierBookingReference and carrierId must also remain consistent when updating that source booking.

eventId identifies the delivered message, revision identifies the booking state. These are different fields and must not be substituted for each other.

The API uses a tenant/source/booking identity boundary and serializable transactions. Exactly repeating an event with the same eventId and content is reported as DUPLICATE_EVENT.

Lifecycle response states

data.statusMeaningRecommended client action
ACCEPTEDBooking assessed; no consequential findingAcknowledge and continue
EXCEPTIONEvidence-backed consequential findingRoute to operations if configured
INSUFFICIENT_EVIDENCECommercial match or precedence unresolvedReview source/reference completeness
OUT_OF_COVERAGELane not included in subscribed booking coverageDo not retry unchanged as a failure
NOT_QUALIFIEDNo permitted confirmed milestone establishedRetain at source until qualified
DUPLICATE_EVENTExact event ID and payload already recordedTreat as idempotent acknowledgment
UNCHANGED_SNAPSHOTNo new commercial state; revision may advanceDo not count twice
STALE_REVISIONOlder than recorded revisionStop replay or reconcile ordering
CANCELLEDPreviously qualified booking made inactiveRemove active volume from source-side view

Amendments and cancellation

  • Submit AMENDED only when updated facts reflect an accepted, commercially qualified booking state.
  • An amendment uses the same sourceBookingId with a greater monotonic revision and a different eventId.
  • For cancellation, submit action CANCELLED with sourceBookingId, greater revision and source document identity; do not include the booking property.
  • Previously canceled bookings cannot be silently reactivated. Explicit reinstatement policy is not implemented.
API v1 · Fictional examples · Production access requires coordinated onboarding · OpenAPI contract ↗