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

# Update a location

`PUT /locations/{locationId}`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/locations/{locationId}`
- Auth: OAuth 2
  - Authorization code: `https://sb2login.servicechannel.com/oauth/authorize`
  - Token URL: `https://sb2login.servicechannel.com/oauth/token`
- TypeScript: <https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/docs/locations/:locationId/put.ts> (a function with typed inputs; its response is checked against the schema)

Modifies information of the existing location.You can use either of the following methods to retrieve location details: [GET/stores](/swagger/ui/index?version=3#/Locations/GETv3_stores_Id__Id__storeIdentifier__storeIdentifier__Name__Name__Sort__Sort__Page__Page__PageSize__PageSize_), [GET/locations](/swagger/ui/index?version=3#/Locations/GETv3_locations_Id__Id__storeIdentifier__storeIdentifier__Name__Name__Sort__Sort__Page__Page__PageSize__PageSize_).
             <br />***Note:*** Method is available for subscribers with the *Super Admin* permission or *SC Admin* role.
             <br />Visit ServiceChannel University to find out [how subscribers can update location details](https://servicechannel.atlassian.net/wiki/spaces/SCU/pages/708936009/Updating+Location+Details).
             <br />**Example request**
            
                 PUT / locations/{locationId}
                 {
                  "StoreId": "34",
                  "Name": "CSR Flagship",
                  "Latitude": 40.736601,
                  "Longitude": -73.991795,
                  "Distance": null,
                  "Address1": "3rd Floor, Innovation Center",
                  "Address2": "18 E. 16th Street",
                  "City": "New York",
                  "State": "NY",
                  "StateId": 1,
                  "Region": "Northeast",
                  "District": "NYC/LI",
                  "Zip": "10003",
                  "Country": "US",
                  "CountryId": 1,
                  "ClosedDate": "null",
                  "OpenDate": "2021-07-05T07:05:04.991Z",
                  "Email": "flagship@gmail.com",
                  "Phone": "212-555-1212",
                  "Contact": "",
                  "FaxNumber": "",
                  "LocationTypeId": null,
                  "SquareValue": 20.21
                  "SquareMeasure": "ft or foot" or "m or metre"
                 }

## Path parameters

- `locationId` integer, required

## Request body

- ServiceChannelServicesMessagingLocationUpdateLocationExRequest: Request object to update location details.
  - `StoreId` string, required: Numeric location identifier in the client’s system.
  - `Name` string, required: Location name.
  - `Latitude` number, double: Global position. Latitude.
  - `Longitude` number, double: Global position. Longitude.
  - `Distance` number, double: Distance from GPS coordinates to the location.
  - `Address1` string: Additional location address.
  - `Address2` string: Main location address.
  - `City` string: Location city.
  - `State` string: State where the location is placed.
  - `StateId` integer: Numeric identifier of the location’s state.
  - `Region` string: Part of the country where the location is placed.
  - `District` string: Abbreviation of the town or country area where the location is placed.
  - `Zip` string: Postal code of the location.
  - `Country` string: Abbreviation of the country name where the location is placed.
  - `CountryId` integer: Numeric identifier of the country of the location.
  - `ClosedDate` string, date-time: Last day when the location is open for business.
  - `OpenDate` string, date-time: First day when the location is open for business.
  - `Email` string: Email the location can be contacted at.
  - `Phone` string: Contact phone number of the location.
  - `Contact` string: Name of the main person to contact at the location.
  - `FaxNumber` string: Fax number the location can be contacted at.
  - `LocationTypeId` integer: Numeric identifier of the location type.
  - `SquareValue` number, double: Square value
  - `SquareMeasure` string: Square measure

## Response `200`

The location details are updated.

## Other responses

- `400`: The request is not accepted due to bad syntax, missing parameters, insufficient data, etc. <br/>Error codes: 601 — Location not found 1254 — Invalid square measure
- `401`: The request is not authorized. <br/>Error codes: 504 — API call rejected by security permissions
- `500`: The server was unable to complete the request due to an internal error.

---

[API](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3.md) - [All operations](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/llms.txt) - [OpenAPI document](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/revisions/d490d6596809?raw)
