Update on call
curl --request PUT \
--url https://api.sortx.co.uk/maintenance-pro/on-call \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"settings": {
"enabled": true,
"ackMinutes": 0,
"officeHours": {
"mon": {
"open": "<string>",
"close": "<string>"
},
"tue": {
"open": "<string>",
"close": "<string>"
},
"wed": {
"open": "<string>",
"close": "<string>"
},
"thu": {
"open": "<string>",
"close": "<string>"
},
"fri": {
"open": "<string>",
"close": "<string>"
},
"sat": {
"open": "<string>",
"close": "<string>"
},
"sun": {
"open": "<string>",
"close": "<string>"
}
},
"shifts": [
{
"id": "<string>",
"userId": "<string>",
"days": [],
"start": "<string>",
"end": "<string>"
}
]
},
"expectedRevision": 4503599627370495
}
'const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
settings: {
enabled: true,
ackMinutes: 0,
officeHours: {
mon: {open: '<string>', close: '<string>'},
tue: {open: '<string>', close: '<string>'},
wed: {open: '<string>', close: '<string>'},
thu: {open: '<string>', close: '<string>'},
fri: {open: '<string>', close: '<string>'},
sat: {open: '<string>', close: '<string>'},
sun: {open: '<string>', close: '<string>'}
},
shifts: [
{
id: '<string>',
userId: '<string>',
days: [],
start: '<string>',
end: '<string>'
}
]
},
expectedRevision: 4503599627370495
})
};
fetch('https://api.sortx.co.uk/maintenance-pro/on-call', 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/on-call"
payload = {
"settings": {
"enabled": True,
"ackMinutes": 0,
"officeHours": {
"mon": {
"open": "<string>",
"close": "<string>"
},
"tue": {
"open": "<string>",
"close": "<string>"
},
"wed": {
"open": "<string>",
"close": "<string>"
},
"thu": {
"open": "<string>",
"close": "<string>"
},
"fri": {
"open": "<string>",
"close": "<string>"
},
"sat": {
"open": "<string>",
"close": "<string>"
},
"sun": {
"open": "<string>",
"close": "<string>"
}
},
"shifts": [
{
"id": "<string>",
"userId": "<string>",
"days": [],
"start": "<string>",
"end": "<string>"
}
]
},
"expectedRevision": 4503599627370495
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"settings": {
"enabled": true,
"ackMinutes": 0,
"officeHours": {
"mon": {
"open": "<string>",
"close": "<string>"
},
"tue": {
"open": "<string>",
"close": "<string>"
},
"wed": {
"open": "<string>",
"close": "<string>"
},
"thu": {
"open": "<string>",
"close": "<string>"
},
"fri": {
"open": "<string>",
"close": "<string>"
},
"sat": {
"open": "<string>",
"close": "<string>"
},
"sun": {
"open": "<string>",
"close": "<string>"
}
},
"shifts": [
{
"id": "<string>",
"userId": "<string>",
"days": [
"mon"
],
"start": "<string>",
"end": "<string>"
}
]
},
"revision": 123,
"savedAt": "<string>",
"canManage": true,
"timeZone": "<string>",
"members": [
{
"userId": "<string>",
"name": "<string>",
"email": "<string>",
"role": "<string>",
"mobile": "<string>",
"mobileVerified": true
}
],
"nowChain": [
{
"userId": "<string>",
"name": "<string>",
"reason": "rota"
}
],
"outOfHoursNow": true,
"me": {
"userId": "<string>",
"mobile": "<string>",
"verified": true,
"pendingMobile": "<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
Update on call
Save the agency’s office hours and on-call rota (owner or admin)
PUT
/
maintenance-pro
/
on-call
Update on call
curl --request PUT \
--url https://api.sortx.co.uk/maintenance-pro/on-call \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"settings": {
"enabled": true,
"ackMinutes": 0,
"officeHours": {
"mon": {
"open": "<string>",
"close": "<string>"
},
"tue": {
"open": "<string>",
"close": "<string>"
},
"wed": {
"open": "<string>",
"close": "<string>"
},
"thu": {
"open": "<string>",
"close": "<string>"
},
"fri": {
"open": "<string>",
"close": "<string>"
},
"sat": {
"open": "<string>",
"close": "<string>"
},
"sun": {
"open": "<string>",
"close": "<string>"
}
},
"shifts": [
{
"id": "<string>",
"userId": "<string>",
"days": [],
"start": "<string>",
"end": "<string>"
}
]
},
"expectedRevision": 4503599627370495
}
'const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
settings: {
enabled: true,
ackMinutes: 0,
officeHours: {
mon: {open: '<string>', close: '<string>'},
tue: {open: '<string>', close: '<string>'},
wed: {open: '<string>', close: '<string>'},
thu: {open: '<string>', close: '<string>'},
fri: {open: '<string>', close: '<string>'},
sat: {open: '<string>', close: '<string>'},
sun: {open: '<string>', close: '<string>'}
},
shifts: [
{
id: '<string>',
userId: '<string>',
days: [],
start: '<string>',
end: '<string>'
}
]
},
expectedRevision: 4503599627370495
})
};
fetch('https://api.sortx.co.uk/maintenance-pro/on-call', 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/on-call"
payload = {
"settings": {
"enabled": True,
"ackMinutes": 0,
"officeHours": {
"mon": {
"open": "<string>",
"close": "<string>"
},
"tue": {
"open": "<string>",
"close": "<string>"
},
"wed": {
"open": "<string>",
"close": "<string>"
},
"thu": {
"open": "<string>",
"close": "<string>"
},
"fri": {
"open": "<string>",
"close": "<string>"
},
"sat": {
"open": "<string>",
"close": "<string>"
},
"sun": {
"open": "<string>",
"close": "<string>"
}
},
"shifts": [
{
"id": "<string>",
"userId": "<string>",
"days": [],
"start": "<string>",
"end": "<string>"
}
]
},
"expectedRevision": 4503599627370495
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"settings": {
"enabled": true,
"ackMinutes": 0,
"officeHours": {
"mon": {
"open": "<string>",
"close": "<string>"
},
"tue": {
"open": "<string>",
"close": "<string>"
},
"wed": {
"open": "<string>",
"close": "<string>"
},
"thu": {
"open": "<string>",
"close": "<string>"
},
"fri": {
"open": "<string>",
"close": "<string>"
},
"sat": {
"open": "<string>",
"close": "<string>"
},
"sun": {
"open": "<string>",
"close": "<string>"
}
},
"shifts": [
{
"id": "<string>",
"userId": "<string>",
"days": [
"mon"
],
"start": "<string>",
"end": "<string>"
}
]
},
"revision": 123,
"savedAt": "<string>",
"canManage": true,
"timeZone": "<string>",
"members": [
{
"userId": "<string>",
"name": "<string>",
"email": "<string>",
"role": "<string>",
"mobile": "<string>",
"mobileVerified": true
}
],
"nowChain": [
{
"userId": "<string>",
"name": "<string>",
"reason": "rota"
}
],
"outOfHoursNow": true,
"me": {
"userId": "<string>",
"mobile": "<string>",
"verified": true,
"pendingMobile": "<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
Response
Success
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes