Works programmes
curl --request GET \
--url https://api.sortx.co.uk/planned-maintenance/works-programmes \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sortx.co.uk/planned-maintenance/works-programmes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sortx.co.uk/planned-maintenance/works-programmes"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"kpis": {
"active": 123,
"completedThisYear": 123,
"propertiesCovered": 123,
"unitsFinished": 123,
"budgetMinor": 123,
"budgetYearLabel": "<string>",
"spentMinor": 123,
"committedMinor": 123,
"usedPercent": 123
},
"counts": {
"all": 123,
"in_progress": 123,
"planning": 123,
"complete": 123
},
"timeline": {
"today": "<string>",
"startsOn": "<string>",
"endsOn": "<string>",
"months": [
"<string>"
],
"rows": [
{
"id": "<string>",
"name": "<string>",
"status": "planning",
"properties": 123,
"propertiesDone": 123,
"startsOn": "<string>",
"endsOn": "<string>",
"doneThrough": "<string>"
}
]
},
"items": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"status": "planning",
"contractorContactId": "<string>",
"contractorName": "<string>",
"quotesReceived": 123,
"contractorDecisionBy": "<string>",
"startsOn": "<string>",
"endsOn": "<string>",
"completedOn": "<string>",
"properties": 123,
"propertiesDone": 123,
"budgetMinor": 123,
"spentMinor": 123,
"committedMinor": 123,
"leftMinor": 123,
"awaitingApproval": 123,
"landlordApprovalAboveMinor": 123,
"budgetLineId": "<string>",
"followOnCycleId": "<string>",
"followOnDueOn": "<string>",
"nextAction": {
"kind": "approval",
"propertyLabel": "<string>",
"amountMinor": 123
},
"nextActionLabel": "<string>",
"revision": 123,
"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>"
}planned-maintenance
Works programmes
Programmes: capital works across many properties, with KPIs, the timeline and each programme’s budget meter and next action
GET
/
planned-maintenance
/
works-programmes
Works programmes
curl --request GET \
--url https://api.sortx.co.uk/planned-maintenance/works-programmes \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sortx.co.uk/planned-maintenance/works-programmes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sortx.co.uk/planned-maintenance/works-programmes"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"kpis": {
"active": 123,
"completedThisYear": 123,
"propertiesCovered": 123,
"unitsFinished": 123,
"budgetMinor": 123,
"budgetYearLabel": "<string>",
"spentMinor": 123,
"committedMinor": 123,
"usedPercent": 123
},
"counts": {
"all": 123,
"in_progress": 123,
"planning": 123,
"complete": 123
},
"timeline": {
"today": "<string>",
"startsOn": "<string>",
"endsOn": "<string>",
"months": [
"<string>"
],
"rows": [
{
"id": "<string>",
"name": "<string>",
"status": "planning",
"properties": 123,
"propertiesDone": 123,
"startsOn": "<string>",
"endsOn": "<string>",
"doneThrough": "<string>"
}
]
},
"items": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"status": "planning",
"contractorContactId": "<string>",
"contractorName": "<string>",
"quotesReceived": 123,
"contractorDecisionBy": "<string>",
"startsOn": "<string>",
"endsOn": "<string>",
"completedOn": "<string>",
"properties": 123,
"propertiesDone": 123,
"budgetMinor": 123,
"spentMinor": 123,
"committedMinor": 123,
"leftMinor": 123,
"awaitingApproval": 123,
"landlordApprovalAboveMinor": 123,
"budgetLineId": "<string>",
"followOnCycleId": "<string>",
"followOnDueOn": "<string>",
"nextAction": {
"kind": "approval",
"propertyLabel": "<string>",
"amountMinor": 123
},
"nextActionLabel": "<string>",
"revision": 123,
"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>"
}