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

# Patient APIs Introduction

> APIs for patient authentication and report retrieval

<img className="block dark:hidden" src="https://mintcdn.com/flabs/XMaScWewdN3WnYoT/logo/light.svg?fit=max&auto=format&n=XMaScWewdN3WnYoT&q=85&s=76bd6efd710b5d3a6017da1d7b459ed2" alt="Flabs Logo Light" width="166" height="40" data-path="logo/light.svg" />

<img className="hidden dark:block" src="https://mintcdn.com/flabs/XMaScWewdN3WnYoT/logo/dark.svg?fit=max&auto=format&n=XMaScWewdN3WnYoT&q=85&s=ce6b2e92330df479a4edd58d12660548" alt="Flabs Logo Dark" width="319" height="78" data-path="logo/dark.svg" />

## Overview

Flabs Patient APIs allow you to authenticate patients via OTP and retrieve their medical reports securely.

<CardGroup cols={3}>
  <Card title="Request OTP" icon="message" href="/patient/endpoint/get_otp">
    Send OTP to patient's contact number
  </Card>

  <Card title="Verify OTP" icon="shield-check" href="/patient/endpoint/verify_otp">
    Verify OTP and get patient token
  </Card>

  <Card title="Get Reports" icon="file-medical" href="/patient/endpoint/get_records">
    Retrieve all patient reports
  </Card>
</CardGroup>

## Patient Authentication Flow

Our patient authentication system uses a two-step verification process:

1. **Request OTP**: Send an OTP to the patient's contact number
2. **Verify OTP**: Validate the OTP to receive a patient token
3. **Access Reports**: Use the patient token to access patient-specific reports

<Note>
  All API requests require both the lab authentication token (in the
  Authorization header) and for the reports endpoint, the patient token (in the
  patient-authorization header).
</Note>

## Getting Started

To integrate with our patient authentication system:

1. Authenticate your lab client using the Auth API
2. Request an OTP for the patient using the [getLoginOTP](/patient/endpoint/get_otp) endpoint
3. Have the patient verify the OTP using the [verifyLoginOTP](/patient/endpoint/verify_otp) endpoint
4. Retrieve the patient's reports using the [getReports](/patient/endpoint/get_records) endpoint

## Security

Patient data is secure and can only be accessed with:

* A valid lab authentication token
* A valid patient-specific token obtained through OTP verification

This dual authentication ensures that only authorized labs can access patient data, and only for patients who have verified their identity.
