---
title: "Patch Location"
method: PATCH
path: "/v1/locations/{location_id}"
tags: ["locations"]
---

# Patch Location

`PATCH /v1/locations/{location_id}`

## Request

- Base URL: `https://api.myarchivist.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.myarchivist.ai/v1/locations/{location_id}`
- Auth: HTTP bearer

Partially update a location.

## Path parameters

- `location_id` string, required

## Headers

- `x-api-key` string, nullable

## Request body

- LocationUpdate
  - `name` string, nullable
  - `aliases` string[], nullable
  - `type` string, nullable
  - `description` string, nullable
  - `image` string, nullable
  - `tcg_image` string, nullable
  - `parent_id` string, nullable

## Response `200`

Successful Response

- LocationRead: Read view of a stored location. The constrained fields from LocationBase are redeclared here without their limits on purpose. LocationBase exists to validate *incoming* writes, but LocationRead validates rows that already exist, and those rows are also written by the Next.js app straight through Prisma, which enforces none of these limits. Inheriting them made pydantic reject legacy rows on read, so `GET /v1/locations/{id}` answered 500 for every location whose stored description was longer than the create/update cap. `CharacterRead` has always relaxed its own text fields for this reason; these types had not.
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, nullable
  - `id` string, required
  - `name` string, required
  - `aliases` string[]
  - `type` string, nullable
  - `description` string, nullable
  - `image` string, nullable
  - `tcg_image` string, nullable
  - `parent_id` string, nullable
  - `campaign_id` string, required
  - `merge` boolean

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/myarchivist/apis/archivist-public-api.md) · [All operations](https://skmtc.dev/myarchivist/apis/archivist-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/myarchivist/apis/archivist-public-api/revisions/3ea6ca7efc56?raw)
