---
title: "Send a non-controlled prescription to an outside pharmacy via VetHubRx. Creates the OutsideMedication record (Status=Sending) and returns it; the final Sent/Failed state arrives asynchronously via webhook."
method: POST
path: "/erx/prescriptions"
tags: ["Erx"]
---

# Send a non-controlled prescription to an outside pharmacy via VetHubRx. Creates the OutsideMedication record (Status=Sending) and returns it; the final Sent/Failed state arrives asynchronously via webhook.

`POST /erx/prescriptions`

## Request

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

## Request body

- SendErxPrescriptionRequestDto: POST /erx/prescriptions — send a non-controlled prescription to an outside pharmacy.
  - `patientId` string
  - `providerUserId` string
  - `medication` ErxMedicationDto: A medication from the vendor's NDC catalog, shaped for the send modal.
    - `ndcCode` string
    - `name` string
    - `brandName` string, nullable
    - `drugClass` string, nullable
    - `category` string, nullable: "Human" | "Vet" per the vendor catalog.
    - `quantityUomCode` string, nullable
    - `packageSize` string, nullable
    - `packageSizeUom` string, nullable
    - `labeler` string, nullable
    - `deaSchedule` string, nullable: Vendor DEA schedule text, e.g. "0-Not scheduled under Federal Law".
    - `isControlled` boolean: True for any federally scheduled drug — the send path refuses these.
  - `quantity` union
    - number, double
    - string, double
  - `daysSupply` union
    - integer
    - string, int32
  - `refills` union
    - integer
    - string, int32
  - `sig` string: Directions to the client (patient's owner).
  - `notesToPharmacist` string, nullable
  - `weight` string, nullable: Free text with units, e.g. "12 lbs". REQUIRED — the pharmacy network rejects sends without it.
  - `pharmacy` ErxPharmacyDto: A pharmacy from the vendor's NCPDP/NPI directory, shaped for the send modal.
    - `id` union
      - integer
      - string, int32
    - `name` string
    - `address1` string, nullable
    - `address2` string, nullable
    - `city` string, nullable
    - `state` string, nullable
    - `zip` string, nullable
    - `phone` string, nullable
    - `ncpdp` string, nullable
    - `npi` string, nullable
  - `medicationRequestId` string, nullable: Optional back-link when this send fulfills an approved MedicationRequest routed to an online pharmacy (design §6.4). No state coupling — the request completes its own lifecycle; the eRx record just remembers where it came from.

## Response `201`

Created

- OutsideMedicationDto: Patient-facing view of an out-of-band external medication request (tracking only — no inventory or Rx governance involvement).
  - `id` string
  - `patientId` string
  - `medicationName` string
  - `quantity` string, nullable
  - `sig` string, nullable
  - `status` string: One of: Requested, Filled, Cancelled, Sending, Sent, Failed (the last three are eRx-only).
  - `kind` string: One of: Medication, Diet. Diets are charted in their own section.
  - `requestedDate` string, date-time
  - `source` string, nullable
  - `notes` string, nullable
  - `createdByName` string, nullable
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `filledAt` string, date-time, nullable: When staff confirmed the pharmacy filled it. Set/cleared by the status endpoint.
  - `filledByName` string, nullable
  - `erx` OutsideMedicationErxDto: Read-side e-prescribing detail for an OutsideMedication row (design §3).
    - `vendor` string
    - `providerUserId` string, nullable
    - `providerName` string, nullable
    - `ndcCode` string, nullable
    - `quantityUomCode` string, nullable
    - `daysSupply` union
      - integer
      - string, int32
    - `refills` union
      - integer
      - string, int32
    - `pharmacyDirectoryId` union
      - integer
      - string, int32
    - `pharmacySnapshot` string, nullable: Raw pharmacy snapshot JSON captured at send time (name/address/ncpdp/npi).
    - `code` string, nullable
    - `sentAt` string, date-time, nullable
    - `result` string, nullable: Webhook result JSON (response + normalized status). Never the NCPDP xml.
    - `lastError` string, nullable
    - `medicationRequestId` string, nullable

## Changes

- **2026-10-07** `021fabd866ff`: 3 info
  - added the optional property `kind` to the response with the `201` status (media type: text/plain)
  - added the optional property `kind` to the response with the `201` status (media type: application/json)
  - added the optional property `kind` to the response with the `201` status (media type: text/json)
- **2026-08-26** `a57456aa87b0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/changes/erx/prescriptions/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)
