Skip to content
campaiDeveloper
campai.com

Finance ยท Statistics

GET/{organizationId}/{mandateId}/finance/statistics/paidRevenueReads only

Get paid revenue

Returns the revenue paid in a period and in the period of the same length right before it, in cents. Refunds count against it, and draft and canceled receipts are left out

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Permission checks in detail
Required permissions
  • mandate.read
  • receipt.read

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired

Query parameters

  • fromDatestringrequired
  • toDatestringrequired
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request GET 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/YOUR_MANDATE_ID/finance/statistics/paidRevenue' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • amountnumber
  • previousAmountnumber
Response200
{
  "amount": 1,
  "previousAmount": 1
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.