From 8e45ff21dd6fab404b8d1b24dbaee27fea12365a Mon Sep 17 00:00:00 2001 From: ms Date: Thu, 21 Oct 2021 09:46:01 +0200 Subject: Access API. Documenting the new 'transaction' resource. --- core/api-bank-access.rst | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/core/api-bank-access.rst b/core/api-bank-access.rst index 9d9477bf..a5307600 100644 --- a/core/api-bank-access.rst +++ b/core/api-bank-access.rst @@ -137,6 +137,57 @@ name and account password, at least in the GNU Taler demo bank implementation. :http:statuscode:`422 Unprocessable Entity` (New): The withdraw operation cannot be confirmed because no exchange and reserve public key selection happened before. +------------ +Transactions +------------ + +.. http:GET:: ${BANK_API_BASE_URL}/accounts/${account_name}/transactions + + Retrieve all the transactions where the bank account with the label ``account_name`` + was debited or credited. + + **Response** + + .. ts:def:: BankAccountTransaction + + interface BankAccountTransactionsResponse { + transactions: BankAccountTransaction[]; + } + +.. http:GET:: ${BANK_API_BASE_URL}/accounts/${account_name}/transactions/${transaction_id} + + **Response** + + Retrieve the transaction whose identifier is ``transaction_id``, + in the following format: + + .. ts:def:: BankAccountTransaction + + interface BankAccountTransaction { + + creditorIban: string; + creditorBic: string; + creditorName: string; + + debtorIban: string; + debtorBic: string; + debtorName: string; + + amount: number; + currency: string; + subject: string; + + date: string; // YYYY-MM-DD + uid: string; // transaction (unique) ID + direction: "DBIT" | "CRDT"; + } + + +.. http:POST:: ${BANK_API_BASE_URL}/accounts/${account_name}/transactions + + Create a new transaction where the bank account with the label ``account_name`` is **debited**. + + ---------------------- Registration (Testing) ---------------------- -- cgit v1.2.3