Skip to Content
Clinic APIAppointments

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

ParameterTypeRequiredDescription
pageintegerNoPage number for pagination
page_sizeintegerNoNumber of items per page

Example Request

GET /v1/clinic/appointments/pending_documentation HTTP/1.1 Content-Type: application/json X-User-Token: your_token_here

Appointments in Date Range

Get appointments within a specific date range.

Endpoint: GET /v1/clinic/appointments/in_date_range
Authentication: Required

Query Parameters

ParameterTypeRequiredDescription
start_datestringYesStart date (ISO 8601 format)
end_datestringYesEnd date (ISO 8601 format)
provider_idintegerNoFilter by provider ID
patient_idintegerNoFilter 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_here

Reschedule Appointments

Update appointment scheduling information.

Endpoint: PUT /v1/clinic/appointments/reschedule_appointments/{id}
Authentication: Required

Path Parameters

ParameterTypeRequiredDescription
idintegerYesAppointment ID

Request Body Parameters

ParameterTypeRequiredDescription
appointmentobjectYesAppointment data object
appointment.scheduled_atstringNoNew scheduled date/time
appointment.provider_idintegerNoNew provider ID
appointment.reasonstringNoReason 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." }