Appearance
Get Case Interactions
This API endpoint enables you to fetch case interactions.
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…
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 GET \
'https://client.willsuite.co.uk/engine/api/cases/d57bc3b7-4f44-4846-9741-985db9af9b61/interactions' \
--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/interactions');
$request->setRequestMethod('GET');
$request->setHeaders([
'Content-Type' => 'application/json',
'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();Response
json
[
{
"id": "c289b268-9814-4f5a-9bb7-baa30735134f",
"type": "email",
"notes": "Test",
"when": "2024-05-17 14:47:00",
"sender": null,
"recipient": "David Jhonson",
"customer_case_id": "40169aac-07d8-4383-960c-c3ac3e506228",
"icon": "fa fa-envelope",
"formatted_type": "email"
}
]json
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"type": {
"type": "string"
},
"notes": {
"type": "string"
},
"when": {
"type": "string",
"format": "date-time"
},
"sender": {
"type": ["string", "null"],
"nullable": true
},
"recipient": {
"type": "string"
},
"customer_case_id": {
"type": "string",
"format": "uuid"
},
"icon": {
"type": "string"
},
"formatted_type": {
"type": "string"
}
},
"required": [
"id",
"type",
"notes",
"when",
"recipient",
"customer_case_id",
"icon",
"formatted_type"
]
}
}Create Case Interaction
This API endpoint enables you to create a new case interaction log.
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
type string - Required
This is the type of interaction (contact type).
Could be one of the following (case-sensitive):
- phone
- SMS
- appointment
- letter
- video_conference
- other
notes string
Maximum 255 characters
Notes of the interaction
when string
Accepted format YYYY-MM-DD HH:mm:ss - e.g. 2024-07-20 10:00:00
Date of the interaction
recipient string
Maximum 255 characters
Recipient of the interaction.
sender string
Maximum 255 characters
Sender of the interaction.
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/interactions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...' \
--data-raw '{
"type" : "email",
"notes" : "API Test",
"when" : "2024-05-17 15:22",
"recipient": "test"
}'php
<?php
$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->append('{
"type" : "email",
"notes" : "API Test",
"when" : "2024-05-17 15:22",
"recipient": "test"
} ');
$request->setRequestUrl('https://client.willsuite.co.uk/engine/api/cases/d57bc3b7-4f44-4846-9741-985db9af9b61/interactions');
$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
{
"id": "db45775b-28c2-4679-87fb-eb2cd57bfce8",
"type": "email",
"notes": "API Test",
"when": "2024-05-17T14:22:00.000000Z",
"sender": null,
"recipient": "test",
"customer_case_id": "d57bc3b7-4f44-4846-9741-985db9af9b61"
}json
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"type": {
"type": "string"
},
"notes": {
"type": "string"
},
"when": {
"type": "string",
"format": "date-time"
},
"sender": {
"type": ["string", "null"],
"nullable": true
},
"recipient": {
"type": "string"
},
"customer_case_id": {
"type": "string",
"format": "uuid"
}
},
"required": [
"id",
"type",
"notes",
"when",
"recipient",
"customer_case_id"
]
}Update Case Interaction
This API endpoint enables you to update existing case interactions
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.
interactionId string - Required
The unique interaction ID for which you intend to update.
Body parameters
type string - Required
This is the type of interaction (contact type).
Could be one of the following (case-sensitive):
- phone
- SMS
- appointment
- letter
- video_conference
- other
notes string
Maximum 255 characters
Notes of the interaction
when string
Accepted format YYYY-MM-DD HH:mm:ss - e.g. 2024-07-20 10:00:00
Date of the interaction
recipient string
Maximum 255 characters
Recipient of the interaction.
sender string
Maximum 255 characters
Sender of the interaction.
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/interactions/db45775b-28c2-4679-87fb-eb2cd57bfce8' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...' \
--data-raw '{
"type" : "email",
"notes" : "Update API Test",
"recipient": "Test2"
} 'php
<?php
$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->append('{
"type" : "email",
"notes" : "Update API Test",
"recipient": "Test2"
} ');
$request->setRequestUrl('https://client.willsuite.co.uk/engine/api/cases/d57bc3b7-4f44-4846-9741-985db9af9b61/interactions/db45775b-28c2-4679-87fb-eb2cd57bfce8');
$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": "db45775b-28c2-4679-87fb-eb2cd57bfce8",
"type": "email",
"notes": "API Test Update",
"when": "2024-05-17T14:22:00.000000Z",
"sender": null,
"recipient": "Adam",
"customer_case_id": "40169aac-07d8-4383-960c-c3ac3e506228"
}json
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"type": {
"type": "string"
},
"notes": {
"type": "string"
},
"when": {
"type": "string",
"format": "date-time"
},
"sender": {
"type": ["string", "null"],
"nullable": true
},
"recipient": {
"type": "string"
},
"customer_case_id": {
"type": "string",
"format": "uuid"
}
},
"required": [
"id",
"type",
"notes",
"when",
"recipient",
"customer_case_id"
]
}