Locations

Patch a location

Changed on

Update or unset one or more fields of a specified Location. If, for a given value, both toNull=true and a value are provided, the response will be a 422.

patch/locations/{locationId}

Request

Request body

Example request

{
  "latitude": {
    "toNull": true
  },
  "longitude": {
    "value": 50
  }
}

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