Expiring
curl --request GET \
--url https://api.sortx.co.uk/contractor-expiring \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sortx.co.uk/contractor-expiring', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sortx.co.uk/contractor-expiring"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"today": "<string>",
"kpis": {
"expired": 123,
"pausedContractors": 123,
"due30": 123,
"renewalsUploaded30": 123,
"jobsAtRisk": 123,
"due60": 123,
"firstReminderSent60": 123
},
"groups": [
{
"window": "expired",
"label": "<string>",
"count": 123,
"rows": [
{
"credentialId": "<string>",
"contactId": "<string>",
"contractor": "<string>",
"bookingsPaused": true,
"kind": "<string>",
"document": "<string>",
"expiresOn": "<string>",
"expiresLabel": "<string>",
"relative": "<string>",
"daysLeft": 123,
"jobsAffected": 123,
"nextJob": "<string>",
"nextJobOn": "<string>",
"nextJobRepairId": "<string>",
"reminderSteps": 123,
"remindersSent": 123,
"reminderState": "<string>",
"renewalUploaded": true,
"renewalSubmissionId": "<string>",
"action": "reassign",
"phone": "<string>"
}
]
}
],
"chasing": {
"remindDays": [
60
],
"aiCallDays": 123,
"pauseBookingsOnExpiry": true,
"notifyManager": true,
"copyLandlords": true,
"revision": 123
},
"nextRun": {
"reminders": 123,
"aiCalls": 123
}
}{
"_tag": "TenantCreateRejected",
"reason": "<string>",
"field": "<string>"
}{
"_tag": "Unauthenticated"
}{
"_tag": "TenantSuspended",
"tenantId": "<string>",
"reason": "<string>"
}{
"_tag": "EntitlementMissing",
"tenantId": "<string>",
"moduleId": "<string>"
}{
"_tag": "TenantNotFound",
"slug": "<string>"
}{
"_tag": "WebhookDuplicate",
"integration": "<string>",
"externalId": "<string>"
}{
"_tag": "RateLimited",
"key": "<string>",
"retryAfterSeconds": 123,
"message": "<string>"
}{
"_tag": "IntegrationUnavailable",
"integration": "<string>",
"detail": "<string>"
}contractors
Expiring
The Expiring documents board: what lapses next by window, booked jobs it affects, reminders sent, and automatic chasing
GET
/
contractor-expiring
Expiring
curl --request GET \
--url https://api.sortx.co.uk/contractor-expiring \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sortx.co.uk/contractor-expiring', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sortx.co.uk/contractor-expiring"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"today": "<string>",
"kpis": {
"expired": 123,
"pausedContractors": 123,
"due30": 123,
"renewalsUploaded30": 123,
"jobsAtRisk": 123,
"due60": 123,
"firstReminderSent60": 123
},
"groups": [
{
"window": "expired",
"label": "<string>",
"count": 123,
"rows": [
{
"credentialId": "<string>",
"contactId": "<string>",
"contractor": "<string>",
"bookingsPaused": true,
"kind": "<string>",
"document": "<string>",
"expiresOn": "<string>",
"expiresLabel": "<string>",
"relative": "<string>",
"daysLeft": 123,
"jobsAffected": 123,
"nextJob": "<string>",
"nextJobOn": "<string>",
"nextJobRepairId": "<string>",
"reminderSteps": 123,
"remindersSent": 123,
"reminderState": "<string>",
"renewalUploaded": true,
"renewalSubmissionId": "<string>",
"action": "reassign",
"phone": "<string>"
}
]
}
],
"chasing": {
"remindDays": [
60
],
"aiCallDays": 123,
"pauseBookingsOnExpiry": true,
"notifyManager": true,
"copyLandlords": true,
"revision": 123
},
"nextRun": {
"reminders": 123,
"aiCalls": 123
}
}{
"_tag": "TenantCreateRejected",
"reason": "<string>",
"field": "<string>"
}{
"_tag": "Unauthenticated"
}{
"_tag": "TenantSuspended",
"tenantId": "<string>",
"reason": "<string>"
}{
"_tag": "EntitlementMissing",
"tenantId": "<string>",
"moduleId": "<string>"
}{
"_tag": "TenantNotFound",
"slug": "<string>"
}{
"_tag": "WebhookDuplicate",
"integration": "<string>",
"externalId": "<string>"
}{
"_tag": "RateLimited",
"key": "<string>",
"retryAfterSeconds": 123,
"message": "<string>"
}{
"_tag": "IntegrationUnavailable",
"integration": "<string>",
"detail": "<string>"
}