> ## Documentation Index
> Fetch the complete documentation index at: https://docs.parchmenthealth.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get patient prescriptions

> Get prescriptions for a specific patient

## Pagination

### Query Parameters

* `limit` (optional, integer): Maximum number of prescriptions to return per page (default: 20, max: 50).
* `lastKey` (optional, string): Opaque cursor for fetching the next page. Use the `pagination.lastKey` value from the previous response.

### Error Status

When a prescription has encountered an error during processing, the `status` field will be `"Error"` and an `error` object will be included with a description:

```json theme={null}
{
  "status": "Error",
  "error": {
    "description": "Description of the error that occurred"
  }
}
```

When there is no error, the `error` field is omitted from the prescription.

### Response

If pagination is used, the response will include a `pagination` object:

```json theme={null}
{
  "prescriptions": [
    {
      "url": "https://...",
      "scid": "ABC123",
      "status": "Active",
      "created_date": "2025-01-15T10:30:00Z",
      "prescriber": {
        "title": "Dr",
        "given_name": "Jane",
        "family_name": "Smith",
        "user_id": "8e1c9bab-6614-4723-8981-87c8fa026dae"
      },
      "item_name": "Amoxicillin 500mg capsules",
      "quantity": "20",
      "number_of_repeats_authorised": "2",
      "pbs_code": "1234A",
      "item_strength": "500mg",
      "item_form": "capsule",
      "route_administration": "oral",
      "custom_drug_details": {},
      "delivery": {
        "method": "EMAIL",
        "recipient_type": "PHARMACY",
        "destination": "scripts@bayside-pharmacy.com.au",
        "pharmacy": {
          "pharmacy_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
          "name": "Bayside Pharmacy"
        }
      }
    }
  ],
  "patient": { ... },
  "prescriber": { ... },
  "pagination": {
    "count": 20,
    "hasNext": true,
    "limit": 20,
    "offset": 0,
    "lastKey": "eyJwayI6ICJQQVRJRU5UIzIwYjA0OTM0LTJjZTUtNDYyOC1iYzZlLWVhMWNkM2I3MjllMyIsICJzayI6ICIyMDI1LTA1LTAyVDA1OjU5OjI3LjM0NFo..."
  }
}
```

<Warning>
  The top-level `prescriber` field is **deprecated**. Use `prescriptions[].prescriber` instead — each prescription carries its own prescriber, including the Parchment `user_id`. The top-level field is kept for backwards compatibility and will be removed in a future release.
</Warning>

* `count`: Number of prescriptions returned in this page.
* `hasNext`: Whether more prescriptions are available on subsequent pages.
* `limit`: Maximum number of prescriptions per page (as requested).
* `offset`: Starting position of the current page (zero-based).
* `lastKey`: The string to use as the `lastKey` query parameter for the next request. If `null`, there are no more results.


## OpenAPI

````yaml GET /v1/organizations/{organization_id}/users/{user_id}/patients/{patient_id}/prescriptions
openapi: 3.0.1
info:
  title: Parchment APIs
  description: >-
    Parchments API documentation for partner integrations, enabling secure
    e-prescription services
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.sandbox.parchmenthealth.io/external
  - url: https://api.parchmenthealth.io/external
security:
  - bearerAuth: []
paths:
  /v1/organizations/{organization_id}/users/{user_id}/patients/{patient_id}/prescriptions:
    get:
      description: Get prescriptions for a specific patient
      parameters:
        - name: x-organization-secret
          in: header
          required: true
          description: Organization secret for authentication - provided by Parchment
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: Number of prescriptions to return
          schema:
            type: integer
        - name: lastKey
          in: query
          required: false
          description: Last key to return
          schema:
            type: string
        - name: organization_id
          in: path
          required: true
          description: Organization ID
          schema:
            type: string
            format: uuid
        - name: user_id
          in: path
          required: true
          description: User ID
          schema:
            type: string
            format: uuid
        - name: patient_id
          in: path
          required: true
          description: Patient ID
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully retrieved prescriptions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientPrescriptionsExternal'
              example:
                success: true
                statusCode: 200
                message: Prescriptions retrieved successfully
                data:
                  patient:
                    given_name: John
                    family_name: Smith
                    date_of_birth: '1990-01-15T00:00:00.000Z'
                    sex: M
                    patient_id: '1234567890'
                    partner_patient_id: PARTNER#12345
                  prescriber:
                    given_name: Dr. Emily
                    family_name: Johnson
                    user_id: 8e1c9bab-6614-4723-8981-87c8fa026dae
                  prescriptions:
                    - prescription_type: ELECTRONIC
                      url: >-
                        https://egw-etp-int-qrcode-web-au-se.azurewebsites.net/scripts/2F3WFX8J4WQH8T72X9
                      scid: 2F3WFX8J4WQH8T72X9
                      status: Active
                      created_date: '2025-06-30T00:11:22'
                      item_name: Sildenafil 100 mg tablet, 4
                      quantity: '4'
                      number_of_repeats_authorised: '0'
                      repeat_intervals: '0'
                      pbs_code: ''
                      item_strength: ''
                      item_form: ''
                      route_administration: Oral
                      pbsdva_authority_number: '0'
                      phone_approval_authority_number: ''
                      schedule_number: S4
                      private_prescription: true
                      emergency_supply: false
                      brand_substitution_not_allowed: false
                      reason_for_prescribing: ''
                      patient_instructions: xcxc
                      doctor_notes: ''
                      pharmacy_name: ''
                      regulation_24: false
                      controlled_substance_reference: ''
                      unusual_dose_flag: false
                      unusual_qty_flag: false
                      my_sl_consent: true
                      send_to_pharmacy: ''
                      unlisted_item_repat_authority: false
                      prescriber_script_number: '19192'
                      custom_drug_details:
                        custom_product_id: '1234567890'
                      prescriber:
                        title: Dr
                        given_name: Emily
                        family_name: Johnson
                        user_id: 8e1c9bab-6614-4723-8981-87c8fa026dae
                      delivery:
                        method: EMAIL
                        recipient_type: PHARMACY
                        destination: scripts@bayside-pharmacy.com.au
                        pharmacy:
                          pharmacy_id: f47ac10b-58cc-4372-a567-0e02b2c3d479
                          name: Bayside Pharmacy
                    - prescription_type: ELECTRONIC
                      url: >-
                        https://egw-etp-int-qrcode-web-au-se.azurewebsites.net/scripts/2F3WFX8B8K66686MVA
                      scid: 2F3WFX8B8K66686MVA
                      status: Ceased
                      created_date: '2025-04-17T05:09:02'
                      item_name: Oxycodone hydrochloride 20 mg capsule, 20
                      quantity: '500'
                      number_of_repeats_authorised: '0'
                      repeat_intervals: '0'
                      pbs_code: 8502L
                      item_strength: ''
                      item_form: ''
                      route_administration: Oral
                      pbsdva_authority_number: '10074227'
                      phone_approval_authority_number: '1234567'
                      schedule_number: S8
                      private_prescription: false
                      emergency_supply: false
                      brand_substitution_not_allowed: false
                      reason_for_prescribing: ''
                      patient_instructions: 1x am pm
                      doctor_notes: ''
                      pharmacy_name: ''
                      regulation_24: false
                      controlled_substance_reference: ''
                      unusual_dose_flag: false
                      unusual_qty_flag: false
                      my_sl_consent: true
                      send_to_pharmacy: ''
                      unlisted_item_repat_authority: false
                      prescriber_script_number: '18631'
                      custom_drug_details: {}
                      prescriber:
                        title: Dr
                        given_name: Emily
                        family_name: Johnson
                        user_id: 8e1c9bab-6614-4723-8981-87c8fa026dae
                      delivery:
                        method: SMS
                        recipient_type: PATIENT
                        destination: '+61400000000'
                timestamp: '2024-01-15T10:30:00.000Z'
                requestId: req_1705312200000_yza567
                pagination:
                  count: 1
                  hasNext: false
                  limit: 50
                  offset: 0
                  lastKey: null
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                statusCode: 400
                error:
                  type: https://parchment.health/errors/invalid-request
                  title: Bad request
                  detail: Invalid query parameters provided.
                timestamp: '2024-01-15T10:30:00.000Z'
                requestId: req_1705312200000_bcd890
                meta:
                  apiVersion: '1.0'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                statusCode: 401
                code: UNAUTHORIZED
                error:
                  type: https://parchment.health/errors/authentication-required
                  title: Unauthorized
                  detail: Valid authentication token is required.
                timestamp: '2024-01-15T10:30:00.000Z'
                requestId: req_1705312200000_efg123
        '403':
          description: Insufficient permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                statusCode: 403
                code: FORBIDDEN
                error:
                  type: https://parchment.health/errors/insufficient-scope
                  title: Insufficient permissions
                  detail: >-
                    This operation requires the 'read:patient_prescription'
                    scope
                timestamp: '2024-01-15T10:30:00.000Z'
                requestId: req_1705312200000_hij456
        '404':
          description: Patient not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                statusCode: 404
                code: RESOURCE_NOT_FOUND
                error:
                  type: https://parchment.health/errors/patient-not-found
                  title: Patient not found
                  detail: Patient with the specified ID does not exist.
                  instance: /patients/invalid-id
                timestamp: '2024-01-15T10:30:00.000Z'
                requestId: req_1705312200000_klm789
