Create complaint
curl --request POST \
--url https://api.sortx.co.uk/maintenance-pro/complaints \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"requestId": "<string>",
"contactId": "<string>",
"complainantName": "<string>",
"complainantEmail": "<string>",
"complainantPhone": "<string>",
"propertyId": "<string>",
"repairId": "<string>",
"summary": "<string>",
"outcomeSought": "<string>",
"receivedOn": "<string>",
"handlerUserId": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requestId: '<string>',
contactId: '<string>',
complainantName: '<string>',
complainantEmail: '<string>',
complainantPhone: '<string>',
propertyId: '<string>',
repairId: '<string>',
summary: '<string>',
outcomeSought: '<string>',
receivedOn: '<string>',
handlerUserId: '<string>'
})
};
fetch('https://api.sortx.co.uk/maintenance-pro/complaints', 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/complaints"
payload = {
"requestId": "<string>",
"contactId": "<string>",
"complainantName": "<string>",
"complainantEmail": "<string>",
"complainantPhone": "<string>",
"propertyId": "<string>",
"repairId": "<string>",
"summary": "<string>",
"outcomeSought": "<string>",
"receivedOn": "<string>",
"handlerUserId": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"complaint": {
"id": "<string>",
"reference": "<string>",
"status": "stage_1",
"stage": 1,
"complainantKind": "tenant",
"complainantName": "<string>",
"complainantEmail": "<string>",
"complainantPhone": "<string>",
"contactId": "<string>",
"propertyId": "<string>",
"propertyLabel": "<string>",
"repairId": "<string>",
"repairReference": "<string>",
"channel": "phone",
"category": "repairs",
"summary": "<string>",
"outcomeSought": "<string>",
"handlerUserId": "<string>",
"handlerName": "<string>",
"timings": {
"scheme": "tpo",
"stage1": {
"acknowledge": {
"days": 123,
"source": "housing_ombudsman_code_2024"
},
"respond": {
"days": 123,
"source": "housing_ombudsman_code_2024"
},
"respondFrom": "received",
"extension": {
"days": 123,
"source": "housing_ombudsman_code_2024"
}
},
"stage2": {
"acknowledge": {
"days": 123,
"source": "housing_ombudsman_code_2024"
},
"respond": {
"days": 123,
"source": "housing_ombudsman_code_2024"
},
"respondFrom": "received",
"extension": {
"days": 123,
"source": "housing_ombudsman_code_2024"
}
},
"referralAfterDays": {
"days": 123,
"source": "housing_ombudsman_code_2024"
}
},
"stage1": {
"stage": 1,
"receivedOn": "<string>",
"acknowledgedOn": "<string>",
"extensionDays": 123,
"extensionReason": "<string>",
"respondedOn": "<string>",
"decision": "upheld",
"response": "<string>",
"remedy": "<string>",
"responderName": "<string>",
"acknowledgeBy": {
"due": "<string>",
"doneOn": "<string>",
"state": "met",
"days": 123,
"source": "housing_ombudsman_code_2024",
"sourceLabel": "<string>"
},
"respondBy": {
"due": "<string>",
"doneOn": "<string>",
"state": "met",
"days": 123,
"source": "housing_ombudsman_code_2024",
"sourceLabel": "<string>"
}
},
"stage2": {
"stage": 1,
"receivedOn": "<string>",
"acknowledgedOn": "<string>",
"extensionDays": 123,
"extensionReason": "<string>",
"respondedOn": "<string>",
"decision": "upheld",
"response": "<string>",
"remedy": "<string>",
"responderName": "<string>",
"acknowledgeBy": {
"due": "<string>",
"doneOn": "<string>",
"state": "met",
"days": 123,
"source": "housing_ombudsman_code_2024",
"sourceLabel": "<string>"
},
"respondBy": {
"due": "<string>",
"doneOn": "<string>",
"state": "met",
"days": 123,
"source": "housing_ombudsman_code_2024",
"sourceLabel": "<string>"
}
},
"remedyAmountMinor": 123,
"closedOn": "<string>",
"closeNote": "<string>",
"referral": {
"scheme": "tpo",
"referredOn": "<string>",
"reference": "<string>",
"mayReferFrom": "<string>",
"outcome": "upheld",
"outcomeOn": "<string>",
"awardMinor": 123,
"note": "<string>"
},
"attention": {
"step": "acknowledge",
"deadline": {
"due": "<string>",
"doneOn": "<string>",
"state": "met",
"days": 123,
"source": "housing_ombudsman_code_2024",
"sourceLabel": "<string>"
},
"label": "<string>"
},
"sameResponderBothStages": true,
"revision": 123,
"createdAt": "<string>"
},
"history": [
{
"action": "<string>",
"at": "<string>",
"actorName": "<string>",
"note": "<string>"
}
],
"today": "<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>"
}maintenance-pro
Create complaint
Log a complaint at stage 1 (idempotent on requestId)
POST
/
maintenance-pro
/
complaints
Create complaint
curl --request POST \
--url https://api.sortx.co.uk/maintenance-pro/complaints \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"requestId": "<string>",
"contactId": "<string>",
"complainantName": "<string>",
"complainantEmail": "<string>",
"complainantPhone": "<string>",
"propertyId": "<string>",
"repairId": "<string>",
"summary": "<string>",
"outcomeSought": "<string>",
"receivedOn": "<string>",
"handlerUserId": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requestId: '<string>',
contactId: '<string>',
complainantName: '<string>',
complainantEmail: '<string>',
complainantPhone: '<string>',
propertyId: '<string>',
repairId: '<string>',
summary: '<string>',
outcomeSought: '<string>',
receivedOn: '<string>',
handlerUserId: '<string>'
})
};
fetch('https://api.sortx.co.uk/maintenance-pro/complaints', 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/complaints"
payload = {
"requestId": "<string>",
"contactId": "<string>",
"complainantName": "<string>",
"complainantEmail": "<string>",
"complainantPhone": "<string>",
"propertyId": "<string>",
"repairId": "<string>",
"summary": "<string>",
"outcomeSought": "<string>",
"receivedOn": "<string>",
"handlerUserId": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"complaint": {
"id": "<string>",
"reference": "<string>",
"status": "stage_1",
"stage": 1,
"complainantKind": "tenant",
"complainantName": "<string>",
"complainantEmail": "<string>",
"complainantPhone": "<string>",
"contactId": "<string>",
"propertyId": "<string>",
"propertyLabel": "<string>",
"repairId": "<string>",
"repairReference": "<string>",
"channel": "phone",
"category": "repairs",
"summary": "<string>",
"outcomeSought": "<string>",
"handlerUserId": "<string>",
"handlerName": "<string>",
"timings": {
"scheme": "tpo",
"stage1": {
"acknowledge": {
"days": 123,
"source": "housing_ombudsman_code_2024"
},
"respond": {
"days": 123,
"source": "housing_ombudsman_code_2024"
},
"respondFrom": "received",
"extension": {
"days": 123,
"source": "housing_ombudsman_code_2024"
}
},
"stage2": {
"acknowledge": {
"days": 123,
"source": "housing_ombudsman_code_2024"
},
"respond": {
"days": 123,
"source": "housing_ombudsman_code_2024"
},
"respondFrom": "received",
"extension": {
"days": 123,
"source": "housing_ombudsman_code_2024"
}
},
"referralAfterDays": {
"days": 123,
"source": "housing_ombudsman_code_2024"
}
},
"stage1": {
"stage": 1,
"receivedOn": "<string>",
"acknowledgedOn": "<string>",
"extensionDays": 123,
"extensionReason": "<string>",
"respondedOn": "<string>",
"decision": "upheld",
"response": "<string>",
"remedy": "<string>",
"responderName": "<string>",
"acknowledgeBy": {
"due": "<string>",
"doneOn": "<string>",
"state": "met",
"days": 123,
"source": "housing_ombudsman_code_2024",
"sourceLabel": "<string>"
},
"respondBy": {
"due": "<string>",
"doneOn": "<string>",
"state": "met",
"days": 123,
"source": "housing_ombudsman_code_2024",
"sourceLabel": "<string>"
}
},
"stage2": {
"stage": 1,
"receivedOn": "<string>",
"acknowledgedOn": "<string>",
"extensionDays": 123,
"extensionReason": "<string>",
"respondedOn": "<string>",
"decision": "upheld",
"response": "<string>",
"remedy": "<string>",
"responderName": "<string>",
"acknowledgeBy": {
"due": "<string>",
"doneOn": "<string>",
"state": "met",
"days": 123,
"source": "housing_ombudsman_code_2024",
"sourceLabel": "<string>"
},
"respondBy": {
"due": "<string>",
"doneOn": "<string>",
"state": "met",
"days": 123,
"source": "housing_ombudsman_code_2024",
"sourceLabel": "<string>"
}
},
"remedyAmountMinor": 123,
"closedOn": "<string>",
"closeNote": "<string>",
"referral": {
"scheme": "tpo",
"referredOn": "<string>",
"reference": "<string>",
"mayReferFrom": "<string>",
"outcome": "upheld",
"outcomeOn": "<string>",
"awardMinor": 123,
"note": "<string>"
},
"attention": {
"step": "acknowledge",
"deadline": {
"due": "<string>",
"doneOn": "<string>",
"state": "met",
"days": 123,
"source": "housing_ombudsman_code_2024",
"sourceLabel": "<string>"
},
"label": "<string>"
},
"sameResponderBothStages": true,
"revision": 123,
"createdAt": "<string>"
},
"history": [
{
"action": "<string>",
"at": "<string>",
"actorName": "<string>",
"note": "<string>"
}
],
"today": "<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
A workspace API key (Settings → API keys), scoped to <group>:read / <group>:write.
Body
application/json
Minimum string length:
1Available options:
tenant, landlord, other Available options:
phone, email, letter, in_person, online, other Available options:
repairs, communication, staff_conduct, fees_charges, deposit, contractor, other