Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of contents

Table of Contents
maxLevel3
excludeTable of contents

Overview
Anchor
overview
overview

...

Issue tickets from supplied manifest. The manifest should come from the
product server for a matching participant id. Manifests from an unknown
participants, expired manifest or with an illegal signature will be
rejected.

Parameters

Type

Name

Description

Schema

Header

X-BoB-AuthToken

required

JWT authentication token

string

Body

manifestCall

required

Manifest to issue tickets from

manifestCall

Responses

HTTP Code

Description

Schema

201

Successful operation, return identifiers for issued tickets

Headers :

No Format
location

(string) : URL of created ticket bundle.

ticketIssueResponse

400

Manifest is invalid or from unknown participant

No Content

401

Unauthorised

No Content

Produces


  • No Format
    application/json


...

Get all issued tickets that meets the requirements specified by the
parameters. Which parameters you can filter on are described below.

Parameters

Type

Name

Description

Schema

Header

X-BoB-AuthToken

required

JWT authentication token

string

Query

active

optional

Filter on active tickets

boolean

Query

pid

optional

Filter on participant ID requesting the ticket

integer (int64)

Query

refundable

optional

Filter on refundable tickets

boolean

Query

refunded

optional

Filter on refunded tickets

boolean

Query

requestId

optional

Filter on request ID

string

Query

travellerId

required

Filter on travellers ID

string

Responses

HTTP Code

Description

Schema

200

Successful operation, return list of tickets. If filter doesn't
produce any matches an empty array will be returned.

< ticket > array

401

Unauthorised

No Content

Produces


  • No Format
    application/json


...

Get data and information about ticket with specified ticket identifier,
issued by this server.

Parameters

Type

Name

Description

Schema

Header

X-BoB-AuthToken

required

JWT authentication token

string

Path

ticketId

required

Ticket identifier

string

Responses

HTTP Code

Description

Schema

200

Successful operation

ticket

401

Unauthorised

No Content

404

Ticket not found

No Content

Produces


  • No Format
    application/json


...

Get active status for ticket with specified ticket identifier.

Parameters

Type

Name

Description

Schema

Header

X-BoB-AuthToken

required

JWT authentication token

string

Path

ticketId

required

Ticket id

string

Responses

HTTP Code

Description

Schema

200

Successful operation

ticketActiveStatus

401

Unauthorised

No Content

404

Ticket not found

No Content

Produces


  • No Format
    application/json


...

Freeze or thaw ticket with specified ticket identifier.

Parameters

Type

Name

Description

Schema

Header

X-BoB-AuthToken

required

JWT authentication token

string

Path

ticketId

required

Ticket identifier

string

Body

activeStatus

required

Set to true to thaw ticket, false to freeze. A ticket must be active to be able
to use it.

ticketActiveStatus

Responses

HTTP Code

Description

Schema

200

Successful operation, ticket is now inactive

No Content

401

Unauthorised

No Content

404

Ticket not found

No Content

Produces


  • No Format
    application/json


...

Get all ticket events for specified ticket identifier. If no
events are available an empty list will be returned.

Parameters

Type

Name

Description

Schema

Header

X-BoB-AuthToken

required

JWT authentication token

string

Path

ticketId

required

Ticket identifier

string

Responses

HTTP Code

Description

Schema

200

Successful operation, list of all events for specified ticket identifier.

< ticketEventResult > array

401

Unauthorised

No Content

404

Ticket not found

No Content

Produces


  • No Format
    application/json


...

Get ticket event specified with event identifier and ticket identifier.
Note! this is the server event identifier and not the local event identfier.

Parameters

Type

Name

Description

Schema

Header

X-BoB-AuthToken

required

JWT authentication token

string

Path

eventId

required

Event identifier

string

Path

ticketId

required

Ticket identifier

string

Responses

HTTP Code

Description

Schema

200

Successful operation

ticketEventResult

401

Unauthorised

No Content

404

Ticket and event combination not found

No Content

Produces


  • No Format
    application/json


