Skip to content
SETSimple Easy Transactions
SET DocsSET Crypto API Suite and SET API referenceCurrent as of 2026-11-21 · wallet release 7d8a79fb
Browse: SET API

SET API · Analytics

Invoices: invoiced, received, outstanding, refunded

GET/v1/analytics/sales

Key scope: read · Success: 200

Invoice totals for invoices created in the window: per currency invoices (the count), invoiced, received, outstanding and refunded, and byState, one row per invoice state and currency. It reads invoices and refunds, not balance transactions.

Query parameters

since string
A UTC date, YYYY-MM-DD: the first day counted, on each invoice's creation time. With neither since nor until, the window is the last 30 days ending tomorrow at 00:00 UTC.
until string
A UTC date, YYYY-MM-DD, exclusive. It must be after since and at most 366 days later.

Notes

  • Needs the read scope. Any account type; no deployment switch.
  • An account with no invoices answers 200 with empty totals and byState.
  • A window longer than 366 days answers 400 window_too_long; a malformed date, or an until that is not after since, answers 400 window_invalid.
  • outstanding is invoiced minus received, for open invoices only.
  • received includes the payment tag, so it can exceed invoiced: in the example INV-9001 was invoiced 250.00 and paid at its payableAmount, 250.004741.
  • The example was made with a sandbox key on a business account, with one invoice paid and one left open.
  • This example is a recorded run of SET's own code (wallet release e9b03447) with a sandbox key; ids and times are that run's.

Errors

  • 400 window_invalid
  • 400 window_too_long

All codes: Errors.