APG PayAPG Paydocs

Loans

List loans

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

Return a page of loans. Supply page for offset pagination or startingAfter for cursor pagination, and q to search. The filters combine with each other and with q by AND. GET /filter-catalogues/loans lists those 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
loans:query

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

Query parameters

qstring

Search. Matches a loan id, the id of its product or facility, the reference loan id, the account name or the EDI number. 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 LoanSort

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

columnsarray of LoanColumn

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 LoanStatus, array of LoanStatus

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

statusNotone of LoanStatus, array of LoanStatus

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

merchantIdone of array of string, string

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

merchantIdNotone of array of string, string

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

marketplaceIdone of array of string, string

Only loans whose marketplace is one of these. Repeat the parameter to give several.

marketplaceIdNotone of array of string, string

Leave out loans whose marketplace is one of these. Repeat the parameter to give several.

marketplaceIdAbsentboolean

true for only loans with no marketplace, false for only those with one.

customerIdone of array of string, string

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

customerIdNotone of array of string, string

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

customerIdAbsentboolean

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

productTypeone of LprodType, array of LprodType

Only loans whose kind is one of these. Repeat the parameter to give several.

productTypeNotone of LprodType, array of LprodType

Leave out loans whose kind is one of these. Repeat the parameter to give several.

currencyone of IsoCurrency, array of IsoCurrency

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

currencyNotone of IsoCurrency, array of IsoCurrency

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

referenceLoanIdstring

Filter by your own identifier for the loan.

createdAfterstring (date-time)

Only loans whose creation time is at or after this ISO-8601 timestamp.

createdBeforestring (date-time)

Only loans whose creation time is at or before this ISO-8601 timestamp.

Responses

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

Discriminated by type
type = "LoanPageAttributes"
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": "LoanPageAttributes",
  "data": [
    {
      "type": "LoanViewAttributes",
      "loanId": "loan_9f2Kd8QpLzXw",
      "merchantId": "mcht_9f2Kd8QpLzXw",
      "marketplaceId": "mktp_9f2Kd8QpLzXw",
      "customerId": "cust_9f2Kd8QpLzXw",
      "loanFacilityId": "lfac_9f2Kd8QpLzXw",
      "loanProductId": "lprod_9f2Kd8QpLzXw",
      "loanAgreementId": "lma_9f2Kd8QpLzXw",
      "accountName": "Ada Lovelace",
      "status": "Enabled",
      "balances": {
        "type": "LoanBalancesAttributes",
        "currency": "AUD",
        "limit": 500000,
        "used": 1250,
        "available": 1250,
        "reserved": 1250,
        "pending": 1250
      },
      "specification": {
        "type": "LoanSpecRealtimeSettlement",
        "variableFee": 12.5,
        "setting": "Manual"
      },
      "timeZone": "string",
      "billingPaymentSourceId": "psrc_9f2Kd8QpLzXw",
      "productLine": "CentralPay",
      "metadata": {
        "yourKey": {}
      },
      "referenceLoanId": "your-own-reference",
      "createdAt": "2026-08-19T04:21:07Z",
      "updatedAt": "2026-08-19T04:21:07Z"
    }
  ],
  "hasMore": true,
  "nextStartingAfter": "string",
  "totalCount": 42,
  "page": 1250,
  "totalPages": 1250
}

Error responses