...

No Format
GET /ticket/{ticketId}/recoverStatus

Parameters

Type

Name

Description

Schema

Header

X-BoB-AuthToken

required

JWT authentication token

string

Path

ticketId

required

Ticket identifier

string

Responses

HTTP Code

Description

Schema

200

successful operation

recoverStatus

401

Unauthorised

No Content

404

Ticket not found

No Content

Produces


  • No Format
    application/json


...

Recover ticket specified with ticket identifier.

Parameters

Type

Name

Description

Schema

Header

X-BoB-AuthToken

required

JWT authentication token

string

Path

ticketId

required

Ticket id

string

Responses

HTTP Code

Description

Schema

200

Successful operation, ticket recovered

No Content

400

Ticket could not be recovered

No Content

401

Unauthorised

No Content

404

Ticket not found

No Content

Produces


  • No Format
    application/json


...

Get information if ticket specified with ticket identifier is
recoverable. If ticket is refundable also supply information
about recoverable amount and VAT.

Parameters

Type

Name

Description

Schema

Header

X-BoB-AuthToken

required

JWT authentication token

string

Path

ticketId

required

Ticket identifier

string

Responses

HTTP Code

Description

Schema

200

successful operation

recoverableStatus

401

Unauthorised

No Content

404

Ticket not found

No Content

Produces


  • No Format
    application/json


...

Get information if ticket specified with ticket identifier has
been refunded or not. If ticket was refunded also supply information
about refunded amount and VAT.

Parameters

Type

Name

Description

Schema

Header

X-BoB-AuthToken

required

JWT authentication token

string

Path

ticketId

required

Ticket id

string

Responses

HTTP Code

Description

Schema

200

Successful operation

refundStatus

401

Unauthorised

No Content

404

Ticket not found

No Content

Produces


  • No Format
    application/json


...

Refund ticket specified with ticket identifier.

Parameters

Type

Name

Description

Schema

Header

X-BoB-AuthToken

required

JWT authentication token

string

Path

ticketId

required

Ticket id

string

Responses

HTTP Code

Description

Schema

200

Successful operation, ticket was refunded

No Content

400

Ticket could not be refunded

No Content

401

Unauthorised

No Content

404

Ticket not found

No Content

Produces


  • No Format
    application/json


...

Get information if ticket specified with ticket identifier is
refundable. If ticket is refundable also supply information
about refundable amount and VAT.

Parameters

Type

Name

Description

Schema

Header

X-BoB-AuthToken

required

JWT authentication token

string

Path

ticketId

required

Ticket id

string

Responses

HTTP Code

Description

Schema

200

successful operation

refundableStatus

401

Unauthorised

No Content

404

Ticket not found

No Content

Produces


  • No Format
    application/json


...

Set the ticket specified with ticket identifier in revoked state.
When a ticket is in revoked state it can.

Parameters

Type

Name

Description

Schema

Header

X-BoB-AuthToken

required

JWT authentication token

string

Path

ticketId

required

Ticket identifier

string

Responses

HTTP Code

Description

Schema

200

Successful operation, ticket in revoved state.

No Content

401

Unauthorised

No Content

404

Ticket not found

No Content

Produces


  • No Format
    application/json


...

Create a new ticket bundle containing that is a subset of another ticket bundle.
The tickets are specified in the request payload as a list of ticket identfiers.

Parameters

Type

Name

Description

Schema

Header

X-BoB-AuthToken

required

JWT authentication token

string

Body

ticketBundleRequest

required

List of ticket identifiers of tickets to be included in ticket bundle

ticketBundleRequest

Responses

HTTP Code

Description

Schema

201

Successful operation

Headers :

No Format
location

(string) : URL of created ticket bundle.

ticketBundle

400

All the ticket didn't come from the same ticket bundle

No Content

401

Unauthorised

No Content

Produces


  • No Format
    application/json


...

Get ticket bundle specified by the ticket bundle identifier

Parameters

Type

Name

Description

Schema

