Skip to main content

Modify a Site

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

PUT /sites

Updates the site around a place using the placeId.

Request

Authorization: bearer {token}

Parameters:

Name Description Data Type
placeId (Required) Unique place identifier associated with the site.
Int


Body:

Name Description Data Type
Id (Required) Unique site identifier
Int
SiteName (Optional) Name of the site
string
Polygon (Optional) An array containing the latitude/longitude pairs that define the boundaries of the site. Must contain at least three coordinates.
Array of decimals

Response Body

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

Sample Request

{
  "Id": 131926,
  "siteName": "Company Site",
  "Polygon": [
    [
      [-74.575495708167878, 40.382754195334741],
      [-74.574809062659838, 40.382137167831516],
      [-74.573006618202, 40.383436596653695]
    ]
  ]
}

Sample Response

{
  "data": [
    {
      "Id": 131926,
      "ModifiedOn": "2019-02-26T20:34:55.22+00:00"
    }
  ]
}

Error Codes

Message Description
401 Unauthorized This error is thrown when Authorization token is invalid or expired.
The place already has site. Try update site This error is thrown when trying to add a site to a place with existing site.
Place coords is outside of provided polygon This error is thrown when the Place is outside the site polygon
The supplied shape points do not result in a valid figure: 24404: Not valid because polygon ring (1) intersects itself or some other ring. The problem occurs in entry (2) in a geometry collection. This error is thrown when the coordinates do not create a closed polygon with non-intersecting sides.
Cannot find Item with supplied id This error is thrown when the placeId or siteId is not associated with the account.
Last updated January 9, 2023.
API Endpoint: