Appearance
Create Case Appointment
This API endpoint enables you to create new appointments for a case.
Input
HTTP request headers
Content-Type string
Setting to application/json is required.
Authorization string
This is the token you fetched e.g. Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJS…
Path parameters
caseID string - Required
The unique case ID for which you intend to generate a new appointment.
Body parameters
adviser_email string - Required
- This adviser will be designated for the appointment.
- It should be a valid email associated with an adviser within your company.
start_time string - Required
Accepted format YYYY-MM-DD HH:mm:ss - e.g. 2024-07-20 09:00:00
end_time string - Required
- Accepted format
YYYY-MM-DD HH:mm:ss- e.g. 2024-07-20 10:00:00 - Should be a date and time that occurs after or is later than the start time.
email_confirmation boolean
If set to true, a confirmation email for the appointment booking will be sent to the customer corresponding to the email provided in the email_recipient field.
email_notification boolean
If set to true, a reminder email for the appointment will be sent to the customer associated with the email provided in the email_recipient field.
email_recipient string
Email corresponding to a customer within the provided caseID.
sms_confirmation boolean
If set to true, a confirmation SMS for the appointment booking will be sent to the customer associated with the phone number provided in the sms_recipient field.
sms_notification boolean
If set to true, a reminder SMS for the appointment will be sent to the customer associated with the phone number provided in the sms_recipient field.
sms_recipient string
The phone number to which the confirmation/notification via SMS will be sent.
notes string
location string
This will be added to the confirmation/reminder to inform them of the appointment location.
zoom_meeting boolean
When set to true, it will generate a Zoom meeting link, assuming that the advisor associated with the appointment has connected their Zoom account through the WillSuite 3rd Party Integrations section.
Output
Http status codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 404 | Resource not found |
| 500 | Internal Server Error |
Request example
bash
curl -X POST \
'https://client.willsuite.co.uk/engine/api/cases/d57bc3b7-4f44-4846-9741-985db9af9b61/appointments' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...' \
--data-raw '{
"adviser_email": "test@willsuite.co.uk",
"start_time": "2024-01-12 09:00:00",
"end_time": "2024-01-12 10:00:00",
"email_recipient": "test2@willsuite.co.uk"
}'php
<?php
$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->append('{
"adviser_email": "test@willsuite.co.uk",
"start_time": "2024-01-12 09:00:00",
"end_time": "2024-01-12 10:00:00",
"email_recipient": "test2@willsuite.co.uk"
} ');
$request->setRequestUrl('https://client.willsuite.co.uk/engine/api/cases/d57bc3b7-4f44-4846-9741-985db9af9b61/appointments');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'Content-Type' => 'application/json',
'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();Response
json
{
"notes": null,
"start_time": "2024-01-12T09:00:00.000000Z",
"end_time": "2024-01-12 10:00:00",
"sms_recipient": null,
"sms_confirmation": null,
"sms_notification": null,
"sms_day_before": 0,
"email_recipient": "test@willsuite.co.uk",
"email_confirmation": null,
"email_notification": null,
"email_day_before": 0,
"location": null,
"customer_case_id": "d57bc3b7-4f44-4846-9741-985db9af9b61",
"id": "cd10afb8-5663-4712-a945-90421929cebe",
"updated_at": "2024-01-12T14:43:11.000000Z",
"created_at": "2024-01-12T14:43:11.000000Z",
"adviser_email": "test2@willsuite.co.uk"
}json
{
"type": "object",
"properties": {
"notes": {
"type": ["string", "null"]
},
"start_time": {
"type": "string",
"format": "date-time"
},
"end_time": {
"type": "string",
"format": "date-time"
},
"sms_recipient": {
"type": ["string", "null"]
},
"sms_confirmation": {
"type": ["string", "null"]
},
"sms_notification": {
"type": ["string", "null"]
},
"sms_day_before": {
"type": "integer"
},
"email_recipient": {
"type": ["string", "null"]
},
"email_confirmation": {
"type": ["string", "null"]
},
"email_notification": {
"type": ["string", "null"]
},
"email_day_before": {
"type": "integer"
},
"location": {
"type": ["string", "null"]
},
"customer_case_id": {
"type": "string"
},
"id": {
"type": "string"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"adviser_email": {
"type": "string"
}
},
"required": [
"start_time",
"end_time",
"email_recipient",
"customer_case_id",
"id",
"updated_at",
"created_at",
"adviser_email"
]
}Update Case Appointment
This API endpoint enables you to update existing appointment for a case.
Input
HTTP request headers
Content-Type string
Setting to application/json is required.
Authorization string
This is the token you fetched e.g. Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJS…
Path parameters
caseID string - Required
The unique case ID for which you intend to generate a new appointment.
appointmentID string - Required
The unique appointment ID for which you intend to update.
Body parameters
start_time string
Accepted format YYYY-MM-DD HH:mm:ss - e.g. 2024-07-20 09:00:00
end_time string
- Accepted format
YYYY-MM-DD HH:mm:ss- e.g. 2024-07-20 10:00:00 - Should be a date and time that occurs after or is later than the start time.
email_confirmation boolean
If set to true, a confirmation email for the appointment booking will be sent to the customer corresponding to the email provided in the email_recipient field.
email_notification boolean
If set to true, a reminder email for the appointment will be sent to the customer associated with the email provided in the email_recipient field.
email_recipient string
Email corresponding to a customer within the provided caseID.
sms_confirmation boolean
If set to true, a confirmation SMS for the appointment booking will be sent to the customer associated with the phone number provided in the sms_recipient field.
sms_notification boolean
If set to true, a reminder SMS for the appointment will be sent to the customer associated with the phone number provided in the sms_recipient field.
sms_recipient string
The phone number to which the confirmation/notification via SMS will be sent.
notes string
location string
This will be added to the confirmation/reminder to inform them of the appointment location.
Output
Http status codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 404 | Resource not found |
| 500 | Internal Server Error |
Request example
bash
curl -X PATCH \
'https://client.willsuite.co.uk/engine/api/cases/d57bc3b7-4f44-4846-9741-985db9af9b61/appointments/cd10afb8-5663-4712-a945-90421929cebe' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...' \
--data-raw '{
"start_time": "2024-01-12 11:00:00",
"end_time": "2024-01-12 12:00:00",
"email_recipient": "test@willsuite.co.uk"
} 'php
<?php
$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->append('{
"start_time": "2024-01-12 11:00:00",
"end_time": "2024-01-12 12:00:00",
"email_recipient": "test@willsuite.co.uk"
} ');
$request->setRequestUrl('https://client.willsuite.co.uk/engine/api/cases/d57bc3b7-4f44-4846-9741-985db9af9b61/appointments/cd10afb8-5663-4712-a945-90421929cebe');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'Content-Type' => 'application/json',
'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();Response
json
{
"id": "cd10afb8-5663-4712-a945-90421929cebe",
"customer_case_id": "d57bc3b7-4f44-4846-9741-985db9af9b61",
"type": null,
"notes": null,
"start_time": "2024-01-12T11:00:00.000000Z",
"sms_recipient": null,
"sms_notification": null,
"sms_day_before": 0,
"sms_confirmation": null,
"attended": 0,
"cancelled": 0,
"deleted_at": null,
"created_at": "2024-01-12T14:43:11.000000Z",
"updated_at": "2024-01-12T14:59:28.000000Z",
"location": null,
"email_confirmation": null,
"email_notification": null,
"email_day_before": 0,
"email_recipient": "test@willsuite.co.uk",
"end_time": "2024-01-12 12:00:00",
"zoom_id": null,
"join_url": null
}json
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"customer_case_id": {
"type": "string"
},
"type": {
"type": ["string", "null"]
},
"notes": {
"type": ["string", "null"]
},
"start_time": {
"type": "string",
"format": "date-time"
},
"sms_recipient": {
"type": ["string", "null"]
},
"sms_notification": {
"type": ["string", "null"]
},
"sms_day_before": {
"type": "integer"
},
"sms_confirmation": {
"type": ["string", "null"]
},
"attended": {
"type": "integer"
},
"cancelled": {
"type": "integer"
},
"deleted_at": {
"type": ["string", "null"],
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"location": {
"type": ["string", "null"]
},
"email_confirmation": {
"type": ["string", "null"]
},
"email_notification": {
"type": ["string", "null"]
},
"email_day_before": {
"type": "integer"
},
"email_recipient": {
"type": "string"
},
"end_time": {
"type": "string"
},
"zoom_id": {
"type": ["string", "null"]
},
"join_url": {
"type": ["string", "null"]
}
},
"required": [
"id",
"customer_case_id",
"start_time",
"attended",
"cancelled",
"created_at",
"updated_at",
"email_recipient",
"end_time"
]
}Delete Case Appointment
This API endpoint enables you to delete existing appointment for a case.
Input
HTTP request headers
Content-Type string
Setting to application/json is required.
Authorization string
This is the token you fetched e.g. Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJS…
Path parameters
caseID string - Required
The unique case ID for which you intend to generate a new appointment.
appointmentID string - Required
The unique appointment ID for which you intend to update.
Output
Http status codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 404 | Resource not found |
| 500 | Internal Server Error |
Request example
bash
curl -X DELETE \
'https://client.willsuite.co.uk/engine/api/cases/d57bc3b7-4f44-4846-9741-985db9af9b61/appointments/cd10afb8-5663-4712-a945-90421929cebe' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...'php
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://client.willsuite.co.uk/engine/api/cases/d57bc3b7-4f44-4846-9741-985db9af9b61/appointments/cd10afb8-5663-4712-a945-90421929cebe');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'Content-Type' => 'application/json',
'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();Response
Status: 200