> ## 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.

# Get an allergy

> **Permission:** `allergies:read`

Get one allergy from the chart.

Only a detailed (structured) allergy has an id; an allergy that is only a name on the clinic's simple list is not fetchable by id. With `Accept: application/fhir+json` the answer is a FHIR R4 AllergyIntolerance.



## OpenAPI

````yaml /openapi/ehr-api.v1.yaml get /v1/clinics/{clinic_id}/allergies/{allergy_id}
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
security:
  - ApiKey: []
paths:
  /v1/clinics/{clinic_id}/allergies/{allergy_id}:
    get:
      tags:
        - Allergies
      summary: Get an allergy
      description: >-
        **Permission:** `allergies:read`


        Get one allergy from the chart.


        Only a detailed (structured) allergy has an id; an allergy that is only
        a name on the clinic's simple list is not fetchable by id. With `Accept:
        application/fhir+json` the answer is a FHIR R4 AllergyIntolerance.
      operationId: getAllergy
      parameters:
        - name: clinic_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: allergy_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/Allergy'
        '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:
    Allergy:
      type: object
      description: >-
        An allergy or intolerance - the exposed-field allow-list, field by
        field. `review_status` says where the record stands: `confirmed` is on
        the clinic's chart (clinic truth); `pending` is an outside submission
        still waiting for a clinician (`verification_status: unconfirmed`);
        `rejected` and `withdrawn` are this key's own submissions that did not
        become chart truth. `entry` is `structured` for a detailed allergy
        record and `legacy_text` for an allergy that is only a name on the
        clinic's simple allergy list: it has `id: null`, no detail, and cannot
        be fetched or changed by id. An empty list does NOT mean "no known
        allergies".
      required:
        - id
        - patient_id
        - entry
        - substance
        - verification_status
        - review_status
      properties:
        id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            The allergy record's id once confirmed; null for a pending
            submission (use `submission_id`) and for a `legacy_text` entry.
        patient_id:
          type: string
          format: uuid
        entry:
          type: string
          enum:
            - structured
            - legacy_text
            - no_known_allergies
          description: >-
            `no_known_allergies` is a record saying the patient has no known
            allergies; its substance text is `No known allergies`. A clinician
            confirms it like any other allergy record.
        substance:
          $ref: '#/components/schemas/AllergySubstance'
        category:
          type: array
          items:
            type: string
            enum:
              - food
              - medication
              - environment
              - biologic
        criticality:
          type:
            - string
            - 'null'
          enum:
            - low
            - high
            - unable_to_assess
            - null
        type:
          type:
            - string
            - 'null'
          enum:
            - allergy
            - intolerance
            - null
        clinical_status:
          type:
            - string
            - 'null'
          enum:
            - active
            - inactive
            - resolved
            - entered_in_error
            - null
        verification_status:
          type: string
          enum:
            - confirmed
            - unconfirmed
            - refuted
            - entered_in_error
        reactions:
          type: array
          items:
            $ref: '#/components/schemas/AllergyReaction'
        onset_date:
          type:
            - string
            - 'null'
          format: date
        note:
          type:
            - string
            - 'null'
        recorded_by:
          type:
            - string
            - 'null'
          format: uuid
          description: clinic_staff.id of the clinician who recorded or confirmed it.
        source:
          type: string
          enum:
            - clinic
            - api
        origin_assistant_name:
          type:
            - string
            - 'null'
        accepted_by:
          type:
            - string
            - 'null'
          enum:
            - clinic
            - automatic
            - null
          description: >-
            Who put this record on the chart: `clinic` (the clinic's own team,
            or a clinician who confirmed it) or `automatic` (the clinic chose to
            accept this kind of item from this key or connection without review;
            the record is on the chart but no clinician has reviewed it, so
            `verification_status` reads `unconfirmed` until one does). Null
            while the item is still a pending submission.
        reviewed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Set when a clinician marked an automatically accepted item reviewed;
            null otherwise.
        reviewed_by_staff_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            clinic_staff.id of the clinician who marked an automatically
            accepted item reviewed; null otherwise.
        review_status:
          type: string
          enum:
            - confirmed
            - pending
            - rejected
            - withdrawn
        submission_id:
          type:
            - string
            - 'null'
          format: uuid
        decision_reason:
          type:
            - string
            - 'null'
          description: >-
            Why a clinician rejected it. Present only when `review_status` is
            `rejected`.
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
    AllergySubstance:
      type: object
      required:
        - text
      properties:
        text:
          type: string
        code:
          oneOf:
            - $ref: '#/components/schemas/AllergySubstanceCode'
            - type: 'null'
    AllergyReaction:
      type: object
      additionalProperties: false
      description: >-
        One reaction. `manifestation` lists what happened, in the clinic's or
        sender's own words.
      required:
        - manifestation
      properties:
        manifestation:
          type: array
          minItems: 1
          maxItems: 10
          items:
            type: string
            maxLength: 100
        severity:
          type:
            - string
            - 'null'
          enum:
            - mild
            - moderate
            - severe
            - null
        description:
          type:
            - string
            - 'null'
          maxLength: 500
    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
    AllergySubstanceCode:
      type: object
      description: >-
        A coded substance. `system` is `rxnorm`, `snomed-ct` or `local` (a
        clinic's own code, never mapped to an HL7 system). An `rxnorm` code is
        accepted only when it is a verified RxNorm code the platform recognises;
        `display` is the platform's own term for a verified RxNorm code and is
        never taken from the sender.
      required:
        - system
        - code
      properties:
        system:
          type: string
          enum:
            - rxnorm
            - snomed-ct
            - local
        code:
          type: string
        display:
          type:
            - string
            - 'null'
  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.