Update schedule job
curl --request PATCH \
--url https://api.sortx.co.uk/planned-maintenance/schedule/jobs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"id": "<string>",
"expectedRevision": 123,
"estCostMinor": 123,
"actualCostMinor": 123,
"tenantNotified": true,
"accessRefused": {
"reason": "<string>"
},
"budgetLineId": "<string>",
"scheduledOn": "<string>",
"startMinute": 123,
"endMinute": 123,
"title": "<string>",
"completedOn": "<string>"
}
'const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
expectedRevision: 123,
estCostMinor: 123,
actualCostMinor: 123,
tenantNotified: true,
accessRefused: {reason: '<string>'},
budgetLineId: '<string>',
scheduledOn: '<string>',
startMinute: 123,
endMinute: 123,
title: '<string>',
completedOn: '<string>'
})
};
fetch('https://api.sortx.co.uk/planned-maintenance/schedule/jobs', 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/schedule/jobs"
payload = {
"id": "<string>",
"expectedRevision": 123,
"estCostMinor": 123,
"actualCostMinor": 123,
"tenantNotified": True,
"accessRefused": { "reason": "<string>" },
"budgetLineId": "<string>",
"scheduledOn": "<string>",
"startMinute": 123,
"endMinute": 123,
"title": "<string>",
"completedOn": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"key": "<string>",
"source": "cycle",
"id": "<string>",
"title": "<string>",
"propertyId": "<string>",
"blockId": "<string>",
"addressLine": "<string>",
"area": "<string>",
"sourceLabel": "<string>",
"cycleId": "<string>",
"programmeId": "<string>",
"contractorContactId": "<string>",
"contractorName": "<string>",
"dueOn": "<string>",
"overdue": true,
"estCostMinor": 123,
"status": "assign",
"approvalState": "required",
"tenantNotifiedAt": "<string>",
"accessRefusedAt": "<string>",
"accessRefusedReason": "<string>",
"skippable": true,
"booking": {
"date": "<string>",
"startMinute": 123,
"endMinute": 123
},
"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
Update schedule job
Change a schedule job’s plan: estimated or actual cost, tenant notified, access refused, budget line; a programme job’s date, time, title and status
PATCH
/
planned-maintenance
/
schedule
/
jobs
Update schedule job
curl --request PATCH \
--url https://api.sortx.co.uk/planned-maintenance/schedule/jobs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"id": "<string>",
"expectedRevision": 123,
"estCostMinor": 123,
"actualCostMinor": 123,
"tenantNotified": true,
"accessRefused": {
"reason": "<string>"
},
"budgetLineId": "<string>",
"scheduledOn": "<string>",
"startMinute": 123,
"endMinute": 123,
"title": "<string>",
"completedOn": "<string>"
}
'const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
expectedRevision: 123,
estCostMinor: 123,
actualCostMinor: 123,
tenantNotified: true,
accessRefused: {reason: '<string>'},
budgetLineId: '<string>',
scheduledOn: '<string>',
startMinute: 123,
endMinute: 123,
title: '<string>',
completedOn: '<string>'
})
};
fetch('https://api.sortx.co.uk/planned-maintenance/schedule/jobs', 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/schedule/jobs"
payload = {
"id": "<string>",
"expectedRevision": 123,
"estCostMinor": 123,
"actualCostMinor": 123,
"tenantNotified": True,
"accessRefused": { "reason": "<string>" },
"budgetLineId": "<string>",
"scheduledOn": "<string>",
"startMinute": 123,
"endMinute": 123,
"title": "<string>",
"completedOn": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"key": "<string>",
"source": "cycle",
"id": "<string>",
"title": "<string>",
"propertyId": "<string>",
"blockId": "<string>",
"addressLine": "<string>",
"area": "<string>",
"sourceLabel": "<string>",
"cycleId": "<string>",
"programmeId": "<string>",
"contractorContactId": "<string>",
"contractorName": "<string>",
"dueOn": "<string>",
"overdue": true,
"estCostMinor": 123,
"status": "assign",
"approvalState": "required",
"tenantNotifiedAt": "<string>",
"accessRefusedAt": "<string>",
"accessRefusedReason": "<string>",
"skippable": true,
"booking": {
"date": "<string>",
"startMinute": 123,
"endMinute": 123
},
"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
Body
application/json
Response
Success