Skip to content

Appointments

Endpoints for booking, cancelling, and rescheduling appointments, including retrieving current appointment statuses and updated information.

Create appointment

Request

This endpoint is used for creating new appointments. Developers should gather the necessary information to pass in the request body as inputs for this endpoint. Only timeslots retrieved from the /v1/provider_locations/availability endpoint will be accepted. After an /appointments call is successfully processed, the system will return an appointment ID.

The appointment_id returned is used in the endpoint /v1/appointments/{appointment_id} to track the status of the appointment, and in the endpoint /v1/appointments/cancel to cancel an appointment.

Security
ClientCredentialsFlow(Required scopes: external.appointment.write) or AuthorizationCodeFlow(Required scopes: external.appointment.write)
Bodyapplication/jsonrequired
appointment_typestring(AppointmentType)required

The type of appointment.

Value:"providers"
dataobject(AppointmentData)required
curl -i -X POST \
  https://api-developer-sandbox.zocdoc.com/v1/appointments \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "appointment_type": "providers",
    "data": {
      "start_time": "2022-04-27T09:00:00-04:00",
      "visit_reason_id": "pc_FRO-18leckytNKtruw5dLR",
      "provider_location_id": "pr_abc123-def456_wxyz7890|lo_abc123-def456_wxyz7890",
      "patient": {
        "patient_id": "string",
        "developer_patient_id": "string",
        "first_name": "string",
        "last_name": "string",
        "date_of_birth": "2019-08-24",
        "sex_at_birth": "male",
        "phone_number": "9999999999",
        "email_address": "test@example.com",
        "patient_address": {
          "address1": "string",
          "city": "string",
          "state": "NY",
          "zip_code": 36925,
          "address2": "string"
        },
        "insurance": {
          "insurance_plan_id": "ip_31820",
          "insurance_group_number": "string",
          "insurance_member_id": "string",
          "is_self_pay": true
        },
        "gender": [
          "female_at_birth"
        ]
      },
      "patient_type": "new",
      "notes": "string"
    }
  }'

Responses

Successful

Bodyapplication/json
request_idstringrequired

Unique request identifier for tracing

dataobject(AppointmentResponseData)required

Data that will be returned upon a sucessful booking request

Response
{ "request_id": "string", "data": { "appointment_id": "string", "appointment_status": "pending_booking", "developer_patient_id": "string", "is_provider_resource": true, "location_phone_number": "9999999999", "location_phone_extension": "string", "waiting_room_path": "string", "confirmation_type": "auto", "visit_type": "in_person", "notes": "string" } }