get-accounts.rst (3939B)
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 // FIXME-REMOVED-ALREADY: LibEuFin no longer implements this field 76 // (the min_cashout column was dropped); deprecated here but gone from code. 77 min_cashout?: Amount; 78 79 // Is this account visible to anyone? 80 is_public: boolean; 81 82 // Is this a taler exchange account? 83 is_taler_exchange: boolean; 84 85 // Is the account locked. 86 // Defaults to false. 87 // @deprecated since **v7** 88 is_locked?: boolean; 89 90 // Opaque unique ID used for pagination. 91 // @since **v4**, will become mandatory in the next version. 92 row_id?: Integer; 93 94 // Current status of the account 95 // active: the account can be used 96 // locked: the account can be used but cannot create new tokens 97 // @since **v7** 98 // deleted: the account has been deleted but is retained for compliance 99 // reasons, only the administrator can access it 100 // Defaults to 'active' is missing 101 // @since **v4**, will become mandatory in the next version. 102 status?: "active" | "locked" | "deleted"; 103 104 // Conversion rate class of the user 105 // Only present if conversion is activated on the server 106 // @since **v9** 107 conversion_rate_class_id?: Integer; 108 109 // Conversion rate available to the user 110 // Only present if conversion is activated on the server 111 // @since **v9** 112 conversion_rate?: ConversionRate; 113 }