[Developer platform](/en-us/developers)

# 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.

| 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. |

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.

[Create a developer account](https://portal.otms.transportial.com/auth/developer/register)[Read the guide](https://docs.transportial.com/examples/address-validation)[How it works](/en-us/blog/validate-delivery-addresses-api)

---
Canonical page: https://transportial.com/en-us/developers/algorithms/location-data
