Modify a Site

PUT /sites

Updates the site around a place using the placeId.

Request

Authorization: bearer {token}

Parameters:

NameDescriptionData Type
placeId(Required) Unique place identifier associated with the site.
Int


Body:

NameDescriptionData 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

NameDescriptionData Type
IdUnique site identifier
Int
ModifiedOnIndicates 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

MessageDescription
401 UnauthorizedThis error is thrown when Authorization token is invalid or expired.
The place already has site. Try update siteThis error is thrown when trying to add a site to a place with existing site.
Place coords is outside of provided polygonThis 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 idThis error is thrown when the placeId or siteId is not associated with the account.