Endpoints
| Endpoint | Permission | What it does |
|---|
POST /location/geocode/addressGeoReference | geoCode:addressGeoReference | Coordinates for an address. |
POST /location/geocode/validateAddressGeoReference | geoCode:addressGeoReference | Whether an address exists, with its formatted form. |
POST /location/geocode/markerReference | geoCode:markerReference | Coordinates for a road, rail or waterway marker, such as hectometre post A15 Re 45.3. |
POST /location/reverseGeocode/markerReference | geoCode:markerReference | The marker on the nearest numbered road, rail line or waterway for a point. |
Base URL https://api.transportial.com/api. Send x-api-key and x-api-secret, from an API access integration holding the permission above. Missing or invalid credentials answer 401; an integration without the permission answers 403.
Validate before you plan
The validation endpoint returns valid, the formatted address and partialMatch, which is true when only part of the input was recognised. Use it at order entry, while someone can still correct the address.
Kilometre, hectometre and mile markers
On a motorway, a driver with a breakdown says "A15, right side, post 45.3", not an address. The marker endpoint turns that into coordinates on the right carriageway. The reverse endpoint turns a vehicle position into the marker, for messages to drivers, roadside assistance and incident reports.
The same request works for rail line kilometres and river or canal kilometres. In the US and Canada, markers restart at every state or province line, so send the region as well.
Where the numbering jumps
Marker numbers are not measured distance. When a road is realigned, its posts keep their old numbers, so the numbering skips or repeats. Between two known markers the position is interpolated; where the numbering does not match the distance, it is counted from the nearer marker instead. Each result says how it was derived and how far away the nearest known marker is.