Difference between revisions of "Google Calendar Update"
Ashley DeBon (talk | contribs) (Created page with "== Update Calendar Selection == === Base URL === https://apimobile.callproof.com === Endpoint === /api/calendar/calendar-update/ === Purpose === Updates the authenticated u...") |
Ashley DeBon (talk | contribs) (→Successful Response (200)) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | == Update Calendar Selection == | + | ==[[Mobile_API]] » Update Calendar Selection == |
=== Base URL === | === Base URL === | ||
| Line 39: | Line 39: | ||
| calendar_id || string/integer || Yes || Identifier of the calendar to select for follow-up sync | | calendar_id || string/integer || Yes || Identifier of the calendar to select for follow-up sync | ||
|} | |} | ||
| + | |||
| + | === cURL Example for Android === | ||
| + | |||
| + | <pre> curl --location --request PUT 'https://apimobile.callproof.com/api/calendar/calendar-update/' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "provider": "google", "calendar_id": "YOUR_CALENDAR_ID" }' </pre> | ||
| + | |||
| + | === cURL Example for iOS === | ||
| + | |||
| + | <pre> curl --location --request PUT 'https://apimobile.callproof.com/api/calendar/calendar-update/' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "provider": "google", "calendar_id": "YOUR_CALENDAR_ID" }' </pre> | ||
=== Successful Response (200) === | === Successful Response (200) === | ||
Latest revision as of 12:37, 21 July 2026
Mobile_API » Update Calendar Selection
Base URL
https://apimobile.callproof.com
Endpoint
/api/calendar/calendar-update/
Purpose
Updates the authenticated user’s selected calendar for task/follow-up sync. Supports Google and Microsoft Office calendar providers. Depending on whether the selected calendar is valid, the user’s preferred calendar is changed or cleared.
HTTP Method
PUT
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 |
|---|---|---|---|
| provider | string | Yes | Calendar provider. Supported values: google, office
|
| calendar_id | string/integer | Yes | Identifier of the calendar to select for follow-up sync |
cURL Example for Android
curl --location --request PUT 'https://apimobile.callproof.com/api/calendar/calendar-update/' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "provider": "google", "calendar_id": "YOUR_CALENDAR_ID" }'
cURL Example for iOS
curl --location --request PUT 'https://apimobile.callproof.com/api/calendar/calendar-update/' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "provider": "google", "calendar_id": "YOUR_CALENDAR_ID" }'
Successful Response (200)
Indicates that the calendar selection was updated (changed or removed) 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 (examples below) |
| uri | string | Requested resource URI |
Example success messages:
- Google: "Calendar changed successfully." or "Calendar Removed successfully."
- Office: "Microsoft Office Calendar changed successfully." or "Microsoft Office Calendar Removed successfully."
Error Responses
| Status Code | Meaning |
|---|---|
| 200 | Validation failed – response body uses clientStatusCode 401 with message "Invalid Data"
|
| 400 | Bad Request – the calendar could not be updated |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- Validation (HTTP 200, clientStatusCode 401) – Missing
providerorcalendar_id("Invalid Data"). - 400 – Invalid provider ("Invalid Calendar Provider"), or another update error (for example, "Error while updating the Calendar").
- 401 – Authentication failed or the access token is missing/expired.