Location

The Location resource encompasses the geographical details of an address associated with a contact. It includes information such as formatted address, country, state, city, town, postal code, latitude, and longitude. Additionally, the what3words resource, nested within Location, provides geocoding information using What3words, where What3words is enabled.

The location object

Attributes
Location
interface Location {
  object: "Address";
  id: string;
  formatted_address: string | null;
  address_line: string | null;
  address_line2: string | null;
  country: string | null;
  state: string | null;
  city: string | null;
  town: string | null;
  postal_code: string | null;
  latitude: number | null;
  longitude: number | null;
  what3words: W3w | null;
}
Location.W3w
interface W3W {
  country: string | null;
  square: {
    southwest: {
      lng: number;
      lat: number;
    };
    northeast: {
      lng: number;
      lat: number;
    };
  };
  nearestPlace: string | null;
  coordinates: {
    lng: number;
    lat: number;
  };
  words: string | null;
  map: string | null;
}
Example Location
{
  "id": "l17pJzMvpvgEVqBN",
  "city": null,
  "town": null,
  "state": "England",
  "object": "Address",
  "country": "United Kingdom",
  "latitude": 51.51175827682243,
  "longitude": -0.08703180123414728,
  "what3words": {
    "map": "https://w3w.co/things.pull.dark",
    "words": "things.pull.dark",
    "square": {
      "northeast": { "lat": 51.511778, "lng": -0.087019 },
      "southwest": { "lat": 51.511751, "lng": -0.087062 }
    },
    "country": "GB",
    "coordinates": { "lat": 51.511764, "lng": -0.08704 },
    "nearestPlace": "City of London, London"
  },
  "postal_code": "EC4N 7HB",
  "address_line": "Clements Lane, 125",
  "address_line2": null,
  "formatted_address": "125 Clements Ln, London EC4N 7HB, UK"
}