TrakkHQ API
Connect your own systems to TrakkHQ: read your jobs, proof of delivery and live tracking, and send booking requests that a person in your office accepts.
The TrakkHQ API is a REST API for a company's own TrakkHQ data. Use it to show job status in your own system, pull proof of delivery into a customer portal, or send bookings from your ordering system. Every answer is JSON.
Who can use it
API keys come with the Pro, Pro+ and Enterprise plans. See the pricing page for what each plan includes.
An admin makes a key in TrakkHQ under Settings, then Connections, then API keys. Each key is either read only or read and write, and is shown once when it is made, so copy it somewhere safe. An admin can revoke a key at any time.
How to connect
- Send every request to https://app.trakkhq.com/api/v1 over HTTPS.
- Put the key in the Authorization header as a bearer token: Authorization: Bearer followed by your key.
- Start with GET /me to check the key works. It returns your company, the key's name and what it can do.
Each key can make up to 120 requests a minute. Past that you get a 429 answer: wait a minute and try again.
Nothing is booked or changed without a person
Bookings and changes sent through the API are requests. They wait in TrakkHQ for a person in your office to accept them, and nothing goes straight onto the board. If a booking looks like a job you already have for that client and day, it is refused and the answer names the job.
Send an Idempotency-Key header with each booking (your order number works well). If your system sends the same booking twice, the second answer is the first one again, not a second request.
The OpenAPI file
The whole API is described in one OpenAPI 3.1 file. Most API tools and code generators can read it. The same file is also at GET /openapi.json with your key.
Usage terms
Your company's own TrakkHQ data, for your own systems. Every answer carries the usage terms in the X-Usage-Terms header. You may use this company's TrakkHQ data only to do this company's own work. Do not copy, reproduce, scrape or rebuild TrakkHQ, its screens, features or data, and do not keep TrakkHQ data for any other use.
Never available, whatever a key's scopes:
- Prices, rate cards and quotes
- Invoices (none are sent, changed or voided, and none are listed)
- Pay, payroll and timesheets
- Xero, MYOB and QuickBooks
- Deleting anything
- Users, sign-ins and keys
Endpoints
Every path below starts with https://app.trakkhq.com/api/v1.
Any endpoint can answer:
401: No key, or the key is wrong or revoked.403: Your company isn't on Pro or above, the API isn't switched on for it, or the AI power this needs is off in Settings → Connections → Connect to AI.429: More than 120 requests in a minute from this key. Wait a minute.
GET /
What this API is, its endpoints and its usage terms.
Start here. Lists every endpoint and gives the usage terms in full.
Works with a read only key.
Answers: 200: The index.
GET /me
Who this key is: company, key name, scopes.
A quick way to check a key works.
Works with a read only key.
Answers: 200: The key.
GET /openapi.json
This API as an OpenAPI 3.1 file.
Load it into Postman, Insomnia or a code generator.
Works with a read only key.
Answers: 200: The OpenAPI document.
GET /jobs
Your jobs, newest first, a page at a time.
Filter by date range, status, client and reference. Each page has up to `limit` jobs (default 25, at most 100). When there are more, `next_cursor` is set: send it back as `cursor` for the next page. `count` is how many jobs match in all.
Works with a read only key.
Parameters:
date_from(query): Jobs on or after this day.date_to(query): Jobs on or before this day.status(query): Only jobs with this status, e.g. booked, in_transit, delivered.client(query): Only this client (its code or name).reference(query): Your PO/PL number or a TrakkHQ job number, matched exactly.q(query): Any words: PO, address, customer.limit(query): Jobs per page, 1 to 100 (default 25).cursor(query): next_cursor from the page before.
Answers: 200: A page of jobs; 400: A filter is not in the right format.
GET /jobs/{job}
One job in full: times, driver, truck, stops.
The same job fields as the list, plus the start and finish times and every stop with what is picked up or dropped off there.
Works with a read only key.
Parameters:
job(path, required): The job: its TrakkHQ job number (e.g. ABC-1001), your PO/PL number, or its job key. URL-encode it.
Answers: 200: The job; 404: No job of yours matches; 409: More than one of your jobs has that reference. Use the TrakkHQ job number.
GET /jobs/{job}/pod
Proof of delivery: when, who, signed, photos.
When it was delivered, who received it, whether it was signed and how many photos were taken, for the job and each drop. `pdf` is the address of the POD PDF once the job is finished.
Works with a read only key.
Parameters:
job(path, required): The job: its TrakkHQ job number (e.g. ABC-1001), your PO/PL number, or its job key. URL-encode it.
Answers: 200: The proof of delivery; 404: No job of yours matches; 409: More than one of your jobs has that reference. Use the TrakkHQ job number.
GET /jobs/{job}/pod.pdf
The POD PDF of a finished job.
The same customer-safe POD document your customers get (no prices, no driver pay). Only once the job is finished.
Works with a read only key.
Parameters:
job(path, required): The job: its TrakkHQ job number (e.g. ABC-1001), your PO/PL number, or its job key. URL-encode it.
Answers: 200: The PDF; 404: No job of yours matches. Or: The job isn't finished yet; 409: More than one of your jobs has that reference. Use the TrakkHQ job number.
GET /jobs/{job}/tracking
Where the job is: status, ETA, position.
The job's status and, while the truck is on its way, the arrival time. The truck's position is included only while it is on this job and only when your live map is on for the job's client (the same rules as the tracking link).
Works with a read only key.
Parameters:
job(path, required): The job: its TrakkHQ job number (e.g. ABC-1001), your PO/PL number, or its job key. URL-encode it.
Answers: 200: The job's tracking; 404: No job of yours matches; 409: More than one of your jobs has that reference. Use the TrakkHQ job number.
GET /clients
Your clients.
Each client's code and name. No rates or prices.
Works with a read only key.
Answers: 200: Your clients.
GET /drivers
Your drivers.
Each driver's name, board (city) and usual truck. No pay, phone or address.
Works with a read only key.
Answers: 200: Your drivers.
GET /trucks
Your trucks.
Each truck's rego, make, model, type and whether it is in the fleet.
Works with a read only key.
Answers: 200: Your trucks.
POST /bookings
Ask for a booking (a person accepts it).
Sends a booking request. It is NEVER booked straight in: it waits in Booking requests (inside Approvals where your company has Approvals) for a person to accept. A request that looks like a job already on your board for that client and day is refused with 409 and names the job; send `another_truck: true` if it really is another truck. Send an `Idempotency-Key` header (any unique text, e.g. your order number) and a retry gets the first answer back instead of a second request.
Needs a read and write key.
Parameters:
Idempotency-Key(header): Any unique text for this booking. The same key again returns the first answer.
Send JSON: BookingIn (see the OpenAPI file for its fields).
Answers: 201: The request, waiting for a person; 400: Something is in the wrong format; 409: It looks like a job or request already there; 422: Something is missing or isn't one of yours (see needs_choice), or the Idempotency-Key was used with a different booking.
POST /jobs/{job}/notes
Add a note to a job's instructions.
Goes to Approvals for a person to click, unless your admin has set notes to "Just do it" in Connect to AI (and the job hasn't started).
Needs a read and write key.
Parameters:
job(path, required): The job: its TrakkHQ job number (e.g. ABC-1001), your PO/PL number, or its job key. URL-encode it.
Send JSON: NoteIn (see the OpenAPI file for its fields).
Answers: 202: Sent, or done; 404: No job of yours matches; 409: More than one of your jobs has that reference. Use the TrakkHQ job number; 400: No note.
POST /jobs/{job}/changes/times
Ask to change a job's date or times.
Goes to Approvals for a person to click, unless your admin has set this change to "Just do it" (and the job hasn't started).
Needs a read and write key.
Parameters:
job(path, required): The job: its TrakkHQ job number (e.g. ABC-1001), your PO/PL number, or its job key. URL-encode it.
Send JSON: TimesIn (see the OpenAPI file for its fields).
Answers: 202: Sent, or done; 404: No job of yours matches; 409: More than one of your jobs has that reference. Use the TrakkHQ job number; 400: Nothing to change, or a time in the wrong format.
POST /jobs/{job}/changes/assign
Ask to assign a driver or truck.
As above. The driver and truck must be your own (see /drivers and /trucks).
Needs a read and write key.
Parameters:
job(path, required): The job: its TrakkHQ job number (e.g. ABC-1001), your PO/PL number, or its job key. URL-encode it.
Send JSON: AssignIn (see the OpenAPI file for its fields).
Answers: 202: Sent, or done; 404: No job of yours matches; 409: More than one of your jobs has that reference. Use the TrakkHQ job number; 400: Not one of your drivers or trucks.
POST /jobs/{job}/changes/stops
Ask to change a pick-up or drop-off.
As above.
Needs a read and write key.
Parameters:
job(path, required): The job: its TrakkHQ job number (e.g. ABC-1001), your PO/PL number, or its job key. URL-encode it.
Send JSON: StopsIn (see the OpenAPI file for its fields).
Answers: 202: Sent, or done; 404: No job of yours matches; 409: More than one of your jobs has that reference. Use the TrakkHQ job number; 400: Nothing to change.
Questions about the API, or something you need that isn't here? Email [email protected].
Try it on your own jobs
Every new company gets 30 days of Pro+ free, with no card needed. Or book a demo and we'll show you a live day on our own fleet.