Skip to main content
PATCH
/
locations
/
{id}
Update Location Status
curl --request PATCH \
  --url https://api.usecobalt.com/v1/locations/{id} \
  --header 'Content-Type: application/json' \
  --header 'access_token: <api-key>' \
  --header 'client_id: <api-key>' \
  --header 'client_secret: <api-key>' \
  --data '{
  "status": "active"
}'
{
  "success": true,
  "message": "<string>",
  "location_id": "<string>"
}

Example Request

curl -X PATCH https://api.usecobalt.com/v1/locations/abc123def4567890abcdef1234567890 \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
    "status": "inactive"
}'

Example Response

{
    "success": true,
    "message": "Location status updated successfully.",
    "location_id": "abc123def4567890abcdef1234567890"
}

Notes

  • The status update is case-insensitive (“active”, “Active”, “ACTIVE” are all accepted)
  • Only the status field can be updated through this endpoint
  • The location must belong to your organization
  • Invalid location IDs will return a 404 error

Authorizations

client_id
string
header
required
client_secret
string
header
required
access_token
string
header
required

Path Parameters

id
string
required

The location's ID

Body

application/json
status
enum<string>
Available options:
active,
inactive

Response

200 - application/json

Successful response

success
boolean
message
string
location_id
string