API Reference¶
Complete endpoint documentation
Base Information¶
| Item | Value |
|---|---|
| Base URL | https://api.vitaravox.ca:9443 |
| Protocol | HTTPS (TLS 1.2+) |
| Format | JSON |
| Auth | API Key (X-API-Key header) |
Authentication¶
Include API key in request header:
Endpoints¶
Health Check¶
No authentication required.
Response:
{
"status": "healthy",
"timestamp": "2026-01-12T15:30:00.000Z",
"version": "1.1.0",
"components": {
"database": { "healthy": true },
"oscar": { "healthy": true }
}
}
Search Patient by Phone¶
Request:
Response:
{
"success": true,
"patient": {
"demographicNo": 12345,
"firstName": "John",
"lastName": "Smith"
}
}
Search Patient by Name¶
Request:
Response:
{
"success": true,
"patients": [
{
"demographicNo": 12345,
"firstName": "John",
"lastName": "Smith",
"dateOfBirth": "1985-03-15"
}
]
}
Get Patient Details¶
Request:
Response:
{
"success": true,
"patient": {
"demographicNo": 12345,
"firstName": "John",
"lastName": "Smith",
"dateOfBirth": "1985-03-15",
"sex": "M",
"hin": "9876543210",
"phone": "604-555-1234",
"email": "john@email.com",
"address": {
"street": "123 Main St",
"city": "Vancouver",
"province": "BC",
"postalCode": "V6A 1A1"
}
}
}
Get Clinic Info¶
Request:
Response:
{
"success": true,
"clinic": {
"id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"name": "Downtown Medical",
"phone": "604-555-0100",
"address": "456 Health Ave",
"accepting_new_patients": true,
"waitlist_enabled": true,
"hours": {
"monday": { "open": "09:00", "close": "17:00" },
"tuesday": { "open": "09:00", "close": "17:00" }
}
}
}
Get Providers¶
Request:
Response:
{
"success": true,
"providers": [
{
"providerNo": "100001",
"displayName": "Dr. Sarah Chen",
"specialty": "Family Medicine"
}
]
}
Find Earliest Appointment¶
Request:
Response:
{
"success": true,
"appointment": {
"date": "2026-01-14",
"time": "09:30",
"duration": 15,
"provider": {
"providerNo": "100001",
"displayName": "Dr. Sarah Chen"
}
}
}
Check Appointments¶
Request (Find Available):
{
"providerId": "100001",
"startDate": "2026-01-13",
"endDate": "2026-01-20",
"findAvailable": true
}
Request (Patient's Appointments):
Response:
{
"success": true,
"appointments": [
{
"date": "2026-01-14",
"time": "09:30",
"provider": { "displayName": "Dr. Chen" }
}
]
}
Create Appointment¶
Request:
{
"demographicNo": 12345,
"providerNo": "100001",
"date": "2026-01-14",
"startTime": "09:30",
"duration": 15,
"appointmentType": "B",
"reason": "Prescription refill"
}
Response:
Update Appointment¶
Request:
Response:
Cancel Appointment¶
Request:
Response:
Register New Patient¶
Request:
{
"firstName": "Jane",
"lastName": "Doe",
"dateOfBirth": "1990-05-20",
"sex": "F",
"hin": "9123456789",
"phone": "604-555-9876",
"address": {
"street": "789 Oak St",
"city": "Vancouver",
"province": "BC",
"postalCode": "V6C 3C3"
}
}
Response:
Add to Waitlist¶
Request:
{
"clinicId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"firstName": "Jane",
"lastName": "Doe",
"phone": "604-555-9876"
}
Response:
Transfer Call¶
Request:
Response:
Log Call¶
Request:
{
"clinicId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"vapiCallId": "call_abc123",
"language": "en",
"intent": "book",
"outcome": "booked",
"durationSeconds": 127
}
Response:
Admin API¶
The Admin API endpoints for clinic and user management use JWT authentication and follow a standard response format. See Admin UI Guide for complete documentation.
Standard Admin Response Format¶
{
"success": true,
"data": [...],
"pagination": {
"page": 1,
"pageSize": 10,
"total": 25,
"totalPages": 3
}
}
Admin Authentication¶
Error Response Format¶
Error Codes¶
| Code | HTTP | Description |
|---|---|---|
| PATIENT_NOT_FOUND | 404 | Patient not in EMR |
| APPOINTMENT_NOT_FOUND | 404 | Appointment doesn't exist |
| NO_AVAILABILITY | 404 | No slots available |
| INVALID_REQUEST | 400 | Invalid parameters |
| OSCAR_UNAVAILABLE | 503 | EMR unreachable |
| UNAUTHORIZED | 401 | Invalid API key |
| RATE_LIMITED | 429 | Too many requests |
| INTERNAL_ERROR | 500 | Server error |