taler-docs

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

get-accounts.rst (3783B)


      1 .. http:get:: /accounts
      2 
      3   Obtains a list of the accounts registered at the bank.
      4   It returns only the information that this API handles, without
      5   any balance or transactions list.
      6   This request is only available to the administrator.
      7 
      8   **Request:**
      9 
     10   :query limit: *Optional.*
     11     At most return the given number of results. Negative for descending by ``row_id``, positive for ascending by ``row_id``. Defaults to ``-20``. Since **v5**.
     12   :query offset: *Optional.*
     13     Starting ``row_id`` for :ref:`pagination <row-id-pagination>`. Since **v5**.
     14   :query filter_name: *Optional.*
     15     Pattern to filter on the account's legal name.  Given
     16     the filter 'foo', all the accounts will **contain**
     17     'foo' in their legal name.  Without this option,
     18     all the existing accounts are returned.
     19   :query conversion_rate_class_id: *Optional.*
     20     Id of a conversion rate class. Given the filter '1', the accounts will be part of the conversion rate class 1. Given the filter '0', will have no conversion rate class. Without this option all the existing accounts are returned. Since **v9**.
     21   :query delta: *Optional.*
     22     Deprecated since **v5**. Use *limit* instead.
     23   :query start: *Optional.*
     24     Deprecated since **v5**. Use *offset* instead.
     25 
     26   **Response:**
     27 
     28   :http:statuscode:`200 OK`:
     29     At least one account was found.
     30     The server responds with a `ListBankAccountsResponse` object.
     31   :http:statuscode:`204 No Content`:
     32     No accounts were found for the given request.
     33   :http:statuscode:`401 Unauthorized`:
     34     Invalid or missing credentials.
     35   :http:statuscode:`403 Forbidden`:
     36     Missing rights.
     37 
     38   **Details:**
     39 
     40   .. ts:def:: ListBankAccountsResponse
     41 
     42     interface ListBankAccountsResponse {
     43       accounts: AccountMinimalData[];
     44     }
     45 
     46   .. ts:def:: Balance
     47 
     48     interface Balance {
     49       amount: Amount;
     50       credit_debit_indicator: "credit" | "debit";
     51     }
     52 
     53   .. ts:def:: AccountMinimalData
     54 
     55     interface AccountMinimalData {
     56       // Username of the account
     57       username: string;
     58 
     59       // Legal name of the account owner.
     60       name: string;
     61 
     62       // Full payto URI of this bank account.
     63       payto_uri: string;
     64 
     65       // Current balance of the account
     66       balance: Balance;
     67 
     68       // Number indicating the max debit allowed for the requesting user.
     69       debit_threshold: Amount;
     70 
     71       // Custom minimum cashout amount for this account.
     72       // If null or absent, the global conversion fee is used.
     73       // @since **v6**
     74       // @deprecated in **v9**, use conversion_rate_class_id instead
     75       min_cashout?: Amount;
     76 
     77       // Is this account visible to anyone?
     78       is_public: boolean;
     79 
     80       // Is this a taler exchange account?
     81       is_taler_exchange: boolean;
     82 
     83       // Is the account locked.
     84       // Defaults to false.
     85       // @deprecated since **v7**
     86       is_locked?: boolean;
     87 
     88       // Opaque unique ID used for pagination.
     89       // @since **v4**, will become mandatory in the next version.
     90       row_id?: Integer;
     91 
     92       // Current status of the account
     93       // active: the account can be used
     94       // locked: the account can be used but cannot create new tokens
     95       // @since **v7**
     96       // deleted: the account has been deleted but is retained for compliance
     97       // reasons, only the administrator can access it
     98       // Defaults to 'active' is missing
     99       // @since **v4**, will become mandatory in the next version.
    100       status?: "active" | "locked" | "deleted";
    101 
    102       // Conversion rate class of the user
    103       // Only present if conversion is activated on the server
    104       // @since **v9**
    105       conversion_rate_class_id?: Integer;
    106 
    107       // Conversion rate available to the user
    108       // Only present if conversion is activated on the server
    109       // @since **v9**
    110       conversion_rate?: ConversionRate;
    111     }