Clinic Appointments API
Endpoints for managing appointments within the clinic system.
Pending Documentation
Get appointments that require documentation.
Endpoint: GET /v1/clinic/appointments/pending_documentation
Authentication: Required
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number for pagination |
page_size | integer | No | Number of items per page |
Example Request
GET /v1/clinic/appointments/pending_documentation HTTP/1.1
Content-Type: application/json
X-User-Token: your_token_hereAppointments in Date Range
Get appointments within a specific date range.
Endpoint: GET /v1/clinic/appointments/in_date_range
Authentication: Required
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
start_date | string | Yes | Start date (ISO 8601 format) |
end_date | string | Yes | End date (ISO 8601 format) |
provider_id | integer | No | Filter by provider ID |
patient_id | integer | No | Filter by patient ID |
Example Request
GET /v1/clinic/appointments/in_date_range?start_date=2023-10-01&end_date=2023-10-31 HTTP/1.1
Content-Type: application/json
X-User-Token: your_token_hereReschedule Appointments
Update appointment scheduling information.
Endpoint: PUT /v1/clinic/appointments/reschedule_appointments/{id}
Authentication: Required
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Appointment ID |
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
appointment | object | Yes | Appointment data object |
appointment.scheduled_at | string | No | New scheduled date/time |
appointment.provider_id | integer | No | New provider ID |
appointment.reason | string | No | Reason for rescheduling |
Example Request
PUT /v1/clinic/appointments/reschedule_appointments/123 HTTP/1.1
Content-Type: application/json
X-User-Token: your_token_here
{
"appointment": {
"scheduled_at": "2023-10-27T14:30:00.000Z",
"provider_id": 456,
"reason": "Provider availability change"
}
}Response Format
All appointment endpoints return appointment objects with the following structure:
{
"id": 123,
"patient_id": 1049,
"provider_id": 456,
"scheduled_at": "2023-10-27T14:30:00.000Z",
"status": "scheduled",
"appointment_type": "therapy",
"duration_minutes": 60,
"notes": "Initial consultation",
"created_at": "2023-10-20T10:00:00.000Z",
"updated_at": "2023-10-20T10:00:00.000Z"
}Error Responses
Common error responses for appointment endpoints:
404 Not Found
{
"errors": "Appointment not found"
}422 Unprocessable Entity
{
"errors": {
"scheduled_at": ["can't be blank"],
"provider_id": ["must exist"]
}
}401 Unauthorized
{
"errors": "You are not authorized to perform this action."
}