Locations

Update a Location

Update one or more fields of a specified Location. All fields in the request body are optional. Only the specified fields will be updated. Exception: the location name is required. Other exception: if the latitude or longitude is updated, and no new timezone is provided, a new timezone will be picked based on the latitude and longitude.

put/locations/{locationId}

Request

Request body

namestring required

A name for the Location.

latitudenumber

A geographical latitude.

longitudenumber

A geographical longitude.

regionRadiusinteger

The radius in meters around latitude and longitude which defines this Location.

temperatureScalestring

The desired temperature scale used for the Location. Values include F and C.

timeZoneIdstring

An ID matching the Java Time Zone ID of the location. If this is not provided, the service will try to choose a time zone based on the latitude and longitude.

localestring

We expect a POSIX locale but we also accept an IETF BCP 47 language tag.

additionalPropertiesobject

Additional information about the Location that allows SmartThings to further define your Location.

Example request

{
  "name": "Home",
  "temperatureScale": "F"
}

Response

A Location.

locationIdstring required

A unique location identifier. This is not guaranteed to be a valid UUID.

namestring required

A name given for the location (eg. Home)

countryCodestring required

An ISO Alpha-3 country code. (i.e. GBR, USA)

latitudenumber

A geographical latitude.

longitudenumber

A geographical longitude.

regionRadiusinteger

The radius in meters around latitude and longitude which defines this location.

temperatureScalestring

The desired temperature scale used within location. Value can be F or C.

timeZoneIdstring

A valid Java Time Zone ID for the location. This can be specified in the create or update request, or it can be generated based on the latitude and longitude.

localestring

We expect a POSIX locale but we also accept an IETF BCP 47 language tag.

backgroundImagestring

Not currently in use.

additionalPropertiesobject

Additional information about the location that allows SmartThings to further define your location.

createdstring date-time

The timestamp of when a location was created in UTC.

lastModifiedstring date-time

The timestamp of when a location was last updated in UTC.

Example response

{
  "locationId": "6b3d1909-1e1c-43ec-adc2-5f941de4fbf9",
  "name": "Home",
  "countryCode": "USA",
  "latitude": 45.00708112,
  "longitude": -93.11223629,
  "regionRadius": 150,
  "temperatureScale": "F",
  "timeZoneId": "America/Chicago",
  "locale": "en_US",
  "parent": {
    "type": "LOCATIONGROUP",
    "id": "6ecb6c06-7319-49b1-8ebd-f97660efdd06"
  },
  "created": 1547920800,
  "lastModified": 1548007200
}

Changes

No recorded changes to this operation across all 8 revisions of this API.