Difference between revisions of "Nearest Places Start Appointment to CallProof"
Ashley DeBon (talk | contribs) (Created page with "== Create Place Appointment == === Base URL === https://apimobile.callproof.com === Endpoint === /api/place-appointment === Purpose === Starts an appointment from a Places...") |
Ashley DeBon (talk | contribs) (→Successful Response (200)) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | == Create Place Appointment == | + | == [[Mobile_API]] »Create Place Appointment == |
=== Base URL === | === Base URL === | ||
| Line 45: | Line 45: | ||
| event_form_id || integer || Yes || Event form identifier associated with the appointment | | event_form_id || integer || Yes || Event form identifier associated with the appointment | ||
|} | |} | ||
| + | |||
| + | === cURL Example for Android === | ||
| + | |||
| + | <pre> curl --location 'https://apimobile.callproof.com/api/place-appointment' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "place_id": YOUR_PLACE_ID, "latitude": "YOUR_LATITUDE", "longitude": "YOUR_LONGITUDE", "start": YOUR_START_UNIX_TIMESTAMP, "event_form_id": YOUR_EVENT_FORM_ID }' </pre> | ||
| + | |||
| + | === cURL Example for iOS === | ||
| + | |||
| + | <pre> curl --location 'https://apimobile.callproof.com/api/place-appointment' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "place_id": YOUR_PLACE_ID, "latitude": "YOUR_LATITUDE", "longitude": "YOUR_LONGITUDE", "start": YOUR_START_UNIX_TIMESTAMP, "event_form_id": YOUR_EVENT_FORM_ID }' </pre> | ||
=== Successful Response (200) === | === Successful Response (200) === | ||
Latest revision as of 14:20, 20 July 2026
Mobile_API »Create Place Appointment
Base URL
https://apimobile.callproof.com
Endpoint
/api/place-appointment
Purpose
Starts an appointment from a Places result. If the place is not already linked to a CallProof contact, a contact is created from the place details. Any previous open appointment for the user is auto-ended, then a new appointment is started at the given location and time.
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 |
|---|---|---|---|
| place_id | integer | Yes | Unique identifier of the place to start the appointment from |
| latitude | string/number | Yes | Latitude of the appointment location (numeric; minimum length 3) |
| longitude | string/number | Yes | Longitude of the appointment location (numeric; minimum length 3) |
| start | integer | Yes | Appointment start time as a Unix timestamp (seconds) |
| event_form_id | integer | Yes | Event form identifier associated with the appointment |
cURL Example for Android
curl --location 'https://apimobile.callproof.com/api/place-appointment' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "place_id": YOUR_PLACE_ID, "latitude": "YOUR_LATITUDE", "longitude": "YOUR_LONGITUDE", "start": YOUR_START_UNIX_TIMESTAMP, "event_form_id": YOUR_EVENT_FORM_ID }'
cURL Example for iOS
curl --location 'https://apimobile.callproof.com/api/place-appointment' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "place_id": YOUR_PLACE_ID, "latitude": "YOUR_LATITUDE", "longitude": "YOUR_LONGITUDE", "start": YOUR_START_UNIX_TIMESTAMP, "event_form_id": YOUR_EVENT_FORM_ID }'
Successful Response (200)
Indicates that the appointment was started successfully and returns the related contact ID.
| 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, "appointment started successfully") |
| contact_id | integer | Identifier of the contact linked to or created for the place |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 200 | Validation failed – response body uses clientStatusCode 401 with the first validation error message
|
| 400 | Bad Request – the place appointment could not be started |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- Validation (HTTP 200, clientStatusCode 401) – Missing/invalid
place_id,latitude,longitude,start, orevent_form_id. - 400 – Appointment already exists ("Appointment Already Exist"), contact not found ("Contact Not Found"), or another start error (for example, "Error while Start Appointment in Places").
- 401 – Authentication failed or the access token is missing/expired.