We’ll not provide separate examples for Inspection API since the two endpoints are essentially the same as their counterparts in Validation API.
Validate 1 - online validation
The response is shown for a valid validation of a ticket.
Endpoint: POST /api/v2/validation/74f5a450-f57a-416f-9f1d-54f371dea08c?mtb=v2F2Q…
Expand |
---|
|
Bitbucket file macro |
---|
url | https://bitbucket.org/samtrafiken/tess-documentation/src/master/examples/validation/validate1/request.json |
---|
syntaxHighlighting | JSON |
---|
|
|
Expand |
---|
|
Bitbucket file macro |
---|
url | https://bitbucket.org/samtrafiken/tess-documentation/src/master/examples/validation/validate1/response.json |
---|
syntaxHighlighting | JSON |
---|
|
|
Validate 2 - offline batch validation
Endpoint: POST /api/v2/validation
Expand |
---|
|
Bitbucket file macro |
---|
url | https://bitbucket.org/samtrafiken/tess-documentation/src/master/examples/validation/validate2/request.json |
---|
syntaxHighlighting | JSON |
---|
|
|
Retrieve all tickle macros
Endpoint: GET /api/v2/ticklemacros
Expand |
---|
|
Bitbucket file macro |
---|
url | https://bitbucket.org/samtrafiken/tess-documentation/src/master/examples/ticklemacros/getall/response.json |
---|
syntaxHighlighting | JSON |
---|
|
|
Retrieve tickle macros by serial
Endpoint: GET /api/v2/ticklemacros/1
Expand |
---|
|
Bitbucket file macro |
---|
url | https://bitbucket.org/samtrafiken/tess-documentation/src/master/examples/ticklemacros/get/response.json |
---|
syntaxHighlighting | JSON |
---|
|
|
Retrieve blacklist
Endpoint: GET /api/v2/blacklist?blacklistEntryId=0
Expand |
---|
|
Bitbucket file macro |
---|
url | https://bitbucket.org/samtrafiken/tess-documentation/src/master/examples/blacklist/get/response.json |
---|
syntaxHighlighting | JSON |
---|
|
|
Fraudcheck
The fraudcheck call results in a velocity calculated as follows:
The caller provides a reference to a MTB, a time and geographical position
The callee looks up the time and geographical position of the last ticket event for the given MTB
The callee returns the calculated velocity given the time/geopos
The response must only be given once per validation event and client. Velocity less than 5 km/h or distances less than 1 km shall render 0 km/h.
The resulting velocity is used to determine possible fraud. If the velocity is higher than any available mode of transportation, the ticket has most likely been copied and presented at different locations.
Endpoint: GET /api/v2/fraudcheck
Expand |
---|
|
Bitbucket file macro |
---|
url | https://bitbucket.org/samtrafiken/tess-documentation/src/master/examples/validation/fraudcheck/request.json |
---|
syntaxHighlighting | JSON |
---|
|
|
Expand |
---|
|
Bitbucket file macro |
---|
url | https://bitbucket.org/samtrafiken/tess-documentation/src/master/examples/validation/fraudcheck/response.json |
---|
syntaxHighlighting | JSON |
---|
|
|