Closed ralfbayer-db closed 2 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.
It is not relevant for fare providers as they do not create fulfillments. -Clemens
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.
Questions regarding POST /bookings/{bookingId}/fulfillments: