get-aml-OFFICER_PUB-accounts.rst (6467B)
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 whose AML file is 34 currently open. An AML file is open after an ``ACCOUNT_OPEN`` event and 35 until a later ``ACCOUNT_IDLE`` event closes it. If set to no, only return 36 accounts whose AML file is closed or was never opened. Do not give this 37 parameter (or use "all") to see all accounts regardless of open status. 38 :query high_risk: 39 *Optional*. If set to yes, only return accounts that were flagged 40 as high risk. If set to no, only return accounts that are not flagged as 41 high risk. Do not give this parameter (or use "all") to see all accounts 42 regardless of risk status. 43 :query h_payto: 44 *Optional*. Restrict the response to the account identified by this 45 normalized payto URI hash. This exact-match filter can be combined with 46 the lifecycle, investigation and risk filters above. 47 48 **Response:** 49 50 :http:statuscode:`200 OK`: 51 The response will be an `AmlAccountsResponse` message (if the 52 client's header "Accept" was "application/json"). Other encodings 53 may differ in the exact returned data and format. 54 :http:statuscode:`204 No Content`: 55 There are no accounts at all (within the specified constraints). 56 :http:statuscode:`400 Bad Request`: 57 The client's request is malformed. 58 This response comes with a standard `ErrorDetail` response with 59 a code of ``TALER_EC_GENERIC_RESERVE_PUB_MALFORMED``, 60 ``TALER_EC_EXCHANGE_GENERIC_PURSE_PUB_MALFORMED``, 61 ``TALER_EC_GENERIC_PARAMETER_MALFORMED``, 62 ``TALER_EC_EXCHANGE_GENERIC_COINS_INVALID_COIN_PUB``, or 63 ``TALER_EC_EXCHANGE_GENERIC_AML_OFFICER_PUB_MALFORMED``. 64 :http:statuscode:`403 Forbidden`: 65 The signature is invalid. 66 Returned with a standard `ErrorDetail` response with 67 a code of ``TALER_EC_EXCHANGE_GENERIC_AML_OFFICER_ACCESS_DENIED``. 68 :http:statuscode:`404 Not Found`: 69 The designated AML account is not known. 70 :http:statuscode:`406 Not Acceptable`: 71 The requested MIME type for the response is not supported. 72 This response comes with a standard `ErrorDetail` response with 73 a code of ``TALER_EC_GENERIC_PARAMETER_MALFORMED``. 74 :http:statuscode:`500 Internal Server Error`: 75 The server failed to process the request due to an internal error. 76 This response comes with a standard `ErrorDetail` response with 77 a code of ``TALER_EC_GENERIC_DB_FETCH_FAILED``. 78 79 80 **Details:** 81 82 .. ts:def:: AmlAccountsResponse 83 84 interface AmlAccountsResponse { 85 86 // Array of customer accounts matching the query. 87 accounts: CustomerAccountSummary[]; 88 } 89 90 .. ts:def:: CustomerAccountSummary 91 92 interface CustomerAccountSummary { 93 94 // Which payto-address is this record about. 95 // Identifies a GNU Taler wallet or an affected bank account. 96 h_payto: NormalizedPaytoHash; 97 98 // Full payto URL of the account that the decision is 99 // about. 100 full_payto: string; 101 102 // True if the account was assessed as being high risk. 103 high_risk: boolean; 104 105 // Latest officer-authored file note about the account (if any). 106 comments?: string; 107 108 // Human-readable label assigned to the customer (if any). 109 customer_label?: string; 110 111 // Machine-readable system information about the account (if any). 112 // "BELOW_ACCOUNT_OPENING_THRESHOLD" means that transactions remain 113 // below the threshold that opens an AML file. System information and 114 // an officer-authored file note can both be present. 115 system_note?: "BELOW_ACCOUNT_OPENING_THRESHOLD"; 116 117 // Row of the account in the exchange tables. Useful to filter 118 // by offset. 119 rowid: Integer; 120 121 // When was the account opened? "never" if it was never opened. 122 open_time: Timestamp; 123 124 // When was the account closed? "never" if it was never closed. 125 close_time: Timestamp; 126 127 // True if the account is under investigation by AML staff 128 // after this decision. 129 to_investigate: boolean; 130 131 } 132 133 .. ts:def:: AccountProperties 134 135 // All fields in this object are optional. The actual 136 // properties collected depend fully on the discretion 137 // of the exchange operator; 138 // however, some common fields are standardized 139 // and thus described here. 140 interface AccountProperties { 141 142 // True if this is a politically exposed account. 143 // Rules for classifying accounts as politically 144 // exposed are country-dependent. 145 pep?: boolean; 146 147 // True if this is a sanctioned account. 148 // Rules for classifying accounts as sanctioned 149 // are country-dependent. 150 sanctioned?: boolean; 151 152 // True if this is a high-risk account. 153 // Rules for classifying accounts as at-risk 154 // are exchange operator-dependent. 155 high_risk?: boolean; 156 157 // Business domain of the account owner. 158 // The list of possible business domains is 159 // operator- or country-dependent. 160 business_domain?: string; 161 162 // Is the client's account currently frozen? 163 is_frozen?: boolean; 164 165 // Was the client's account reported to the authorities? 166 was_reported?: boolean; 167 168 }