Skip to content
Track That Ride
Menu

API documentation

API quickstart

To start with the Track That Ride API, create an API key in the dashboard, send it as a Bearer token to https://trackthatride.com/api/v1/rides, then create a delivery with a POST to the same path. The response includes a tracking token, and the customer’s live tracking page is trackthatride.com/track/ followed by that token.

Looking for every endpoint and schema in one place? See the Full OpenAPI reference.

1. Create an API key

Sign in to the dashboard, open API keys and create a key. Give it rides:read and rides:write for this quickstart. The full key is shown once; copy it into an environment variable. Production keys start with tk_live_.

export TTR_API_KEY="tk_live_..."

2. Make an authenticated request

curl https://trackthatride.com/api/v1/rides?limit=5 \
  -H "Authorization: Bearer $TTR_API_KEY"

A 200 returns { "rides": [...], "pagination": { "page", "limit", "total", "pages", "hasNext", "hasPrev" }, "filters": {...} }. A 401 means the key is missing, wrong, revoked or expired; a 403 means it lacks the permission.

3. Create a delivery

Six fields are required: customer_name, address (the drop), pickup_address, pickup_contact_name, pickup_phone and estimated_pickup_time (an ISO date-time in the future). Phone numbers are read in your company’s country, so UK numbers can be written as you would dial them.

curl -X POST https://trackthatride.com/api/v1/rides \
  -H "Authorization: Bearer $TTR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_name": "Jane Example",
    "phone_number": "07700 900123",
    "email": "jane@example.com",
    "address": "10 Downing Street, London SW1A 2AA",
    "pickup_address": "1 Example Road, London E1 6AN",
    "pickup_contact_name": "Front desk",
    "pickup_phone": "07700 900456",
    "estimated_pickup_time": "2030-01-15T14:00:00Z",
    "order_id": "ORDER-1001"
  }'

A 201 returns the created delivery. It starts as pending; pass driver_id to assign a driver at the same time. If you included the customer’s email, they are emailed the tracking link.

4. Get the tracking link

The response includes public_tracking_token. The customer’s live tracking page is:

https://trackthatride.com/track/<public_tracking_token>

Put that link in your own order emails or messages. You can also fetch a ready-to-paste message, worded from your company’s template:

curl https://trackthatride.com/api/v1/rides/123/share-message \
  -H "Authorization: Bearer $TTR_API_KEY"

5. Hear about changes

Register a webhook so your system is told when the delivery starts, is delivered or fails, instead of polling. See webhooks for events and signature checks.

curl -X POST https://trackthatride.com/api/v1/webhooks \
  -H "Authorization: Bearer $TTR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/hooks/ttr", "events": ["delivery.started", "delivery.completed", "delivery.failed"]}'

The response contains the webhook’s signing secret, shown once. Store it to verify signatures.

Next steps