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

# Get a prescription

> Retrieve an individual medication prescription by ID.



## OpenAPI

````yaml /openapi-public.yml get /api/v1/prescriptions/{prescription_id}
openapi: 3.0.3
info:
  title: Blend API
  version: 1.0.0
  description: API for Blend
servers:
  - url: https://api.byblend.com
    description: Blend production server
security:
  - bearerAuth: []
tags:
  - name: Orders
    description: Order management endpoints
  - name: Patients
    description: Patient management endpoints
  - name: Reports
    description: Reporting endpoints
  - name: Products and Materials
    description: Product catalog and inventory endpoints
  - name: Electronic Prescriptions
    description: Electronic prescription management endpoints
  - name: Prescriptions
    description: Prescription management endpoints
  - name: Authentication
    description: Authentication endpoints
  - name: Notifications
    description: User management endpoints
  - name: Prescribers
paths:
  /api/v1/prescriptions/{prescription_id}:
    get:
      tags:
        - Prescriptions
      summary: Get a prescription
      description: Retrieve an individual medication prescription by ID.
      parameters:
        - name: prescription_id
          in: path
          required: true
          description: >-
            Unique identifier for the prescription (UUID). You may also send the
            prescription's serial number (integer) instead of the UUID.
          schema:
            type: string
            format: uuid
            example: 5c6b8e2f-7e3c-4f2d-8a1b-9c7d5e4f3g2h
        - name: refill_risk
          in: query
          required: false
          description: >
            If `true`, include a nested `refill_risk` assessment (prescriber
            license coverage

            vs predicted next fill). Omitted from the response when this
            parameter is absent

            or false.
          schema:
            type: boolean
            example: true
      responses:
        '200':
          description: Successful response with prescription
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Prescription'
components:
  schemas:
    Prescription:
      allOf:
        - $ref: '#/components/schemas/ID'
        - type: object
          properties:
            customer_id:
              type: string
              description: >-
                Once identified, Blend ID of the customer associated with the
                patient
              format: uuid
              example: b658f16f-819c-4503-aede-bd555fc4ebfb
            electronic_prescription_id:
              type: string
              format: uuid
              example: b658f16f-819c-4503-aede-bd555fc4ebfb
              description: Blend ID of the containing electronic prescription
            refill_risk:
              allOf:
                - $ref: '#/components/schemas/PrescriptionRefillRisk'
              description: >
                Included only when `refill_risk=true` is passed on get
                prescription

                or get prescriptions. Omitted from the response otherwise.
        - $ref: '#/components/schemas/PrescriptionCreateUpdate'
    ID:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier
          example: 0227d1e5-ba9a-42b5-8fe2-38882aa65708
    PrescriptionRefillRisk:
      type: object
      description: |
        Prescriber license vs predicted next-fill risk assessment.
        Present only when the request includes `refill_risk=true`.
      properties:
        applicable:
          type: boolean
          description: Whether refill-risk assessment applies to this prescription
          example: true
        not_applicable_reason:
          type: string
          nullable: true
          description: >
            When `applicable` is false, why assessment was skipped

            (e.g. `cancelled`, `rx_expired`, `no_fills_remaining`,
            `no_prescriber`,

            `no_relevant_states`).
          example: null
        at_risk:
          type: boolean
          description: >-
            True when the covering license is missing today or expires before
            the predicted next fill
          example: true
        reasons:
          type: array
          description: Risk reason codes when `at_risk` is true
          items:
            type: string
            enum:
              - prescriber_unlicensed
              - prescriber_license_expiring
          example:
            - prescriber_license_expiring
        relevant_states:
          type: array
          description: Patient/eRx state codes used for license coverage checks
          items:
            type: string
          example:
            - CA
        predicted_next_fill_date:
          type: string
          format: date
          nullable: true
          description: Predicted earliest next fill date used for license expiry comparison
          example: '2026-08-15'
        last_fill_date:
          type: string
          format: date
          nullable: true
          description: Date of the most recent fill on this prescription, if any
          example: '2026-05-20'
        days_supply_used:
          type: integer
          nullable: true
          description: >-
            Days supply used for next-fill prediction (dispensed preferred, else
            Rx days_supply)
          example: 90
        dispensed_days_supply:
          type: integer
          nullable: true
          description: Dispensed days supply from the most recent fill, if present
          example: 90
        is_controlled:
          type: boolean
          nullable: true
          description: >-
            Whether the prescription is treated as controlled for this
            assessment
          example: false
        covering_licenses:
          type: array
          description: >-
            Active covering licenses (or relevant active licenses when currently
            unlicensed)
          items:
            $ref: '#/components/schemas/PrescriptionRefillRiskCoveringLicense'
        earliest_covering_expiration:
          type: string
          format: date
          nullable: true
          description: Earliest expiration among licenses that cover today
          example: '2026-07-01'
        days_until_next_fill:
          type: integer
          nullable: true
          description: Days from today until `predicted_next_fill_date`
          example: 26
        days_until_license_expiry:
          type: integer
          nullable: true
          description: Days from today until `earliest_covering_expiration`
          example: 10
    PrescriptionCreateUpdate:
      allOf:
        - $ref: '#/components/schemas/ID'
        - type: object
          properties:
            patient_id:
              type: string
              description: Once identified, Blend ID of the patient
            prescriber_id:
              type: string
              description: Once identified, Blend ID of the prescriber
            prescription_product_id:
              type: string
              description: Once identified, Blend ID of the prescription product
            days_supply:
              type: number
              description: Days supply of the prescription product
              example: 30
            description:
              type: string
              description: >-
                Description of the prescription product as imported directly
                from electronic prescription XML
            directions:
              type: string
              description: Parsed sig
            drug_name:
              type: string
              description: Name of the drug as provided in the electronic prescription XML
            expires_at:
              type: string
              format: date
              description: Date the prescription expires
              example: '2026-04-25T00:00:00'
            fills_remaining:
              type: number
              description: >-
                Total number of fills remaining. Upon initial receipt, this will
                include initial fill quantity plus any refills.
              example: 3
            transfer_fills:
              type: number
              description: Number of fills completed before transfer
              example: 0
            name:
              type: string
              description: >-
                Name of the Blend prescription product as imported from the
                assciated prescription_product
              example: Topical Rapamycin
            notes:
              type: string
              description: Notes as imported directly from electronic prescription XML
              example: Please dispense 30 days supply
            product_code:
              type: string
              description: >-
                Product code of the prescription product as imported directly
                from electronic prescription XML
            product_code_type:
              type: string
              description: >-
                Type of product code as imported directly from electronic
                prescription XML
            quantity:
              type: number
              description: Quantity of the prescription product to dispense
              example: 30
            refills:
              type: number
              description: Number of refills as ordered by the prescriber
              example: 2
            serial_number:
              type: string
              description: Blend-generated serial number of the prescription product
              example: '100721'
            sig:
              type: string
              description: >-
                Original sig as imported directly from electronic prescription
                XML
            status:
              type: string
              description: Status of the prescription in Blend workflow
              example: new
            strength:
              type: string
              description: >-
                Strength of the prescription product as imported directly from
                electronic prescription XML
            substitution_allowed:
              type: boolean
              description: Whether the prescription product can be substituted
              example: true
            units:
              type: string
              description: >-
                Units of measure; adheres to NCPDP QuantityUnitOfMeasure
                terminology code
              example: C48480
            written_at:
              type: string
              format: date-time
              description: Date and time the prescription was written
              example: '2025-04-25T00:00:00'
    PrescriptionRefillRiskCoveringLicense:
      type: object
      description: Prescriber state license considered for refill-risk assessment.
      properties:
        state:
          type: string
          description: Two-letter state code
          example: CA
        license_number:
          type: string
          description: License number
          example: A12345
        expiration_date:
          type: string
          format: date
          nullable: true
          description: License expiration date, or null if it does not expire
          example: '2027-06-30'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````