APG PayAPG Paydocs

Loans

List loan statement documents

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

Return the documents made for the statement, each with where it got to: its format, its status, its mail and its ready notice. A statement has few, so they page by page only.

Permissions

Required permission
loanStatements:query

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

Path parameters

loanStatementIdstring
required

Query parameters

pageinteger (int32)

1-based page number.

limitinteger (int32)

Maximum items per page.

Responses

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

Discriminated by type
type = "LstmtDocumentPageAttributes"
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": "LstmtDocumentPageAttributes",
  "data": [
    {
      "type": "SdocViewAttributes",
      "statementDocumentId": "sdoc_9f2Kd8QpLzXw",
      "format": "Csv",
      "status": "Pending",
      "fileName": "Ada Lovelace",
      "sizeBytes": 1250,
      "expiresAt": "2026-08-19T04:21:07Z",
      "errorMessage": "string",
      "attempts": 1250,
      "email": {
        "type": "SdocDeliveryAttributes",
        "status": "Pending",
        "attempts": 1250,
        "sentAt": "2026-08-19T04:21:07Z",
        "error": "string"
      },
      "readyNotice": {
        "type": "SdocDeliveryAttributes",
        "status": "Pending",
        "attempts": 1250,
        "sentAt": "2026-08-19T04:21:07Z",
        "error": "string"
      },
      "origin": "Generated",
      "createdAt": "2026-08-19T04:21:07Z",
      "updatedAt": "2026-08-19T04:21:07Z"
    }
  ],
  "hasMore": true,
  "nextStartingAfter": "string",
  "totalCount": 42,
  "page": 1250,
  "totalPages": 1250
}

Error responses