HealthSetu API
The HealthSetu API allows healthcare providers to programmatically manage diagnostic tests, availability slots, booking statuses, and lead integrations. Our API follows RESTful conventions, uses standard HTTP verbs, and returns JSON-encoded responses.
https://api.healthsetu.com/api/v1
Authentication
The HealthSetu API uses API keys to authenticate requests. You can view and manage your API keys in the Partner Dashboard. Your API keys carry many privileges, so be sure to keep them secure!
Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
Authorization: Bearer YOUR_API_KEY
Errors
HealthSetu uses conventional HTTP response codes to indicate the success or failure of an API request. Codes in the 2xx range indicate success, 4xx indicate an error on your end, and 5xx indicate an error on our end.
| Status Code | Summary |
|---|---|
| 200 - OK | Everything worked as expected. |
| 400 - Bad Req | The request was unacceptable, often missing a required parameter. |
| 401 - Unauth | No valid API key was provided. |
| 403 - Forbidden | The API key doesn't have permissions for the request. |
| 404 - Not Found | The requested resource doesn't exist. |
| 422 - Unproc | The request was well-formed but could not be processed natively. |
| 429 - Too Many Requests | You've hit the rate limit. Exponential backoff is recommended. |
| 5xx - Server Error | Something went wrong on HealthSetu's end. (Rare) |
Create Test
Adds a single diagnostic test to your provider catalog.
/provider/tests
Body Parameters
The name of the test (e.g. "Complete Blood Count").
Price in base currency units (INR).
Turnaround time in hours from sample collection.
The specimen required (e.g. "blood", "urine", "saliva").
curl -X POST https://api.healthsetu.com/api/v1/provider/tests \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"test": {
"name": "Complete Blood Count",
"price": 500,
"tat_hours": 24,
"sample_type": "blood"
}
}'
Bulk Upload Tests
Upload multiple tests in a single request to synchronize your complete catalog.
/provider/tests/bulk
Body Parameters
An array of test objects containing name, price, and other test attributes.
curl -X POST https://api.healthsetu.com/api/v1/provider/tests/bulk \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"tests": [
{ "name": "Lipid Profile", "price": 800 },
{ "name": "Thyroid Profile", "price": 600 }
]
}'
Manage Slots
Create or update booking availability slots for patients.
/provider/slots
Status Updates
Update the status of an existing booking or sample collection.
/provider/status_updates
Push Leads
Send external leads or patient inquiries into the HealthSetu system for centralized management.
/provider/leads/push