List
curl --request GET \
--url https://api.sortx.co.uk/inspections \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sortx.co.uk/inspections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sortx.co.uk/inspections"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"id": "<string>",
"reference": "<string>",
"type": "routine",
"status": "due",
"propertyId": "<string>",
"propertyLabel": "<string>",
"blockId": "<string>",
"blockLabel": "<string>",
"tenancyId": "<string>",
"dueOn": "<string>",
"overdue": true,
"notes": "<string>",
"summary": "<string>",
"outcome": "satisfactory",
"booking": {
"appointmentId": "<string>",
"status": "held",
"startsAt": "<string>",
"endsAt": "<string>",
"staffId": "<string>",
"staffName": "<string>",
"revision": 123
},
"findingCount": 123,
"followUpCount": 123,
"draftSavedAt": "<string>",
"completedAt": "<string>",
"completedByUserId": "<string>",
"cancelledAt": "<string>",
"cancelReason": "<string>",
"accessNotice": {
"givenAt": "<string>",
"method": "in_person",
"notes": "<string>",
"short": true
},
"acknowledgement": {
"receivedOn": "<string>",
"signed": true,
"commented": true,
"comments": "<string>",
"documentId": "<string>",
"recordedAt": "<string>",
"recordedByUserId": "<string>"
},
"revision": 123,
"createdByUserId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"counts": {
"due": 123,
"overdue": 123,
"booked": 123,
"completed": 123,
"cancelled": 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>"
}inspections
List
Inspections with their booked visit and follow-up counts, and the workspace’s counts
GET
/
inspections
List
curl --request GET \
--url https://api.sortx.co.uk/inspections \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sortx.co.uk/inspections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sortx.co.uk/inspections"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"id": "<string>",
"reference": "<string>",
"type": "routine",
"status": "due",
"propertyId": "<string>",
"propertyLabel": "<string>",
"blockId": "<string>",
"blockLabel": "<string>",
"tenancyId": "<string>",
"dueOn": "<string>",
"overdue": true,
"notes": "<string>",
"summary": "<string>",
"outcome": "satisfactory",
"booking": {
"appointmentId": "<string>",
"status": "held",
"startsAt": "<string>",
"endsAt": "<string>",
"staffId": "<string>",
"staffName": "<string>",
"revision": 123
},
"findingCount": 123,
"followUpCount": 123,
"draftSavedAt": "<string>",
"completedAt": "<string>",
"completedByUserId": "<string>",
"cancelledAt": "<string>",
"cancelReason": "<string>",
"accessNotice": {
"givenAt": "<string>",
"method": "in_person",
"notes": "<string>",
"short": true
},
"acknowledgement": {
"receivedOn": "<string>",
"signed": true,
"commented": true,
"comments": "<string>",
"documentId": "<string>",
"recordedAt": "<string>",
"recordedByUserId": "<string>"
},
"revision": 123,
"createdByUserId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"counts": {
"due": 123,
"overdue": 123,
"booked": 123,
"completed": 123,
"cancelled": 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>"
}Authorizations
A workspace API key (Settings → API keys), scoped to <group>:read / <group>:write.