Appearance
CRM Fields
These are you custom CRM fields.
Get CRM Fields
This API endpoint enables you to fetch all your custom CRM fields.
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/crm-fields' \
--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/crm-fields');
$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": "060f0180-2a3f-425a-9ca9-e06749648614",
"field_label": "Extra Email",
"options": null
},
{
"id": "c5d82b0b-5cb3-46f7-841f-788fdff2ec8a",
"field_label": "Extra Tel",
"options": null
}
]json
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"field_label": { "type": "string" },
"options": { "type": ["null", "array"] }
},
"required": ["id", "field_label", "options"]
}
}