TOMP-WG / TOMP-API

Transport Operator to Mobility-as-a-Service Provider-API development for Mobility as a Service
Apache License 2.0
100 stars 41 forks source link

[FEATURE REQUEST] Allow for handling different cancellation options #545

Open matt-wirtz opened 6 months ago

matt-wirtz commented 6 months ago

Is your feature request related to a problem? Please describe.

Services with time slot reservation options or fixed price services usually have cancellation options where additional fees are applied. E.g. when booking a shared car for some time next week that booking can be canceled until the booking time has been reached. But when cancelling some charges are applied. Or if a booked DRT service is cancelled usually additional fees are applied. Some TOs offer different cancellation options like either a voucher or a refund.

Currently an extensive provision of cancellation options is not supported by TOMP.

Urgency

Major (the TOMP API works as advertised but this is really neccessary to implement), because the use case of cancelling a trip/booking is quite common for services with time slot reservation options or fixed price services.

Describe the solution you'd like

There should be two use cases:

Possible Implementation

When the cancel operation is triggered the MP can opt to set "requestCancellationOffers": true. In this case the TO provides an array of cancellationOptions. That object holds e.g. the price, info text and an cancellationOptionId. Based on this the MP can trigger the cancellation by providing "requestCancellationOffers": false and "cancellationOfferId": 2. If the MP triggers a cancellation with "requestCancellationOffers": false and doesn't provide a cancellationOfferId the TO decides which option to use.