v1
latestOpenAPI 3.0.02026-07-2412592575.3 KBspending analysis
Retrieve spending analysis by categories, projects and accounts
Defaults to all categories and accounts if none specified. <br />The categories field in the response has a breakdown of the total by categories for the given periods. You can expect to also receive the breakdown for income and transfer categories. <br />The 'total' field in the response calculates the total outgoing expenditure for the given periods. This calculation do not include income and transfers. <br /> Categories under the transfer group are the only ones that can appear twice showing income and expenditure separately <br />Requires spending_analysis:read scope.
post/spending-analysis
Request body
Example request
{
"dates": [
{
"name": "currentMonth",
"from": "2018-10-01",
"to": "2018-10-31"
},
{
"name": "previousMonth",
"from": "2018-09-01",
"to": "2018-09-30"
}
],
"accountIds": [
"ac9bd177-d01e-449c-9f29-d3656d2edc2e"
],
"categoryIds": [
"std:338d2636-7f88-491d-8129-255c98da1eb8"
]
}Response
Successful Spending Analysis Response
Example response
{
"data": {
"categories": [
{
"categoryId": "std:65ebdcdb-c46b-478f-bbbc-feabeb0b4342",
"categoryGroup": "group:2",
"currentMonth": -2000,
"previousMonth": -1000
},
{
"categoryId": "std:379c7ed2-27f3-401f-b581-f6507934f0f0",
"categoryGroup": "group:3",
"currentMonth": -1500,
"previousMonth": -500
}
],
"total": {
"currentMonth": -3500,
"previousMonth": -1500
}
}
}