Skip to main content
GET
/
payables
/
paid
Total paid summary
const options = {method: 'GET'};

fetch('https://api.dolfinai.co/payables/paid', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "granularity": "<string>",
  "currency": "<string>",
  "summary": {
    "totalPaid": 123,
    "billCount": 123,
    "uniqueSuppliers": 123,
    "averageBill": 123
  },
  "trend": {
    "direction": "<string>",
    "previousPeriodStart": "2023-12-25",
    "previousPeriodEnd": "2023-12-25",
    "previousTotal": 123,
    "deltaAmount": 123,
    "deltaPercent": 123
  },
  "paymentTiming": {
    "verdict": "<string>",
    "billsPaid": 123,
    "averageDaysToPay": 123,
    "averageDaysVsDue": 123,
    "onTermsRate": 123
  },
  "asOf": "2023-12-25",
  "periodStart": "2023-12-25",
  "periodEnd": "2023-12-25",
  "paidByCurrency": [
    {
      "currency": "<string>",
      "amount": 123,
      "count": 123
    }
  ],
  "buckets": [
    {
      "periodStart": "2023-12-25",
      "periodEnd": "2023-12-25",
      "paid": 123,
      "billCount": 123
    }
  ],
  "byMethod": [
    {
      "method": "<string>",
      "paid": 123,
      "billCount": 123
    }
  ],
  "topSuppliers": [
    {
      "supplierName": "<string>",
      "supplierId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "paid": 123,
      "billCount": 123
    }
  ]
}

Query Parameters

period
enum<string>
default:Last30Days
Available options:
Last7Days,
Last30Days,
Last90Days,
Last12Months,
MonthToDate,
QuarterToDate,
YearToDate
currency
string

Response

200 - application/json

OK

granularity
string
required

daily | weekly | monthly

currency
string
required

The primary currency the Summary, Trend, PaymentTiming, Buckets, ByMethod and TopSuppliers fields are reported in. See PaidByCurrency for activity in every currency.

summary
object
required
trend
object
required
paymentTiming
object
required
asOf
string<date>
period
enum<string>
Available options:
Last7Days,
Last30Days,
Last90Days,
Last12Months,
MonthToDate,
QuarterToDate,
YearToDate
periodStart
string<date>
periodEnd
string<date>
paidByCurrency
object[]

Total paid per currency across the period — covers ALL currencies, not just the primary one. Use this for the headline figure when the org pays in multiple currencies so amounts are never reported as zero.

buckets
object[]
byMethod
object[]
topSuppliers
object[]