---
title: "PATCH /Inventory/{id}/lots/{lotId}/containers/{containerId}"
method: PATCH
path: "/Inventory/{id}/lots/{lotId}/containers/{containerId}"
tags: ["Inventory"]
---

# PATCH /Inventory/{id}/lots/{lotId}/containers/{containerId}

`PATCH /Inventory/{id}/lots/{lotId}/containers/{containerId}`

## Path parameters

- `id` string, required
- `lotId` string, required
- `containerId` string, required

## Request body

- UpdateLotContainerDto — Update a container's metadata: storage location, and — while its DEA ledger is still empty — its code. Quantity is deliberately absent: stock moves only through the adjust/dispense flows so lot == sum(containers) and the DEA ledger stay reconciled.
  - `locationId` string, nullable — New storage location id; omit to leave unchanged.
  - `containerCode` string, nullable — New container code; omit to leave unchanged. Rejected once any DEA entry exists under the old or new code — the (book, container) ledger keys on it.

## Response `200`

OK

- InventoryLotContainerDto — A single physical container of a lot (bottle, vial, ...). A lot's quantity is the sum of its active containers; quantity, location, and DEA open/sealed status are tracked per container. See ITE-157.
  - `id` string
  - `inventoryLotId` string
  - `containerCode` string, nullable
  - `inventoryLocationId` string, nullable
  - `quantityOnHand` union
    - number, double
    - string, double
  - `status` string
  - `openedAt` string, date-time, nullable
  - `isActive` boolean
  - `deaDestroyed` boolean — True when this container has been destroyed in the DEA log (its controlled ledger is closed). Such a container is read-only on the inventory side — any correction must be recorded from the controlled-substances (DEA) log. Derived live from the ledger, not stored on the container row.
  - `createdAt` string, date-time
  - `updatedAt` string, date-time

## Other responses

- `400` — Bad Request
- `404` — Not Found

---

[API](https://skmtc.net/clinicos/apis/pawthosx-business-api-v1.md) · [All operations](https://skmtc.net/clinicos/apis/pawthosx-business-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/clinicos/pawthosx-business-api-v1/revisions/d8d7501dde48/schema)
