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

fetch('https://api.dolfinai.co/receivables/received', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "granularity": "<string>",
  "currency": "<string>",
  "summary": {
    "totalReceived": 123,
    "paymentCount": 123,
    "uniqueCustomers": 123,
    "averagePayment": 123
  },
  "trend": {
    "direction": "<string>",
    "previousPeriodStart": "2023-12-25",
    "previousPeriodEnd": "2023-12-25",
    "previousTotal": 123,
    "deltaAmount": 123,
    "deltaPercent": 123
  },
  "asOf": "2023-12-25",
  "periodStart": "2023-12-25",
  "periodEnd": "2023-12-25",
  "receivedByCurrency": [
    {
      "currency": "<string>",
      "amount": 123,
      "count": 123
    }
  ],
  "buckets": [
    {
      "periodStart": "2023-12-25",
      "periodEnd": "2023-12-25",
      "received": 123,
      "paymentCount": 123
    }
  ],
  "byMethod": [
    {
      "method": "<string>",
      "received": 123,
      "paymentCount": 123
    }
  ],
  "topCustomers": [
    {
      "customerName": "<string>",
      "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "received": 123,
      "paymentCount": 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, Buckets, ByMethod and TopCustomers fields are reported in. See ReceivedByCurrency for activity in every currency.

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

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

buckets
object[]
byMethod
object[]
topCustomers
object[]