diff options
Diffstat (limited to 'libeufin/api-sandbox.rst')
-rw-r--r-- | libeufin/api-sandbox.rst | 261 |
1 files changed, 118 insertions, 143 deletions
diff --git a/libeufin/api-sandbox.rst b/libeufin/api-sandbox.rst index ee298d85..f75c76e0 100644 --- a/libeufin/api-sandbox.rst +++ b/libeufin/api-sandbox.rst @@ -1,189 +1,164 @@ + Sandbox API ########### -Entities +HTTP API ======== -Bank Account - ... +.. + Payments. -EBICS Host +.. http:post:: /admin/payments -EBICS Subscriber - ... + Adds a new payment to the book. Mainly used for testing + purposes. -EBICS Partner - ... + **Request:** + .. ts:def:: PaymentRequest + interface PaymentRequest { + + // IBAN that will receive the payment. + creditorIban: string; -HTTP API -======== + // IBAN that will send the payment. + debitorIban: string; + amount: string; + currency: string; -.. http:post:: /ebicsweb + // subject of the payment. + subject: string; + } - Submit an EBICS request to the sandbox. +.. + Host management. +.. http:post:: /admin/ebics/hosts + + Creates a new Ebics host. -.. http:post:: /admin/customers + **Request:** - Create a new customer. A customer identifies a human that - may own multiple bank accounts. + .. ts:def:: EbicsHostRequest - When creating a customer, one EBICS subscriber is automatically - created for the customer. + interface EbicsHostRequest { + + // Ebics version. + hostID: string; - In the future, we might add an API to create multiple additional subscribers for - a customer. + // Name of the host. + ebicsVersion: string; + } + - When creating a new customer, an ID will be assigned automatically. +.. http:get:: /admin/ebics/hosts + + Shows the list of all the hosts existing + in the system. - .. code-block:: tsref + **Response:** - interface CustomerCreationRequest { - // human-readable name for the customer - name: string; - } + .. ts:def:: EbicsHostResponse -.. http:get:: /admin/customers/:id + interface EbicsHostResponse { + + // shows the host IDs that are active in the system. + // The Ebics version *is* missing, but it's still available + // via the HEV message. + ebicsHosts: string[]; + } + - Get information about a customer. +.. + Subscriber management. - .. ts:def:: CustomerInfo +.. http:post:: /admin/ebics/subscribers - interface CustomerInfo { - ebicsInfo?: CustomerEbicsInfo; - finTsInfo?: CustomerFinTsInfo; - } + Creates a new Ebics subscriber. - .. ts:def:: CustomerEbicsInfo + **Request:** - interface CustomerEbicsInfo { - ebicsHostId: string; - ebicsParterId: string; - ebicsUserId: string; + .. ts:def:: SubscriberRequest - // Info for the customer's "main subscriber" - subscriberInitializationState: "NEW" | "PARTIALLY_INITIALIZED_INI" | "PARTIALLY_INITIALIZED_HIA" | "READY" | "INITIALIZED"; - } + interface SubscriberRequest { + + // hostID + hostID: string; - .. ts:def:: CustomerFinTsInfo - - // TODO + // userID + userID: string; -.. http:post:: /admin/customers/:id/ebics/keyletter + // partnerID + partnerID: string; - Accept the information from the customer's ("virtual") INI-Letter and HIA-Letter - and change the key's state as required. + // systemID + systemID: string; - .. code-block:: tsref + } + - interface KeyLetterRequest { +.. http:get:: /admin/ebics/subscribers - ini: { - // The user ID that participates in a EBICS subscriber. - userId: string; + Shows the list of all the subscribers existing + in the system. - // The customer ID specific to the bank (therefore not - // participating in a EBICS subscriber). - customerId: string; + **Response:** - // Human name of the user - name: string; + .. ts:def:: SubscribersResponse - // As per specification, this value is: - // "Date of processing of the corresponding EBICS order". DD.MM.YYYY format. - date: string; + interface SubscribersResponse { + + subscribers: Subscriber[] + } + + .. ts:def:: Subscriber - // As per specification, this value is: - // "Time of processing of the corresponding EBICS order". HH:MM:SS format. - time: string; + interface Subscriber { + + // userID + userID: string; - // Identification token of the bank. Not required to obey to any particular standard. - recipient: string; + // partnerID + partnerID: string; - // Electronic signature version. Admitted values: A005, A006. - version: string; + // hostID + hostID: string; - // Length in bits of the key exponent. - public_exponent_length: number; - // RSA key exponent in hexadecimaml notation. - public_exponent: string; + } - // Length in bits of the key modulus. - public_modulus_length: number; - // RSA key modulus in hexadecimaml notation. - public_modulus: string; +.. http:post:: /admin/ebics/bank-accounts - // RSA key hash. - // - // A005, A005 versions require hash type SHA-256. - hash: string; - } + Associates a new bank account to an existing subscriber. - hia: { - // The user ID that participates in a EBICS subscriber. - userId: string; - - // The customer ID specific to the bank (therefore not - // participating in a EBICS subscriber). - customerId: string; - - // Human name of the user - name: string; - - // As per specification, this value is: - // "Date of processing of the corresponding EBICS order". DD.MM.YYYY format. - date: string; - - // As per specification, this value is: - // "Time of processing of the corresponding EBICS order". HH:MM:SS format. - time: string; - - // Identification token of the bank. Not required to obey to any particular standard. - recipient: string; - - //////////////////////////////////////////////////// - // Identification and Authentication key details. // - //////////////////////////////////////////////////// - - // Identification and authentication signature version. - // Admitted value: X002. - ia_version: string; - - // length of the exponent, in bits. - ia_public_exponent_length: number; - // RSA key exponent in hexadecimaml notation. - ia_public_exponent: string; - - // length of the modulus, in bits. - ia_public_modulus_length: number; - // RSA key modulus in hexadecimaml notation. - ia_public_modulus: string; - - // SHA-256 hash of the identification and authentication key. - ia_hash: string; - - ///////////////////////////// - // Encryption key details. // - ///////////////////////////// - - // Encryption version. Admitted value: E002. - enc_version: string; - - // length of the exponent, in bits. - enc_public_exponent_length: number; - // RSA key exponent in hexadecimaml notation. - enc_public_exponent: string; - - // length of the modulus, in bits. - enc_public_modulus_length: number; - // RSA key modulus in hexadecimaml notation. - enc_public_modulus: string; - - // SHA-256 hash of the encryption key. - enc_hash: string; - } - } + **Request:** + + .. ts:def:: BankAccountRequest + + interface BankAccountRequest { + + // Ebics subscriber + subscriber: string; + + // IBAN + iban: string; + + // BIC + bic: string; + + // human name + name: string; + + // bank account label + label: string; + + } + +.. + Main EBICS service. + +.. http:post:: /ebicsweb + + Serves all the Ebics requests. |