Search places for drayage
Find a city, ZIP code or address to use as a drayage origin or destination. Drayage is moving a container by truck between a port or rail ramp and an inland address.
Matches as you type (autocomplete), best match first. Each result carries the city, state_code, country_code and zip_code that GET /drayage/rates takes as city, state, country and zip.
Places come from Mapbox geocoding, so results can change as Mapbox's data does. No match is not an error: items is empty.
API key scope required: rates:read.
Query Parameters
- Type: stringqmin length:2max length:200required
ZIP code, city, state, country or address to search for, 2 to 200 characters.
- Type: integerlimitgreater than:0max:10
How many places to return, 1 to 10.
- Type: stringcountrymin length:2max length:2nullable
Only places in this country: its two-letter ISO 3166 code, in either case.
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
Request Example for get/drayage/locations
curl 'https://api-dev.highqube.ai/drayage/locations?q=Ontario%2C%20CA&limit=5&country=US' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"success": true,
"message": "Success",
"data": {
"query": "Ontario",
"items": [
{
"place_id": "dXJuOm1ieHBsYzpFZUlvN0E",
"label": "Ontario, California 91761, United States",
"city": "Ontario",
"state": "California",
"state_code": "CA",
"zip_code": "91761",
"country": "United States",
"country_code": "US",
"latitude": 34.0633,
"longitude": -117.6509
}
],
"total": 1
},
"errors": [
{
"field": "query.routes",
"message": "Field required",
"code": "insufficient_scope",
"required_scope": "quotes:write"
}
],
"meta": {
"additionalProperty": "anything"
}
}
