Budget lines
curl --request GET \
--url https://api.sortx.co.uk/planned-maintenance/budgets/{year}/lines \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sortx.co.uk/planned-maintenance/budgets/{year}/lines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sortx.co.uk/planned-maintenance/budgets/{year}/lines"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"period": {
"id": "<string>",
"startYear": 123,
"label": "<string>",
"startsOn": "<string>",
"endsOn": "<string>",
"current": true,
"revision": 123
},
"lines": [
{
"id": "<string>",
"kind": "programmes",
"name": "<string>",
"description": "<string>",
"position": 123,
"countLabel": "<string>",
"budgetMinor": 123,
"spentMinor": 123,
"committedMinor": 123,
"pendingMinor": 123,
"remainingMinor": 123,
"usedPercent": 123
}
],
"total": {
"budgetMinor": 123,
"spentMinor": 123,
"committedMinor": 123,
"pendingMinor": 123,
"remainingMinor": 123,
"usedPercent": 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>"
}planned-maintenance
Budget lines
One financial year’s budget lines
GET
/
planned-maintenance
/
budgets
/
{year}
/
lines
Budget lines
curl --request GET \
--url https://api.sortx.co.uk/planned-maintenance/budgets/{year}/lines \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sortx.co.uk/planned-maintenance/budgets/{year}/lines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sortx.co.uk/planned-maintenance/budgets/{year}/lines"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"period": {
"id": "<string>",
"startYear": 123,
"label": "<string>",
"startsOn": "<string>",
"endsOn": "<string>",
"current": true,
"revision": 123
},
"lines": [
{
"id": "<string>",
"kind": "programmes",
"name": "<string>",
"description": "<string>",
"position": 123,
"countLabel": "<string>",
"budgetMinor": 123,
"spentMinor": 123,
"committedMinor": 123,
"pendingMinor": 123,
"remainingMinor": 123,
"usedPercent": 123
}
],
"total": {
"budgetMinor": 123,
"spentMinor": 123,
"committedMinor": 123,
"pendingMinor": 123,
"remainingMinor": 123,
"usedPercent": 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>"
}