Quickstart Guide

This guide will help you make your first API call to HiQOR API. We'll walk through both non-sensitive and sensitive data operations.

Step 1: Obtain an API Key

Before you can make API calls, you need to obtain an API key. If you haven't already, please contact our API team at api@hiqor.com to get your API key.

Step 2: Authenticate

Use your API key to obtain an authentication token. Send a POST request to the authentication endpoint:

curl -X POST https://7hh4csiioi.execute-api.us-west-2.amazonaws.com/default/storage/authenticate \
-H "Content-Type: application/json" \
-d '{
"username": "your_username",
"password": "your_api_key"
}'

The response will contain your authentication token. You'll need this for subsequent API calls. The response will look like this:

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

Step 3: Send Patient Data

You can send both non-sensitive and sensitive patient data using the same endpoint. The data type is specified in the query parameter:

curl -X POST https://7hh4csiioi.execute-api.us-west-2.amazonaws.com/default/patient/savePatientData?dataType=non-sensitive \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" \
-H "Content-Type: application/json" \
-d '{
  "assessmentType": "FaceScan",
  "funnelID": "dr-karen-hansey",
  "patientUUID": "c2094a43-772f-4a55-973d-9bf775fa7013",
  "contactConsent": true,
  "IPAddress": "192.168.1.1",
  "email": "patient@example.com",
  "firstName": "John",
  "lastName": "Doe",
  "phoneNumber": "+1234567890",
  "zipCode": "12345",
  "formCompleted": true,
  "assessmentCompleted": false
}'

Replace the token in the Authorization header with the one you received in Step 2, and use appropriate values for the patient data.

Step 4: Receiving Processed Data

After sending patient data, HiQOR will process it and route it based on the funnelID. You will receive the processed results via webhooks or SNS subscriptions.

To receive these results, you need to:

  1. Set up a webhook endpoint on your server to receive the processed data
  2. Or, set up an SNS subscription to receive notifications when new data is available

Response

When you send patient data, you'll receive a confirmation response:

{
  "message": "Patient data received successfully",
  "patientUUID": "c2094a43-772f-4a55-973d-9bf775fa7013"
}

Important Notes

  • Always include the appropriate dataType query parameter ("sensitive" or "non-sensitive")
  • Ensure your authentication token is valid and included in all requests
  • Use the correct endpoint based on the type of data you're working with

If you encounter any issues or have questions, don't hesitate to contact our API team at api@hiqor.com.