---
title: "Toggle location active status"
method: PATCH
path: "/v1/locations/{location}"
tags: ["Location"]
---

# Toggle location active status

`PATCH /v1/locations/{location}`

Activate or deactivate a location. A location must be deactivated before it can be deleted.

Deactivation is blocked if:
- the location is the only active location, or
- the location is set as the main or back-order location

## Path parameters

- `location` string, uuid, required

## Headers

- `X-BUSINESS-API-KEY` string, required

## Request body

- object
  - `active` boolean, required — Set to `false` to deactivate, `true` to activate

## Response `200`

Location active status updated

- object
  - `id` string, uuid, required — Location ID
  - `business_id` string, uuid, required — Business that owns this location
  - `name` string, required — Name of the location
  - `street` string, required — Street address
  - `city` string, required — City
  - `state` string, required — State or region
  - `country` string, required — Country code or name
  - `postal_code` string, required — Postal code
  - `active` boolean, required — Whether the location is active
  - `pickups` object[] — Pickup configurations linked to this location (empty when not loaded)
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400` — Cannot deactivate — only active location
- `401` — Missing or invalid API key / OAuth token
- `403` — Authenticated user cannot manage locations
- `422` — Validation error (e.g. main/back-order location cannot be deactivated)

---

[API](https://skmtc.net/hitpayapp/apis/hitpay-api.md) · [All operations](https://skmtc.net/hitpayapp/apis/hitpay-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hitpayapp/hitpay-api/versions/6aae1a736990/schema)
