Update location

Update an existing location. This is a full update: optional fields that are omitted are cleared (an omitted active is treated as false, and an omitted address removes the current one). First retrieve the current location from /api/locations/{id}, apply your changes, then send back the full object.

Required permission: Locations

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
int32
required
≥ 1

The id of the location to update.

Body Params

The details of the location

string | null
required

The location's name (max 50 characters).

type
object | null
required

The location type. On writes, provide either id or code (code wins when both are set). Values come from /api/property_values/location_types/values.

string | null

The location's description (max 2,000 characters).

address
object | null

The location's address, when one is set.

boolean

Whether the location is active.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses
200

OK

401

Authentication is required, or the Ocs-Api-Key header is missing or invalid.

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json