Places and routes
این محتوا هنوز به زبان شما در دسترس نیست.
Quotes and jobs take coordinates. If your system already stores them, you don’t need these endpoints. They are here for booking screens, where a person types an address or taps a map.
Searching for an address
Section titled “Searching for an address”GET /v1/places?q=Tower Hill&nearLatitude=51.508&nearLongitude=-0.128&limit=5| Parameter | |
|---|---|
q |
Required. What the person typed, at least three characters. |
nearLatitude, nearLongitude |
Optional. Results near this point come first — pass your shop’s location. |
limit |
How many suggestions. Default 5. |
[ { "name": "Tower Hill, London EC3N", "latitude": 51.5099, "longitude": -0.0766, "postcode": "EC3N 4DJ" }]These are suggestions for a person to choose from. Don’t book against the first one unseen.
The address at a point
Section titled “The address at a point”GET /v1/places/reverse?latitude=51.5081&longitude=-0.0759Returns one place in the same shape, or 204 No Content when there is no address there.
Both endpoints answer 503 Service Unavailable if the address service is briefly unreachable. Try again
shortly.
A route between two points
Section titled “A route between two points”GET /v1/routes?fromLatitude=51.508&fromLongitude=-0.1281&toLatitude=51.5081&toLongitude=-0.0759&vehicle=bicycle{ "distance_metres": 4630, "duration_seconds": 1140, "shape": [ { "latitude": 51.508, "longitude": -0.1281 }, { "latitude": 51.5079, "longitude": -0.1243 } ]}The route comes from the same road network as the price, so the line you draw and the quote agree.
shape is every bend in order, ready to draw on a map. vehicle is optional and takes the same names as
a quote.