Skip to main content
GET
/
payables
/
spend-summary
Spend summary
const options = {method: 'GET'};

fetch('https://api.dolfinai.co/payables/spend-summary', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "from": "2023-12-25",
  "to": "2023-12-25",
  "defaultCurrency": "<string>",
  "mixedCurrency": true,
  "totals": [
    {
      "currency": "<string>",
      "total": 123,
      "fixed": 123,
      "variable": 123,
      "fixedShare": 123,
      "billCount": 123
    }
  ],
  "byCategory": [
    {
      "currency": "<string>",
      "category": "<string>",
      "total": 123,
      "fixed": 123,
      "variable": 123,
      "billCount": 123,
      "lineItemCount": 123,
      "billIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ]
    }
  ],
  "bySpendClass": [
    {
      "currency": "<string>",
      "total": 123,
      "billCount": 123,
      "billIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ]
    }
  ],
  "bySupplier": [
    {
      "supplierName": "<string>",
      "currency": "<string>",
      "supplierId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "total": 123,
      "fixed": 123,
      "variable": 123,
      "billCount": 123,
      "billIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ]
    }
  ],
  "tags": [
    {
      "tag": "<string>",
      "currency": "<string>",
      "total": 123,
      "billCount": 123,
      "billIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ]
    }
  ],
  "delta": [
    {
      "currency": "<string>",
      "direction": "<string>",
      "previousFrom": "2023-12-25",
      "previousTo": "2023-12-25",
      "previousTotal": 123,
      "deltaAmount": 123,
      "deltaPercent": 123
    }
  ],
  "uncategorisedCount": 123
}

Query Parameters

from
string<date>
to
string<date>

Response

OK

from
string<date>
to
string<date>
defaultCurrency
null | string
mixedCurrency
boolean
totals
object[]
byCategory
object[]
bySpendClass
object[]
bySupplier
object[]
tags
object[]
delta
object[]
uncategorisedCount