When integrating the taxi and passenger services data, we realized it was complex today to send a trip object in cases where the trip was cancelled for whatever reason (no-show, app-cancellation, etc...). This is because the only way to determine the trip was cancelled is to go into the mode-specific trip attributes and infer the cancellation from the cancellation_reason field being not-empty (as of today, only an unnormalized string of text).
=> We suggest to add a trip_cancelled boolean as part of the root trip object so that the cancellation can be determined a lot easier. In this case, fields such as distance, duration, etc... could be made optional when trip has been cancelled for whatever reason.
This could be made mode-specific if some other mode do not need such a field.
PS: See issue #888 for our take on the mode-specific attributes and how we suggest to structure them.
When integrating the taxi and passenger services data, we realized it was complex today to send a trip object in cases where the trip was cancelled for whatever reason (no-show, app-cancellation, etc...). This is because the only way to determine the trip was cancelled is to go into the mode-specific trip attributes and infer the cancellation from the
cancellation_reasonfield being not-empty (as of today, only an unnormalized string of text).=> We suggest to add a
trip_cancelledboolean as part of the root trip object so that the cancellation can be determined a lot easier. In this case, fields such asdistance,duration, etc... could be made optional when trip has been cancelled for whatever reason.This could be made mode-specific if some other mode do not need such a field.
PS: See issue #888 for our take on the mode-specific attributes and how we suggest to structure them.