/locations/findOrCreate

Similar to the POST /people/findOrCreate endpoint, this endpoint searches for the given Location. If a Location is found, the existing Location is returned. If a Location is not found, a new Location is created.

This endpoint is useful when synchronizing from a system that does not uniquely identify locations.

This endpoint parses the address provided, and uses the following criteria to find existing locations in US contexts:

  • If a name is provided and a ZIP5 can be determined (either provided or discovered based on city and stateOrProvince), and no Street Name can be parsed, a match will be attempted based on name and ZIP5
  • Then, if a name is provided and a ZIP5 cannot be determined and no Street Name can be parsed, a match will be attempted based on name, city, and stateOrProvince
  • Then, if a Street Name can be parsed and a ZIP5 can be determined (either provided or discovered based on city and stateOrProvince), a match will be attempted based on Street Number, Street Name, Apartment Number, and ZIP5

Non-US contexts match on exact name and parsed address.

If successful, the endpoint responds with HTTP Status Code 201 Created (even if it matched and updated an existing Location). It also sets the Location header to the location of the Location.

Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!