---
search:
  tags:
    - Prescriptions
    - POST
seo:
  description: >-
    Any signed in user. Records a pending prescription of one or more medicines
    for… Reference for the POST /api/v1/prescriptions endpoint in the PharmaFlow
    API.
sidebar:
  label: Create a prescription
  badge: POST
title: Create a prescription
type: openapi-operation
---
Any signed in user. Records a pending prescription of one or more medicines for the branch. patient_name, prescriber_name, and at least one item required; stock is checked at dispense.

`POST /api/v1/prescriptions`

**Request body** (`application/json`, required)

- `patient_name` (string, required)
- `patient_id_number` (string)
- `prescriber_name` (string, required)
- `prescriber_license` (string)
- `notes` (string)
- `items` (object[], required)

Request body example:

```json
{
  "patient_name": "string",
  "patient_id_number": "string",
  "prescriber_name": "string",
  "prescriber_license": "string",
  "notes": "string",
  "items": [
    {
      "medicine_id": "string",
      "quantity": 0,
      "dosage_instructions": "string"
    }
  ]
}
```

**Responses**

- `201` — Prescription recorded
- `400` — A required field is missing or the items list is empty
- `401` — Not authenticated

Response example, 201:

```json
{
  "id": "string",
  "branch_id": "string",
  "rx_number": "string",
  "patient_name": "string",
  "patient_id_number": "string",
  "prescriber_name": "string",
  "prescriber_license": "string",
  "status": "string",
  "sale_id": "string",
  "dispensed_by": "string",
  "dispensed_by_name": "string",
  "notes": "string",
  "created_by": "string",
  "created_at": "string",
  "updated_at": "string",
  "dispensed_at": "string",
  "items": [
    {
      "id": "string",
      "prescription_id": "string",
      "medicine_id": "string",
      "quantity": -9007199254740991,
      "dosage_instructions": "string",
      "medicine_name": "string",
      "selling_price": "string",
      "vat_category": "string",
      "requires_prescription": -9007199254740991
    }
  ]
}
```
