Legacy: Getting an Invoice (v1alpha2)
warning
This page documents the TripInvoiceService for version v1alpha2
, which is now
deprecated and considered Legacy. This means that while it is still supported,
no new integrations should be built using this version.
For the latest version of the TripInvoiceService (v2alpha1
), please refer to
the
Trip Invoices
guide.
Learn how to obtain an invoice for a terminated trip.
MaaS provides two endpoints for retrieving an invoice:
- To get an invoice for one terminated trip call the
GetTripInvoice
API with the
tripId
as a path parameter:
- Staging
- Production
curl --location --request GET \
--header 'Content-Type: application/json' \
--header 'User-Agent: {YOUR_COMPANY_NAME}' \
--header 'Authorization: Bearer {JWT}' \
'https://web.maas.api.staging.ridedott.com/v1alpha2/trips/{tripId}/invoice'
curl --location --request GET \
--header 'Content-Type: application/json' \
--header 'User-Agent: {YOUR_COMPANY_NAME}' \
--header 'Authorization: Bearer {JWT}' \
'https://web.maas.api.ridedott.com/v1alpha2/trips/{tripId}/invoice'
- To access a list of all the created invoices for an individual user, you
can use the
ListTripInvoice
API and pass
userId
search parameter to it:
- Staging
- Production
curl --location --request GET \
--header 'Content-Type: application/json' \
--header 'User-Agent: {YOUR_COMPANY_NAME}' \
--header 'Authorization: Bearer {JWT}' \
'https://web.maas.api.staging.ridedott.com/v1alpha2/trips/-/invoices/?user_id={userId}'
curl --location --request GET \
--header 'Content-Type: application/json' \
--header 'User-Agent: {YOUR_COMPANY_NAME}' \
--header 'Authorization: Bearer {JWT}' \
'https://web.maas.api.ridedott.com/v1alpha2/trips/-/invoices/?user_id={userId}'