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

# Register Records Adapter

> Registers where your HIS records API lives and how to call it, for the HIP in X-Hip-Id. Each capability is one templated HTTP call with an extract map; flows chain them. The records APIs read visit_ids and fhir from the finished flow.



## OpenAPI

````yaml post /abdm/nhcx/v1/records/adapters
openapi: 3.1.0
info:
  description: ABHA Registration and login APIs
  title: Registration
  version: 1.0.0
servers:
  - description: Production
    url: https://api.eka.care
  - description: Stage/Sandbox
    url: https://api.dev.eka.care
security: []
paths:
  /abdm/nhcx/v1/records/adapters:
    post:
      summary: Register Records Adapter
      description: >-
        Registers where your HIS records API lives and how to call it, for the
        HIP in X-Hip-Id. Each capability is one templated HTTP call with an
        extract map; flows chain them. The records APIs read visit_ids and fhir
        from the finished flow.
      parameters:
        - description: Eka User ID (OID)
          in: header
          name: X-Pt-Id
          schema:
            type: string
        - description: Partner User ID
          in: header
          name: X-Partner-Pt-Id
          schema:
            type: string
        - description: Partner HIP ID
          in: header
          name: X-Hip-Id
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelsRegisterAdapterRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelsAdapterResponse'
          description: OK
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NhcxError'
          description: ''
        5XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NhcxError'
          description: ''
      security:
        - authApiKey: []
components:
  schemas:
    ModelsRegisterAdapterRequest:
      properties:
        active:
          type:
            - 'null'
            - boolean
        auth_headers:
          additionalProperties:
            type: string
          type:
            - object
            - 'null'
        base_url:
          type: string
        capabilities:
          additionalProperties:
            $ref: '#/components/schemas/ModelsCapability'
          type:
            - object
            - 'null'
        flows:
          additionalProperties:
            items:
              type: string
            type: array
          description: >-
            Chains capabilities by name. Optional: a HIP that names its
            capabilities admission_visits / visit_fhir gets that chain by
            default.
          type:
            - object
            - 'null'
        name:
          type: string
      required:
        - base_url
        - capabilities
      type: object
    ModelsAdapterResponse:
      properties:
        active:
          type: boolean
        base_url:
          type: string
        capabilities:
          additionalProperties:
            $ref: '#/components/schemas/ModelsCapability'
          type:
            - object
            - 'null'
        flows:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
        hip_id:
          type: string
        name:
          type: string
        updated_at:
          format: date-time
          type: string
      type: object
    NhcxError:
      properties:
        error:
          type: string
        issues:
          description: >-
            Every validation problem found, when the backend rejects a submit
            before it reaches the payer
          items:
            type: string
          type: array
        updated_at:
          description: 'Only on a 409 from the draft save: the stored draft''s version'
          type: string
      type: object
    ModelsCapability:
      properties:
        base_url:
          description: >-
            Overrides the adapter's BaseURL for this one capability, for a HIP
            whose records are split across services — visits on one host,
            bundles on another.
          type: string
        body:
          description: >-
            Sent as JSON when present. Placeholders inside its string values are
            substituted, so it doubles as a request template.
        extract:
          additionalProperties:
            type: string
          description: >-
            Names the variables to pull out of the response, by JSON path
            (`data.visits[*].visitid`, `id`, `$` for the whole body). Those
            variables feed the templates of later steps and the endpoint's own
            reply, which is what lets each HIP answer in its own shape.
          type: object
        for_each:
          $ref: '#/components/schemas/ModelsForEach'
          description: >-
            Fans this step out: it runs once per element of a variable an
            earlier step extracted, binding each element to a template param.
        headers:
          additionalProperties:
            type: string
          description: Sent on top of the adapter's auth headers; values are templates.
          type: object
        method:
          description: Defaults to GET when empty.
          type: string
        path:
          description: Joined onto BaseURL (the capability's own, or the adapter's).
          type: string
        query:
          additionalProperties:
            type: string
          description: Appended as the query string; values are templates.
          type: object
      type: object
    ModelsForEach:
      properties:
        from:
          description: The variable holding the list.
          type: string
        param:
          description: >-
            The template placeholder each element is bound to for that
            iteration.
          type: string
      type: object
  securitySchemes:
    authApiKey:
      description: The API requires a Bearer token (JWT) for authentication.
      scheme: bearer
      type: http

````

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