Skip to main content
GET
Get spend by city

Authorizations

Authorization
string
header
required

Bearer JWT issued to your business account during onboarding

Query Parameters

from
string

Start of the range (UTC). A date like 2026-07-08 starts at the beginning of that day. A full timestamp is used as the exact start time and is included.

Example:

"2026-06-01"

to
string

End of the range (UTC). A date like 2026-07-08 includes that whole day. A full timestamp is the exact end time and is not included, so back-to-back ranges do not overlap. Defaults to now.

Example:

"2026-07-01"

userId
string

Filter spend to one end user (Mongo ObjectId). Must belong to this business.

Example:

"507f1f77bcf86cd799439012"

cardId
string

Filter spend to one card (local rainCards _id).

Example:

"507f1f77bcf86cd799439013"

limit
number

Max rows per page (default 25, max 500).

Example:

25

page
number

1-based page number for ranked rows (default 1).

Example:

1

Response

200 - application/json
from
string
required
Example:

"2026-06-01T00:00:00.000Z"

to
string
required
Example:

"2026-07-01T23:59:59.999Z"

totalAmount
number
required

Total spend in USDC cents

Example:

482075

totalTransactions
number
required
Example:

156

page
number
required

Current 1-based page

Example:

1

limit
number
required

Page size

Example:

25

totalRows
number
required

Total ranked rows before paging

Example:

120

totalPages
number
required
Example:

5

rows
object[]
required