Log repair contact
curl --request POST \
--url https://api.sortx.co.uk/maintenance-pro/repairs/{id}/contacts \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"requestId": "<string>",
"partyName": "<string>",
"note": "<string>",
"occurredAt": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requestId: '<string>',
partyName: '<string>',
note: '<string>',
occurredAt: '<string>'
})
};
fetch('https://api.sortx.co.uk/maintenance-pro/repairs/{id}/contacts', 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}/contacts"
payload = {
"requestId": "<string>",
"partyName": "<string>",
"note": "<string>",
"occurredAt": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"repairId": "<string>",
"visits": [
{
"number": 123,
"calendarEventId": "<string>",
"startsAt": "<string>",
"endsAt": "<string>",
"state": "booked",
"current": true,
"contractor": "<string>",
"outcome": {
"id": "<string>",
"result": "fixed",
"reasons": [
"tenant_not_home"
],
"note": "<string>",
"source": "staff",
"recordedBy": "<string>",
"recordedAt": "<string>",
"nextStep": {
"parts": {
"part": "<string>",
"supplier": "<string>",
"ordered": true,
"expectedOn": "<string>",
"costMinor": 123,
"currency": "<string>",
"returnDurationMinutes": 123
},
"quote": {
"quoteId": "<string>",
"lines": [
{
"description": "<string>",
"amountMinor": 123
}
],
"totalMinor": 123,
"vatMinor": 123,
"earliestStartOn": "<string>",
"currency": "<string>"
},
"hazard": {
"description": "<string>",
"madeSafe": true,
"anyoneAtRisk": true
},
"returnVisit": {
"needed": "<string>",
"timeNeededMinutes": 123,
"returnBy": "<string>"
},
"photoDocumentIds": [
"<string>"
]
}
},
"arrivals": [
{
"stage": "<string>",
"at": "<string>",
"note": "<string>"
}
]
}
],
"contacts": [
{
"id": "<string>",
"party": "tenant",
"partyName": "<string>",
"channel": "call",
"direction": "outbound",
"result": "spoke",
"note": "<string>",
"occurredAt": "<string>",
"recordedBy": "<string>"
}
],
"summary": {
"visits": 123,
"unfinished": 123,
"contactAttempts": 123,
"unanswered": 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
Log repair contact
Log an attempt to reach the tenant, contractor or landlord about a repair
POST
/
maintenance-pro
/
repairs
/
{id}
/
contacts
Log repair contact
curl --request POST \
--url https://api.sortx.co.uk/maintenance-pro/repairs/{id}/contacts \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"requestId": "<string>",
"partyName": "<string>",
"note": "<string>",
"occurredAt": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requestId: '<string>',
partyName: '<string>',
note: '<string>',
occurredAt: '<string>'
})
};
fetch('https://api.sortx.co.uk/maintenance-pro/repairs/{id}/contacts', 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}/contacts"
payload = {
"requestId": "<string>",
"partyName": "<string>",
"note": "<string>",
"occurredAt": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"repairId": "<string>",
"visits": [
{
"number": 123,
"calendarEventId": "<string>",
"startsAt": "<string>",
"endsAt": "<string>",
"state": "booked",
"current": true,
"contractor": "<string>",
"outcome": {
"id": "<string>",
"result": "fixed",
"reasons": [
"tenant_not_home"
],
"note": "<string>",
"source": "staff",
"recordedBy": "<string>",
"recordedAt": "<string>",
"nextStep": {
"parts": {
"part": "<string>",
"supplier": "<string>",
"ordered": true,
"expectedOn": "<string>",
"costMinor": 123,
"currency": "<string>",
"returnDurationMinutes": 123
},
"quote": {
"quoteId": "<string>",
"lines": [
{
"description": "<string>",
"amountMinor": 123
}
],
"totalMinor": 123,
"vatMinor": 123,
"earliestStartOn": "<string>",
"currency": "<string>"
},
"hazard": {
"description": "<string>",
"madeSafe": true,
"anyoneAtRisk": true
},
"returnVisit": {
"needed": "<string>",
"timeNeededMinutes": 123,
"returnBy": "<string>"
},
"photoDocumentIds": [
"<string>"
]
}
},
"arrivals": [
{
"stage": "<string>",
"at": "<string>",
"note": "<string>"
}
]
}
],
"contacts": [
{
"id": "<string>",
"party": "tenant",
"partyName": "<string>",
"channel": "call",
"direction": "outbound",
"result": "spoke",
"note": "<string>",
"occurredAt": "<string>",
"recordedBy": "<string>"
}
],
"summary": {
"visits": 123,
"unfinished": 123,
"contactAttempts": 123,
"unanswered": 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
A workspace API key (Settings → API keys), scoped to <group>:read / <group>:write.
Path Parameters
Body
application/json
Available options:
tenant, contractor, landlord, other Available options:
call, sms, email, whatsapp, in_person Available options:
outbound, inbound Available options:
spoke, no_answer, voicemail, message, wrong_number, call_back