Book all due
curl --request POST \
--url https://api.sortx.co.uk/inspections/routine/book-all-due \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"propertyIds": [
"<string>"
],
"schedule": {
"date": "<string>",
"startMinute": 123,
"durationMinutes": 123,
"gapMinutes": 123,
"staffId": "<string>"
}
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
propertyIds: ['<string>'],
schedule: {
date: '<string>',
startMinute: 123,
durationMinutes: 123,
gapMinutes: 123,
staffId: '<string>'
}
})
};
fetch('https://api.sortx.co.uk/inspections/routine/book-all-due', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sortx.co.uk/inspections/routine/book-all-due"
payload = {
"propertyIds": ["<string>"],
"schedule": {
"date": "<string>",
"startMinute": 123,
"durationMinutes": 123,
"gapMinutes": 123,
"staffId": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"created": 123,
"booked": 123,
"inspections": [
{
"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>"
},
"followsInspectionId": "<string>",
"accessNote": "<string>",
"reportSentAt": "<string>",
"reportSentToEmail": "<string>",
"revision": 123,
"createdByUserId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
]
}{
"_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
Book all due
Open a routine inspection for every property due (overdue or due soon), and optionally book them into the diary
POST
/
inspections
/
routine
/
book-all-due
Book all due
curl --request POST \
--url https://api.sortx.co.uk/inspections/routine/book-all-due \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"propertyIds": [
"<string>"
],
"schedule": {
"date": "<string>",
"startMinute": 123,
"durationMinutes": 123,
"gapMinutes": 123,
"staffId": "<string>"
}
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
propertyIds: ['<string>'],
schedule: {
date: '<string>',
startMinute: 123,
durationMinutes: 123,
gapMinutes: 123,
staffId: '<string>'
}
})
};
fetch('https://api.sortx.co.uk/inspections/routine/book-all-due', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sortx.co.uk/inspections/routine/book-all-due"
payload = {
"propertyIds": ["<string>"],
"schedule": {
"date": "<string>",
"startMinute": 123,
"durationMinutes": 123,
"gapMinutes": 123,
"staffId": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"created": 123,
"booked": 123,
"inspections": [
{
"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>"
},
"followsInspectionId": "<string>",
"accessNote": "<string>",
"reportSentAt": "<string>",
"reportSentToEmail": "<string>",
"revision": 123,
"createdByUserId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
]
}{
"_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
Body
application/json