> ## Documentation Index
> Fetch the complete documentation index at: https://ekacare-mintlify-697c363f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Push care context data to HIU

> Use this API to push encrypted FHIR data to the HIU after receiving the [`abha.hip_data_fetch`](/api-reference/user-app/abdm-connect/webhooks/hip-data-fetch) webhook.

The HIP is responsible for preparing ABDM-compliant FHIR bundles, encrypting them using the key information received in the webhook, and pushing the data through this API. Use the `transaction_id` from the webhook payload to correlate the request.

This API is only needed if you are **not** storing health data on Eka servers.




## OpenAPI

````yaml POST /abdm/v1/hip/care-context/data/on-fetch
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/v1/hip/care-context/data/on-fetch:
    post:
      description: API for HIP to push care context FHIR data to HIU
      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/RecordsHipDataPushRequest'
      responses:
        '202':
          description: Accepted
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
          description: ''
        5XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
          description: ''
      security:
        - authApiKey: []
components:
  schemas:
    RecordsHipDataPushRequest:
      properties:
        entries:
          items:
            $ref: '#/components/schemas/RecordsEntry'
          type:
            - array
            - 'null'
        key_information:
          $ref: '#/components/schemas/RecordsKeyMaterial'
        page_count:
          type: integer
        page_number:
          type: integer
        transaction_id:
          type: string
      type: object
    GenericError:
      properties:
        code:
          type: integer
        error:
          type: string
        source_error:
          $ref: '#/components/schemas/SourceErr'
      type: object
    RecordsEntry:
      properties:
        care_context_id:
          type: string
        checksum:
          description: Checksum of the non encrypted plain text fhir data
          type: string
        content:
          description: Encrypted content
          type: string
        media:
          enum:
            - application/fhir+json
          type: string
      type: object
    RecordsKeyMaterial:
      properties:
        crypto_alg:
          type: string
        curve:
          type: string
        dh_public_key:
          $ref: '#/components/schemas/RecordsDHPubKey'
        nonce:
          type: string
      type: object
    SourceErr:
      properties:
        code:
          type: string
        message:
          type: string
      type: object
    RecordsDHPubKey:
      properties:
        expiry:
          type: string
        key_value:
          type: string
        parameters:
          type: string
      type: object
  securitySchemes:
    authApiKey:
      description: The API requires a Bearer token (JWT) for authentication.
      scheme: bearer
      type: http

````