Get an Existing Site

GET /Sites/{SiteId}

Gets the site information for a place using the siteId. If the site includes gate information entered in the ContentTools web tool, it will also be returned.

Request

Authorization: bearer {token}

Parameters:

NameDescriptionData Type
SiteId(Required) Unique Site id
Int

Response Body

NameDescriptionData Type
SiteIdUnique Site identifier
Int
SiteNameName of the site
string
ModifiedOnThe last time the site was modified
DateTime
PolygonAn array containing the latitude/longitude pairs that define the boundaries of the site
Array of decimals
SitesGatesArray of gates information associated with the site
Complex

SiteGate

NameDescriptionData Type
GateTypeThe type of gate. Valid values include:
  • Two way
  • Entry Only
  • Exit Only
string
GateNoteDriver notes to be displayed when approaching the gate
string
SiteSnapCoordsCoords on the Site polygon where the gate is located
Coords
RoadSnapCoordsCoords on the road network to access the gate
Coords
TruckRestrictedIndicates if the gate is truck restricted
boolean
AutoRestrictedIndicates if the gate is auto restricted
boolean

Coords

DataDescriptionData Type
LatLatitude up to 6 digit precision
string
LonLongitude up to 6 digit precision
string

Sample Response

{
  "data": [
    {
      "Id": 131928,
      "SiteName": "Company site",
      "ModifiedOn": "2019-02-26T20:57:33.177+00:00",
      "Polygon": [
        [
          [-74.575495708167878, 40.382754195334741],
          [-74.574809062659838, 40.382137167831516],
          [-74.573006618202, 40.383436596653695],
          [-74.5739883067018, 40.383996405747617],
          [-74.575495708167878, 40.382754195334741]
        ]
      ],
      "SiteGates": [
        {
          "AutoRestricted": false,
          "GateNote": "Sample notes",
          "GateType": "Two Way",
          "SiteSnapCoords": {
            "Lat": "40.38385",
            "Lon": "-74.573732"
          },
          "RoadSnapCoords": {
            "Lat": "40.383919",
            "Lon": "-74.573676"
          },
          "TruckRestricted": false
        },
        {
          "AutoRestricted": false,
          "GateType": "Entry Only",
          "SiteSnapCoords": {
            "Lat": "40.383465",
            "Lon": "-74.573057"
          },
          "RoadSnapCoords": {
            "Lat": "40.383502",
            "Lon": "-74.573027"
          },
          "TruckRestricted": false
        }
      ]
    }
  ]
}

Error Codes

MessageDescription
401 UnauthorizedThis error is thrown when Authorization token is invalid or expired.