---
title: "Dispense from inventory and update governance status in one operation. For in-house routed prescriptions only."
method: POST
path: "/rx/governance/{id}/dispense-inventory"
tags: ["RxGovernance"]
---

# Dispense from inventory and update governance status in one operation. For in-house routed prescriptions only.

`POST /rx/governance/{id}/dispense-inventory`

## Request

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

## Path parameters

- `id` string, required

## Request body

- DispenseFromInventoryDto
  - `lotId` string
  - `containerId` string, nullable: ITE-157: explicit container within the lot; null for auto (open-first).
  - `locationId` string
  - `witnessUserId` string, nullable
  - `notes` string, nullable
  - `invoiceId` string, nullable: When supplied, the dispense transaction is also attached to this estimate as an InvoiceLineItem in the same request cycle.
  - `collectorName` string, nullable: UK CDR: collector name for Schedule 2–5 dispenses.
  - `collectorIdChecked` boolean, nullable: UK CDR: photo ID verification flag.
  - `overrideValidation` boolean: The user confirmed dispensing past stock (ITE-1410, Warn mode) with string? DispenseFromInventoryDto.OverrideReason. This door already waives VCPR / quantity on the user's behalf; this only covers a stock shortfall going on the overdraft lot.
  - `overrideReason` string, nullable

## Response `200`

OK

- RxGovernanceDto
  - `id` string
  - `createdDate` string
  - `patientName` string
  - `species` string
  - `clientName` string
  - `medication` string
  - `medicationId` string, nullable
  - `medicationCategory` string, nullable
  - `deaSchedule` string, nullable
  - `strength` string, nullable
  - `provider` string
  - `status` string
  - `guardrails` GuardrailChecksDto
    - `dose` boolean
    - `interaction` boolean
    - `allergy` boolean
  - `events` RxEventDto[]
    - `type` string
    - `timestamp` string, date-time
    - `actor` string
    - `data` object, nullable
  - `routing` RxRoutingDto
    - `id` string
    - `method` string
    - `pharmacyId` string, nullable
    - `pharmacyName` string, nullable
    - `externalRxNumber` string, nullable
    - `inventoryLotId` string, nullable
    - `trackingNumber` string, nullable
    - `estimatedDeliveryTime` string, nullable
    - `notes` string, nullable
    - `routedAt` string, date-time
    - `routedBy` string, nullable
  - `lastExamDate` string, nullable: Patient's last exam date (VCPR - Veterinary-Client-Patient Relationship)
  - `patientId` string, nullable
  - `prescriptionItemId` string, nullable
  - `quantity` union
    - number, double
    - string, double
  - `transactionId` string, nullable
  - `invoiceLineItemId` string, nullable: Set when the dispense-from-inventory call included an InvoiceId and a line item was created atomically with the dispense. Lets clients append the line item locally without refetching.
  - `invoiceId` string, nullable: The estimate the dispense was attached to — either the one the caller supplied or one auto-created/resolved server-side. Lets a client that had no estimate of its own adopt the server's estimate instead of failing to reconcile the line.
  - `estimateId` string, nullable: The draft Estimate the dispense-from-inventory landed on (the single billing path — the request's own quote estimate, fulfilled by the dispense). The payments panel converts this estimate instead of direct-creating a parallel bill (ITE-678). Mutually exclusive with string? RxGovernanceDto.InvoiceLineItemId.
  - `estimateLineItemId` string, nullable: The Performed estimate line the dispense fulfilled, when string? RxGovernanceDto.EstimateId is set.
  - `dosage` string, nullable
  - `frequency` string, nullable
  - `duration` string, nullable
  - `instructions` string, nullable
  - `amendment` RxAmendmentSummaryDto: The latest post-dispense amendment, alongside the directions it superseded. The "as dispensed" fields are read from that amendment's `OriginalContent`, which is a snapshot of the PrescriptionItem — and post-dispense the item never mutates, so every amendment's OriginalContent describes the same dispensed state. The most recent one is therefore enough; earlier amendments need not be replayed.
    - `reason` string
    - `amendedAt` string, date-time
    - `amendedByDisplayName` string, nullable
    - `amendmentCount` union: How many amendments this prescription has accumulated.
      - integer
      - string, int32
    - `dispensedDosage` string, nullable
    - `dispensedFrequency` string, nullable
    - `dispensedDuration` string, nullable
    - `dispensedInstructions` string, nullable
  - `prescriberLicenseNumber` string, nullable
  - `distributionCategorySnapshot` string, nullable
  - `isCascade` boolean
  - `cascadeReason` string, nullable
  - `antimicrobialUseType` string, nullable
  - `antimicrobialJustification` string, nullable
  - `clinicalAssessmentPerformed` boolean
  - `physicalExamPerformed` boolean
  - `physicalExamJustification` string, nullable
  - `validUntil` string, nullable: ISO date string (YYYY-MM-DD).
  - `repeatCount` union
    - integer
    - string, int32
  - `refillsAllowed` union: Refills authorized on the prescription item (US-style refills). Distinct from int RxGovernanceDto.RepeatCount, which is the UK repeat-dispensing value (ITE-475).
    - integer
    - string, int32
  - `refillsUsed` union: Refills already used against int RxGovernanceDto.RefillsAllowed.
    - integer
    - string, int32
  - `refillsPrn` boolean: PRN refills: unlimited until string? RxGovernanceDto.ValidUntil; RefillsAllowed is then 0.
  - `medicationExpirationDate` string, nullable: ISO date string (YYYY-MM-DD). Medication expiration entered on the Rx.
  - `withdrawalPeriod` string, nullable

## Other responses

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

## Changes

- **2026-10-28** `099cf36186e0`: 6 info
  - added the optional property `medicationExpirationDate` to the response with the `200` status (media type: text/plain)
  - added the optional property `medicationExpirationDate` to the response with the `200` status (media type: application/json)
  - added the optional property `medicationExpirationDate` to the response with the `200` status (media type: text/json)
  - added the optional property `refillsPrn` to the response with the `200` status (media type: text/plain)
  - …2 more
- **2026-10-21** `85ee96c0bb96`: 12 info
  - added the new optional request property `overrideReason` (media type: application/json)
  - added the new optional request property `overrideReason` (media type: text/json)
  - added the new optional request property `overrideReason` (media type: application/*+json)
  - added the new optional request property `overrideValidation` (media type: application/json)
  - …8 more
- **2026-10-11** `f7ab358172d0`: 3 info
  - added the optional property `routing/oneOf[#/components/schemas/RxRoutingDto]/externalRxNumber` to the response with the `200` status (media type: text/plain)
  - added the optional property `routing/oneOf[#/components/schemas/RxRoutingDto]/externalRxNumber` to the response with the `200` status (media type: application/json)
  - added the optional property `routing/oneOf[#/components/schemas/RxRoutingDto]/externalRxNumber` to the response with the `200` status (media type: text/json)
- …earlier changes not shown

[Operation history](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/changes/rx/governance/:id/dispense-inventory/post.md)

---

[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)