Header

X-BoB-AuthToken

required

JWT authentication token

string

Path

ticketBundleId

required

Ticket bundle id

string

Responses

HTTP Code

Description

Schema

200

Successful operation

ticketBundle

401

Unauthorised

No Content

404

Ticket bundle not found

No Content

Produces


  • No Format
    application/json


...

Device Reference, unique reference for device that creates device signed tickets

Name

Description

Schema

did

required

Device identifier

string (base64url)

pid

required

Participant identifier

integer (int64)

fare
Anchor
fare
fare

Fare information, amount, currency and VAT

Name

Description

Schema

amount

required

Fare cost excluding VAT

number (float)

currency

required

Currency code (ISO 4217)

string

vatAmount

required

VAT amount

number (float)

vatPercent

required

VAT percent

number (float)

geoPosition
Anchor
geoposition
geoposition

Geographical position (WGS84 decimal)

Name

Description

Schema

alt

optional

Altitude

number (double)

lat

required

Latitude

number (double)

long

required

Longitude

number (double)

manifestCall
Anchor
manifestcall
manifestcall

Manifest with parameter to be used for issuing tickets

Name

Description

Schema

bookingId

optional

Booking identifier from Booking API

string

issueMtb

optional

Set to true to return MTB when tickets are issued

boolean

manifestMtbTemplate

required

Signed manifest with MTB template

string (base64url)

recoverTicketId

optional

ID of ticket in recover state to be recovered in operation

string

requestId

optional

Request identifier allocated by manifest requestor

string

startOfValidity

optional

Request start of validity set in the future (must be within the validity time of the manifest). Time stamp in ISO 8601 format.

string (date-time)

ticketHolder

optional

Traveller to register as ticket holder

ticketHolder

mtbReference
Anchor
mtbreference
mtbreference

MTB reference

Name

Description

Schema

issuerSignature

required

MTB issuer signature

string (base64url)

pid

required

Participant identifier

integer (int64)

recoverStatus
Anchor
recoverstatus
recoverstatus

Recover status

Name

Description

Schema

recovered

required

True if ticket is in recovered state

boolean

recoveredAmount

optional

Fare recovered

fare

recoverableStatus
Anchor
recoverablestatus
recoverablestatus

Tells if ticket is recoverable and amount recoverable

Name

Description

Schema

recoverable

required

Is ticket recoverable

boolean

recoverableAmount

optional

Recovereable fare

fare

refundStatus
Anchor
refundstatus
refundstatus

Refund status

Name

Description

Schema

refunded

required

True if ticket is in refunded state

boolean

refundedAmount

optional

Fare refunded

fare

refundableStatus
Anchor
refundablestatus
refundablestatus

Tells if ticket is refundable and amount refundable

Name

Description

Schema

refundable

required

Is ticket refundable

boolean

refundableAmount

optional

Refundable fare

fare

ticket
Anchor
ticket
ticket

Ticket data and status

Name

Description

Schema

activeStatus

optional

Ticket active status

ticketActiveStatus

issuedAt

required

Time stamp in ISO 8601 format

string (date-time)

mtb

optional

Signed MTB container

string (base64url)

recoverStatus

optional

Ticket recover status

recoverStatus

refundStatus

optional

Ticket refund status

refundStatus

refundableStatus

optional

Ticket refundable status

refundableStatus

ticketHolder

optional

Ticket holder

ticketHolder

ticketId

required

Unique identifier for ticket

string

ticketPayload

required

Ticket payload as base64url encoded JSON

string (base64url)

ticketActiveStatus
Anchor
ticketactivestatus
ticketactivestatus

...

A group of tickets. All tickets must come from the same manifest
used to issue the tickets.

Name

Description

Schema

manifestId

optional

Unique manifest identifier for issued tickets

string

mtb

required

Signed MTB container

string (base64url)

settlementId

optional

Unique settlement identifier for tickets in bundle

string

ticketBundleId

required

Unique ticket bundle identifier

string

ticketIds

optional

