Skip to main content
POST
/
appointments
/
fetch
Fetch Appointments
curl --request POST \
  --url https://api.usecobalt.com/v1/appointments/fetch \
  --header 'Content-Type: application/json' \
  --header 'access_token: <api-key>' \
  --header 'client_id: <api-key>' \
  --header 'client_secret: <api-key>' \
  --data '{
  "start_date": "2023-12-25",
  "end_date": "2023-12-25"
}'
{
  "success": true,
  "message": "<string>",
  "job_execution_id": "<string>"
}
This is a slow operation that fetches up-to-date appointment data directly from the EMR system. If the newest data is not critical, consider using the GET /appointments endpoint instead for faster results from cached data.

Webhook Notifications

When the appointment fetch is complete, we will send a webhook to your registered endpoint. Here is an example of what the webhook payload will look like:
{
    "id": "evt_1J9X2q2eZvKYlo2Cmnopqr",
    "user_id": "user_1J9X2q2eZvKYlo2Cstuv",
    "job_execution_id": "job_1J9X2q2eZvKYlo2Cmnopqr",
    "timestamp": "2023-10-28T11:00:00Z",
    "type": "appointment.live_fetch_completed",
    "action": "sync",
    "data": {
        "success": true,
        "appointment_count": 42,
        "start_date": "2025-01-01",
        "end_date": "2025-01-31",
        "appointments": [
            {
                "id": "appt_123",
                "patient_id": "pat_456",
                "date_time": "2025-01-15T10:00:00Z",
                "provider_id": "prov_789"
            }
        ]
    }
}

Authorizations

client_id
string
header
required
client_secret
string
header
required
access_token
string
header
required

Body

application/json
start_date
string<date>
required

Start date for the appointment range in ISO 8601 format (YYYY-MM-DD).

end_date
string<date>
required

End date for the appointment range in ISO 8601 format (YYYY-MM-DD). Maximum range is 7 days.

Response

Request accepted for processing

success
boolean
message
string
job_execution_id
string