fepli
DevelopersAPI resources

Debtors

A debtor is a family's ledger: what they paid, which fees are still open, and their balance. A family gets a debtor with their first attendance.

All debtor endpoints need ROLE_ADMIN and ROLE_PAYMENTS_ADMIN, and they answer 404 Not Found while the app Zahlungen is switched off. Amounts are in cents. In book entries, positive values credit the family and negative values are claims against them.

The debtor model

  • Name
    uuid
    Type
    string
    Description

    The debtor's identifier.

  • Name
    account
    Type
    reference
    Description

    The account.

  • Name
    balance
    Type
    integer
    Description

    The sum of all book entries that aren't payments, in cents: book entries added by hand, balance used on receipts, claims for partly paid fees, and reversals credited to the balance. A positive balance is used up by the next payment; a negative balance is a claim.

  • Name
    paid
    Type
    integer
    Description

    The sum of the payment book entries, in cents: money received, minus reversals that were paid out.

  • Name
    due
    Type
    integer
    Description

    The sum of the fees of the open attendances, in cents.

  • Name
    openAttendances
    Type
    string[]
    Description

    The UUIDs of the attendances whose fee is due and unpaid.

  • Name
    receipts
    Type
    reference[]
    Description

    The family's receipts. The reference's name is the receipt number.

  • Name
    bookEntries
    Type
    object[]
    Description

    The debtor's book entries. Each has a uuid, a bookingDate, a value in cents, a type (payment for money received or paid out, manual for everything else), the postingRecord text, and the UUID of the receipt that created it, or null for a book entry added by hand.


GET/debtors

List all debtors

Returns a page of debtors, ordered by the family's last name. Outside your own tenant, and where the tenant encrypts the names of its participants, they are ordered by creation.

Optional filters

  • Name
    q
    Type
    string
    Description

    Only debtors of families whose name or e-mail address contains this text. Matches nothing outside your own tenant.

  • Name
    account
    Type
    string
    Description

    Only the debtor of this account (UUID, or e-mail address within your own tenant).

  • Name
    withBalance
    Type
    boolean
    Description

    true for debtors with a positive balance only.

  • Name
    page, itemsPerPage
    Type
    integer
    Description

    See Pagination.

GET/debtors
curl -G https://example.fepli.eu/api/debtors \
  -H "Authorization: Bearer $FEPLI_TOKEN" \
  --data-urlencode "account=familie.mueller@example.org"

Response

[
  {
    "uuid": "0191c7b4-5a6b-7c8d-9e0f-1a2b3c4d5e09",
    "account": {
      "uuid": "0191c7b2-4d5e-7f60-8a1b-2c3d4e5f6a05",
      "name": "Anna Müller"
    },
    "balance": 0,
    "paid": 1250,
    "due": 400,
    "bookEntries": [
      {
        "uuid": "0192e1a1-0a1b-7c2d-8e3f-4a5b6c7d8e29",
        "bookingDate": "2026-09-10T10:22:31+02:00",
        "value": 1250,
        "type": "payment",
        "postingRecord": "RE-142",
        "receipt": "0192e1a0-7b8c-7d9e-a0f1-2b3c4d5e6f08"
      }
    ],
    "receipts": [
      { "uuid": "0192e1a0-7b8c-7d9e-a0f1-2b3c4d5e6f08", "name": "RE-142" }
    ],
    "openAttendances": ["0192d0f9-5c6d-7e7f-9a8b-0c1d2e3f4a30"]
  }
]

GET/debtors/{uuid}

Retrieve a debtor

Returns one debtor. An account's debtor UUID is in its debtor field.

GET/debtors/{uuid}
curl https://example.fepli.eu/api/debtors/0191c7b4-5a6b-7c8d-9e0f-1a2b3c4d5e09 \
  -H "Authorization: Bearer $FEPLI_TOKEN"

POST/debtors/{uuid}/book-entries

Add a book entry

Adds a manual book entry to the debtor: a credit for the family, for example after an overpayment, or a claim against them. Returns the updated debtor.

Required attributes

  • Name
    value
    Type
    integer
    Description

    The amount in cents. Positive credits the family, negative charges them. Can't be 0.

  • Name
    postingRecord
    Type
    string
    Description

    The posting record, up to 255 characters.

POST/debtors/{uuid}/book-entries
curl -X POST https://example.fepli.eu/api/debtors/0191c7b4-5a6b-7c8d-9e0f-1a2b3c4d5e09/book-entries \
  -H "Authorization: Bearer $FEPLI_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"value": 500, "postingRecord": "Gutschrift: doppelt überwiesen"}'

Was this page helpful?