# Create a Prescription

Create a new prescription for a patient.

Endpoint: POST /v1/prescriptions
Version: 1.0.0
Security: apiKeyAuth, practiceGroupId

## Security:

  - `apiKeyAuth` (unknown)
    apiKey in header x-api-key

  - `practiceGroupId` (unknown)
    apiKey in header x-practice-group-id

## Request fields (application/json):

  - `patient` (object, required)

  - `patient.id` (string, required)

  - `patient.first_name` (string, required)

  - `patient.last_name` (string, required)

  - `patient.sex` (string, required)
    Enum: "Not known", "Not specified", "Male", "Female", "Other"

  - `patient.title` (string)
    Enum: "Baron", "Baroness", "Brigadier", "Count", "Colonel", "Countess", "Captain", "Dame", "The Dowager Viscountess", "Dr", "Duchess", "Duke", "Earl", "His Excellency", "Father", "H.E. Ambassador Mr", "H.E. Mr", "H.E. Mrs", "Her Grace", "His Grace", "The Hon", "The Hon Mr", "The Hon Mrs", "HRH", "HRH Prince", "HRH Princess", "Insurance", "HM King", "Lady", "Lord", "Major", "Master", "Miss", "Mr", "Mrs", "Ms", "Mss", "Mx", "Pr", "Professor", "HM Queen", "Rabbi", "Reverend", "Sheikh", "Sheikha", "Sir", "The", "", "Viscount", "Viscountess"

  - `patient.dob` (string, required)

  - `patient.nhs_number` (string)

  - `patient.email` (string, required)

  - `patient.mobile` (string, required)

  - `patient.address` (object, required)

  - `patient.address.line1` (string, required)

  - `patient.address.line2` (string)

  - `patient.address.line3` (string)

  - `patient.address.town` (string, required)

  - `patient.address.county` (string)

  - `patient.address.country` (string, required)

  - `patient.address.postcode` (string, required)

  - `prescriber` (object, required)

  - `prescriber.name` (string, required)

  - `prescriber.code` (string)

  - `prescriber.contact_number` (string)

  - `prescriber.prescriber_id` (string, required)

  - `medicines` (array, required)

  - `medicines.name` (string, required)

  - `medicines.quantity` (string, required)

  - `medicines.directions` (string, required)

  - `medicines.snomed_code` (string)

  - `delivery` (object, required)

  - `delivery.issue_method` (string, required)
    Enum: "messaging", "pharmacy", "delivery", "provider"

  - `delivery.send_sms` (boolean)

  - `delivery.pharmacy_id` (string)

  - `delivery.invoice_clinic` (boolean)

  - `delivery.delivery_address` (object)

  - `delivery.delivery_address.line1` (string, required)

  - `delivery.delivery_address.line2` (string)

  - `delivery.delivery_address.line3` (string)

  - `delivery.delivery_address.town` (string, required)

  - `delivery.delivery_address.county` (string)

  - `delivery.delivery_address.country` (string, required)

  - `delivery.delivery_address.postcode` (string, required)

  - `secure_pin` (string, required)

  - `notes` (string)

## Response 200:

  - `200` (unknown)
    Ok

## Response 200 fields (application/json):

  - `prescription_id` (string, required)

## Response 400:

  - `400` (unknown)
    Validation error

## Response 400 fields (application/json):

  - `error` (boolean, required)
    Example: true

  - `statusCode` (number, required)
    Example: 400

  - `message` (array, required)

  - `message.code` (string, required)
    Example: invalid_type

  - `message.expected` (string, required)
    Example: string

  - `message.path` (array, required)
    Example: ["patient_id"]

  - `message.message` (string, required)
    Example: Required

## Response 401:

  - `401` (unknown)
    Unauthorised

## Response 404:

  - `404` (unknown)
    Not found

## Response 429:

  - `429` (unknown)
    Too Many Requests

## Response 500:

  - `500` (unknown)
    Unknown error

