Repair case
curl --request GET \
--url https://api.sortx.co.uk/maintenance-pro/repairs/{id}/case \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sortx.co.uk/maintenance-pro/repairs/{id}/case', 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/repairs/{id}/case"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"repairId": "<string>",
"report": {
"channel": "<string>",
"loggedAt": "<string>",
"reportedBy": "<string>",
"loggedBy": "<string>",
"photos": [
{
"documentId": "<string>",
"name": "<string>"
}
]
},
"owner": {
"userId": "<string>",
"name": "<string>"
},
"triage": {
"triaged": true,
"triagedAt": "<string>",
"categoryKey": "damp-and-mould",
"categoryLabel": "<string>",
"priority": "P1",
"priorityLine": "<string>",
"vulnerability": [
"child_under_5"
],
"household": "<string>",
"policy": {
"note": "<string>",
"minimumPriority": "P1",
"inspectionRequired": true
},
"firstVisitDueAt": "<string>",
"firstVisit": "<string>"
},
"accessNotes": "<string>",
"attendances": [
{
"calendarEventId": "<string>",
"engineer": "<string>",
"workDone": "<string>",
"next": "<string>",
"attendedAt": "<string>",
"recordedBy": "<string>"
}
],
"invoice": {
"invoiceId": "<string>",
"number": "<string>",
"receivedAt": "<string>",
"issuedOn": "<string>",
"status": "received",
"currency": "<string>",
"grossMinor": 123,
"revision": 123,
"approvedAt": "<string>",
"approvedBy": "<string>",
"paymentRunOn": "<string>",
"paymentRunLabel": "<string>",
"payment": "not_approved",
"paidOn": "<string>",
"lines": [
{
"id": "<string>",
"code": "<string>",
"description": "<string>",
"visitCalendarEventId": "<string>",
"visitNumber": 123,
"quantity": 123,
"netMinor": 123,
"grossMinor": 123,
"check": "matches_visit",
"checkLabel": "<string>"
}
]
},
"close": {
"tenantConfirmed": {
"at": "<string>",
"source": "tenant"
},
"invoicePaidOn": "<string>",
"surveyAvailable": true,
"dampFollowUp": {
"weeksAfterClose": 123,
"taskId": "<string>",
"dueOn": "<string>"
},
"closedAt": "<string>"
},
"learning": {
"rootCause": "access_equipment_not_ordered",
"changeNextTime": "<string>",
"tags": [
"<string>"
],
"completedAt": "<string>",
"completedBy": "<string>"
},
"learningTagSuggestions": [
"<string>"
],
"visitCount": 123,
"daysOpen": 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>"
}maintenance-pro
Repair case
A repair’s case: report, owner, triage (priority, household, policy), attendance, invoice lines, payment run, final checks and learning
GET
/
maintenance-pro
/
repairs
/
{id}
/
case
Repair case
curl --request GET \
--url https://api.sortx.co.uk/maintenance-pro/repairs/{id}/case \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sortx.co.uk/maintenance-pro/repairs/{id}/case', 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/repairs/{id}/case"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"repairId": "<string>",
"report": {
"channel": "<string>",
"loggedAt": "<string>",
"reportedBy": "<string>",
"loggedBy": "<string>",
"photos": [
{
"documentId": "<string>",
"name": "<string>"
}
]
},
"owner": {
"userId": "<string>",
"name": "<string>"
},
"triage": {
"triaged": true,
"triagedAt": "<string>",
"categoryKey": "damp-and-mould",
"categoryLabel": "<string>",
"priority": "P1",
"priorityLine": "<string>",
"vulnerability": [
"child_under_5"
],
"household": "<string>",
"policy": {
"note": "<string>",
"minimumPriority": "P1",
"inspectionRequired": true
},
"firstVisitDueAt": "<string>",
"firstVisit": "<string>"
},
"accessNotes": "<string>",
"attendances": [
{
"calendarEventId": "<string>",
"engineer": "<string>",
"workDone": "<string>",
"next": "<string>",
"attendedAt": "<string>",
"recordedBy": "<string>"
}
],
"invoice": {
"invoiceId": "<string>",
"number": "<string>",
"receivedAt": "<string>",
"issuedOn": "<string>",
"status": "received",
"currency": "<string>",
"grossMinor": 123,
"revision": 123,
"approvedAt": "<string>",
"approvedBy": "<string>",
"paymentRunOn": "<string>",
"paymentRunLabel": "<string>",
"payment": "not_approved",
"paidOn": "<string>",
"lines": [
{
"id": "<string>",
"code": "<string>",
"description": "<string>",
"visitCalendarEventId": "<string>",
"visitNumber": 123,
"quantity": 123,
"netMinor": 123,
"grossMinor": 123,
"check": "matches_visit",
"checkLabel": "<string>"
}
]
},
"close": {
"tenantConfirmed": {
"at": "<string>",
"source": "tenant"
},
"invoicePaidOn": "<string>",
"surveyAvailable": true,
"dampFollowUp": {
"weeksAfterClose": 123,
"taskId": "<string>",
"dueOn": "<string>"
},
"closedAt": "<string>"
},
"learning": {
"rootCause": "access_equipment_not_ordered",
"changeNextTime": "<string>",
"tags": [
"<string>"
],
"completedAt": "<string>",
"completedBy": "<string>"
},
"learningTagSuggestions": [
"<string>"
],
"visitCount": 123,
"daysOpen": 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