Prescrypto Products API

Standard-drug catalog search (separate JWT-authenticated endpoint).

OpenAPI Specification

prescrypto-products-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Prescrypto Integration Hospitals Products 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: Products
  description: Standard-drug catalog search (separate JWT-authenticated endpoint).
paths:
  /api/v2/standarddrug:
    get:
      operationId: searchStandardDrug
      tags:
      - Products
      summary: Search the standard-drug catalog
      description: Search the catalog of ~25,000 standard drugs (autocomplete). This endpoint lives on a separate host (SD_ENDPOINT) and requires a JWT token; both are provisioned by Prescrypto via email. Returns up to 5 results per page.
      security:
      - JWTAuth: []
      parameters:
      - name: query_string
        in: query
        required: true
        schema:
          type: string
        description: Medication search string.
      - name: page
        in: query
        schema:
          type: integer
        description: Result page.
      responses:
        '200':
          description: List of matching drugs
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StandardDrug'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Authentication failed or invalid token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SimpleError'
  schemas:
    StandardDrug:
      type: object
      properties:
        uid:
          type: string
        package_desc:
          type: string
        description:
          type: string
        molecule:
          type: string
        brand:
          type: string
        measure_units:
          type: string
        retail_price:
          type: string
        image_url:
          type: string
        order_id:
          type: integer
    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
  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>.'