API Referencev1

Appointments

The Appointments API manages scheduling for dental practices. Create, update, cancel, and reschedule appointments, check availability, and retrieve appointment history.

The Appointment Object

FieldTypeDescription
idstringUnique appointment ID (apt_*)
patient_idstringPatient ID (pat_*)
dentist_idstringDentist/staff ID (usr_*)
start_timestringISO 8601 datetime (UTC)
end_timestringISO 8601 datetime (UTC)
typeenumconsultation, cleaning, filling, extraction, root_canal, implant, follow_up, other
statusenumscheduled, confirmed, in_progress, completed, cancelled, no_show
notesstringInternal notes for the appointment
location_idstringClinic/location ID (loc_*)
created_atstringISO 8601 timestamp (UTC)
GET/appointments

List all appointments

Returns a paginated list of appointments. Filter by date range, patient, dentist, or status.

Parameters

ParameterTypeRequiredDescription
patient_idstringOptionalFilter by patient ID
dentist_idstringOptionalFilter by dentist ID
statusstringOptionalFilter by status: scheduled, confirmed, completed, cancelled
start_datestringOptionalFilter appointments starting on or after this date (ISO 8601)
end_datestringOptionalFilter appointments starting on or before this date (ISO 8601)
limitintegerOptionalResults per page (1-100). Default: 20
cursorstringOptionalPagination cursor

Example Request

Requestbash
curl -X GET "https://api.odento.app/api/v1/appointments?start_date=2025-01-15T00:00:00Z&end_date=2025-01-22T23:59:59Z&status=scheduled" \
  -H "X-API-Key-ID: ok_live_abc123def456ghi789jkl012" \
  -H "X-API-Key-Secret: os_abc123def456ghi789jkl012mno345pqr678stu901vwx234yzab567"

Example Response

Response200json
{
  "success": true,
  "data": {
    "items": [
      {
        "id": "apt_7a3b9c1d2e5f8a4b",
        "patient_id": "pat_5f8d3a2b1c9e4a7b",
        "dentist_id": "usr_abc123",
        "start_time": "2025-01-22T10:00:00Z",
        "end_time": "2025-01-22T11:00:00Z",
        "type": "consultation",
        "status": "scheduled",
        "notes": "Routine checkup",
        "location_id": "loc_xyz789",
        "created_at": "2025-01-15T08:00:00Z"
      }
    ],
    "pagination": {
      "has_more": false,
      "next_cursor": null,
      "per_page": 20
    }
  }
}

Try It Out

API Playground
Headers
This is a simulated response — no real API calls are made from the browser.
POST/appointments

Create an appointment

Creates a new appointment. The API checks for scheduling conflicts and returns a 409 if the time slot is already booked.

Parameters

ParameterTypeRequiredDescription
patient_idstringRequiredPatient ID (pat_*)
dentist_idstringRequiredDentist ID (usr_*)
start_timestringRequiredISO 8601 datetime (UTC)
end_timestringRequiredISO 8601 datetime (UTC)
typestringRequiredAppointment type (consultation, cleaning, filling, etc.)
location_idstringRequiredClinic/location ID (loc_*)
notesstringOptionalInternal notes

Example Request

Requestbash
curl -X POST https://api.odento.app/api/v1/appointments \
  -H "X-API-Key-ID: ok_live_abc123def456ghi789jkl012" \
  -H "X-API-Key-Secret: os_abc123def456ghi789jkl012mno345pqr678stu901vwx234yzab567" \
  -H "Content-Type: application/json" \
  -d '{
    "patient_id": "pat_5f8d3a2b1c9e4a7b",
    "dentist_id": "usr_abc123",
    "start_time": "2025-01-22T10:00:00Z",
    "end_time": "2025-01-22T11:00:00Z",
    "type": "consultation",
    "location_id": "loc_xyz789",
    "notes": "Routine checkup"
  }'

Example Response

Response201json
{
  "success": true,
  "data": {
    "id": "apt_7a3b9c1d2e5f8a4b",
    "patient_id": "pat_5f8d3a2b1c9e4a7b",
    "dentist_id": "usr_abc123",
    "start_time": "2025-01-22T10:00:00Z",
    "end_time": "2025-01-22T11:00:00Z",
    "type": "consultation",
    "status": "scheduled",
    "notes": "Routine checkup",
    "location_id": "loc_xyz789",
    "created_at": "2025-01-15T08:00:00Z"
  }
}
GET/appointments/{id}

Retrieve an appointment

Retrieves a single appointment by ID, including patient and dentist summary.

Parameters

ParameterTypeRequiredDescription
idstringRequiredThe appointment ID (apt_*)

Example Request

Requestbash
curl -X GET https://api.odento.app/api/v1/appointments/apt_7a3b9c1d2e5f8a4b \
  -H "X-API-Key-ID: ok_live_abc123def456ghi789jkl012" \
  -H "X-API-Key-Secret: os_abc123def456ghi789jkl012mno345pqr678stu901vwx234yzab567"

Example Response

Response200json
{
  "success": true,
  "data": {
    "id": "apt_7a3b9c1d2e5f8a4b",
    "patient_id": "pat_5f8d3a2b1c9e4a7b",
    "patient": {
      "first_name": "Priya",
      "last_name": "Sharma",
      "phone": "+919876543210"
    },
    "dentist_id": "usr_abc123",
    "dentist": {
      "name": "Dr. Priya Sharma",
      "specialization": "General Dentistry"
    },
    "start_time": "2025-01-22T10:00:00Z",
    "end_time": "2025-01-22T11:00:00Z",
    "type": "consultation",
    "status": "scheduled",
    "notes": "Routine checkup",
    "location_id": "loc_xyz789",
    "created_at": "2025-01-15T08:00:00Z"
  }
}
PATCH/appointments/{id}

