Asset lifecycle
curl --request GET \
--url https://api.sortx.co.uk/maintenance-pro/assets/{assetId}/lifecycle \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sortx.co.uk/maintenance-pro/assets/{assetId}/lifecycle', 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/assets/{assetId}/lifecycle"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, 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
Asset lifecycle
An asset’s lifecycle: age, expected life, repairs and spend, the triggers that suggest replacing it, and its replacement proposals
GET
/
maintenance-pro
/
assets
/
{assetId}
/
lifecycle
Asset lifecycle
curl --request GET \
--url https://api.sortx.co.uk/maintenance-pro/assets/{assetId}/lifecycle \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sortx.co.uk/maintenance-pro/assets/{assetId}/lifecycle', 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/assets/{assetId}/lifecycle"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, 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
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