taler-docs

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

get-accounts-USERNAME.rst (3127B)


      1 .. http:get:: /accounts/$USERNAME
      2 
      3   Obtains information relative to the account owned by
      4   ``$USERNAME``.  The request is available to the administrator
      5   and ``$USERNAME`` itself.
      6 
      7   **Response:**
      8 
      9   :http:statuscode:`200 OK`:
     10     The bank responds with an `AccountData` object.
     11   :http:statuscode:`401 Unauthorized`:
     12     Invalid or missing credentials.
     13   :http:statuscode:`403 Forbidden`:
     14     Missing rights.
     15   :http:statuscode:`404 Not found`:
     16     The account pointed by ``$USERNAME`` was not found.
     17 
     18   **Details:**
     19 
     20   .. ts:def:: AccountData
     21 
     22     interface AccountData {
     23       // Legal name of the account owner.
     24       name: string;
     25 
     26       // Available balance on the account.
     27       balance: Balance;
     28 
     29       // Full payto URI of the account.
     30       payto_uri: string;
     31 
     32       // Number indicating the max debit allowed for the requesting user.
     33       debit_threshold: Amount;
     34 
     35       // Custom minimum cashout amount for this account.
     36       // If null or absent, the global conversion fee is used.
     37       // @since **v6**
     38       // @deprecated in **v9**, use conversion_rate_class_id instead
     39       // FIXME-REMOVED-ALREADY: LibEuFin no longer implements this field
     40       // (the min_cashout column was dropped); deprecated here but gone from code.
     41       min_cashout?: Amount;
     42 
     43       // Addresses where to send the TAN for transactions.
     44       // Currently only used for cashouts.
     45       // If missing, cashouts will fail.
     46       // In the future, might be used for other transactions
     47       // as well.
     48       contact_data?: ChallengeContactData;
     49 
     50       // Full 'payto' URI of a fiat bank account where to send cashouts with
     51       // ``name`` as the 'receiver-name'.
     52       // This field is optional
     53       // because not all the accounts are required to participate
     54       // in the merchants' circuit.  One example is the exchange:
     55       // that never cashouts.  Registering these accounts can
     56       // be done via the access API.
     57       cashout_payto_uri?: string;
     58 
     59       // Is this account visible to anyone?
     60       is_public: boolean;
     61 
     62       // Is this a taler exchange account?
     63       is_taler_exchange: boolean;
     64 
     65       // Is the account locked.
     66       // Defaults to false.
     67       // @deprecated since **v7**
     68       is_locked?: boolean;
     69 
     70       // @deprecated in **v10**
     71       // Is 2FA enabled and what channel is used for challenges?
     72       tan_channel?: TanChannel;
     73 
     74       // Is 2FA enabled and what channels are used for challenges?
     75       // @since **v10**
     76       tan_channels?: TanChannel[];
     77 
     78       // Current status of the account
     79       // active: the account can be used
     80       // locked: the account can be used but cannot create new tokens
     81       // @since **v7**
     82       // deleted: the account has been deleted but is retained for compliance
     83       // reasons, only the administrator can access it
     84       // Defaults to 'active' is missing
     85       // @since **v4**, will become mandatory in the next version.
     86       status?: "active" | "locked" | "deleted";
     87 
     88       // Conversion rate class of the user
     89       // Only present if conversion is activated on the server
     90       // @since **v9**
     91       conversion_rate_class_id?: Integer;
     92     }