Get Current Appointment for Current user

From docs
Jump to: navigation, search

Get Current Appointment

Base URL

https://apimobile.callproof.com

Endpoint

/api/current-appointment

Purpose

Returns the authenticated user’s currently active appointment, if one exists. When an appointment is in progress, the response includes appointment identifiers, timing, notes, and related contact/event form details. When no appointment is active, the response indicates that no appointment is currently in progress.

HTTP Method

GET

Headers

Header Required Description
Authorization Yes Bearer access token

Security

  • Yes – Requires Bearer Token authentication.

Parameters

Path Parameters

None.

Query Parameters

None.

Request Body

None.

cURL Example for Android

curl --location 'https://apimobile.callproof.com/api/current-appointment' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

cURL Example for iOS

curl --location 'https://apimobile.callproof.com/api/current-appointment' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

Successful Response (200)

Indicates that the current appointment status was retrieved successfully.

When an appointment is active

Field Type Description
clientStatusCode integer Status indicator for the client (for example, 200)
user_id integer Identifier of the authenticated user
company_id integer Identifier of the authenticated user’s company
data object Current appointment payload
data.appointment_id integer Unique identifier of the active appointment
data.contact_id integer Contact associated with the appointment
data.created string Appointment created / start datetime (format: YYYY-MM-DD HH:MM:SS)
data.duration integer Appointment duration
data.notes string Appointment notes
data.updated_in_seconds integer / string Last updated time as a Unix timestamp
data.event_form_id integer Related event form identifier, or 0 if none
data.is_google_place boolean Whether the appointment contact is a Google Place account
data.is_appointment_active integer Indicates an active appointment (1)
uri string Requested resource URI

When no appointment is active

Field Type Description
clientStatusCode integer Status indicator for the client (for example, 200)
user_id integer Identifier of the authenticated user
company_id integer Identifier of the authenticated user’s company
data object Appointment status payload
data.is_appointment_active integer Indicates no active appointment (0)
uri string Requested resource URI

Error Responses

Status Code Meaning
400 Bad Request – current appointment details could not be retrieved successfully
401 Unauthorized – missing, invalid, or expired Bearer token
  • 400 – The service encountered an error while retrieving the current appointment.
  • 401 – Authentication failed or the access token is missing/expired.