Send planned job to landlord
curl --request POST \
--url https://api.sortx.co.uk/planned-maintenance/approvals/send \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"requestId": "<string>",
"id": "<string>",
"expectedRevision": 123,
"note": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({requestId: '<string>', id: '<string>', expectedRevision: 123, note: '<string>'})
};
fetch('https://api.sortx.co.uk/planned-maintenance/approvals/send', 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/approvals/send"
payload = {
"requestId": "<string>",
"id": "<string>",
"expectedRevision": 123,
"note": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"job": {
"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
},
"emailed": true,
"landlordName": "<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
Send planned job to landlord
Send the job’s cost to the property’s landlord for approval
POST
/
planned-maintenance
/
approvals
/
send
Send planned job to landlord
curl --request POST \
--url https://api.sortx.co.uk/planned-maintenance/approvals/send \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"requestId": "<string>",
"id": "<string>",
"expectedRevision": 123,
"note": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({requestId: '<string>', id: '<string>', expectedRevision: 123, note: '<string>'})
};
fetch('https://api.sortx.co.uk/planned-maintenance/approvals/send', 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/approvals/send"
payload = {
"requestId": "<string>",
"id": "<string>",
"expectedRevision": 123,
"note": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"job": {
"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
},
"emailed": true,
"landlordName": "<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