get-accounts-USERNAME-transactions.rst (2593B)
1 .. http:get:: /accounts/$USERNAME/transactions 2 3 Retrieve a subset of transactions related to $USERNAME. 4 5 An authenticated request is available to the account owner and the 6 administrator. The same endpoint also accepts an unauthenticated request 7 when the account is public. Anonymous responses contain the complete 8 `BankAccountTransactionInfo` records, including the subject and both the 9 debtor and creditor payto URIs; no fields are redacted. 10 11 For an unauthenticated request, a private account and a missing account both 12 return ``404 Not Found`` so the endpoint does not disclose which case 13 applies. Anonymous responses use ``Cache-Control: no-store``. 14 15 .. warning:: 16 17 Setting ``is_public`` to true discloses the account's existing and future 18 transaction history, not only transactions created after the setting was 19 enabled. Accounts that were already public when this v12 correction was 20 deployed are grandfathered into this full-history disclosure without a 21 migration or a renewed opt-in. Operators must review existing public 22 accounts before deployment. 23 24 **Request:** 25 26 :query limit: *Optional.* 27 At most return the given number of results. Negative for descending by ``row_id``, positive for ascending by ``row_id``. Defaults to ``-20``. Since **v5**. 28 :query offset: *Optional.* 29 Starting ``row_id`` for :ref:`pagination <row-id-pagination>`. Since **v5**. 30 :query timeout_ms: *Optional.* 31 Timeout in milliseconds, for :ref:`long-polling <long-polling>`, to wait for at least one element to be shown. Only useful if *limit* is positive. Since protocol **v5**. 32 :query delta: *Optional.* 33 Deprecated since **v5**. Use *limit* instead. 34 :query start: *Optional.* 35 Deprecated since **v5**. Use *offset* instead. 36 :query long_poll_ms: *Optional.* 37 Deprecated since **v5**. Use *timeout_ms* instead. 38 39 **Response:** 40 41 :http:statuscode:`200 OK`: 42 The bank responds with an `BankAccountTransactionsResponse` object. 43 :http:statuscode:`204 No content`: 44 No transaction found. 45 :http:statuscode:`401 Unauthorized`: 46 Invalid credentials were supplied. Missing credentials are permitted 47 only for public accounts. 48 :http:statuscode:`403 Forbidden`: 49 Missing rights. 50 :http:statuscode:`404 Not found`: 51 The account pointed by ``$USERNAME`` was not found. For anonymous 52 requests this status is also returned for private accounts. 53 54 **Details:** 55 56 .. ts:def:: BankAccountTransactionsResponse 57 58 interface BankAccountTransactionsResponse { 59 transactions: BankAccountTransactionInfo[]; 60 }