Skip to content
campaiDeveloper
campai.com

Finance ยท Statistics

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

Get cash flow

Returns the money in and out of the cash accounts and cash registers in a period and in the period of the same length right before it, with the split per month. Money moved between two of these accounts and opening balances are left out. All amounts are in cents. Null without full accounting

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
  • posting.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/cashFlow' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • incomenumber
  • expensesnumber
  • previousIncomenumber
  • previousExpensesnumber
  • monthsobject[]
    3 properties
    • datestring
    • incomenumber
    • expensesnumber
Response200
{
  "income": 1,
  "expenses": 1,
  "previousIncome": 1,
  "previousExpenses": 1,
  "months": [
    {
      "date": "string",
      "income": 1,
      "expenses": 1
    }
  ]
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.