OVPAY-2491 - Added endpoint for getting trip history by SRID + amount or OVpasnumber.

This commit is contained in:
Bas Boterman 2026-03-25 17:01:18 +01:00
parent 5c950701e0
commit 868ac3e6bd

View File

@ -11,7 +11,7 @@ paths:
get:
tags:
- Trips
summary: Get trips for a token
summary: Get trips for a token in profile
description: >-
Get the most recent trips for a given token ID, as long as this token is
bound to the profile (as derived from sub in given JWT)
@ -246,6 +246,263 @@ paths:
- default: []
x-auth-type: Application & Application User
x-throttling-tier: Unlimited
/customers/tokens/trips:
get:
tags:
- Trips
summary: Get trips for an anonymous token
description: >-
Get the most recent trips for a given token type and value (i.e. SRID and amount or OVpasnumber).
parameters:
- name: X-HTM-JWT-AUTH-HEADER
in: header
required: true
style: simple
explode: false
schema:
type: string
- name: tokenType
in: query
required: true
description: >-
A tokenType IS AN enumerated identifier THAT describes the type of
Token that will be used as an input for the translation.
schema:
type: string
enum:
- srfid
- passnumber
- name: tokenValue
in: query
required: true
description: >-
A tokenValue IS A string THAT defines the value of the specified
tokenType.
examples:
srfid:
value: P485Q6M797J9LW
summary: srfid
passnumber:
value: 424HJGF
summary: passNumber
schema:
type: string
- name: dateTimeFrom
in: query
required: false
style: form
explode: false
schema:
type: string
- name: dateTimeUntil
in: query
required: false
style: form
explode: false
schema:
type: string
- name: organisationId
in: query
required: false
style: form
explode: false
schema:
type: string
- name: transportType
in: query
required: false
style: form
explode: false
schema:
type: string
- name: lineId
in: query
required: false
style: form
explode: false
schema:
type: string
- name: paymentMethod
in: query
required: false
style: form
explode: false
schema:
type: string
- name: productTemplateId
in: query
required: false
style: form
explode: false
schema:
type: string
- name: category
in: query
required: false
style: form
explode: false
schema:
type: string
- name: tripStatus
in: query
required: false
style: form
explode: false
schema:
type: string
- name: tripId
in: query
required: false
style: form
explode: false
schema:
type: string
- name: showSuperseedingTrips
in: query
required: false
style: form
explode: false
schema:
type: string
- name: organisationName
in: query
required: false
style: form
explode: false
schema:
type: string
- name: limit
in: query
required: false
style: form
explode: false
schema:
type: integer
- name: offset
in: query
required: false
style: form
explode: false
schema:
type: integer
responses:
'200':
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/getTokenTrips'
examples:
emptyResponse:
summary: No trips found for a token
value: []
multipleTripsResponse:
summary: Multiple trips found for a token
value:
- tripId: 66538
tripVersion: 2
transportType: RAIL
lineId: "10"
tripStatus: COMPLETE
fare: 2470
currency: EUR
lastUpdatedTripDateTime: 2021-06-01T06:22:00Z
checkinTransactionTimestamp: 2021-06-01T06:00:00Z
checkoutTransactionTimestamp: 2021-06-01T06:22:00Z
checkinLocation:
stopId: 621
stopName:
items:
- key: nl-NL
value: Utrecht Centraal
- key: en-US
value: Utrecht Centraal
stopDesc: Station Utrecht Centraal
stopUrl: /icons/stops/stop.svg
locationType: 0
checkoutLocation:
stopId: 253
stopName:
items:
- key: nl-NL
value: Goes
- key: en-US
value: Goes
stopDesc: Station Goes
stopUrl: /icons/stops/stop.svg
locationType: 0
loyaltyOrDiscount: false
_links:
tripDetails:
href: https://services.acc.api.htm.nl/abt/abtcustomers/1.0/customers/tokens/123/trips/66538
method: GET
templated: false
- tripId: 66539
tripVersion: 1
transportType: BUS
lineId: "20"
tripStatus: MISSING_CKO
fare: 1230
currency: EUR
lastUpdatedTripDateTime: 2021-06-01T07:00:00Z
checkinTransactionTimestamp: 2021-06-01T06:30:00Z
checkoutTransactionTimestamp: null
checkinLocation:
stopId: 622
stopName:
items:
- key: nl-NL
value: Amsterdam Centraal
- key: en-US
value: Amsterdam Centraal
stopDesc: Station Amsterdam Centraal
stopUrl: /icons/stops/stop.svg
locationType: 0
checkoutLocation: null
loyaltyOrDiscount: true
_links:
getTripDetails:
href: https://services.acc.api.htm.nl/abt/abtcustomers/1.0/customers/tokens/123/trips/66539
method: GET
templated: false
getStopsForCorrection:
href: https://services.acc.api.htm.nl/abt/abtcustomers/1.0/customers/trips/stops?xbot=36637b86-7a31-4b77-99dd-2d39b9c1a9b6&tripId=66539&transactionId=001e8481-1151-gemaltoPure-1622527200000
method: GET
templated: false
'400':
description: '400'
content:
application/json:
schema:
$ref: '#/components/schemas/400Response'
'401':
description: '401'
content:
application/json:
schema:
$ref: '#/components/schemas/401Response'
'403':
description: '403'
content:
application/json:
schema:
$ref: '#/components/schemas/403Response'
'404':
description: '404'
content:
application/json:
schema:
$ref: '#/components/schemas/404Response'
'500':
description: '500'
content:
application/json:
schema:
$ref: '#/components/schemas/500Response'
security:
- default: []
x-auth-type: Application & Application User
x-throttling-tier: Unlimited
/customers/trips/{tripId}:
get:
tags: