taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit 6ade610d3205176f67892b58e514d6ea7520b342
parent 595d3fc77838f6bdc265c85f4ba8876eab96fb47
Author: Antoine A <>
Date:   Tue, 14 Nov 2023 12:07:31 +0000

Improve corebank transaction and account API

Diffstat:
Mcore/api-corebank.rst | 42+++++++++++++++++++++++++++++-------------
1 file changed, 29 insertions(+), 13 deletions(-)

diff --git a/core/api-corebank.rst b/core/api-corebank.rst @@ -311,10 +311,15 @@ Account Management **Request:** - :query start: *Optional.* - Row identifier to explicitly set the *starting point* of the query. :query delta: *Optional.* - The *delta* value that determines the range of the query. + Takes value of the form ``N (-N)``, so that at most ``N`` values strictly older (younger) than ``start`` are returned. Defaults to ``-20`` to return the last 20 entries. + :query start: *Optional.* + Row number threshold, see ``delta`` for its interpretation. Defaults to smallest or biggest row id possible according to ``delta`` sign. + :query filter_name: *Optional.* + Pattern to filter on the account legal name. Given + the filter 'foo', all the results will **contain** + 'foo' in their legal name. Without this option, + all the existing accounts are returned. **Response:** @@ -352,6 +357,10 @@ Account Management **Request:** + :query delta: *Optional.* + Takes value of the form ``N (-N)``, so that at most ``N`` values strictly older (younger) than ``start`` are returned. Defaults to ``-20`` to return the last 20 entries. + :query start: *Optional.* + Row number threshold, see ``delta`` for its interpretation. Defaults to smallest or biggest row id possible according to ``delta`` sign. :query filter_name: *Optional.* Pattern to filter on the account legal name. Given the filter 'foo', all the results will **contain** @@ -449,8 +458,7 @@ Transactions .. http:get:: /accounts/$USERNAME/transactions - Retrieve a subset of transactions related to $USERNAME. Without - query parameters, it returns the last 5 transactions. + Retrieve a subset of transactions related to $USERNAME. The list of returned transactions is determined by a row ID *starting point* and a signed non-zero integer *delta*: @@ -469,13 +477,13 @@ Transactions **Request:** + :query delta: *Optional.* + Takes value of the form ``N (-N)``, so that at most ``N`` values strictly older (younger) than ``start`` are returned. Defaults to ``-20`` to return the last 20 entries. + :query start: *Optional.* + Row number threshold, see ``delta`` for its interpretation. Defaults to smallest or biggest row id possible according to ``delta`` sign. :query long_poll_ms: Optional number to express how many milliseconds the server should wait for at least one result to be shown. If not given, the server responds immediately, regardless of the result. - :query start: *Optional.* - Row identifier to explicitly set the *starting point* of the query. - :query delta: *Optional.* - The *delta* value that determines the range of the query. **Response:** @@ -534,9 +542,9 @@ Transactions **Request:** - .. ts:def:: BankAccountTransactionCreate + .. ts:def:: CreateTransactionRequest - interface CreateBankAccountTransactionCreate { + interface CreateTransactionRequest { // Address in the Payto format of the wire transfer receiver. // It needs at least the 'message' query string parameter. payto_uri: string; @@ -550,8 +558,8 @@ Transactions **Response:** - :http:statuscode:`204 No content`: - The transaction has been created. + :http:statuscode:`200 Ok`: + The bank responds with an `CreateTransactionResponse` object. :http:statuscode:`400 Bad Request`: The request was invalid or the payto://-URI used unacceptable features. :http:statuscode:`401 Unauthorized`: @@ -563,6 +571,14 @@ Transactions * ``TALER_EC_BANK_UNKNOWN_CREDITOR`` : creditor account was not found. * ``TALER_EC_BANK_UNALLOWED_DEBIT`` : the account does not have sufficient funds. + **Details:** + + .. ts:def:: CreateTransactionResponse + + interface CreateTransactionResponse { + // ID identifying the transaction being created + row_id: number; + } Taler Withdrawals -----------------