Get a day's visits in an order to drive them
GET/api/v1/calendar/route
The visits on one day that are scheduled or in progress, in a sensible order to drive them: out from the business's own postcode to the nearest visit, then the nearest to that, with the route then shortened where it doubles back. A technician gets their own visits. An owner or office member gets everyone's, or one person's with membership_id. Distances are straight lines between the middles of postcodes, so the order is a suggestion: it changes no visit's time, and booked_order says whether the visits are already booked in it. A visit whose property has no position is listed in unplaced_visit_ids. Positions come from open postcode data for Great Britain: show meta.attribution wherever you show them. More than 250 visits in the day answers 422 route_too_large; ask for one person's.
- Needs an API key, and runs with the access of the member who made the key.
- A connected AI assistant can use it too, as
getDayRoute.
Parameters
In the query string
datestring (date)requiredThe day, in the workspace's time zone.
membership_idstring (uuid)One person's visits. Owners and office members only; a technician always gets their own.
Responses
200The day's visits in an order to drive them, and what to show beside their positions.
dataobjectrequiredFields(6)
datestring (date)requiredstartobject or nullrequiredWhere the route sets out from, which is the postcode in the business's address. Null when the address has no postcode with a position; the route then starts at the visit booked earliest.
Fields(3)
latitudenumber (double)requiredAt least -90. At most 90.
longitudenumber (double)requiredAt least -180. At most 180.
labelstringrequiredThe business's postcode.
stopsarray of objectrequiredEach item(8)
positionintegerrequiredWhere it comes on the route, counting from 1.
At least 1.
visit_idstring (uuid)requiredcustomer_idstring (uuid)requiredproperty_idstring (uuid)requiredscheduled_start_atstring (date-time)requiredlatitudenumber (double)requiredAt least -90. At most 90.
longitudenumber (double)requiredAt least -180. At most 180.
metres_from_previousinteger or nullrequiredMetres in a straight line from the stop before, or from `start` for the first. Null for the first stop when there is no `start`.
unplaced_visit_idsarray of string (uuid)requiredVisits on the day that are not on the route, because the property has no position yet or the visit has no property.
distance_metresintegerrequiredThe route's length in a straight line from stop to stop.
booked_orderbooleanrequiredTrue when the stops, in this order, are also in the order their visits are booked.
metaobjectrequiredFields(2)
attributionstringrequiredattribution_urlstring (uri)required
A refusal answers in the one error shape every operation shares.
Example
A request our own tests send. The ids are made up: put your own in their place.
curl "https://app.tradesender.co.uk/api/v1/calendar/route?date=2026-10-14" \ -H "Authorization: Bearer $TRADESENDER_KEY"