Integrator’s Guide

Authentication

To work with the API, you need to obtain an API key used for authenticating requests. You can get the API key in your profile settings by going to the Interface section. The API key is available only for users with Pro and Enterprise subscription.

 

Make sure to save this key because when you leave this page it will disappear, and you will have to generate it again. Insert the obtained API key in the header of each request using the X-API-KEY parameter, so the API recognizes your session.

Push PDF files from your system to ScanToFHIR via API

This workflow describes how an external partner can retrieve a response based on a ticket number via the API.

 

  1. As an external partner you call api.scantofhir.com and place a request with a POST /api/external/request command
    Params:
    – apiKey (s. authentication part below)
    – PDF file (scanned document)

  2. After the authentication is proceed the system creates a new tasks and give a ticket number back. With a GET /api/external/request{ticketId} command the external retrieves the current processing state with current results

For detailed information on status and error codes, please refer to the OpenAPI documentation. This resource offers a comprehensive list of response codes and troubleshooting information.

Possible Processing States

Each record may be in one of the following states:

  • In Processing – The request is currently being handled.
  • Processed – The request was successfully handled and completed.
  • Processed with Error – The request was processed, but an error occurred.

This structured process ensures secure, efficient access for external partners while maintaining up-to-date records and processing status.

Push PDF files from your system to ScanToFHIR via STF Agent

The STF Agent is designed to simplify and streamline the process of sending PDF documents to ScatToFHIR system via its API. With a user-friendly command-line interface, this tool ensures easy and efficient operation for all users. STF Agent can be downloaded from here: Download

Step 1: Preparing Your Environment

To use the STF Agent, you’ll first need to set up the necessary directories:

  1. Incoming Folder: To hold PDFs that are waiting to be sent to APID.

  2. Archive Folder: To store PDFs after they have been processed and sent.

You can name these folders as you like and place them in a location that’s convenient for you.

Step 2: Launching the Agent

  1. Go to the directory where STF_APID_Agent.exe is located.

  2. Double-click on STF_APID_Agent.exe to initiate the program.

Step 3: Configuring the Agent

With the agent active, you’ll need to provide specific details to configure the PDF sending process:

  • STF endpoint URL: use production URLhttps://api.scantofhir.com/api/external/request

  • API key: Paste your organization API key, s. authentication part above

  • Folder Paths:

    • Input the full path to the Incoming Folder when prompted (e.g., C:\{YourLocalPath}\incoming).

    • Enter the full path to the Archive Folder (e.g., C:\{YourLocalPath}\archive).