OVPAY-2473 - Added existing trip endpoints.

This commit is contained in:
Bas Boterman 2026-03-05 10:09:44 +01:00
parent 2b02e52c22
commit 0749e927dc

View File

@ -0,0 +1,677 @@
openapi: 3.0.1
info:
title: ABTCustomers
version: '1.0'
servers:
- url: https://services.acc.api.htm.nl/abt/abtcustomers/1.0
security:
- default: []
paths:
/customers/tokens/{ovpayTokenId}/trips:
get:
tags:
- Customer self-service trips
summary: Get trips for a token
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)
parameters:
- name: X-HTM-JWT-AUTH-HEADER
in: header
required: true
style: simple
explode: false
schema:
type: string
- name: ovpayTokenId
in: path
required: true
style: simple
explode: false
schema:
type: integer
- 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'
'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: []
- default: []
x-auth-type: Application & Application User
x-throttling-tier: Unlimited
/customers/trips/{tripId}:
get:
tags:
- Customer self-service trips
summary: Get trips details for a trip and token
description: >-
Get the trip details for a given trip and token ID, as long as the trip
belongs to the token and this token is bound to the profile (as derived
from sub in given JWT)
parameters:
- name: X-HTM-JWT-AUTH-HEADER
in: header
required: true
style: simple
explode: false
schema:
type: string
- name: tripId
in: path
required: true
style: simple
explode: false
schema:
type: integer
- name: ovPayTokenId
in: query
required: true
style: form
explode: false
schema:
type: integer
responses:
'200':
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/getTrips'
'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: []
- default: []
x-auth-type: Application & Application User
x-throttling-tier: Unlimited
components:
schemas:
getTokenTrips:
type: array
items:
type: object
properties:
tripId:
type: number
tripVersion:
type: number
transportType:
type: string
lineId:
type: string
tripStatus:
type: string
fare:
type: number
currency:
type: string
lastUpdatedTripDateTime:
type: string
checkinTransactionTimestamp:
type: string
checkoutTransactionTimestamp:
type: string
checkinLocation:
type: object
properties:
stopId:
type: number
stopName:
type: object
properties:
items:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
stopDesc:
type: string
stopUrl:
type: string
locationType:
type: number
checkoutLocation:
type: object
properties:
stopId:
type: number
stopName:
type: object
properties:
items:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
stopDesc:
type: string
stopUrl:
type: string
locationType:
type: number
loyaltyOrDiscount:
type: boolean
_links:
type: object
properties:
tripDetails:
type: object
properties:
href:
type: string
method:
type: string
templated:
type: boolean
getTrips:
type: object
properties:
tripId:
type: number
tripVersion:
type: number
tripStatus:
type: string
organisationIcon:
type: string
organisationId:
type: string
organisationName:
type: string
supersededByTripIds:
type: array
items:
type: number
supersedesTripIds:
type: array
items:
type: object
tripStartTxnId:
type: number
tripEndTxnId:
type: number
numberOfSyntheticLegs:
type: number
numberofSyntheticTrips:
type: number
products:
type: array
items:
type: object
properties:
productTemplateId:
type: string
purchaseDateTime:
type: string
appliedValue:
type: number
xspit:
type: string
category:
type: string
typesOfFareProduct:
type: array
items:
type: object
properties:
privateCode:
type: string
checkinTransactionTimestamp:
type: string
checkoutTransactionTimestamp:
type: string
checkinTransactionReference:
type: string
checkoutTransactionReference:
type: string
checkinLocation:
type: object
properties:
stopId:
type: number
stopName:
type: object
properties:
items:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
stopDesc:
type: string
stopUrl:
type: string
locationType:
type: number
checkoutLocation:
type: object
properties:
stopId:
type: number
stopName:
type: object
properties:
items:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
stopDesc:
type: string
stopUrl:
type: string
locationType:
type: number
xbot:
type: string
tokenType:
type: string
transportType:
type: string
lineId:
type: string
networkId:
type: string
networkName:
type: string
currency:
type: string
transportIcon:
type: string
legs:
type: array
items:
type: object
properties:
legId:
type: number
checkinTransactionTimestamp:
type: string
checkoutTransactionTimestamp:
type: string
checkinLocation:
type: object
properties:
stopId:
type: number
stopName:
type: object
properties:
items:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
stopDesc:
type: string
stopUrl:
type: string
locationType:
type: number
checkoutLocation:
type: object
properties:
stopId:
type: number
stopName:
type: object
properties:
items:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
stopDesc:
type: string
stopUrl:
type: string
locationType:
type: number
baseRate:
type: number
lineId:
type: string
networkId:
type: string
networkName:
type: string
fare:
type: number
fareState:
type: string
currency:
type: string
products:
type: array
items:
type: object
properties:
productTemplateId:
type: string
purchaseDateTime:
type: string
appliedValue:
type: number
xspit:
type: string
category:
type: string
typesOfFareProduct:
type: array
items:
type: object
properties:
privateCode:
type: string
appliedTimePeriods:
type: array
items:
type: object
tariffJourneyStart:
type: boolean
tariffDistance:
type: number
aggrGeoIntervalDistance:
type: number
topoDistance:
type: number
concessionId:
type: string
tripLegIdx:
type: number
appliedZones:
type: array
items:
type: object
properties:
zoneId:
type: string
zoneName:
type: object
properties:
items:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
lastUpdatedTripDateTime:
type: string
fare:
type: number
loyaltyOrDiscount:
type: boolean
supportCode:
type: string
checkinTransactionId:
type: string
checkoutTransactionId:
type: string
tariffVersionId:
type: string
correlationId:
type: string
createdAt:
type: string
400Response:
type: object
properties:
code:
type: string
example: '400'
type:
type: string
message:
type: string
example: Bad Request
description:
type: string
example: >-
'Bad Request: Input parameters missing! Please fill in at least 1
valid input parameter.
401Response:
type: object
properties:
code:
type: string
example: '900901'
type:
type: string
message:
type: string
example: Invalid Credentials
description:
type: string
example: >-
Invalid Credentials. Make sure you have provided the correct
security credentials.
403Response:
type: object
properties:
code:
type: string
example: '900901'
type:
type: string
message:
type: string
example: Retailer not authorized
description:
type: string
example: >-
The retailer is not allowed to access resource for requested
touchpoint.
404Response:
type: object
properties:
code:
type: string
example: '404'
type:
type: string
example: Status report
message:
type: string
example: Not Found
description:
type: string
example: The requested resource is not available.
500Response:
type: object
properties:
code:
type: string
example: '500'
type:
type: string
message:
type: string
example: Internal Server Error
description:
type: string