Array of identifiers to tickets in bundle

< string > array

ticketBundleRequest
Anchor
ticketbundlerequest
ticketbundlerequest

List of ticket identifiers of tickets to be included in ticket bundle

Name

Description

Schema

ticketIds

required

List ticket identifiers

< string > array

ticketEvent
Anchor
ticketevent
ticketevent

Ticket event data from inspection or validator device

Name

Description

Schema

deviceReference

optional

Device Reference, unique reference for device that creates device signed tickets

deviceReference

eventId

optional

Event identifier (allocated at event creation)

string

eventReason

optional

Reason for failure/success

string

eventResult

optional

0 = success
1 = other failure
2 = failed spatial constraints
3 = failed time constraints
4 = failed device header conditions
5 = failed issuer signature validation
6 = failed device signature validation
7 = failed blacklist check
8 = failed passback check
9 = failed fraud check

integer

eventType

optional

Type of event, inspection or validation

enum (inspection, validation)

geo

optional

Geographical position (WGS84 decimal)

geoPosition

localEventId

optional

Event identifier (allocated at validation/inspection)

string

modeOfTransport

optional

Mode of transport. Ex. bus, train or tram.

string

mtbReference

optional

MTB reference

mtbReference

operatingDayDate

optional

Date of the operating day

string (date)

service

optional

Service information

service

stopArea

optional

Stop area information

stopArea

ticketId

required

Unique identifier for ticket

string

time

required

Time stamp in ISO 8601 format

string (date-time)

validator

optional

 


validator

zone

optional

Zone information

zone

Anchor
ticketevent_service
ticketevent_service

service

Name

Description

Schema

blockId

optional

Block identifier

string

pid

required

Participant identifier associated with service, trip and block

integer (int64)

serviceId

required

Service identifier

string

tripId

optional

Trip identifier

string

Anchor
ticketevent_stoparea
ticketevent_stoparea

stopArea

Name

Description

Schema

nextStopAreaId

optional

Identifier for next stop area

string

pid

required

Participant identifier associated with stop area

integer (int64)

stopAreaId

required

Identifier for current stop area

string

Anchor
ticketevent_validator
ticketevent_validator

validator

Name

Description

Schema

location

optional

Where is validator mounted (vehicle, platform, camel)

string

sublocation

optional

More specific location information (e.g., door)

string

validatorId

optional

What validator originated the event

string

Anchor
ticketevent_zone
ticketevent_zone

zone

Name

Description

Schema

pid

required

Participant identifier associated with zone

integer (int64)

zoneId

required

Zone identifier

string

ticketEventResult
Anchor
ticketeventresult
ticketeventresult

The result of a ticket inspection or validation operation registration

Name

Description

Schema

ticketEvent

optional

 


ticketEvent

ticketEventInspectMessage

optional

Message to be presented to inspector when registering an inspection event

string

ticketEventPassengerMessage

optional

Message to be presented to passenger when registering an inspection
or validation event.

string

ticketEventStatus

optional

Status code for inspection or validation event. This is normally the same
as the exp

integer (int32)

ticketMetadata

optional

 


ticketMetadata

ticketHolder
Anchor
ticketholder
ticketholder

Ticket holders name and identifier

Name

Description

Schema

travellerId

required

Unique traveller identifier

string

travellerName

optional

Display name of traveller

string

ticketIssueResponse
Anchor
ticketissueresponse
ticketissueresponse

Name

Description

Schema

settlementId

required

Unique settlement identifier for issued tickets

string

ticketBundle

optional

 


ticketBundle

ticketIds

required

Array of identifiers to issued tickets

< string > array

ticketMetadata
Anchor
ticketmetadata
ticketmetadata

Metadata associated with a ticket

Name

Description

Schema

relativeValidityStart

optional

Start of ticket validity period in ISO 8601 format

string (date-time)

ticketEventIds

optional

List of all event identifiers associated with this ticket

< string > array

travellerPhotoURL

optional

URL to photo of traveller

string