Record proposal decision
curl --request POST \
--url https://api.sortx.co.uk/maintenance-pro/replacement-proposals/{proposalId}/decision \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"requestId": "<string>",
"expectedRevision": 123,
"decidedOn": "<string>",
"note": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requestId: '<string>',
expectedRevision: 123,
decidedOn: '<string>',
note: '<string>'
})
};
fetch('https://api.sortx.co.uk/maintenance-pro/replacement-proposals/{proposalId}/decision', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sortx.co.uk/maintenance-pro/replacement-proposals/{proposalId}/decision"
payload = {
"requestId": "<string>",
"expectedRevision": 123,
"decidedOn": "<string>",
"note": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"assetId": "<string>",
"propertyId": "<string>",
"blockId": "<string>",
"installedOn": "<string>",
"ageMonths": 123,
"expectedLifeYears": 123,
"replacementCost": {
"amountMinor": 123,
"currency": "<string>"
},
"installCost": {
"amountMinor": 123,
"currency": "<string>"
},
"installerContactId": "<string>",
"retiredAt": "<string>",
"retiredReason": "replaced",
"replacedByAssetId": "<string>",
"revision": 123,
"state": "in_service",
"triggers": [
{
"kind": "open_repair",
"label": "<string>",
"now": "<string>",
"met": true,
"known": true,
"outcome": "<string>"
}
],
"openRepairs": [
{
"id": "<string>",
"reference": "<string>",
"description": "<string>",
"urgency": "<string>",
"status": "<string>"
}
],
"repairsLast12Months": 123,
"spendLast12Months": {
"amountMinor": 123,
"currency": "<string>"
},
"spendToDate": {
"amountMinor": 123,
"currency": "<string>"
},
"landlordContactId": "<string>",
"landlordEmail": "<string>",
"proposals": [
{
"id": "<string>",
"assetId": "<string>",
"status": "draft",
"reason": "repeat_faults",
"currency": "<string>",
"options": [
{
"kind": "repair",
"costMinor": 123,
"contractorContactId": "<string>",
"note": "<string>"
}
],
"recommendation": "repair",
"message": "<string>",
"landlordContactId": "<string>",
"sentAt": "<string>",
"sentTo": "<string>",
"decision": "repair",
"decidedVia": "email",
"decidedOn": "<string>",
"decisionNote": "<string>",
"workOrderRepairId": "<string>",
"revision": 123,
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"canEdit": true
}{
"_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>"
}maintenance-pro
Record proposal decision
Record the owner’s decision; approving a replacement raises the replacement work order
POST
/
maintenance-pro
/
replacement-proposals
/
{proposalId}
/
decision
Record proposal decision
curl --request POST \
--url https://api.sortx.co.uk/maintenance-pro/replacement-proposals/{proposalId}/decision \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"requestId": "<string>",
"expectedRevision": 123,
"decidedOn": "<string>",
"note": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requestId: '<string>',
expectedRevision: 123,
decidedOn: '<string>',
note: '<string>'
})
};
fetch('https://api.sortx.co.uk/maintenance-pro/replacement-proposals/{proposalId}/decision', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sortx.co.uk/maintenance-pro/replacement-proposals/{proposalId}/decision"
payload = {
"requestId": "<string>",
"expectedRevision": 123,
"decidedOn": "<string>",
"note": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"assetId": "<string>",
"propertyId": "<string>",
"blockId": "<string>",
"installedOn": "<string>",
"ageMonths": 123,
"expectedLifeYears": 123,
"replacementCost": {
"amountMinor": 123,
"currency": "<string>"
},
"installCost": {
"amountMinor": 123,
"currency": "<string>"
},
"installerContactId": "<string>",
"retiredAt": "<string>",
"retiredReason": "replaced",
"replacedByAssetId": "<string>",
"revision": 123,
"state": "in_service",
"triggers": [
{
"kind": "open_repair",
"label": "<string>",
"now": "<string>",
"met": true,
"known": true,
"outcome": "<string>"
}
],
"openRepairs": [
{
"id": "<string>",
"reference": "<string>",
"description": "<string>",
"urgency": "<string>",
"status": "<string>"
}
],
"repairsLast12Months": 123,
"spendLast12Months": {
"amountMinor": 123,
"currency": "<string>"
},
"spendToDate": {
"amountMinor": 123,
"currency": "<string>"
},
"landlordContactId": "<string>",
"landlordEmail": "<string>",
"proposals": [
{
"id": "<string>",
"assetId": "<string>",
"status": "draft",
"reason": "repeat_faults",
"currency": "<string>",
"options": [
{
"kind": "repair",
"costMinor": 123,
"contractorContactId": "<string>",
"note": "<string>"
}
],
"recommendation": "repair",
"message": "<string>",
"landlordContactId": "<string>",
"sentAt": "<string>",
"sentTo": "<string>",
"decision": "repair",
"decidedVia": "email",
"decidedOn": "<string>",
"decisionNote": "<string>",
"workOrderRepairId": "<string>",
"revision": 123,
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"canEdit": true
}{
"_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
A workspace API key (Settings → API keys), scoped to <group>:read / <group>:write.
Path Parameters
Body
application/json
Response
Success
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
replaced, removed, condemned, other Available options:
in_service, on_watch, replacement_suggested, retired Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes