Charges

Retrieve revenue and charge data over time and totals with trend comparisons.

POST
https://api.seline.com/api/v1/charges
Click anywhere to copy

Charge is a type of event that happens if you use revenue tracking or Stripe integration.

Parameters

period
stringRequired if no range is provided
Predefined time period (today, yesterday, last7d, last30d, last90d, last12mo, mtd, ytd, all). Either period or range is required.
range
objectRequired if no period is provided
Custom date range with from and to ISO 8601 datetime strings. Either period or range is required.
interval
string
Data interval granularity (hour, day, week, month). If not specified, automatically determined from the date range.
filters
object
Optional filters to narrow down data (page, country, browser, device, referrer, campaign, source, medium, etc.)
Example request
curl -X POST 'https://api.seline.com/api/v1/charges' \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"range": {
"from": "2025-06-10T00:00:00Z",
"to": "2025-09-10T00:00:00Z"
},
"interval": "1 day",
"filters": {
"country": "is:US;is:PL",
}
}'
Click anywhere to copy
Response
{
"charges": [
{ "date": "2025-09-17 00:00:00", "charges": 2, "amount": "87.20" },
...
{ "date": "2025-09-18 00:00:00", "charges": 13, "amount": "175.35" },
],
"total": "462.55",
"count": 39,
"previous": {
"charges": [
...
],
"total": "325.25",
},
"trend": 50
}
Click anywhere to copy