https://hannk.cloud · every request carries the header Authorization: Bearer YOUR_API_KEY (your key comes from your Hannk contact - send it to nobody, including us).
Call GET /api/v1/features first: it says what your account is switched on for. Dates and times are local to the branch, to the minute: 2026-11-20T10:30.Hannk Partner API reference - 2.1.0
Base URL https://hannk.cloud · every request: Authorization: Bearer hk_live_... · JSON in, JSON out.
Dates and times are local to the branch, to the minute: 2026-11-20T10:30.
Every endpoint below has the same name as a method in the Node, Python and PHP clients.
Account
| Endpoint | Client method | What it does | |
|---|---|---|---|
GET |
/api/v1/features |
features |
What your account has switched on (features and their state: included, optional or off). |
GET /api/v1/features
What your account has switched on (features and their state: included, optional or off).
Returns, for example: {"features":[{"code":"partner_api","name":"Partner API and SDK","state":"included", ...}]}
Branches
| Endpoint | Client method | What it does | |
|---|---|---|---|
GET |
/api/v1/branches |
listBranches |
Every branch you have, with its code. |
GET |
/api/v1/branches/{code} |
getBranch |
One branch, by your own code. |
PUT |
/api/v1/branches/{code} |
upsertBranch |
Create or update a branch by your own code. On an update send only what changed - what you leave out keeps its value. |
POST |
/api/v1/branches/import |
importBranches |
Your whole branch network in one call, JSON or XML, up to 500 a call. Matched on code: existing ones update, new ones are created. |
DELETE |
/api/v1/branches/{code} |
deleteBranch |
Remove a branch. Refused while it has current or future reservations. |
GET /api/v1/branches
Every branch you have, with its code.
Returns, for example: [{"code":"LHR","name":"Heathrow Airport","address":"...","lat":51.47,"lng":-0.45, "opening_hours":{"mon":"07:00-22:00",...}, ...}]
GET /api/v1/branches/{code}
One branch, by your own code.
PUT /api/v1/branches/{code}
Create or update a branch by your own code. On an update send only what changed - what you leave out keeps its value.
No coordinates? Send the address (and postcode) and Hannk finds them. video settings are read-only here.
{
"name": "Right Cars - Heathrow Airport",
"address": "Northern Perimeter Road, Hounslow",
"postcode": "TW6 2SQ",
"country": "GB",
"phones": [
"+44 20 7946 0000"
],
"btype": "airport",
"airport_iata": "LHR",
"timezone": "Europe/London",
"currency": "GBP",
"opening_hours": {
"mon": "07:00-22:00",
"tue": "07:00-22:00",
"wed": "07:00-22:00",
"thu": "07:00-22:00",
"fri": "07:00-22:00",
"sat": "08:00-13:00, 15:00-20:00",
"sun": "closed"
},
"pickup_instructions": "Take the shuttle from Terminal 2, stop 14.",
"return_instructions": "Follow signs for Car Rental Return, level 0.",
"geofence_miles": 1,
"local_radius_miles": 25,
"local_deposit": 150,
"addl_driver_cost": 8,
"zone_breach_cost": 50,
"driver_age": {
"groups": [
{
"min_age": 21,
"max_age": 24,
"cost": 15
},
{
"min_age": 75,
"max_age": 99,
"cost": 10
}
]
}
}
Returns, for example: {"ok":true,"action":"created","geocoded":true,"branch":{...}}
The newer branch fields (2.2.0):
btype-airport_in,airport_meet_greet,airport_shuttle,city,depot,hotelorother. Plain"airport"is accepted and stored asairport_in. The three airport kinds tell the customer how they reach you: desk in the terminal, met at arrivals, or a shuttle bus.admin_fee- this branch's standard admin fee. Omitted keeps the branch value;nullclears it back to the company default.terms- the branch's rental terms & conditions as plain text or simple HTML, up to 200 KB. Shown in the app and signed at pick-up; a PDF uploaded in the console wins when both exist.""ornullclears them. Comes back in full onGET /api/v1/branches/{code}; the list GET carries onlyterms_updated_at. Also accepted:branch_terms(the same string), orrental_termsas a list of numbered clauses{"no":1,"title":"...","text":"..."}.cross_border- country by name or ISO code,daily_pricea number ornullfor free entry. The list you send is authoritative: countries you stop listing are removed from the branch; omit the field entirely to leave them untouched;[]removes them all. JSON only - not carried by the XML import. Each country becomes a real geofenced area drawn from its actual boundary.local_area- who counts as a local customer:{"mode":"radius","miles":30}(a circle),{"mode":"country"}(the branch's own country),{"mode":"state","name":"Souss-Massa"}or{"mode":"city","name":"Agadir"}(OpenStreetMap's outline of the place), ornullto clear the drawn area.opening_hoursuse the 24-hour clock,00:00-23:59. The day ends at 23:59: for open to midnight send"08:00-23:59", never24:00. An omittedstatusisactive; an omittedlanguageisen.
Anything the API does not recognise is named in the reply's ignored list - read the response body, not just the status code.
POST /api/v1/branches/import
Your whole branch network in one call, JSON or XML, up to 500 a call. Matched on code: existing ones update, new ones are created.
For XML send Content-Type: application/xml with <branches><branch><code>..</code>..</branch></branches> - see samples/branches.xml.
{
"branches": [
{
"code": "LHR",
"name": "Heathrow Airport",
"address": "Northern Perimeter Road, Hounslow",
"postcode": "TW6 2SQ"
},
{
"code": "MAN",
"name": "Manchester Airport",
"address": "Outwood Lane, Manchester",
"postcode": "M90 1QX"
}
]
}
Returns, for example: {"ok":true,"format":"json","received":2,"created":1,"updated":1,"failed":0,"results":[...]}
DELETE /api/v1/branches/{code}
Remove a branch. Refused while it has current or future reservations.
Fleet
| Endpoint | Client method | What it does | |
|---|---|---|---|
GET |
/api/v1/vehicles |
listVehicles |
Every vehicle in your fleet (id, registration, class, whether it has a telematics unit, and the pricing on the car). |
POST |
/api/v1/vehicles |
saveVehicle |
Add a vehicle, or update the one with the same registration. |
GET |
/api/v1/vehicles/{ref} |
getVehicle |
One vehicle, by registration (spaces and case ignored) or Hannk id - with its smoking charges and zero-excess offer as they would actually be charged. |
PUT |
/api/v1/vehicles/{ref} |
updateVehicle |
Change a vehicle. Send only what changed. |
DELETE |
/api/v1/vehicles/{ref} |
removeVehicle |
Take a vehicle out of the fleet: mode=retire (records kept) or mode=erase (needs confirm_plate). Refused while on rental or with a box fitted. |
GET |
/api/v1/telematics/devices |
listDevices |
Telematics boxes available to connect to a vehicle (use the device_id in POST /api/v1/vehicles). |
GET /api/v1/vehicles
Every vehicle in your fleet: id, registration, class, whether it has a telematics unit, and the pricing on the car - addl_driver_cost, local_deposit and the zero_excess product as set on the vehicle.
Returns, for example: [{"id":40,"plate":"AF69 LFG","brand":"Toyota","model":"Corolla","acriss":"CDAR","telematics":1,"no_box":0,"addl_driver_cost":8,"local_deposit":150,"zero_excess":{"mode":"daily","daily":14.99,"max":150,"fixed":null,"deposit":200}}]
Vehicles are not assigned to branches (2.3.0). Any car may serve any pickup branch; the reservation's pickup branch decides terms, charges and zones. A branch sent with a vehicle is accepted and ignored.
POST /api/v1/vehicles
Add a vehicle, or update the one with the same registration.
A NEW vehicle goes on one of your boxes: name it with box_number, or a free one is used; with none free the answer is 409 NO_SPARE_BOX. A car with NO box: send "no_box": true (with plate, brand and model) - it is added with no box and no telematics, when Hannk has switched cars without a box on for you (GET /api/v1/features -> cars_without_box.allowed); otherwise 403 NOBOX_NOT_ALLOWED. no_box together with box_number, device_id or telematics_id is 400 NOBOX_WITH_BOX. Updating an existing vehicle never needs a box. Add device_id (from GET /api/v1/telematics/devices) to connect a telematics unit in the same call.
{
"plate": "AF69 LFG",
"brand": "Toyota",
"model": "Corolla",
"year": 2019,
"acriss": "CDAR",
"fuel": "Hybrid",
"trans": "Auto",
"seats": 5,
"day_rate": 42,
"addl_driver_cost": 8,
"local_deposit": 150,
"zx_mode": "daily",
"zx_daily": 14.99,
"zx_max": 150
}
Pricing on the car (all optional, on create and update): addl_driver_cost - what an additional driver costs per day on this car; local_deposit - the deposit a customer local to the pickup branch leaves; and the zero-excess product: zx_mode (daily or fixed), zx_daily, zx_max (the ceiling on the daily total), zx_fixed (one price for the rental), zx_deposit (what is held instead of the full deposit once zero excess is bought). Zero excess buys the damage excess down to nothing - it is not the deposit waiver (deposit_insurance_daily on the reservation). A pricing field left null falls back: additional driver and local deposit to the reservation's pickup branch, zero excess to your company default. GET /api/v1/vehicles/{ref} adds zero_excess_offer - what would actually be sold once the fallbacks apply, with a worked 7-day example.
Returns, for example: {"ok":true,"vehicle_id":40,"action":"created","telematics":{"status":"none"}}
GET /api/v1/vehicles/{ref}
One vehicle, by registration (spaces and case ignored) or Hannk id - with its smoking charges and zero-excess offer as they would actually be charged.
PUT /api/v1/vehicles/{ref}
Change a vehicle. Send only what changed.
Writable: plate, brand, model, year, acriss, day_rate, seats, trans, fuel, type, colour, active, device_token, smoke_charge, smoke_charge_again, smoke_charge_repeat, smoke_gap_mins, smoke_cap, zx_mode, zx_daily, zx_max, zx_fixed, zx_deposit, addl_driver_cost, local_deposit. telematics_id is read-only. A branch sent here is accepted and ignored - vehicles are not assigned to branches.
{
"day_rate": 45,
"acriss": "CDAR",
"addl_driver_cost": 8,
"active": true
}
DELETE /api/v1/vehicles/{ref}
Take a vehicle out of the fleet: mode=retire (records kept) or mode=erase (needs confirm_plate). Refused while on rental or with a box fitted.
| Query | Required | |
|---|---|---|
mode |
yes | retire or erase |
confirm_plate |
the registration, required to erase |
GET /api/v1/telematics/devices
Telematics boxes available to connect to a vehicle (use the device_id in POST /api/v1/vehicles).
Reservations
| Endpoint | Client method | What it does | |
|---|---|---|---|
GET |
/api/v1/availability |
availability |
Is there a car? What POST /api/v1/reservations would allocate right now. Nothing is held. |
POST |
/api/v1/reservations |
createReservation |
Push a booking. Name the car (plate), a class (acriss), or neither and Hannk allocates a free one - the registration comes back either way. |
PUT |
/api/v1/reservations/{ref} |
updateReservation |
Create-or-update by your reference. Send only what changed. Dates and the car can change until the car is collected. |
POST |
/api/v1/reservations/import |
importReservations |
Many reservations in one call (JSON or XML, up to 500). Matched on external_ref; each row runs exactly the rules of PUT. |
GET |
/api/v1/reservations |
listReservations |
Current and future reservations (up to 200, soonest first). |
GET |
/api/v1/reservations/{ref} |
getReservation |
One reservation by your reference. |
GET |
/api/v1/reservations/{ref}/agreement |
agreementReadiness |
What the rental agreement is still missing for this booking, and whose job each item is. |
POST |
/api/v1/reservations/{ref}/vehicle |
assignVehicle |
Put a named car on a reservation (registration; spaces and case ignored). |
DELETE |
/api/v1/reservations/{ref} |
cancelReservation |
Cancel (kept, status cancelled, the car is freed at once). purge=true removes it entirely. Refused once collected. |
GET |
/api/v1/voucher-link |
voucherLink |
The customer's link for a reservation - they open it, verify, sign and unlock the car with their phone. |
GET |
/api/v1/zones |
listZones |
The geofencing zones you may name in allowed_zones (by id, name or chart). |
GET /api/v1/availability
Is there a car? What POST /api/v1/reservations would allocate right now. Nothing is held.
| Query | Required | |
|---|---|---|
from |
yes | pickup, e.g. 2026-11-20T10:30 |
to |
yes | return, e.g. 2026-11-27T09:00 |
branch_code |
your branch code | |
branch_id |
or Hannk's branch id | |
acriss |
a vehicle class, e.g. CDAR |
Returns, for example: {"available":true,"free_count":3,"would_allocate":{"registration":"AF69 LFG","vehicle_id":40,...}} or {"available":false,"code":"ALL_BUSY","reason":"...","free_after":"2026-11-22T09:00"}
POST /api/v1/reservations
Push a booking. Name the car (plate), a class (acriss), or neither and Hannk allocates a free one - the registration comes back either way.
Always send your own external_ref - it makes retries safe and is how you address the booking afterwards. The reply's missing_info lists what Hannk wanted but you did not send; it is not an error.
{
"external_ref": "RC000123",
"from": "2026-11-20T10:30",
"to": "2026-11-27T09:00",
"branch_code": "LHR",
"dropoff_branch_code": "LHR",
"acriss": "CDAR",
"customer": {
"name": "Jane Smith",
"email": "jane@example.com",
"phone": "+447700900123",
"dob": "1988-04-02",
"address": "1 High Street, London",
"postcode": "SW1A 1AA"
},
"total": 315.0,
"deposit_amount": 250,
"excess_amount": 1000,
"included": [
"CDW",
"Unlimited mileage"
],
"fuel_policy": "full_to_full",
"deposit_insurance_daily": 12,
"flight_number": "BA2551",
"charges": [
{
"code": "RENT",
"description": "Rental 7 days",
"qty": 7,
"unit_price": 45,
"amount": 315,
"payment_by": "C"
}
],
"additional_drivers": [
{
"name": "John Smith",
"dob": "1983-02-11",
"email": "john@example.com"
}
],
"additional_drivers_paid": 2
}
additional_drivers_paid (0-4, 2.2.0): how many additional drivers are already paid for when the names are not yet known. Each unnamed place becomes an included driver slot, filled free of charge at check-in - by the desk or by the customer in the app, licence photos and all. Names you do send count against the paid places. Send it again on PUT to change the count; places already filled with a driver are never removed.
Returns, for example: {"ok":true,"action":"created","voucher_url":"https://.../?claim=...","registration":"AF69 LFG","assignment":{"mode":"allocated",...},"missing_info":[...], ...}
PUT /api/v1/reservations/{ref}
Create-or-update by your reference. Send only what changed. Dates and the car can change until the car is collected.
vehicle: "auto" asks Hannk to find a car free for the new dates. Sending charges or products replaces the whole list.
{
"to": "2026-11-28T09:00",
"vehicle": "auto"
}
POST /api/v1/reservations/import
Many reservations in one call (JSON or XML, up to 500). Matched on external_ref; each row runs exactly the rules of PUT.
XML: Content-Type: application/xml, <reservations><reservation>..</reservation></reservations> - see samples/reservations.xml.
{
"reservations": [
{
"external_ref": "RC000124",
"from": "2026-12-01T09:00",
"to": "2026-12-04T09:00",
"branch_code": "LHR",
"customer": {
"name": "Ali Khan",
"email": "ali@example.com"
}
}
]
}
GET /api/v1/reservations
Current and future reservations (up to 200, soonest first).
| Query | Required | |
|---|---|---|
include_cancelled |
true to include cancelled ones |
GET /api/v1/reservations/{ref}
One reservation by your reference.
GET /api/v1/reservations/{ref}/agreement
What the rental agreement is still missing for this booking, and whose job each item is.
POST /api/v1/reservations/{ref}/vehicle
Put a named car on a reservation (registration; spaces and case ignored).
{
"plate": "AF69 LFG"
}
DELETE /api/v1/reservations/{ref}
Cancel (kept, status cancelled, the car is freed at once). purge=true removes it entirely. Refused once collected.
| Query | Required | |
|---|---|---|
reason |
why, kept with the booking | |
purge |
true to delete the record instead of cancelling |
GET /api/v1/voucher-link
The customer's link for a reservation - they open it, verify, sign and unlock the car with their phone.
| Query | Required | |
|---|---|---|
ref |
yes | your reservation reference |
broker |
a broker subdomain, to brand the link |
GET /api/v1/zones
The geofencing zones you may name in allowed_zones (by id, name or chart).
Telematics
| Endpoint | Client method | What it does | |
|---|---|---|---|
GET |
/api/v1/vehicles/{id}/status |
liveStatus |
The car right now, asked of its unit: doors, ignition, immobiliser, position, speed, fuel, odometer, 12V battery. |
GET |
/api/v1/vehicles/{id}/telemetry |
telemetrySnapshots |
The last stored status snapshots for a vehicle, newest first. |
GET |
/api/v1/vehicles/{ref}/history |
history |
Every stored sample in a window, oldest first, paged - for your own warehouse or analytics. |
GET |
/api/v1/vehicles/{ref}/history.csv |
historyCsv |
The same samples as a CSV file (up to 200,000 rows) - ready for a spreadsheet or a warehouse load. |
GET |
/api/v1/vehicles/{ref}/journeys |
journeys |
The samples cut into trips: start, end, minutes, distance (odometer when available, else GPS), max and average speed, and the route. |
GET |
/api/v1/reservations/{ref}/journeys |
rentalJourneys |
The trips of one rental - from when the car was actually collected to when it came back. |
GET |
/api/v1/reservations/{ref}/telematics |
rentalTelematics |
Every sample of one rental (up to 50,000), oldest first. |
GET |
/api/v1/vehicles/{ref}/warnings |
warnings |
What the car is complaining about: battery, fuel, offline, impacts, zones, smoke... |
GET |
/api/v1/vehicles/{ref}/events |
vehicleEvents |
Everything that happened to the car (commands, alerts, branch moves), newest first. |
GET |
/api/v1/vehicles/{ref}/reservations |
vehicleReservations |
Who has had the car, newest first. |
GET |
/api/v1/vehicles/{ref}/everything |
everything |
One call for a fleet board: the vehicle, where it was last seen, who has it now, the next booking and its open warnings. |
GET |
/api/v1/events |
events |
Your company's event feed since a time (up to 500, newest first) - poll it to pick up alerts in your own system. |
POST |
/api/v1/vehicles/{id}/command |
command |
Send a command to the car: lock, unlock, immobilize, release, refresh or blink. |
GET /api/v1/vehicles/{id}/status
The car right now, asked of its unit: doors, ignition, immobiliser, position, speed, fuel, odometer, 12V battery.
{id} is the Hannk vehicle id. This is a live call to the unit - use it for a person looking at one car, not for polling a fleet.
GET /api/v1/vehicles/{id}/telemetry
The last stored status snapshots for a vehicle, newest first.
| Query | Required | |
|---|---|---|
limit |
1-500, default 100 |
GET /api/v1/vehicles/{ref}/history
Every stored sample in a window, oldest first, paged - for your own warehouse or analytics.
| Query | Required | |
|---|---|---|
from |
default 7 days ago | |
to |
a bare date means the whole day | |
page |
default 1 | |
page_size |
1-5000, default 500 | |
event |
only samples whose event name contains this |
Returns, for example: {"total":1840,"page":1,"pages":4,"records":[{"at":"2026-10-22T09:14","event":"Position","lat":53.75,"lng":-2.48,"speed":42,"direction":180,"odometer":40211.4,"fuel_level":62,"soc_level":null,"battery_voltage":12.6,"temperature":19,"event_id":"..."}]}
GET /api/v1/vehicles/{ref}/history.csv
The same samples as a CSV file (up to 200,000 rows) - ready for a spreadsheet or a warehouse load.
| Query | Required | |
|---|---|---|
from |
||
to |
GET /api/v1/vehicles/{ref}/journeys
The samples cut into trips: start, end, minutes, distance (odometer when available, else GPS), max and average speed, and the route.
| Query | Required | |
|---|---|---|
from |
||
to |
||
points |
false to leave the route out | |
simplify |
false for every point | |
max_points |
per trip, default 400 |
GET /api/v1/reservations/{ref}/journeys
The trips of one rental - from when the car was actually collected to when it came back.
GET /api/v1/reservations/{ref}/telematics
Every sample of one rental (up to 50,000), oldest first.
GET /api/v1/vehicles/{ref}/warnings
What the car is complaining about: battery, fuel, offline, impacts, zones, smoke...
| Query | Required | |
|---|---|---|
state |
open (default), cleared, dismissed or all |
GET /api/v1/vehicles/{ref}/events
Everything that happened to the car (commands, alerts, branch moves), newest first.
| Query | Required | |
|---|---|---|
type |
only this event type | |
page |
||
page_size |
1-500, default 100 |
GET /api/v1/vehicles/{ref}/reservations
Who has had the car, newest first.
| Query | Required | |
|---|---|---|
from |
||
to |
||
status |
||
page |
||
page_size |
GET /api/v1/vehicles/{ref}/everything
One call for a fleet board: the vehicle, where it was last seen, who has it now, the next booking and its open warnings.
GET /api/v1/events
Your company's event feed since a time (up to 500, newest first) - poll it to pick up alerts in your own system.
| Query | Required | |
|---|---|---|
since |
ISO date-time, default 7 days ago |
POST /api/v1/vehicles/{id}/command
Send a command to the car: lock, unlock, immobilize, release, refresh or blink.
Logged as yours in the car's events. {id} is the Hannk vehicle id.
{
"cmd": "lock"
}
Errors
Every error is JSON: {"error": "a sentence to show a person", "code": "A_STABLE_CODE", "problems": ["..."]}.
| Status | Means |
|---|---|
| 400 | Something in the request needs fixing. problems lists every one at once. |
| 401 | No key, or a key Hannk does not know. |
| 404 | No such branch / vehicle / reservation in your account. |
| 409 | It exists but cannot be done now - code says why (e.g. ALL_BUSY, VEHICLE_ALREADY_BOOKED, ALREADY_COLLECTED, ON_RENTAL). |
| 502 | The car or its telematics unit did not answer. Safe to retry. |
Questions about the API: your Hannk contact, or sales@hannk.com. Include the time, the call you made and the external_ref or registration - never your API key.