Prescrypto Hospitals API

Hospital / clinic records.

Documentation

Specifications

Other Resources

OpenAPI Specification

prescrypto-hospitals-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Prescrypto Integration Hospitals 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: Hospitals
  description: Hospital / clinic records.
paths:
  /api/v2/hospital/:
    get:
      operationId: listHospitals
      tags:
      - Hospitals
      summary: List hospitals
      responses:
        '200':
          description: List of hospitals
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Hospital'
    post:
      operationId: createHospital
      tags:
      - Hospitals
      summary: Create a hospital
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Hospital'
      responses:
        '201':
          description: Hospital created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Hospital'
        '400':
          $ref: '#/components/responses/BadRequest'
  /api/v2/hospital/{hospital_id}/:
    parameters:
    - name: hospital_id
      in: path
      required: true
      schema:
        type: integer
    get:
      operationId: getHospital
      tags:
      - Hospitals
      summary: Get hospital details
      responses:
        '200':
          description: Hospital detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Hospital'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: updateHospital
      tags:
      - Hospitals
      summary: Update hospital fields (including logos)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Hospital'
      responses:
        '200':
          description: Hospital updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Hospital'
components:
  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'
  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
    Hospital:
      type: object
      properties:
        id:
          type: integer
        patron:
          type: string
          description: Hospital / clinic name.
        location:
          type: string
  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>.'