diff options
Diffstat (limited to 'libeufin/api-nexus.rst')
-rw-r--r-- | libeufin/api-nexus.rst | 108 |
1 files changed, 81 insertions, 27 deletions
diff --git a/libeufin/api-nexus.rst b/libeufin/api-nexus.rst index 1d35a4ff..c9fb6890 100644 --- a/libeufin/api-nexus.rst +++ b/libeufin/api-nexus.rst @@ -46,7 +46,7 @@ User Management **Response:** - :status 409 Conflict: Username is not available. + :http:statuscode:`409 Conflict`: Username is not available. **Details:** @@ -96,7 +96,7 @@ manages payment initiations of the account and tracks the initiations of payment Ask nexus to submit one prepare payment at the bank. - :status 404 Not Found: the unique identifier **or** + :http:statuscode:`404 Not found`: the unique identifier **or** the bank connection could not be found in the system @@ -111,7 +111,7 @@ manages payment initiations of the account and tracks the initiations of payment interface PaymentStatus { // Payment unique identifier - uuid: string; + paymentInitiationId: string; // True for submitted payments submitted: boolean; @@ -198,17 +198,38 @@ manages payment initiations of the account and tracks the initiations of payment .. ts:def:: CollectedTransaction interface CollectedTransaction { - // Optional field to specify the bank connection to - // use for such operation. - bankConnection?: string; - // dashed date (YYYY-MM-DD) of the earliest payment - // in the result. Optional, defaults to "earliest - // possible" date. - start: string; - // dashed date (YYYY-MM-DD) of the earliest payment - // in the result. Optional, defaults to "latest - // possible" date. - end: string; + + // This type indicates the time range of the query. + // It can assume the following values: + // + // 'latest': retrieves the last transactions from the bank. + // If there are older unread transactions, those will *not* + // be downloaded. + // + // 'all': retrieves all the transactions from the bank, + // until the oldest. + // + // 'previous-days': currently *not* implemented, it will allow + // the request to download transactions from + // today until N days before. + // + // 'since-last': retrieves all the transactions since the last + // time one was downloaded. + // + rangeType: string; + + // Because transactions are delivered by banks in "batches", + // then every batch can have different qualities. This value + // lets the request specify which type of batch ought to be + // returned. Currently, the following two type are supported: + // + // 'report': intra-day information + // 'statement': prior day bank statement + level: string; + + // Bank connection to use. It is a *optional* value that + // defaults to the default bank connection, if not given. + bankConnection: string; } .. http:get:: {nexusBase}/bank-accounts/{acctid}/transactions @@ -265,23 +286,43 @@ to the real bank. **Request:** + This request can accept two formats, depending on whether a + new bank connection is being made, or a connection backup is + being restored. + + + This type allows the creation of new bank accounts. + + .. ts:def:: NewBankConnection + + interface NewBankConnection { + + source: string; // only "new" allowed + + // connection name. + name: string; + + // type of the connection to make: "ebics" for example. + type: string; + + data: BankConnectionNew; + } + + This type allows to restore a previously made bank connection. + .. ts:def:: BankConnectionRestoreRequest interface BankConnectionRestoreRequest { - source: "new" | "backup"; - + source: "backup"; + + // connection name. name: string; - type: string; // "ebics" for example. - // Restore a previous connection. Take precedence - // over the 'new' field. - backup?: BankConnectionBackup; + + // Backup data, as typically returned by the "../export-backup" API. + backup: BankConnectionBackup; passphrase?: string; - - // Data to create a fresh bank connection without - // restoring any backup. - data?: BankConnectionNew; } @@ -307,13 +348,12 @@ to the real bank. interface BankConnectionBackup { // The information needed in this type depend entirely - // on which connectionis being restored. - + // on which connection is being restored. } **Response:** - :status 409 Conflict: The ``name`` field exists already for + :http:statuscode:`409 Conflict`: The ``name`` field exists already for the requesting user. .. http:post:: {nexusBase}/bank-connections/delete-connection @@ -331,6 +371,20 @@ to the real bank. List available bank connections. + **Response** + + .. ts:def:: BankConnection + + interface BankConnection { + + // connection type. For example "ebics". + type: string; + + // connection name as given by the user at + // the moment of creation. + name: string; + } + .. http:get:: {nexusBase}/bank-connections/{connId} |