DoseSpot Medication History API

The MedicationHistory API from DoseSpot — 2 operation(s) for medicationhistory.

GitHub OpenAPI
Business capability
Medication Administration & Reconciliation BC-2850.40

Operations 2

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /api/patients/{patientId}/medications/history Get a patient's medication history · Get patient's medication history #
Ask an LLM
“What medications has a patient filled over the last year?”
“Can I pull a patient's pharmacy claims history for a specific date range?”
Tell an agent
Get the medication history for patient {patientId}.
Show patient {patientId}'s medication history from {start} to {end}.
POST /api/patients/{patientId}/medications/history/consent Log a patient's medication history consent · Log patient's medication history consent #
Ask an LLM
“How do I record a patient's consent to view their medication history?”
“What do I need to log before I can pull a patient's pharmacy claims?”
Tell an agent
Log consent for patient {patientId} to view medication history.
Record that patient {patientId} gave consent for medication history access.

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/dosespot:dosespot-medicationhistory-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

dosespot-medicationhistory-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: Full_EPCSV2
  title: 'DoseSpot REST API - Plan: Full + EPCS - V2 Medication…'
servers:
- url: https://virtserver.swaggerhub.com/DoseSpot/dosespot-staging-rest-api-v2/Full_EPCSV2
tags:
- name: MedicationHistory
paths:
  /api/patients/{patientId}/medications/history:
    get:
      tags:
      - MedicationHistory
      summary: Get patient's medication history
      description: "Retrieves a patientâ\x80\x99s medication history according to PBM insurance claims submitted to the Surescripts\nePrescribing network. A date range may be specified. A patient must give consent to retrieve this data."
      operationId: MedicationHistory_GetMedicationHistoryV2
      parameters:
      - name: patientId
        in: path
        description: Patient ID
        required: true
        schema:
          type: integer
          format: int32
      - name: start
        in: query
        required: false
        schema:
          type: string
          format: date-time
      - name: end
        in: query
        required: false
        schema:
          type: string
          format: date-time
      - name: pageNumber
        in: query
        required: false
        schema:
          type: integer
          format: int32
          maximum: 2147483645
          minimum: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedListResponse_SureScriptsHistoryMedication'
            text/json:
              schema:
                $ref: '#/components/schemas/PagedListResponse_SureScriptsHistoryMedication'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PagedListResponse_SureScriptsHistoryMedication'
            application/xml:
              schema:
                $ref: '#/components/schemas/PagedListResponse_SureScriptsHistoryMedication'
            text/xml:
              schema:
                $ref: '#/components/schemas/PagedListResponse_SureScriptsHistoryMedication'
  /api/patients/{patientId}/medications/history/consent:
    post:
      tags:
      - MedicationHistory
      summary: Log patient's medication history consent
      description: "Logs a patientâ\x80\x99s consent for their clinician to retrieve and view their medication history"
      operationId: MedicationHistory_LogPatientMedicationHistoryConsentV2
      parameters:
      - name: patientId
        in: path
        description: Patient ID
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemResponse_DateTime'
            text/json:
              schema:
                $ref: '#/components/schemas/ItemResponse_DateTime'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ItemResponse_DateTime'
            application/xml:
              schema:
                $ref: '#/components/schemas/ItemResponse_DateTime'
            text/xml:
              schema:
                $ref: '#/components/schemas/ItemResponse_DateTime'
components:
  schemas:
    ItemResponse_DateTime:
      type: object
      properties:
        Item:
          type: string
          format: date-time
          description: The response object.
        Result:
          description: The result of the operation.
          $ref: '#/components/schemas/Result'
      description: Represents a generic response containing a single object.
    PagedListResponse_SureScriptsHistoryMedication:
      type: object
      properties:
        Items:
          type: array
          description: The list of elements to return.
          readOnly: true
          items:
            $ref: '#/components/schemas/SureScriptsHistoryMedication'
        PageResult:
          $ref: '#/components/schemas/PageResult'
        Result:
          description: The result of the operation.
          $ref: '#/components/schemas/Result'
    Result:
      type: object
      required:
      - ResultCode
      properties:
        ResultCode:
          type: string
          description: The result code of the operation.
        ResultDescription:
          type: string
          description: A description of the result, if there were errors.
      description: Represents the result of a service operation.
    SureScriptsHistoryMedication:
      type: object
      properties:
        PatientMedicationHistoryId:
          type: integer
          format: int64
        PharmacyNotes:
          type: string
        NoSubstitutions:
          type: boolean
        EffectiveDate:
          type: string
          format: date-time
        LastFillDate:
          type: string
          format: date-time
        Payer:
          type: string
        DaysSupply:
          type: integer
          format: int32
        Directions:
          type: string
        DispenseUnitDescription:
          type: string
        DispenseUnitId:
          type: integer
          format: int32
        Quantity:
          type: string
        Refills:
          type: string
        WrittenDate:
          type: string
          format: date-time
        DiagnosisCode:
          type: string
        DiagnosisQualifier:
          type: string
        DoseForm:
          type: string
        Route:
          type: string
        Strength:
          type: string
        GenericDrugName:
          type: string
        DispensableDrugId:
          type: integer
          format: int32
        Brand:
          type: boolean
        RxCUI:
          type: string
        OTC:
          type: boolean
        NDC:
          type: string
        Schedule:
          type: integer
          format: int32
        DisplayName:
          type: string
        DrugClassification:
          type: string
        ExpirationDate:
          type: string
          format: date-time
    PageResult:
      type: object
      properties:
        CurrentPage:
          type: integer
          format: int32
        TotalPages:
          type: integer
          format: int32
        PageSize:
          type: integer
          format: int32
        TotalCount:
          type: integer
          format: int32
        HasPrevious:
          type: boolean
          readOnly: true
        HasNext:
          type: boolean
          readOnly: true