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

# The clinic's catalogue.

> For a workspace TEST key this reads the workspace's seeded synthetic sandbox catalogue, never a real clinic's — same shape either way.



## OpenAPI

````yaml /openapi/ehr-api.v1.yaml get /v1/clinics/{clinic_id}/inventory/items
openapi: 3.1.0
info:
  title: ClinikEHR API
  version: 1.0.0
  description: >-
    Server-to-server REST API for a clinic's own data, reached with a key the
    clinic (or a developer workspace) creates in the developer portal.


    Authenticate every request with `Authorization: Bearer <key>`. Test keys
    reach only your workspace's own synthetic sandbox; live keys reach the
    clinic that created them. Lists wrap their rows as `{ data, has_more,
    next_cursor }`; single resources are returned directly. Errors are
    `application/problem+json` (RFC 9457) with a stable `code`.


    Write requests accept an `Idempotency-Key` header so a retry never repeats a
    change. See the guides for authentication, permissions, pagination, rate
    limits and retries.
servers:
  - url: https://api.clinikehr.com/v1
security:
  - ApiKey: []
paths:
  /v1/clinics/{clinic_id}/inventory/items:
    get:
      tags:
        - Inventory
      summary: The clinic's catalogue.
      description: >-
        For a workspace TEST key this reads the workspace's seeded synthetic
        sandbox catalogue, never a real clinic's — same shape either way.
      operationId: listInventoryItems
      parameters:
        - name: clinic_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: q
          in: query
          required: false
          description: >-
            Free-text name match. Labelled as a text match, never as
            equivalence.
          schema:
            type: string
        - name: barcode
          in: query
          required: false
          schema:
            type: string
        - name: category
          in: query
          required: false
          schema:
            type: string
        - name: updated_since
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - has_more
                  - next_cursor
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/InventoryItem'
                  has_more:
                    type: boolean
                  next_cursor:
                    type:
                      - string
                      - 'null'
              example:
                data:
                  - id: 9c1e6f2a-9b2b-4a36-8f6a-2f7b1e8b9a02
                    name: Paracetamol 500mg Tablets
                    generic_name: paracetamol
                    brand_name: Panadol
                    strength: 500mg
                    dosage_form: tablet
                    category: analgesic
                    item_type: medication
                    unit_of_measure: tablet
                    is_active: true
                    identifiers:
                      - system: gtin
                        value: '6001234567890'
                    retail_price:
                      amount: '12.50'
                      currency: NGN
                    updated_at: '2026-09-20T10:00:00.000Z'
                has_more: false
                next_cursor: null
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - ApiKey: []
components:
  schemas:
    InventoryItem:
      type: object
      required:
        - id
        - name
        - is_active
        - identifiers
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        generic_name:
          type:
            - string
            - 'null'
        brand_name:
          type:
            - string
            - 'null'
        strength:
          type:
            - string
            - 'null'
        dosage_form:
          type:
            - string
            - 'null'
        category:
          type:
            - string
            - 'null'
        item_type:
          type:
            - string
            - 'null'
        unit_of_measure:
          type:
            - string
            - 'null'
        is_active:
          type: boolean
        identifiers:
          type: array
          items:
            $ref: '#/components/schemas/Identifier'
        retail_price:
          oneOf:
            - $ref: '#/components/schemas/Money'
            - type: 'null'
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
    Identifier:
      type: object
      required:
        - system
        - value
      properties:
        system:
          type: string
          enum:
            - gtin
            - nafdac
            - ndc
            - rxcui
            - partner
        value:
          type: string
    Money:
      type: object
      required:
        - amount
        - currency
      properties:
        amount:
          type: string
          description: Decimal string.
        currency:
          type: string
          description: ISO 4217 code, from clinic_settings.currency.
    Problem:
      type: object
      description: RFC 9457 application/problem+json.
      required:
        - type
        - title
        - status
        - code
        - request_id
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        code:
          type: string
        request_id:
          type: string
        errors:
          type: array
          items:
            type: object
            required:
              - pointer
              - message
            properties:
              pointer:
                type: string
              message:
                type: string
  responses:
    BadRequest:
      description: >-
        The request failed validation (unknown query parameter, limit out of
        range, malformed body).
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Unauthorized:
      description: >-
        Missing, malformed, unknown, revoked or expired key, or the wrong
        secret.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Forbidden:
      description: >-
        The key or connection lacks the required scope, the plan does not
        include this resource, the request came from an address this key's IP
        allow-list does not permit, a TEST-environment workspace key asked for a
        clinic_id other than its own workspace's sandbox (`sandbox_only`), or a
        LIVE workspace key asked for a real clinic while its workspace's
        verification has lapsed (`not_verified`) — the response never names
        which addresses ARE allowed, nor which clinic actually is the sandbox.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    NotFound:
      description: The record is absent, or out of the key's scope — one message for both.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    TooManyRequests:
      description: Rate limited. See the Retry-After header.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: ehr_live_<keyId>_<secret> or ehr_test_<keyId>_<secret>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.