Prescrypto Patients API

Patient records.

OpenAPI Specification

prescrypto-patients-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Prescrypto Integration Hospitals Patients API
  version: '2.0'
  description: 'REST API for the Prescrypto electronic-prescription (eRx) platform used across Mexico and LATAM. It lets integrated systems (EHRs, hospital software, telemedicine apps and pharmacies) manage medics, hospitals, patients and prescriptions, generate legally-valid electronic prescriptions (verified against NOM-151-SCFI-2016 via the RexChain blockchain notary), download prescription PDFs, and let pharmacies search and dispense (burn) prescribed medications. All responses are JSON. Authentication uses HTTP Token auth (Authorization: Token <key>); keys are issued through direct communication with Prescrypto.'
  contact:
    name: Prescrypto
    url: https://www.prescrypto.com/contact/
  x-apis-json-provenance:
    generated: '2026-07-20'
    method: generated
    source: github.com/wilsotobianco/prescrypto-docs (official Prescrypto API docs) + Prescrypto_Integration_Endpoints_V2 Postman collection (s3-us-west-2.amazonaws.com/precript-collections)
servers:
- url: https://integration.prescrypto.com
  description: Production integration API (documented base URL)
security:
- TokenAuth: []
tags:
- name: Patients
  description: Patient records.
paths:
  /api/v2/patient/:
    get:
      operationId: listPatients
      tags:
      - Patients
      summary: List / search patients
      description: List patients. Searchable by email, name and CURP via search, or by an external integration id via external_patient_file.
      parameters:
      - name: search
        in: query
        schema:
          type: string
        description: Search on email
        name and CURP fields.: null
      - name: external_patient_file
        in: query
        schema:
          type: string
        description: Filter by an external integration's patient file id.
      - $ref: '#/components/parameters/Limit'
      - $ref: '#/components/parameters/Offset'
      responses:
        '200':
          description: List of patients
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Patient'
    post:
      operationId: createPatient
      tags:
      - Patients
      summary: Create a patient
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Patient'
      responses:
        '201':
          description: Patient created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Patient'
        '400':
          $ref: '#/components/responses/BadRequest'
  /api/v2/patient/{patient_uid}/:
    parameters:
    - name: patient_uid
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: getPatient
      tags:
      - Patients
      summary: Get patient details
      responses:
        '200':
          description: Patient detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Patient'
        '404':
          $ref: '#/components/responses/NotFound'
  /api/v2/patient/update/:
    patch:
      operationId: updatePatient
      tags:
      - Patients
      summary: Update a patient
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Patient'
      responses:
        '200':
          description: Patient updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Patient'
components:
  schemas:
    SimpleError:
      type: object
      description: Prescrypto error envelope. Errors carry either an "error" or a "message" field.
      properties:
        error:
          type: string
        message:
          type: string
        status:
          type: string
    Patient:
      type: object
      properties:
        uid:
          type: string
        name:
          type: string
        email:
          type: string
        phone:
          type: string
        date_of_birth:
          type: string
          format: date
        gender:
          type: string
  responses:
    BadRequest:
      description: Bad request — malformed or missing required parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SimpleError'
    NotFound:
      description: The requested resource could not be found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SimpleError'
  parameters:
    Limit:
      name: limit
      in: query
      schema:
        type: integer
      description: Number of results to return per page.
    Offset:
      name: offset
      in: query
      schema:
        type: integer
      description: The initial index from which to return results.
  securitySchemes:
    TokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'HTTP Token auth. Send: Authorization: Token <your-key>. Keys are issued by Prescrypto via direct communication.'
    JWTAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'JWT auth for the standard-drug (products) endpoint. Send: Authorization: JWT <token>.'