Developer Q&A

Learn how to try the Tollsmart APIs, choose a plan, calculate tolls and reconstruct recorded trips.

Request trial access Log in or register with a token

Getting started

How do I get started with the Tollsmart API?

Request an API Developer Account and register using the invitation token. Only one account per developer is permitted. Within that account, choose the OSM or Google plan and use the API key and documentation for that plan to make your first request.

Can I try the API before paying?

Each API has its own 30-day trial: you can try both Google and OSM within your developer account. Only one account per developer is permitted. Check the included trial usage and expiry for each API in the Developer Console.

Does my truck toll calculator subscription include API access?

The web toll calculator and API service are separate subscriptions. Choose an API plan in the Developer Console and review its current price and included usage.

My registration token is invalid or expired. What should I do?

The invitation token creates your developer account; it is different from the API key used in requests. If the invitation has expired, request a replacement. If registration failed after you entered a valid token, contact support with the error message.

Where do I find the API documentation?

Sign in to the Developer Console and download the PDF documentation under your selected plan. OSM and Google have separate documentation, so use the document that matches your plan. If documentation is missing, contact support and identify your plan.

Registration says my company already exists, but I cannot sign in. What should I do?

Contact support with the error message and the email address used for registration. Avoid creating more accounts or repeatedly changing passwords to work around the error. Support can check whether registration completed and whether the account needs activation or correction.

My older integration stopped working. Where should I get the current endpoints?

Download the latest PDF for your plan from the Developer Console and compare its endpoint URLs and request format with your integration. Update any legacy URLs. If you need help, provide a sanitized request and the response you received.

Plans and usage

Do I need a different API key when my trial ends?

You can continue using the key issued for your selected plan when the trial ends. You can also rotate the key; update your integration to use the replacement key if you do. To continue beyond the trial, activate the paid plan in the Developer Console and confirm its price, usage allowance and billing settings.

What happens when I use all of my monthly allowance?

There are three usage-limit settings: (1) Stop API access until the next billing period starts. This is the default. (2) Automatically increase to a higher tier when the allowance is exhausted. (3) Continue using the API and pay for additional usage at the plan's extra-query rate. Choose the setting in the Developer Console and review the applicable tier prices and extra-query rate.

Does one HTTPS request always count as one API call?

Yes. Within the tiered structure, one HTTPS request counts as one API call. In Google pay-as-you-go mode, a typical request with an origin address and a destination address involves two geocodes plus one toll calculation, counted as three usage units. Requests with additional stops can involve further usage. OSM continues to count as one usage unit per call, including pay-as-you-go mode.

Troubleshooting

Why does my API key fail when my account is active?

Google and OSM plans have separate API keys. Use the key issued for the backend you are calling, and check that the plan is active in the developer console. If a matching key still fails, send support the endpoint, timestamp, request ID and a sample request with the key removed.

Does OSM_EMPTY_RESPONSE mean there are no tolls?

No. OSM_EMPTY_RESPONSE is an error, normally returned with HTTP 502. A successful toll-free route still returns a nonempty result array with zero toll totals. Check error.code, error.retryable and error.request_id, use bounded retries where indicated, and report persistent failures with the request ID.

What should I include when reporting an API error or unexpected toll?

Include the endpoint, approximate request time and timezone, HTTP status, error code, request ID, and a reproducible payload with API keys and personal information removed. For an unexpected toll, include the vehicle characteristics, relevant transponder selection and route or trace so support can reproduce the calculation.

Routes and vehicles

Which API should I use for a planned trip versus GPS points from a completed trip?

For planning a trip, either the Google or OSM plan will do: submit an origin, destination and optional waypoints to that plan's routing endpoint. To reconstruct a recorded trip from GPS points, use OSM map matching at /TollsAPI/osm/map_matching.

Can I calculate tolls for a route I already generated?

The Google API accepts a supplied_route array for an existing detailed Google route. Route geometry needs enough detail to identify the roads and toll crossings accurately. Matching a third-party route does not guarantee compatibility.

How long does an API request take?

OSM point-to-point trip planning typically takes milliseconds. The Google-based API generally takes longer because it analyzes the full route geometry before calculating tolls. OSM map matching can take longer depending on the length of the recorded trip. These are typical processing characteristics; actual response times vary by request.

Do the APIs return mileage and estimated travel time?

Both APIs document numeric distance_meters and duration_seconds fields for a route or route segment.

How do I request transponder discounts?

Supply the supported transponder accounts you want the API to consider. Eligible common transponder discounts are reflected in personalized_value. Special discounts such as local-resident programs are not generally computed. Account formats and coverage differ by backend, so use that backend's documentation.

Can I calculate tolls for trucks and other vehicle types?

Yes. Vehicle specifications can be supplied for vehicles up to nine axles. Complete the relevant vehicle and trailer characteristics rather than relying on the default two-axle passenger vehicle. Keep type flags consistent, since conflicting types or missing classification details can change the price. OSM also offers truck-aware routing.

GPS and recorded trips

What are the limits and best practices for GPS map matching?

Submit a continuous trace with no more than 1,000 points, a total outlined distance no greater than 1,000 km and no consecutive-point gap greater than 50 km. The documented minimum route length is 600 m. Supply accurate latitude/longitude, epoch-millisecond time_stamp values, and speed and signal_accuracy when available. GPS quality and continuity matter as much as point count.

Why does a matched trip show a detour, U-turn or repeated toll?

Map matching estimates the road traveled from the supplied GPS trace. Points on the opposite carriageway, poor horizontal accuracy or large gaps can make the reconstructed path differ from the actual journey. Inspect the returned route against the trace, remove clearly inaccurate points, and test with a continuous, representative set of points before relying on the toll result.

How should I handle a long trip that times out?

Check the documented point-count, total-distance and point-gap limits first. For a trip that still times out, try splitting it into consecutive requests, preserving continuity and submitting them sequentially. There is no universal recommended split length. Ticketed toll roads need special handling because their price may depend on an entry in one request and an exit in another.

Why does a partial trip return an entry or exit toll with no price?

A ticketed road may require both entry and exit to calculate its price. on_ticketed_road indicates a partial journey on such a road, so a missing or zero entry/exit price is not confirmation that the road is free. If your integration needs to join split trips, contact support about enabling toll IDs and using /readprices with the paired entry and exit.

What does NOT_READY mean, and can I run parallel map-matching requests?

NOT_READY indicates that a timing or concurrency gate rejected the request, often because earlier work is still running. Keep one OSM map-matching request in progress per key unless parallel processing has been enabled for your plan. Check the retryable field and use bounded retries with increasing delays when appropriate.