API Developer Guide for GPS Toll Verification

The PrePass GPS Toll Verification solution streamlines toll verification for PrePass clients engaged with tolling services and ensures accurate billing. We precisely cross-reference toll transactions issued from the agency, using gps trip data to pinpoint discrepancies in charges versus actual rates and confirm toll accuracy against the routes traveled. When discrepancies are confirmed, we dispute the incorrect toll with the proper Tolling Agency on behalf of our clients.

Our tools simplify toll verification and contribute to efficient transportation operations for fleet managers, logistics providers and individual drivers.

Intended Audience

Carriers who want to share GPS data for tolls verification through the PrePass GPS Tolls API. Developers may also leverage PrePass GPS Tolls FTP solution to upload GPS data for tolls verification.

Access

Access may be obtained from your account manager, or through PrePass customer service.

Logging in

1. Navigate to the PrePass Developer Portal and select “Customers” from the main panel. At the “Sign In” screen enter your credentials.

Select customers from the main panel

Trying An API

1. Navigate to the PrePass Developer Portal, and select “Sign In” from the main panel.

2. Sign in with your PrePass credentials.

3. Select “Products.”

4. Select "GPS Toll Verification" from the dropdown.

5. Click “Subscribe.”

6. Copy your primary and secondary API keys and keep them in a safe place. You will need them for each call to the PrePass API.

7. Under “APIs,” click a link to an API from the list of available APIs.

8. Select “Try it.”

9. Select the subscription key you wish to use for the request.

10. Edit the sample request body. Note the http request dialog below will reflect the values you have entered.

11. Scroll to the bottom of the page and hit “Send.”

12. Check the response. A successful call to the API will produce a 200 response code and the message “GPS Data processed successfully.”

An unsuccessful call will produce a 400 response code and inform you of the invalid values that were sent in the request. Example:

The http request dialog can also be used to autogenerate code to create requests to the API in the language of your choice:

Endpoints

TollsGPS API:

Endpoint: POST /v{version}/gpsevents

Data Dictionary For Requests To The Tolls GPS API

TollValidationRequest

Field Name
Type
Example
Required
Description

postedTime

Integer 64

Epoch i.e.: 1687979999

Optional

The epoch time (or Unix time) is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT)

Vehicles

Array

vehicles […]

Optional

Array of CustomerVehicle objects. Definition follows.

CustomerVehicle

Field Name
Type
Example
Required
Description

vin

String

1X**D*&67D*8****7 

(17 digit Valid VIN) 

Optional

LVehicle Identification Number

totalAxleCount

Integer

5

Optional

Number of vehicle axles

plateNumber 

String

JD*8*P

Optional 

Vehicle plate number

plateState 

CA

Optional 

State abbreviation

trackSegment

Array

trackSegment [ … ]

Optional

Array of GpsLocation objects. Definition follows.

GpsLocation

Field Name
Type
Example
Required
Description

deviceNumber

String

“06XXXXX73”

Required

Device number for vehicle

latitude 

Double

[-90, 90]

i.e.: 30.213333

Optional 

The latitude of the geographical coordinate.

longitude 

Double

-180, 180]

-112.23232

Optional 

he longitude of the geographical coordinate.

timestamp 

Integer

Epoch

i.e.: 1687979999

Optional 

The epoch time (or Unix time) is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT)

timezone 

Integer

i.e.:  -14400

Optional 

speed

Float

[0,60]

i.e.: 25.9

Optional 

The instantaneous speed of the device, measured in meters per second.

direction 

Float

[0,180] *depends on platform.

i.e.: 360

90

Optional 

The direction in which the device is traveling, measured in degrees and relative to due north.

locationAccuracy 

Float

*Meters or Percentage?

5.23

Optional 

The accuracy of a geographical coordinate, measured in meters. *We recommend using signals with no more than a 20m radius for the best results.

Example HTTP Request Payload

POST https://api-tst.prepass.com/api/tolls/gps/v1/gpsevents  HTTP/1.1 

Content-Type: application/json; ver=1.0

Cache-Control: no-cache

Ocp-Apim-Subscription-Key: [subscription key]

{

    "postedTime": 1710785259,

    "vehicles": [{

        "deviceNumber": "111132097",

        "vin": "JTXXX12RXXXXXX794",

        "totalAxleCount": 5,

        "plateNumber": "SPR909",

        "plateState": "AZ",

        "trackSegment": [{

            "latitude": 33.512852,

            "longitude": -112.144882,

            "timestamp": 1710785250,

            "timezone": 1,

            "speed": 80,

            "direction": 0,

            "locationAccuracy": 100

        }]

    }]

}

Example Response - Success

HTTP/1.1 200 OK

api-supported-versions: 1.0

content-encoding: gzip

content-type: text/plain; charset=utf-8; ver=1

date: Mon, 18 Mar 2024 18:33:29 GMT

request-context: appId=cid-v1:65b4381d-c0fc-41e9-bd3a-96787bf7bfdd

vary: Accept-Encoding

x-powered-by: ASP.NET

GPS Data processed successfully

Example Response - Error

HTTP/1.1 200 OK

api-supported-versions: 1.0

content-encoding: gzip

content-type: text/plain; charset=utf-8; ver=1

date: Mon, 18 Mar 2024 18:33:29 GMT

request-context: appId=cid-v1:65b4381d-c0fc-41e9-bd3a-96787bf7bfdd

vary: Accept-Encoding

x-powered-by: ASP.NET

GPS Data processed successfully

OpenAPI Specification

The OpenAPI specification for the PrePass Tolls API can be downloaded from the PrePass Developer Portal via the API definition dropdown when viewing a specific API.