---
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}`

## Request

- Base URL: `https://api.clinicos.vet/backend/business`
- URL: `https://api.clinicos.vet/backend/business/Inventory/{id}/lots/{lotId}/containers/{containerId}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/docs/Inventory/:id/lots/:lotId/containers/:containerId/patch.ts> (a function with typed inputs; its response is checked against the schema)

## 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.dev/clinicos/apis/pawthosx-business-api-v1.md) - [All operations](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/revisions/099cf36186e0?raw)
