APG PayAPG Paydocs

Loans

List loan statements

GET/loan-statements
Request
GEThttps://api.tst.au.apgpay.dev/loan-statements
curl -X GET https://api.tst.au.apgpay.dev/loan-statements \
  -H "Authorization: Bearer $API_KEY"

Return a page of loan statements. Without q, a query with no loanId, referenceStatementId or date bound reads the statements created in the last 90 days, and an upper bound alone reads the 90 days ending there. A q search covers all of the borrower's statements, as far as the caller's delegate loan access allows, so an old statement is found by its reference. GET /filter-catalogues/loan-statements lists the filters this caller can use. A cursor continues only the walk that issued it: sent with different filters, q or sort, it is refused with 400.

Permissions

Required permission
loanStatements:query

Requires the `query` action on `loanStatements` for the supplied runtime context

Query parameters

qstring

Search. Matches a statement id, the id of its loan, or the reference statement id. An id, an email address, a phone number and any value listed as matched exactly match exactly; any other term matches without regard to case from the start of a value (or of any word in it, beside a longer word of the term), or anywhere in it from three characters, every word of it somewhere; a term that matches nothing so is read again with typos tolerated. Closest matches come first unless sort is given.

pageinteger (int32)

Offset pagination: 1-based page number. Mutually exclusive with the cursor parameters.

startingAfterstring

Cursor pagination, moving forward: the id of the last item on the current page. Mutually exclusive with page.

endingBeforestring

Cursor pagination, moving backward: the id of the first item on the current page. Mutually exclusive with page.

limitinteger (int32)

Maximum items per page.

sortarray of LstmtSort

Fields to sort by, comma-delimited, in priority order. Prefix a field with - for descending.

columnsarray of LstmtColumn

Columns to include, in order, when asking for text/csv. Omit for all of them. Sending it with application/json is a 400.

statusone of LstmtStatus, array of LstmtStatus

Only loan statements whose status is one of these. Repeat the parameter to give several.

statusNotone of LstmtStatus, array of LstmtStatus

Leave out loan statements whose status is one of these. Repeat the parameter to give several.

loanIdone of array of string, string

Only loan statements whose loan is one of these. Repeat the parameter to give several.

loanIdNotone of array of string, string

Leave out loan statements whose loan is one of these. Repeat the parameter to give several.

merchantIdone of array of string, string

Only loan statements whose borrowing merchant is one of these. Repeat the parameter to give several.

merchantIdNotone of array of string, string

Leave out loan statements whose borrowing merchant is one of these. Repeat the parameter to give several.

customerIdone of array of string, string

Only loan statements whose borrowing customer is one of these. Repeat the parameter to give several.

customerIdNotone of array of string, string

Leave out loan statements whose borrowing customer is one of these. Repeat the parameter to give several.

customerIdAbsentboolean

true for only loan statements with no borrowing customer, false for only those with one.

referenceStatementIdstring

Find a statement by the platform's own reference.

currencyone of IsoCurrency, array of IsoCurrency

Only loan statements whose currency is one of these. Repeat the parameter to give several.

currencyNotone of IsoCurrency, array of IsoCurrency

Leave out loan statements whose currency is one of these. Repeat the parameter to give several.

dueFromstring (date)

Only loan statements whose due date is at or after this ISO-8601 date.

dueTostring (date)

Only loan statements whose due date is at or before this ISO-8601 date.

createdAfterstring (date-time)

Only loan statements whose cut time is at or after this ISO-8601 timestamp.

createdBeforestring (date-time)

Only loan statements whose cut time is before, and not at, this ISO-8601 timestamp.

Responses

The response is a tagged shape: type is always "LstmtPageAttributes". Switch on it; subtypes can be added, and a client that already reads it will not break.

Discriminated by type
type = "LstmtPageAttributes"
hasMorebooleanrequired

Whether further items exist after this page.

Example true

nextStartingAfterstring

Id to pass as startingAfter to fetch the next page. Present in cursor mode only.

totalCountinteger (int64)

Total items matching the query.

Example 42

pageinteger (int32)

The 1-based page returned. Present in offset mode only.

Example 1250

totalPagesinteger (int32)

Total pages available. Present in offset mode only.

Example 1250

Example
{
  "type": "LstmtPageAttributes",
  "data": [
    {
      "type": "LstmtViewAttributes",
      "loanStatementId": "lstmt_9f2Kd8QpLzXw",
      "loanId": "loan_9f2Kd8QpLzXw",
      "referenceStatementId": "your-own-reference",
      "merchantId": "mcht_9f2Kd8QpLzXw",
      "customerId": "cust_9f2Kd8QpLzXw",
      "status": "Draft",
      "periodStart": "2026-08-19",
      "periodEnd": "2026-08-19",
      "billingDate": "2026-08-19",
      "dueDate": "2026-08-19",
      "statementFrequency": {
        "type": "LprodFrequencyDaily"
      },
      "amounts": {
        "type": "LstmtAmountsAttributes",
        "currency": "AUD",
        "net": 1250,
        "insurance": 1250,
        "tax": 1250,
        "billed": 1250,
        "fees": 1250,
        "paid": 1250,
        "outstanding": 1250,
        "credited": 1250
      },
      "entries": [
        {
          "type": "LstmtEntryAttributes",
          "entryType": "Charge",
          "description": "string",
          "amounts": {
            "type": "LstmtEntryAmountsAttributes",
            "currency": "AUD",
            "total": 1250,
            "tax": 1250,
            "net": 1250
          },
          "taxRate": 0.9412,
          "taxType": "string",
          "originalAmount": {
            "type": "IsoCurrencyAmount",
            "minorCurrencyUnits": 1250,
            "currency": "AUD"
          },
          "loanTransactionId": "ltxn_9f2Kd8QpLzXw",
          "entryAt": "2026-08-19T04:21:07Z"
        }
      ],
      "lateFee": {
        "type": "LstmtLateFeeAttributes",
        "amounts": {
          "type": "LstmtEntryAmountsAttributes",
          "currency": "AUD",
          "total": 1250,
          "tax": 1250,
          "net": 1250
        },
        "calculatedTo": "2026-08-19",
        "narrative": "string"
      },
      "linkedStatementId": "lstmt_9f2Kd8QpLzXw",
      "narrative": "string",
      "createdAt": "2026-08-19T04:21:07Z",
      "updatedAt": "2026-08-19T04:21:07Z"
    }
  ],
  "hasMore": true,
  "nextStartingAfter": "string",
  "totalCount": 42,
  "page": 1250,
  "totalPages": 1250
}

Error responses