Skip to content
campaiDeveloper
campai.com

Finance ยท Statistics

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

Get due receipts

Returns how many outgoing receipts are overdue, due or in a reminder today, and the five of them that have been due the longest. Amounts are in cents

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
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/dueReceipts' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • overdueCountinteger

    at least 0

  • dueCountinteger

    at least 0

  • reminderCountinteger

    at least 0

  • receiptsobject[]
    6 properties
    • _idid
    • statusstring
      overdue due reminder
    • accountNamestring
    • receiptNumberstringnullable
    • dueDatestring
    • totalAmountLeftToPaynumber
Response200
{
  "overdueCount": 0,
  "dueCount": 0,
  "reminderCount": 0,
  "receipts": [
    {
      "_id": "000000000000000000000001",
      "status": "overdue",
      "accountName": "string",
      "receiptNumber": "string",
      "dueDate": "string",
      "totalAmountLeftToPay": 1
    }
  ]
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.