Works programme
curl --request GET \
--url https://api.sortx.co.uk/planned-maintenance/works-programmes/{id} \
--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/{id}', 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/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"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>",
"jobs": [
{
"id": "<string>",
"programmeId": "<string>",
"propertyId": "<string>",
"addressLine": "<string>",
"area": "<string>",
"kind": "works",
"title": "<string>",
"status": "not_booked",
"scheduledOn": "<string>",
"startMinute": 123,
"endMinute": 123,
"quoteMinor": 123,
"costMinor": 123,
"approvalState": "required",
"tenantNotifiedAt": "<string>",
"accessRefusedAt": "<string>",
"accessRefusedReason": "<string>",
"completedOn": "<string>",
"budgetLineId": "<string>",
"revision": 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>"
}planned-maintenance
Works programme
One works programme with its jobs
GET
/
planned-maintenance
/
works-programmes
/
{id}
Works programme
curl --request GET \
--url https://api.sortx.co.uk/planned-maintenance/works-programmes/{id} \
--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/{id}', 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/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"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>",
"jobs": [
{
"id": "<string>",
"programmeId": "<string>",
"propertyId": "<string>",
"addressLine": "<string>",
"area": "<string>",
"kind": "works",
"title": "<string>",
"status": "not_booked",
"scheduledOn": "<string>",
"startMinute": 123,
"endMinute": 123,
"quoteMinor": 123,
"costMinor": 123,
"approvalState": "required",
"tenantNotifiedAt": "<string>",
"accessRefusedAt": "<string>",
"accessRefusedReason": "<string>",
"completedOn": "<string>",
"budgetLineId": "<string>",
"revision": 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
Response
Success