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

# Get the latest event of a kind

> Returns the newest event of the given `kind` (optionally only those whose `to` matches), or `event: null` when there is none.



## OpenAPI

````yaml api-reference/doc-tool/ipd-api/ipd-sdk-openapi.json get /ipd/v1/sdk/admissions/{admission_id}/events/latest
openapi: 3.1.0
info:
  title: Eka IPD Admission API
  version: '1.0'
servers:
  - description: Production
    url: https://api.eka.care
  - description: Stage/Sandbox
    url: https://api.dev.eka.care
security: []
paths:
  /ipd/v1/sdk/admissions/{admission_id}/events/latest:
    get:
      tags:
        - IPD API
      summary: Get the latest event of a kind
      description: >-
        Returns the newest event of the given `kind` (optionally only those
        whose `to` matches), or `event: null` when there is none.
      operationId: IpdSdkGetTheLatestEventOfAKind
      parameters:
        - name: auth
          in: header
          required: true
          schema:
            type: string
          example: >-
            eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJiX2lkIjoiMTIzNDU2IiwiY2xpZW50X2lkIjoiNzg5MCIsImV4dHJhX2ZpZWxkIjoiZXh0cmFfZmllbGRfZGF0YSJ9.q9KzBI6f4l3OyM_EkB5Quq0l9EEMFh5JS-fx3F_PHUM
        - schema:
            minLength: 1
            type: string
          in: query
          name: kind
          required: true
          description: Event kind to match.
        - schema:
            type: string
          in: query
          name: to
          required: false
          description: Only events whose `to` equals this.
        - schema:
            minLength: 1
            type: string
          in: path
          name: admission_id
          required: true
          description: Id of the IPD admission.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - event
                properties:
                  event:
                    anyOf:
                      - additionalProperties: true
                        type: object
                        required:
                          - id
                          - at
                          - kind
                        properties:
                          id:
                            type: string
                          at:
                            description: When the event happened (ISO date-time).
                            type: string
                          kind:
                            description: >-
                              Event kind, for example `STATUS_CHANGE` or
                              `CLEARANCE`.
                            type: string
                          by:
                            description: Who acted.
                            anyOf:
                              - description: >-
                                  Actor recorded on the change; defaults to the
                                  authenticated operator.
                                additionalProperties: true
                                type: object
                                required:
                                  - id
                                properties:
                                  id:
                                    minLength: 1
                                    type: string
                                  name:
                                    type: string
                                  role:
                                    type: string
                              - type: string
                          from:
                            anyOf:
                              - type: string
                              - type: 'null'
                          to:
                            type: string
                          meta:
                            additionalProperties: true
                            description: Kind-specific details.
                            type: object
                            properties: {}
                          notes:
                            type: string
                          clearance_type:
                            type: string
                          note:
                            type: string
                      - type: 'null'
        '400':
          description: Bad Request — the request failed validation or was rejected.
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
        '404':
          description: >-
            Not Found — the admission (or the addressed record) does not exist
            in your workspace.
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string

````

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