Skip to main content

Add Places

Contents

The ContentTools API has been deprecated and replaced by the Places API.

POST /places

Adds multiple places to a place set. There is a limit of 50 places per API call.

Each place should contain at least the address or coordinates.

  • If both address and coordinates are passed, both address and coordinates will be saved and the place will be plotted using coordinates.
  • If only address is passed, the address will be used to find out the coordinates. Both address and coordinates are saved and the place is plotted using the coordinates.
  • If only coordinates are passed, only coordinates are saved and the place is plotted using coordinates.

Request

Authorization: bearer {token}

Parameters:

Name Description Data Type
SetId (Required) Unique set identifier to associate with the places.
Int

Body:

Name Description Data Type
PlaceName (Required) Name of the place

Criteria:
  • Place names need not be unique under the same place set.
  • Place names cannot be null.
  • Place names should support alphanumeric values.
  • Place names cannot exceed 140 characters.
string
ExternalPlaceId (Optional) Unique external place Id
Alphanumeric
Address (Optional, if coords entered) Address of the location (See below)
Complex
Coords (Optional, if address entered) Coordinates of the location (See below)
Complex
Info (Optional) Comments or description about a place
string
Phone (Optional) Phone number of the place
string

Address

Data Description Data Type
StreetAddress The house number and street name
string
City The name of the city
string
State The two letter state abbreviation
string
PostalCode The postal code or zip
string
Country The name of the country
string

Coords

Data Description Data Type
Lat Latitude as a signed decimal with 6 digits to the right of the decimal. (For example, 40.360621)
string
Lon Longitude as a signed decimal with 6 digits to the right of the decimal. (For example, -74.599027)
string

Response

Data Description Data Type
Id Unique place identifier
Int
ModifiedOn Indicates the last time the place was modified
DateTime

Sample Request

[
  {
    "PlaceName": "Business Location 1",
    "ExternalPlaceId": "CIDBL1",
    "Info": null,
    "Phone": "609-430-3245",
    "Address": {
      "StreetAddress": "457 North Harrison St.",
      "City": "Princeton",
      "State": "NJ",
      "PostalCode": "08852",
      "Country": "US"
    },
    "Coords": {
      "Lat": "40.368635",
      "Lon": "-74.657760"
    }
  },
  {
    "PlaceName": "Business Location 2",
    "ExternalPlaceId": "CIDBL2",
    "Info": null,
    "Phone": "609-430-3245",
    "Address": {
      "StreetAddress": "1 Independence Way",
      "City": "Princeton",
      "State": "NJ",
      "PostalCode": "08852",
      "Country": "US"
    },
    "Coords": {
      "Lat": "40.360621",
      "Lon": "-74.599027"
    }
  }
]

Sample Response

{
  "data": [
    {
      "Id": 10386508,
      "ModifiedOn": "2019-02-26T15:31:08.623+00:00"
    },
    {
      "Id": 10386509,
      "ModifiedOn": "2019-02-26T15:31:08.623+00:00"
    }
  ]
}

Error Codes

Message Description
Either Address or Coords is required This error will be thrown when Place does not include either address or coordinates.
Place Name is required This error will be thrown when Place does not include PlaceName.
No matches found This error will be thrown when incorrect address is passed.
Cannot find set with supplied id This error will be thrown when the Placeset id does not belong to the account.
Duplicated external place Id(s) in database This error will be thrown when the ExternalPlaceId is already associated with a different place within the account.
Last updated May 21, 2024.
API Endpoint:

Contents