---
title: "Updates a location details"
method: PUT
path: "/locations/v4/{locationId}"
tags: ["Locations"]
---

# Updates a location details

`PUT /locations/v4/{locationId}`

Updates the location `locationId` details. A location consists of latitude/longitude coordinate pair and/or geofenceId.
A name, description, and address of the location may be provided.
The old location definition will be replaced, meaning that
full location body should be provided. After a successful update, the response provides
the updated location details.

## Request body

- union — Body for creating a location.
  - object
    - `address` object — Location address.
      - `city` string — City
      - `country` string — Country
      - `postalCode` string — Postal code
      - `state` string — State
      - `street` string — Street address
    - `description` string — Description of the location.
    - `externalLocationId` string — External location id in external cloud
    - `geofenceId` string, uuid — Optional geofence ID associated with the location. A geofence with the specified ID must exist.
    - `location` object, required — Location coordinates.
      - `lat` number, required — Latitude in WGS-84 format, decimal representation ranging from -90 to 90.
      - `lng` number, required — Longitude in WGS-84 format, decimal representation ranging from -180 to 180.
    - `name` string — Name of the location.
  - object
    - `address` object — Location address.
      - `city` string — City
      - `country` string — Country
      - `postalCode` string — Postal code
      - `state` string — State
      - `street` string — Street address
    - `description` string — Description of the location.
    - `externalLocationId` string — External location id in external cloud
    - `geofenceId` string, uuid, required — Optional geofence ID associated with the location. A geofence with the specified ID must exist.
    - `location` object — Location coordinates.
      - `lat` number, required — Latitude in WGS-84 format, decimal representation ranging from -90 to 90.
      - `lng` number, required — Longitude in WGS-84 format, decimal representation ranging from -180 to 180.
    - `name` string — Name of the location.

## Response `200`

Success.

The location information was updated

- object — Location object body.
  - `address` object — Location address.
    - `city` string — City
    - `country` string — Country
    - `postalCode` string — Postal code
    - `state` string — State
    - `street` string — Street address
  - `description` string — Description of the location.
  - `externalLocationId` string — External location id in external cloud
  - `geofenceId` string, uuid — Optional geofenceId associated with the location. Has to match an existing geofenceId.
  - `location` object — Location coordinates.
    - `lat` number, required — Latitude in WGS-84 format, decimal representation ranging from -90 to 90.
    - `lng` number, required — Longitude in WGS-84 format, decimal representation ranging from -180 to 180.
  - `locationId` string, required — Location ID
  - `name` string — Name of the location.

## Other responses

- `400` — Bad request The request object is in an incorrect format or has values that are invalid or out of range. If available, further error details are provided in the response body.
- `401` — Unauthorized The request did not provide correct authentication details
- `403` — Forbidden The account does not have the correct privileges
- `404` — Not Found The specified resource was not found

---

[API](https://skmtc.net/here/apis/tracking.md) · [All operations](https://skmtc.net/here/apis/tracking/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/here/tracking/revisions/efa162f7023c/schema)
