PUT api/GeoSites/{geoSiteId}/UpdateUnitRegistrations

Updates unit registrations for the geosite.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
geoSiteId

integer32

Required

Body Parameters

UpdateUnitRegistrationsRequest
NameDescriptionTypeAdditional information
SerialNumbers

The SerialNumbers of units that registrations should be updated for. If any of the serialnumbers are invalid or cannot be found, the entire request will fail, nothing will be updated.

Collection of string

Required

RegisterUnits

Indicates if the units should be registered or unregistered

boolean

Required

RegisterForAlarms

Indicates if the units should be registered or unregistered for alarms based on this geosite. If RegisterUnits is false, this must also be set false.

boolean

Required

Request Formats

application/json, text/json

Sample:
{
  "SerialNumbers": [
    "sample string 1",
    "sample string 2"
  ],
  "RegisterUnits": true,
  "RegisterForAlarms": true
}

application/xml, text/xml

Sample:
<UpdateUnitRegistrationsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models.GeoSites">
  <RegisterForAlarms>true</RegisterForAlarms>
  <RegisterUnits>true</RegisterUnits>
  <SerialNumbers xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </SerialNumbers>
</UpdateUnitRegistrationsRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Updates unit registrations for the geosite.

GeoSiteInfoModel
NameDescriptionTypeAdditional information
Id

The id of this GeoSite

integer32

None.

UserGroupId

The id of the UserGroup this site belongs to

integer32

None.

SiteType

The type of Geosite. This enum can be used to determine which location properties make sense to look at.

GeoSiteTypeEnum

None.

Name

The name of the site

string

None.

Latitude

The latitude of center of the site.

decimal number

None.

Longitude

The longitude of center of the site.

decimal number

None.

Radius

Radius in meters. Only used for geosites where SiteType = Geoposition For other types of geosite this will be null

integer32

Range: inclusive between 100 and 100000

Street

If this Geosite is created from a Google Location Lookup, this is the Street returned from Google, otherwise NULL

string

None.

Sublocality

If this Geosite is created from a Google Location Lookup, this is the Sublocality returned from Google, otherwise NULL

string

None.

Locality

If this Geosite is created from a Google Location Lookup, this is the Locality returned from Google, otherwise NULL

string

None.

AdminArea1

If this Geosite is created from a Google Location Lookup, this is the AdminArea1 returned from Google, otherwise NULL

string

None.

AdminArea2

If this Geosite is created from a Google Location Lookup, this is the AdminArea2 returned from Google, otherwise NULL

string

None.

AdminArea3

If this Geosite is created from a Google Location Lookup, this is the AdminArea3 returned from Google, otherwise NULL

string

None.

AdminArea4

If this Geosite is created from a Google Location Lookup, this is the AdminArea4 returned from Google, otherwise NULL

string

None.

AdminArea5

If this Geosite is created from a Google Location Lookup, this is the AdminArea5 returned from Google, otherwise NULL

string

None.

CountryCode

If this Geosite is created from a Google Location Lookup, this is the CountryCode returned from Google, otherwise NULL

string

None.

PostalCode

If this Geosite is created from a Google Location Lookup, this is the PostalCode returned from Google, otherwise NULL

string

None.

ColloquialArea

If this Geosite is created from a Google Location Lookup, this is the ColloquialArea returned from Google, otherwise NULL

string

None.

Ward

If this Geosite is created from a Google Location Lookup, this is the Ward returned from Google, otherwise NULL

string

None.

Premise

If this Geosite is created from a Google Location Lookup, this is the Premise returned from Google, otherwise NULL

string

None.

PlaceId

If this Geosite is created from a Google Location Lookup, this is the PlaceId returned from Google, otherwise NULL

string

None.

CreatedDate

UTC timestamp for the creation of this GeoSite

date

None.

VisibleChildren

Indicates if this GeoSite is accessible from child groups and available to units in child groups

boolean

None.

CanEdit

Indicates if you have permission to Edit site details. Even if you do not have Edit Permissions, you can still register and deregister units at the site, if the unit has access to this site

boolean

None.

RegisteredUnitsCount

How many units are currently registered for this site

integer32

None.

RegisteredUnitsAtSiteCount

How many of the registered units are currently at this site

integer32

None.

RegisteredUnitsNotAtSiteCount

How many of the registered units are not currently at this site

integer32

None.

RegisteredUnits

The list of units that are currently registered to this site

Collection of UnitSiteRegistrationModel

None.

RegisteredUnitsAtSite

The list of registered units that are currently at this site

Collection of UnitAtGeoSiteModel

None.

