Developer platform

Geocoding and address validation

Turn structured addresses into coordinates, and find out whether an address is real before a truck is sent there.

Runs on: Google Geocoding, behind one consistent address model.

EndpointPermissionWhat it does
POST /location/geocode/addressGeoReferencegeoCode:addressGeoReferenceCoordinates for an address.
POST /location/geocode/validateAddressGeoReferencegeoCode:addressGeoReferenceWhether an address exists, with its formatted form.

Base URL https://api.app.transportial.com/api. Send x-api-key and x-api-secret, from an API access integration holding the permission above. Note that a missing permission answers 401 and missing authentication 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.

Example

Validate an address

The type field is required: the address model is part of a family of location types.

Call
curl -X POST "https://api.app.transportial.com/api/location/geocode/validateAddressGeoReference" \
  -H "x-api-key: $TRANSPORTIAL_KEY" \
  -H "x-api-secret: $TRANSPORTIAL_SECRET" \
  -H "Content-Type: application/json" \
  -d @request.json
request.json
{
  "type": "addressGeoReference",
  "street": "Weena",
  "houseNumber": "505",
  "postalCode": "3013 AL",
  "city": "Rotterdam",
  "country": "NL"
}
Response
{
  "valid": true,
  "formattedAddress": "...",
  "partialMatch": false,
  "latLonPointGeoReference": { "lat": 0, "lon": 0 }
}

Response shape only; the values depend on your engine and input.

Limits worth knowing

  • The geocode endpoint returns 0,0 when nothing is found; treat that as no result.

Questions

Does this create a location?
No. Both endpoints only look up the address.