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

# Bulk Records Request

> <Note>
This endpoint is idempotent. If a request with the same `org_connection_id` has already been registered, it will return the existing request.
</Note>

This endpoint will register an bulk medical record export request with the Fasten Connect API for the provided `org_connection_id` (Patient id)

This functionality is similar in design to the HL7 [EHI Export](https://build.fhir.org/ig/argonautproject/ehi-api/ehi-export.html) specification.
However it is designed to be a unified API for all EHRs, as many EHRs do not support the HL7 EHI Export specification.

<Warning>
This endpoint requires an API public id & private key for authentication. Do not expose these keys in the browser.
</Warning>

This task will run asynchronously and may take some time to complete. 
You can check the status of the task using the [Get Request Status](/api-reference/ehi_export/get) endpoint.

On completion a webhook will be sent to your `webhook_url` with metadata about the task, and a `download_link` to download the results.




## OpenAPI

````yaml POST /bridge/fhir/ehi-export
openapi: 3.0.1
info:
  title: Fasten Connect
  description: >-
    Useful links:

    - [Fasten Connect API
    repository](https://github.com/fastenhealth/fasten-connect-api)

    - [Fasten Connect Developer
    Portal](https://github.com/fastenhealth/fasten-connect-app)
  termsOfService: https://www.fastenhealth.com/
  contact:
    email: connect@fastenhealth.com
  license:
    name: Private
  version: 1.0.11
servers:
  - url: https://api.connect.fastenhealth.com/v1/
    description: Use this server for both live and test mode.
security: []
tags:
  - name: auth
    description: Portal Authentication & Signup
  - name: user
    description: Operations about user
  - name: org
    description: Operations about organization
  - name: bridge
    description: Customer (organization) facing APIs
  - name: catalog
    description: Catalog APIs
externalDocs:
  description: Find out more about Fasten Connect
  url: https://www.fastenhealth.com/
paths:
  /bridge/fhir/ehi-export:
    post:
      tags:
        - bridge
      summary: Register EHI Export request
      description: >
        <Note>

        This endpoint is idempotent. If a request with the same
        `org_connection_id` has already been registered, it will return the
        existing request.

        </Note>


        This endpoint will register an bulk medical record export request with
        the Fasten Connect API for the provided `org_connection_id` (Patient id)


        This functionality is similar in design to the HL7 [EHI
        Export](https://build.fhir.org/ig/argonautproject/ehi-api/ehi-export.html)
        specification.

        However it is designed to be a unified API for all EHRs, as many EHRs do
        not support the HL7 EHI Export specification.


        <Warning>

        This endpoint requires an API public id & private key for
        authentication. Do not expose these keys in the browser.

        </Warning>


        This task will run asynchronously and may take some time to complete. 

        You can check the status of the task using the [Get Request
        Status](/api-reference/ehi_export/get) endpoint.


        On completion a webhook will be sent to your `webhook_url` with metadata
        about the task, and a `download_link` to download the results.
      requestBody:
        description: Update an existent pet in the store
        content:
          application/json:
            schema:
              type: object
              properties:
                org_connection_id:
                  type: string
                  format: uuid
                  description: Patient Connection Id
                  example: 16e39045-5382-42a0-b93d-b75268984c1f
                fixtures:
                  type: object
                  description: Optional testing fixtures for TEFCA API-mode exports.
                  properties:
                    tefca_ccda:
                      type: string
                      description: >-
                        Force a specific synthetic CCDA response for TEFCA
                        testing.
                      enum:
                        - myra-jones.xml
                        - lennie-connell.xml
                      example: myra-jones.xml
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/EhiExportRequestStatus'
      security:
        - bridge_basic: []
components:
  schemas:
    EhiExportRequestStatus:
      type: object
      properties:
        task_id:
          type: string
          format: string
          description: Task Id
          example: c9c7a91b66b34fdca749bb8e9cfbf617
        status:
          type: string
          enum:
            - pending
            - success
            - failed
          example: pending
      xml:
        name: ehi_export_request_status
  securitySchemes:
    bridge_basic:
      type: http
      scheme: basic
      description: >
        [Basic Authentication](/api-reference/authentication), containing API
        Public Id and Private Key generated from the Fasten Connect Portal. **Do
        not expose these keys in the browser.**

````