Tarot Routing API

Vehicle route optimisation, maps and driving times, core operational resources, and real-time driver tracking.

https://api.optimiser.app/v3

Make your first request

Use an API key from a trusted server to call the API. For example, list your organisation’s scenarios:

curl "https://api.optimiser.app/v3/core/scenarios" \
  -H "X-Tarot-API-Key: $TAROT_API_KEY"

Getting an API key

Generate and manage API keys at route.optimiser.app or by navigating to Admin Panel → User Management → API Keys.

Give your key a descriptive name and appropriate role, then copy the generated secret when shown once. Store it securely in a server-side secret manager or environment variable. Keys can be rotated with a temporary overlap period and revoked immediately if exposed or no longer needed.

To log a user into an embedded Tarot iframe from your product, see the embedded iframe SSO guide.

If you do not have permission to access that page, contact your Organisation's administrator or . If you do not yet have a Tarot account, visit tarotanalytics.com to start a free trial or book a demo.

Choosing the right credential

Every request to Tarot requires exactly one credential in the HTTP headers. Choose the authentication method that matches where your code runs:

  • Calling from a server (backend): Permanent API key in the X-Tarot-API-Key header. Best for backend microservices, background workers, and server-side scripts.
  • Calling from a frontend or app client: Short-lived Access token. Best for web browsers, single-page apps (SPAs), and mobile apps where secrets cannot be safely stored.
  • Calling driver or runsheet endpoints: Runsheet token. Required for driver-specific operations, such as live driver GPS point ingestion.
Server-to-server · Permanent

API key

Use a permanent API key for all server-to-server requests originating from a trusted backend environment.

HTTP Request Header
X-Tarot-API-Key: trout_k7p2m9x4q8va_xxxxxxxxxxxxxxxxxxxxxxxxx

Never embed API keys in browser code, frontend applications, distributed mobile apps, source control, or client-accessible logs.

Available API families

FamilyBase pathAllowed methodsAuthentication
API-key exchange /v3/auth/api_key/exchange POST API key only
Core resources /v3/core/* GET, POST, PUT, DELETE API key or Access token
Maps & driving times /v3/osrm/* GET API key or Access token
Route Optimisation /v3/opt/* GET, POST API key or Access token
Live driver locations /v3/driver_tracking/* GET, POST Runsheet token (for driver points) or API key / Access token (for scenario query)

Core resources

The Tarot Core API exposes full scenario management, orders, jobs, vehicle routing, dispatch, and run operations under the /v3/core/ prefix (forwarded upstream to /api/* on the backend core service).

With hundreds of operations available across orders, scenarios, jobs, runs, and vehicles, consult the interactive Swagger API reference for complete endpoint listings, schema definitions, and parameter documentation.

For a complete integration walkthrough, see Create and edit drivers, Create scenarios and jobs, Retrieve Planned Runs, and Retrieve delivery proofs.

Example: List scenarios

curl "https://api.optimiser.app/v3/core/scenarios" \
  -H "X-Tarot-API-Key: $TAROT_API_KEY"

See the Core API reference for request schemas, query filters, and domain models across all core resources.

Maps, polylines & driving times

Every standard OSRM service is supported: route, nearest, table, match, trip, and tile.

Example: Driving route & travel time

curl "https://api.optimiser.app/v3/osrm/route/v1/driving/13.388860,52.517037;13.397634,52.529407?overview=false" \
  -H "X-Tarot-API-Key: $TAROT_API_KEY"

Supported profiles include driving with standard OSRM query parameters (such as overview, steps, and annotations). Coordinates are formatted as {longitude},{latitude}.

Route Optimisation

Requests to https://api.optimiser.app/v3/opt are forwarded upstream to /v2/* on the GRLS solver. Requests have a generous 10-minute timeout budget and support payloads up to 20MB.

curl -X POST "https://api.optimiser.app/v3/opt/vrp" \
  -H "X-Tarot-API-Key: $TAROT_API_KEY" \
  -H "Content-Type: application/json" \
  --data @request.json

Use the GRLS optimisation documentation for synchronous and asynchronous workflow details, request schemas and response semantics.

Live driver locations

Provides real-time GPS point ingestion and scenario-level tracking queries for active fleet operations.

Authentication requirements by operation:
  • Scenario GPS tracking (/scenario/{scenario_id}/gps_points): Authenticate using your server API key (X-Tarot-API-Key) or an Access token (Authorization: Bearer <access_token>, default 15-minute lifetime; introspect exp).
  • Driver point ingestion & queries (/gps_points): Strictly require a driver Runsheet token (Authorization: Bearer <runsheet_token>, default 90-day lifetime; introspect exp) embedding the specific run, scenario, and socket credentials. Always use Authorization: Bearer <token>.
GET /v3/driver_tracking/scenario/{scenario_id}/gps_points?latest_only=true

Get latest point per run for a scenario (or pass latest_only=false for all points). Accepts API key or Access token.

GET /v3/driver_tracking/gps_points?min_range=…&max_range=…

Get recorded GPS points for the authenticated runsheet context within a time window. Requires Runsheet token.

POST /v3/driver_tracking/gps_points

Create a new GPS point for the authenticated runsheet context. Requires Runsheet token.

Time range filtering: min_range and max_range

When querying driver GPS points (GET /v3/driver_tracking/gps_points), use min_range and max_range to filter points by their recorded timestamp:

ParameterType & FormatDefault ValueDescription
min_range ISO 8601 UTC string
2026-07-17T00:00:00Z
8 hours ago (now - 8h) Start of the filtering window. Only GPS points recorded at or after this time are returned.
max_range ISO 8601 UTC string
2026-07-17T08:00:00Z
Current time (now) End of the filtering window. Only GPS points recorded at or before this time are returned. Must be greater than or equal to min_range.

Timestamps are parsed in ISO 8601 UTC format (e.g. 2026-07-17T00:00:00Z) and converted to Unix epoch timestamps internally for filtering.

Scenario tracking query

curl "https://api.optimiser.app/v3/driver_tracking/scenario/456/gps_points?latest_only=true" \
  -H "X-Tarot-API-Key: $TAROT_API_KEY"

Runsheet GPS point

curl -X POST "https://api.optimiser.app/v3/driver_tracking/gps_points" \
  -H "Authorization: Bearer $RUNSHEET_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{
    "run_id": 123,
    "scenario_id": 456,
    "organisation_id": 789,
    "lat": -33.867798,
    "lon": 151.166258,
    "record_time": "2026-07-17T09:30:00Z"
  }'

Errors, limits & timeouts

StatusMeaning
401Missing, malformed or conflicting credentials; or authentication was not accepted for the requested operation.
404No API route is available for the path.
405The route exists but does not allow that method.
429Gateway request or connection limit reached. Back off before retrying.
502, 503, 504Temporary service availability or timeout failure.

Inspect the response body for operation-specific error details, then retry only when the operation is safe to retry.

Reference documentation