Accept suggested routing
curl --request POST \
--url https://api.sortx.co.uk/front-desk/suggestions/{id}/accept-routing \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"requestId": "<string>",
"teamId": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({requestId: '<string>', teamId: '<string>'})
};
fetch('https://api.sortx.co.uk/front-desk/suggestions/{id}/accept-routing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sortx.co.uk/front-desk/suggestions/{id}/accept-routing"
payload = {
"requestId": "<string>",
"teamId": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"suggestion": {
"id": "<string>",
"enquiryId": "<string>",
"sourceKind": "whatsapp.message",
"sourceId": "<string>",
"sourceText": "<string>",
"receivedAt": "<string>",
"status": "pending",
"reason": "<string>",
"result": {
"tasks": {
"status": "ready",
"reason": "<string>",
"model": "<string>",
"tasks": [
{
"item": "<string>",
"quote": "<string>",
"title": "<string>",
"typeId": "<string>",
"typeName": "<string>",
"teamId": "<string>",
"teamName": "<string>",
"assigneeStaffId": "<string>",
"dueOn": "<string>",
"confidence": 123
}
],
"uncertainQuotes": [
"<string>"
],
"duplicatesMerged": 123
},
"booking": {
"status": "suggested",
"reason": "<string>",
"model": "<string>",
"intent": "book",
"confidence": 123,
"appointment": {
"id": "<string>",
"kind": "<string>",
"title": "<string>",
"startsAt": "<string>",
"endsAt": "<string>",
"status": "<string>",
"staffId": "<string>",
"propertyId": "<string>",
"revision": 123,
"contactId": "<string>"
},
"lastViewing": {
"id": "<string>",
"kind": "<string>",
"title": "<string>",
"startsAt": "<string>",
"endsAt": "<string>",
"status": "<string>",
"staffId": "<string>",
"propertyId": "<string>",
"revision": 123,
"contactId": "<string>"
},
"postViewing": true,
"feedbackThemes": [
{
"theme": "<string>",
"label": "<string>"
}
],
"interestLabel": "<string>"
},
"routing": {
"status": "suggested",
"reason": "<string>",
"model": "<string>",
"category": "<string>",
"categoryConfidence": 123,
"overlaps": [
"<string>"
],
"teamId": "<string>",
"teamName": "<string>",
"teamConfidence": 123,
"reasons": [
"<string>"
]
}
},
"reviews": [
{
"item": "<string>",
"decision": "accepted",
"recordKind": "<string>",
"recordId": "<string>",
"reviewedByUserId": "<string>",
"note": "<string>",
"createdAt": "<string>"
}
],
"retryParts": [
"tasks"
],
"canRetry": true,
"erasedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
},
"recordKind": "<string>",
"recordId": "<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>"
}front-desk
Accept suggested routing
Route the conversation to the team a person confirmed from a suggestion
POST
/
front-desk
/
suggestions
/
{id}
/
accept-routing
Accept suggested routing
curl --request POST \
--url https://api.sortx.co.uk/front-desk/suggestions/{id}/accept-routing \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"requestId": "<string>",
"teamId": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({requestId: '<string>', teamId: '<string>'})
};
fetch('https://api.sortx.co.uk/front-desk/suggestions/{id}/accept-routing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sortx.co.uk/front-desk/suggestions/{id}/accept-routing"
payload = {
"requestId": "<string>",
"teamId": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"suggestion": {
"id": "<string>",
"enquiryId": "<string>",
"sourceKind": "whatsapp.message",
"sourceId": "<string>",
"sourceText": "<string>",
"receivedAt": "<string>",
"status": "pending",
"reason": "<string>",
"result": {
"tasks": {
"status": "ready",
"reason": "<string>",
"model": "<string>",
"tasks": [
{
"item": "<string>",
"quote": "<string>",
"title": "<string>",
"typeId": "<string>",
"typeName": "<string>",
"teamId": "<string>",
"teamName": "<string>",
"assigneeStaffId": "<string>",
"dueOn": "<string>",
"confidence": 123
}
],
"uncertainQuotes": [
"<string>"
],
"duplicatesMerged": 123
},
"booking": {
"status": "suggested",
"reason": "<string>",
"model": "<string>",
"intent": "book",
"confidence": 123,
"appointment": {
"id": "<string>",
"kind": "<string>",
"title": "<string>",
"startsAt": "<string>",
"endsAt": "<string>",
"status": "<string>",
"staffId": "<string>",
"propertyId": "<string>",
"revision": 123,
"contactId": "<string>"
},
"lastViewing": {
"id": "<string>",
"kind": "<string>",
"title": "<string>",
"startsAt": "<string>",
"endsAt": "<string>",
"status": "<string>",
"staffId": "<string>",
"propertyId": "<string>",
"revision": 123,
"contactId": "<string>"
},
"postViewing": true,
"feedbackThemes": [
{
"theme": "<string>",
"label": "<string>"
}
],
"interestLabel": "<string>"
},
"routing": {
"status": "suggested",
"reason": "<string>",
"model": "<string>",
"category": "<string>",
"categoryConfidence": 123,
"overlaps": [
"<string>"
],
"teamId": "<string>",
"teamName": "<string>",
"teamConfidence": 123,
"reasons": [
"<string>"
]
}
},
"reviews": [
{
"item": "<string>",
"decision": "accepted",
"recordKind": "<string>",
"recordId": "<string>",
"reviewedByUserId": "<string>",
"note": "<string>",
"createdAt": "<string>"
}
],
"retryParts": [
"tasks"
],
"canRetry": true,
"erasedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
},
"recordKind": "<string>",
"recordId": "<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.