RegisteredUnitsNotAtSite

The list of registered units that are currently not at this site

Collection of string

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "UserGroupId": 2,
  "SiteType": 0,
  "Name": "sample string 3",
  "Latitude": 4.1,
  "Longitude": 5.1,
  "Radius": 1,
  "Street": "sample string 6",
  "Sublocality": "sample string 7",
  "Locality": "sample string 8",
  "AdminArea1": "sample string 9",
  "AdminArea2": "sample string 10",
  "AdminArea3": "sample string 11",
  "AdminArea4": "sample string 12",
  "AdminArea5": "sample string 13",
  "CountryCode": "sample string 14",
  "PostalCode": "sample string 15",
  "ColloquialArea": "sample string 16",
  "Ward": "sample string 17",
  "Premise": "sample string 18",
  "PlaceId": "sample string 19",
  "CreatedDate": "2024-05-19T15:18:34.828473+00:00",
  "VisibleChildren": true,
  "CanEdit": true,
  "RegisteredUnitsCount": 2,
  "RegisteredUnitsAtSiteCount": null,
  "RegisteredUnitsNotAtSiteCount": 2,
  "RegisteredUnits": [
    {
      "RegisteredForAlarms": true,
      "SerialNumber": "sample string 2",
      "UserGroupId": 3,
      "ReferenceId": "sample string 4",
      "Name": "sample string 5",
      "ItemDescription": "sample string 6",
      "LastModified": "2024-05-19T15:18:34.828473+00:00"
    },
    {
      "RegisteredForAlarms": true,
      "SerialNumber": "sample string 2",
      "UserGroupId": 3,
      "ReferenceId": "sample string 4",
      "Name": "sample string 5",
      "ItemDescription": "sample string 6",
      "LastModified": "2024-05-19T15:18:34.828473+00:00"
    }
  ],
  "RegisteredUnitsAtSite": null,
  "RegisteredUnitsNotAtSite": [
    "sample string 1",
    "sample string 2"
  ]
}

application/xml, text/xml

Sample:
<GeoSiteInfoModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models.GeoSites">
  <AdminArea1>sample string 9</AdminArea1>
  <AdminArea2>sample string 10</AdminArea2>
  <AdminArea3>sample string 11</AdminArea3>
  <AdminArea4>sample string 12</AdminArea4>
  <AdminArea5>sample string 13</AdminArea5>
  <CanEdit>true</CanEdit>
  <ColloquialArea>sample string 16</ColloquialArea>
  <CountryCode>sample string 14</CountryCode>
  <CreatedDate>2024-05-19T15:18:34.828473+00:00</CreatedDate>
  <Id>1</Id>
  <Latitude>4.1</Latitude>
  <Locality>sample string 8</Locality>
  <Longitude>5.1</Longitude>
  <Name>sample string 3</Name>
  <PlaceId>sample string 19</PlaceId>
  <PostalCode>sample string 15</PostalCode>
  <Premise>sample string 18</Premise>
  <Radius>1</Radius>
  <RegisteredUnits>
    <UnitSiteRegistrationModel>
      <ItemDescription xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models">sample string 6</ItemDescription>
      <LastModified xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models">2024-05-19T15:18:34.828473+00:00</LastModified>
      <Name xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models">sample string 5</Name>
      <ReferenceId xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models">sample string 4</ReferenceId>
      <SerialNumber xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models">sample string 2</SerialNumber>
      <UserGroupId xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models">3</UserGroupId>
      <RegisteredForAlarms>true</RegisteredForAlarms>
    </UnitSiteRegistrationModel>
    <UnitSiteRegistrationModel>
      <ItemDescription xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models">sample string 6</ItemDescription>
      <LastModified xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models">2024-05-19T15:18:34.828473+00:00</LastModified>
      <Name xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models">sample string 5</Name>
      <ReferenceId xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models">sample string 4</ReferenceId>
      <SerialNumber xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models">sample string 2</SerialNumber>
      <UserGroupId xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models">3</UserGroupId>
      <RegisteredForAlarms>true</RegisteredForAlarms>
    </UnitSiteRegistrationModel>
  </RegisteredUnits>
  <RegisteredUnitsAtSite i:nil="true" />
  <RegisteredUnitsNotAtSite xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </RegisteredUnitsNotAtSite>
  <SiteType>Unknown</SiteType>
  <Street>sample string 6</Street>
  <Sublocality>sample string 7</Sublocality>
  <UserGroupId>2</UserGroupId>
  <VisibleChildren>true</VisibleChildren>
  <Ward>sample string 17</Ward>
</GeoSiteInfoModel>