Difference between revisions of "Update the End Appointment Details"
Ashley DeBon (talk | contribs) (Created page with "== Save End Appointment Details == === Base URL === https://apimobile.callproof.com === Endpoint === /api/end-appointment === Purpose === Ends / checks out of an active app...") |
Ashley DeBon (talk | contribs) (→Successful Response (200)) |
||
| Line 49: | Line 49: | ||
| longitude || string / number || No || User’s longitude at the time the appointment is ended | | longitude || string / number || No || User’s longitude at the time the appointment is ended | ||
|} | |} | ||
| + | |||
| + | === cURL Example for Android === | ||
| + | <pre> | ||
| + | curl --location --request POST 'https://apimobile.callproof.com/api/end-appointment' \ | ||
| + | --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ | ||
| + | --form 'appointment_id=456' \ | ||
| + | --form 'contact_id=12345' | ||
| + | </pre> | ||
| + | === cURL Example for iOS === | ||
| + | <pre> | ||
| + | curl --location --request POST 'https://apimobile.callproof.com/api/end-appointment' \ | ||
| + | --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ | ||
| + | --form 'appointment_id=456' \ | ||
| + | --form 'contact_id=12345' | ||
| + | </pre> | ||
=== Successful Response (200) === | === Successful Response (200) === | ||
Latest revision as of 08:21, 17 July 2026
Contents
Save End Appointment Details
Base URL
https://apimobile.callproof.com
Endpoint
/api/end-appointment
Purpose
Ends / checks out of an active appointment for a contact. The request can include appointment notes, selected people, custom field values, and optional location coordinates. On success, the appointment is closed, related notes and custom fields are saved, location may be logged, and checkout activity is recorded.
HTTP Method
POST
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
None.
Query Parameters
None.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| appointment_id | integer | Yes | Unique identifier of the appointment to end. Must exist |
| contact_id | integer | Yes | Unique identifier of the contact associated with the appointment. Must exist |
| notes | string | No | Notes to save with the appointment checkout |
| selected_people | string | No | JSON array of selected people / personnel associated with the appointment checkout |
| custom_fields | string | No | JSON string of custom field values to save for the contact during checkout |
| latitude | string / number | No | User’s latitude at the time the appointment is ended |
| longitude | string / number | No | User’s longitude at the time the appointment is ended |
cURL Example for Android
curl --location --request POST 'https://apimobile.callproof.com/api/end-appointment' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'appointment_id=456' \ --form 'contact_id=12345'
cURL Example for iOS
curl --location --request POST 'https://apimobile.callproof.com/api/end-appointment' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'appointment_id=456' \ --form 'contact_id=12345'
Successful Response (200)
Indicates that the appointment was ended and saved successfully.
| 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 |
| message | string | Confirmation message (for example, "Your appointment has been saved.") |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 200 | Validation failure – request body failed validation (returned with an error payload and clientStatusCode 401)
|
| 400 | Bad Request – the appointment could not be ended (for example, processing error or custom field save failure) |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- 200 (validation failure) – Required fields are missing or invalid (for example, missing
appointment_idorcontact_id, or values that do not exist). - 400 – An error occurred while ending the appointment, saving notes/custom fields, or recording location/checkout activity (for example, "Error While Ending Appointment").
- 401 – Authentication failed or the access token is missing/expired.