UnionInternationalCheminsdeFer / OSDM

Projects related to an open sales & distribution API for public transportation.
https://osdm.io
Apache License 2.0
53 stars 21 forks source link

Questions regarding POST /bookings/{bookingId}/fulfillments #402

Closed ralfbayer-db closed 2 months ago

ralfbayer-db commented 9 months ago

Questions regarding POST /bookings/{bookingId}/fulfillments:

jspetrak commented 6 months ago

Observations so far

When a retailer invokes distributor OSDM, either gets 200 and Fulfillments FULFILLED, or 202 and Fulfillments will be later available in the Booking in FULFILLED state.

When distributor performs the POST fulfillment, it may directly create Fulfillmens in CONFIRMED state to indicate it was paid/sold, assign the IDs, and have them FULFILLED once the FulfillmentDocuments are ready.

Retailer can verify in the booking if all Fulfillments were asynchronously provided by checking all booked offer parts for status = FULFILLED. Status CONFIRMED means it was paid/sold but Fulfillment is not ready yet.

PATCH Fulfillments is used exceptionally in cases when providers use Fulfillments as proof of delivery and cancel of booking is no longer possible.

osdm.io docs will need an update once the flow is clarified by fare providers in the tech. group.

jspetrak commented 5 months ago

It is not relevant for fare providers as they do not create fulfillments. -Clemens

jspetrak commented 5 months ago

Models - Fulfillment State Model: remove the call of patch fulfillments, as it is used for activation only. Instead, label it as a "time event".

openapi - update docs of patch fulfillment to indicate it is used for activation process.