Update an appointment

Updates an appointment's fields. Use this to change the type, notes, or status (e.g., mark as completed). To change the time, use the reschedule endpoint.

Parameters

ParameterTypeRequiredDescription
idstringRequiredThe appointment ID (apt_*)
typestringOptionalUpdated appointment type
statusstringOptionalUpdated status: confirmed, in_progress, completed, no_show
notesstringOptionalUpdated notes

Example Request

Requestbash
curl -X PATCH https://api.odento.app/api/v1/appointments/apt_7a3b9c1d2e5f8a4b \
  -H "X-API-Key-ID: ok_live_abc123def456ghi789jkl012" \
  -H "X-API-Key-Secret: os_abc123def456ghi789jkl012mno345pqr678stu901vwx234yzab567" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "completed",
    "notes": "Patient showed mild gingivitis. Recommended scaling."
  }'

Example Response

Response200json
{
  "success": true,
  "data": {
    "id": "apt_7a3b9c1d2e5f8a4b",
    "patient_id": "pat_5f8d3a2b1c9e4a7b",
    "dentist_id": "usr_abc123",
    "start_time": "2025-01-22T10:00:00Z",
    "end_time": "2025-01-22T11:00:00Z",
    "type": "consultation",
    "status": "completed",
    "notes": "Patient showed mild gingivitis. Recommended scaling.",
    "location_id": "loc_xyz789",
    "created_at": "2025-01-15T08:00:00Z"
  }
}
POST/appointments/{id}/reschedule

Reschedule an appointment

Changes the start and end time of an appointment. The API checks for conflicts and returns 409 if the new slot is unavailable. The appointment status is reset to 'scheduled'.

Parameters

ParameterTypeRequiredDescription
idstringRequiredThe appointment ID (apt_*)
start_timestringRequiredNew start time (ISO 8601 UTC)
end_timestringRequiredNew end time (ISO 8601 UTC)
reasonstringOptionalReason for rescheduling (logged for audit)

Example Request

Requestbash
curl -X POST https://api.odento.app/api/v1/appointments/apt_7a3b9c1d2e5f8a4b/reschedule \
  -H "X-API-Key-ID: ok_live_abc123def456ghi789jkl012" \
  -H "X-API-Key-Secret: os_abc123def456ghi789jkl012mno345pqr678stu901vwx234yzab567" \
  -H "Content-Type: application/json" \
  -d '{
    "start_time": "2025-01-25T14:00:00Z",
    "end_time": "2025-01-25T15:00:00Z",
    "reason": "Patient requested later time"
  }'

Example Response

Response200json
{
  "success": true,
  "data": {
    "id": "apt_7a3b9c1d2e5f8a4b",
    "patient_id": "pat_5f8d3a2b1c9e4a7b",
    "dentist_id": "usr_abc123",
    "start_time": "2025-01-25T14:00:00Z",
    "end_time": "2025-01-25T15:00:00Z",
    "type": "consultation",
    "status": "scheduled",
    "notes": "Routine checkup",
    "location_id": "loc_xyz789",
    "created_at": "2025-01-15T08:00:00Z"
  }
}
POST/appointments/{id}/cancel

Cancel an appointment

Cancels an appointment. A cancellation reason is required and logged for audit. Cancelled appointments cannot be reactivated — create a new one instead.

Parameters

ParameterTypeRequiredDescription
idstringRequiredThe appointment ID (apt_*)
reasonstringRequiredCancellation reason

Example Request

Requestbash
curl -X POST https://api.odento.app/api/v1/appointments/apt_7a3b9c1d2e5f8a4b/cancel \
  -H "X-API-Key-ID: ok_live_abc123def456ghi789jkl012" \
  -H "X-API-Key-Secret: os_abc123def456ghi789jkl012mno345pqr678stu901vwx234yzab567" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Patient unavailable on new date"
  }'

Example Response

Response200json
{
  "success": true,
  "data": {
    "id": "apt_7a3b9c1d2e5f8a4b",
    "status": "cancelled",
    "cancelled_at": "2025-01-16T09:30:00Z",
    "cancellation_reason": "Patient unavailable on new date"
  }
}
GET/appointments/availability

Check availability

Returns available time slots for a given dentist, location, and date range. Use this before creating an appointment to find open slots.

Parameters

ParameterTypeRequiredDescription
dentist_idstringRequiredDentist ID (usr_*)
location_idstringRequiredLocation ID (loc_*)
datestringRequiredDate to check (YYYY-MM-DD)
duration_minutesintegerOptionalRequired slot duration. Default: 30

Example Request

Requestbash
curl -X GET "https://api.odento.app/api/v1/appointments/availability?dentist_id=usr_abc123&location_id=loc_xyz789&date=2025-01-22&duration_minutes=60" \
  -H "X-API-Key-ID: ok_live_abc123def456ghi789jkl012" \
  -H "X-API-Key-Secret: os_abc123def456ghi789jkl012mno345pqr678stu901vwx234yzab567"

Example Response

Response200json
{
  "success": true,
  "data": {
    "date": "2025-01-22",
    "dentist_id": "usr_abc123",
    "slots": [
      { "start_time": "2025-01-22T09:00:00Z", "end_time": "2025-01-22T10:00:00Z", "available": true },
      { "start_time": "2025-01-22T10:00:00Z", "end_time": "2025-01-22T11:00:00Z", "available": false },
      { "start_time": "2025-01-22T11:00:00Z", "end_time": "2025-01-22T12:00:00Z", "available": true },
      { "start_time": "2025-01-22T14:00:00Z", "end_time": "2025-01-22T15:00:00Z", "available": true }
    ]
  }
}

Was this page helpful?

Help us improve our documentation