taler-docs

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

get-accounts-USERNAME.rst (2971B)


      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       min_cashout?: Amount;
     40 
     41       // Addresses where to send the TAN for transactions.
     42       // Currently only used for cashouts.
     43       // If missing, cashouts will fail.
     44       // In the future, might be used for other transactions
     45       // as well.
     46       contact_data?: ChallengeContactData;
     47 
     48       // Full 'payto' URI of a fiat bank account where to send cashouts with
     49       // ``name`` as the 'receiver-name'.
     50       // This field is optional
     51       // because not all the accounts are required to participate
     52       // in the merchants' circuit.  One example is the exchange:
     53       // that never cashouts.  Registering these accounts can
     54       // be done via the access API.
     55       cashout_payto_uri?: string;
     56 
     57       // Is this account visible to anyone?
     58       is_public: boolean;
     59 
     60       // Is this a taler exchange account?
     61       is_taler_exchange: boolean;
     62 
     63       // Is the account locked.
     64       // Defaults to false.
     65       // @deprecated since **v7**
     66       is_locked?: boolean;
     67 
     68       // @deprecated in **v10**
     69       // Is 2FA enabled and what channel is used for challenges?
     70       tan_channel?: TanChannel;
     71 
     72       // Is 2FA enabled and what channels are used for challenges?
     73       // @since **v10**
     74       tan_channels?: TanChannel[];
     75 
     76       // Current status of the account
     77       // active: the account can be used
     78       // locked: the account can be used but cannot create new tokens
     79       // @since **v7**
     80       // deleted: the account has been deleted but is retained for compliance
     81       // reasons, only the administrator can access it
     82       // Defaults to 'active' is missing
     83       // @since **v4**, will become mandatory in the next version.
     84       status?: "active" | "locked" | "deleted";
     85 
     86       // Conversion rate class of the user
     87       // Only present if conversion is activated on the server
     88       // @since **v9**
     89       conversion_rate_class_id?: Integer;
     90     }