get-aml-OFFICER_PUB-accounts.rst (5546B)
1 .. http:get:: /aml/$OFFICER_PUB/accounts 2 3 **Request:** 4 5 *Accept*: 6 The client may specify the desired MIME-type for the result. 7 Supported are the usual "application/json", but also 8 "text/csv" (RFC 4180) 9 and "application/vnd.ms-excel" (XML of Excel 2003). 10 11 *Taler-AML-Officer-Signature*: 12 The client must provide Base-32 encoded EdDSA signature with 13 ``$OFFICER_PRIV``, affirming the desire to obtain AML data. Note that 14 this is merely a simple authentication mechanism, the details of the 15 request are not protected by the signature. 16 17 This endpoint was introduced in this form in protocol **v31**. 18 19 :query limit: 20 *Optional*. takes value of the form ``N (-N)``, so that at 21 most ``N`` values strictly older (younger) than ``start`` are returned. 22 Defaults to ``-20`` to return the last 20 entries (before ``start``). 23 :query offset: 24 *Optional*. Row number threshold, see ``delta`` for its 25 interpretation. Defaults to ``INT64_MAX``, namely the biggest row id 26 possible in the database. 27 :query investigation: 28 *Optional*. If set to yes, only return accounts that are under 29 AML investigation, if no only accounts that are not under investigation. 30 Do not give (or use "all") to see all accounts regardless of 31 investigation status. 32 :query open: 33 *Optional*. If set to yes, only return accounts that are open, 34 which means they crossed some initial limit and now have custom rules. 35 Do not give (or use "all") to see all accounts regardless of 36 open status. 37 :query high_risk: 38 *Optional*. If set to yes, only return accounts that were flagged 39 as high risk. 40 Do not give (or use "all") to see all accounts regardless of 41 risk status. 42 43 **Response:** 44 45 :http:statuscode:`200 OK`: 46 The response will be an `AmlAccountsResponse` message (if the 47 client's header "Accept" was "application/json"). Other encodings 48 may differ in the exact returned data and format. 49 :http:statuscode:`204 No content`: 50 There are no accounts at all (within the specified constraints). 51 :http:statuscode:`400 Bad request`: 52 The client's request is malformed. 53 This response comes with a standard `ErrorDetail` response with 54 a code of ``TALER_EC_GENERIC_RESERVE_PUB_MALFORMED``, 55 ``TALER_EC_EXCHANGE_GENERIC_PURSE_PUB_MALFORMED``, 56 ``TALER_EC_GENERIC_PARAMETER_MALFORMED``, 57 ``TALER_EC_EXCHANGE_GENERIC_COINS_INVALID_COIN_PUB``, or 58 ``TALER_EC_EXCHANGE_GENERIC_AML_OFFICER_PUB_MALFORMED``. 59 :http:statuscode:`403 Forbidden`: 60 The signature is invalid. 61 Returned with a standard `ErrorDetail` response with 62 a code of ``TALER_EC_EXCHANGE_GENERIC_AML_OFFICER_ACCESS_DENIED``. 63 :http:statuscode:`404 Not found`: 64 The designated AML account is not known. 65 :http:statuscode:`406 Not Acceptable`: 66 The requested MIME type for the response is not supported. 67 This response comes with a standard `ErrorDetail` response with 68 a code of ``TALER_EC_GENERIC_PARAMETER_MALFORMED``. 69 :http:statuscode:`500 Internal server error`: 70 The server failed to process the request due to an internal error. 71 This response comes with a standard `ErrorDetail` response with 72 a code of ``TALER_EC_GENERIC_DB_FETCH_FAILED``. 73 74 75 **Details:** 76 77 .. ts:def:: AmlAccountsResponse 78 79 interface AmlAccountsResponse { 80 81 // Array of customer accounts matching the query. 82 accounts: CustomerAccountSummary[]; 83 } 84 85 .. ts:def:: CustomerAccountSummary 86 87 interface CustomerAccountSummary { 88 89 // Which payto-address is this record about. 90 // Identifies a GNU Taler wallet or an affected bank account. 91 h_payto: NormalizedPaytoHash; 92 93 // Full payto URL of the account that the decision is 94 // about. 95 full_payto: string; 96 97 // True if the account was assessed as being high risk. 98 high_risk: boolean; 99 100 // Latest comments about the account (if any). 101 comments?: string; 102 103 // Row of the account in the exchange tables. Useful to filter 104 // by offset. 105 rowid: Integer; 106 107 // When was the account opened? "never" if it was never opened. 108 open_time: Timestamp; 109 110 // When was the account opened? "never" if it was never closed. 111 close_time: Timestamp; 112 113 // True if the account is under investigation by AML staff 114 // after this decision. 115 to_investigate: boolean; 116 117 } 118 119 .. ts:def:: AccountProperties 120 121 // All fields in this object are optional. The actual 122 // properties collected depend fully on the discretion 123 // of the exchange operator; 124 // however, some common fields are standardized 125 // and thus described here. 126 interface AccountProperties { 127 128 // True if this is a politically exposed account. 129 // Rules for classifying accounts as politically 130 // exposed are country-dependent. 131 pep?: boolean; 132 133 // True if this is a sanctioned account. 134 // Rules for classifying accounts as sanctioned 135 // are country-dependent. 136 sanctioned?: boolean; 137 138 // True if this is a high-risk account. 139 // Rules for classifying accounts as at-risk 140 // are exchange operator-dependent. 141 high_risk?: boolean; 142 143 // Business domain of the account owner. 144 // The list of possible business domains is 145 // operator- or country-dependent. 146 business_domain?: string; 147 148 // Is the client's account currently frozen? 149 is_frozen?: boolean; 150 151 // Was the client's account reported to the authorities? 152 was_reported?: boolean; 153 154 }