Skip to content
campaiDeveloper
campai.com

Finance · Receipts

POST/{organizationId}/{mandateId}/finance/receipts/totalsReads only

Get receipts totals

Returns the number, gross total and open amount of the receipts matching a filter and selection for a given mandate. Credit notes count as negative amounts 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

Body

Content-Type: application/json

  • searchTermstring
  • hasReceiptboolean
  • viewstring
    36 values
    outgoing sales salesArchived incoming payable payableOutgoing payableIncoming paid paidOutgoing paidIncoming allDue allDueOutgoing allDueIncoming reminder overdue overdueOutgoing overdueIncoming due dueOutgoing dueIncoming collectAll collectOverdue collectDue collectOverdueDirectDebits collectDueDirectDebits collectOverdueOnlineDebits collectDueOnlineDebits pending draft canceled canceledOutgoing canceledIncoming archived archivedOutgoing archivedIncoming withDonation
  • userFilterstringnullable

    A stringified json object representing a property filter

  • selectionobject
    2 properties
    • excludeIdsid[]

      1–1000 items

    • idsid[]

      1–1000 items

Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request POST 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/YOUR_MANDATE_ID/finance/receipts/totals' \
  --header 'X-API-Key: YOUR_API_KEY'

No request that worked has been recorded yet, so the body is not shown.

Response

200 Successful response

Content-Type: application/json

  • countinteger

    at least 0

  • totalGrossAmountnumber
  • totalAmountLeftToPaynumber
Response200
{
  "count": 0,
  "totalGrossAmount": 1,
  "totalAmountLeftToPay": 1
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.