From 5ddd547b1f299fe1f0ca98630f7a7d1506ac8013 Mon Sep 17 00:00:00 2001 From: ms Date: Thu, 21 Oct 2021 13:16:46 +0200 Subject: Access API. Documenting the creation of a transactions. --- core/api-bank-access.rst | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) (limited to 'core/api-bank-access.rst') diff --git a/core/api-bank-access.rst b/core/api-bank-access.rst index a5307600..dd200882 100644 --- a/core/api-bank-access.rst +++ b/core/api-bank-access.rst @@ -146,12 +146,14 @@ Transactions Retrieve all the transactions where the bank account with the label ``account_name`` was debited or credited. + **Request** + + FIXME: this needs query parameters to filter the results. + **Response** - .. ts:def:: BankAccountTransaction - interface BankAccountTransactionsResponse { - transactions: BankAccountTransaction[]; + transactions: BankAccountTransactionInfo[]; } .. http:GET:: ${BANK_API_BASE_URL}/accounts/${account_name}/transactions/${transaction_id} @@ -161,9 +163,9 @@ Transactions Retrieve the transaction whose identifier is ``transaction_id``, in the following format: - .. ts:def:: BankAccountTransaction + .. ts:def:: BankAccountTransactionInfo - interface BankAccountTransaction { + interface BankAccountTransactionInfo { creditorIban: string; creditorBic: string; @@ -185,8 +187,33 @@ Transactions .. 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**. + Create a new transaction where the bank account with the label ``account_name`` is **debited**. + + **Request** + + .. ts:def:: BankAccountTransactionCreate + + interface CreateBankAccountTransactionCreate { + + // All the details corresponding to the wire transfer + // to initiate, in the 'payto' format (RFC 8905). + // Only: 'iban' authority and 'receiver-name', 'amount', + // and 'message' query parameters are accepted. + + // The following example is accepted: + // + // payto://iban/AB0123456789?receiver-name=Jane%20Doe&message=donation&amount=EUR:1 + + paytoUri: string; + } + + **Response** + + :http:statuscode:`200 OK`: + the transaction has been created. + :http:statuscode:`400 Bad Request`: + the request was invalid or the payto://-URI used unacceptable features. ---------------------- Registration (Testing) -- cgit v1.2.3