components:
  schemas:
    PatientPrescriptionsExternal:
      allOf:
        - $ref: '#/components/schemas/ExternalApiResponse'
        - type: object
          properties:
            message:
              example: Prescriptions retrieved successfully
            data:
              $ref: '#/components/schemas/PatientPrescriptionsData'
    Error:
      $ref: '#/components/schemas/ExternalApiErrorResponse'
    ExternalApiResponse:
      type: object
      required:
        - success
        - statusCode
        - message
        - data
        - timestamp
        - requestId
      properties:
        success:
          type: boolean
          description: Indicates if the request was successful
          example: true
        statusCode:
          type: integer
          description: HTTP status code
          example: 200
        message:
          type: string
          description: Human-readable success message
          example: Success
        code:
          type: string
          description: Machine-readable operation code
          example: SUCCESS
        data:
          type: object
          description: Response payload data
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp of the response
          example: '2024-01-15T10:30:00.000Z'
        requestId:
          type: string
          description: Unique identifier for request tracing
          example: req_1705312200000_abc123
        pagination:
          type: object
          description: Pagination information for list operations
          properties:
            count:
              type: integer
              description: Number of items in current response
            hasNext:
              type: boolean
              description: Whether more items are available
            limit:
              type: integer
              description: Maximum items per page
            offset:
              type: integer
              description: Starting position of current page
            lastKey:
              type: string
              nullable: true
              description: >-
                Opaque cursor for fetching the next page. Use this value as the
                lastKey query parameter for the next request. If null, no more
                pages are available
    PatientPrescriptionsData:
      type: object
      description: Patient prescription data
      required:
        - patient
        - prescriber
        - prescriptions
      properties:
        patient:
          $ref: '#/components/schemas/Patient'
        prescriber:
          allOf:
            - $ref: '#/components/schemas/Prescriber'
          deprecated: true
          description: >-
            Deprecated. Use `prescriptions[].prescriber` instead. This field is
            kept for backwards compatibility and will be removed in a future
            release.
        prescriptions:
          type: array
          items:
            $ref: '#/components/schemas/Prescription'
    ExternalApiErrorResponse:
      type: object
      required:
        - success
        - statusCode
        - error
        - timestamp
        - requestId
      properties:
        success:
          type: boolean
          description: Indicates if the request was successful
          example: false
        statusCode:
          type: integer
          description: HTTP status code
          example: 400
        code:
          type: string
          description: Machine-readable operation code identifying the error
          example: RESOURCE_NOT_FOUND
        error:
          type: object
          description: RFC 7807 compliant error details
          required:
            - type
            - title
            - detail
          properties:
            type:
              type: string
              format: uri
              description: URI identifying the problem type
              example: https://parchment.health/errors/validation-error
            title:
              type: string
              description: Human-readable summary of the problem
              example: Validation failed
            detail:
              type: string
              description: Human-readable explanation of the problem
              example: There were some problems with your input.
            instance:
              type: string
              format: uri
              description: URI reference to the specific occurrence
              example: /patients/123
            validation:
              type: array
              description: Field-level validation errors (for 422 responses)
              items:
                type: object
                properties:
                  field:
                    type: string
                    description: Field name that failed validation
                  message:
                    type: string
                    description: Validation error message
                  code:
                    type: string
                    description: Error code for programmatic handling
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp of the response
          example: '2024-01-15T10:30:00.000Z'
        requestId:
          type: string
          description: Unique identifier for request tracing
          example: req_1705312200000_def456
        meta:
          type: object
          description: Additional response metadata
          properties:
            apiVersion:
              type: string
              description: API version used
              example: '1.0'
    Patient:
      type: object
      properties:
        given_name:
          type: string
        family_name:
          type: string
        date_of_birth:
          type: string
          format: date-time
        sex:
          type: string
        patient_id:
          type: string
        partner_patient_id:
          type: string
    Prescriber:
      type: object
      required:
        - given_name
        - family_name
        - user_id
      properties:
        title:
          type: string
          description: >-
            Prescriber's title (e.g. Dr). Present on the per-prescription
            prescriber; omitted on the deprecated top-level prescriber.
        given_name:
          type: string
        family_name:
          type: string
        user_id:
          type: string
          description: >-
            Parchment user identifier of the prescriber. Use this to map the
            prescriber to a user/provider in your system.
    Prescription:
      type: object
      properties:
        prescription_type:
          type: string
          enum:
            - ELECTRONIC
            - PAPER
          description: Type of prescription
        url:
          type: string
          format: uri
        scid:
          type: string
        status:
          type: string
          enum:
            - Active
            - Ceased
            - Cancelled
            - Error
          description: >-
            Current status of the prescription. `Error` indicates the
            prescription failed processing; see the `error` object for details.
        created_date:
          type: string
          format: date-time
        item_name:
          type: string
        quantity:
          type: string
        number_of_repeats_authorised:
          type: string
        repeat_intervals:
          type: string
        pbs_code:
          type: string
        item_strength:
          type: string
        item_form:
          type: string
        route_administration:
          type: string
        pbsdva_authority_number:
          type: string
        phone_approval_authority_number:
          type: string
        schedule_number:
          type: string
        private_prescription:
          type: boolean
        emergency_supply:
          type: boolean
        brand_substitution_not_allowed:
          type: boolean
        reason_for_prescribing:
          type: string
        patient_instructions:
          type: string
        doctor_notes:
          type: string
        pharmacy_name:
          type: string
        regulation_24:
          type: boolean
        controlled_substance_reference:
          type: string
        unusual_dose_flag:
          type: boolean
        unusual_qty_flag:
          type: boolean
        my_sl_consent:
          type: boolean
        send_to_pharmacy:
          type: string
        unlisted_item_repat_authority:
          type: boolean
        prescriber_script_number:
          type: string
        annotations:
          type: string
        prescriber:
          $ref: '#/components/schemas/Prescriber'
        delivery:
          type: object
          description: >-
            How and where this prescription's current version was electronically
            delivered. Reflects the CURRENT version only — a reissue overwrites
            it. To capture delivery history (e.g. an original send followed by
            reissues to different addresses), fetch this endpoint in response to
            each prescription webhook notification (`prescription.created`,
            `prescription.reissued`); each fetch returns the delivery state as
            at that event.
          properties:
            method:
              type: string
              enum:
                - EMAIL
                - SMS
              description: Electronic delivery channel used.
            recipient_type:
              type: string
              enum:
                - PHARMACY
                - PATIENT
              description: >-
                Whether the script was sent to a pharmacy or directly to the
                patient.
            destination:
              type: string
              description: The exact email address or phone number the script was sent to.
            pharmacy:
              type: object
              description: >-
                Identity of the selected pharmacy. Present only when
                recipient_type is PHARMACY; the address is in `destination`.
              properties:
                pharmacy_id:
                  type: string
                  description: The internal Parchment record ID of the pharmacy.
                name:
                  type: string
        custom_drug_details:
          type: object
          description: >-
            Details of a custom (non-catalogue) drug, when the prescribed item
            is a custom drug.
          properties:
            custom_product_id:
              type: string
              description: The partner-supplied custom product identifier.
        error:
          type: object
          description: Present only when `status` is `Error`; omitted otherwise.
          properties:
            description:
              type: string
              description: >-
                Human-readable description of the error that occurred during
                processing.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````