get-aml-OFFICER_PUB-attributes-H_NORMALIZED_PAYTO.rst (5770B)
1 .. http:get:: /aml/$OFFICER_PUB/attributes/$H_NORMALIZED_PAYTO 2 3 Obtain attributes obtained as part of AML/KYC processes for a 4 given account. 5 6 This endpoint was introduced in protocol **v20**. 7 8 **Request:** 9 10 *Accept*: 11 The client may specify the desired MIME-type for the result. 12 Supported are the usual "application/json", but also 13 "application/pdf". 14 15 *Taler-AML-Officer-Signature*: 16 The client must provide Base-32 encoded EdDSA signature with 17 ``$OFFICER_PRIV``, affirming the desire to obtain AML data. Note that 18 this is merely a simple authentication mechanism, the details of the 19 request are not protected by the signature. 20 21 :query limit: 22 *Optional*. takes value of the form ``N (-N)``, so that at 23 most ``N`` values strictly older (younger) than ``start`` are returned. 24 Defaults to ``-20`` to return the last 20 entries (before ``start``). 25 :query offset: 26 *Optional*. Row number threshold, see ``delta`` for its 27 interpretation. Defaults to ``INT64_MAX``, namely the biggest row id 28 possible in the database. 29 30 **Response:** 31 32 :http:statuscode:`200 OK`: 33 The responds will be an `KycAttributesResponse` message. 34 :http:statuscode:`204 No content`: 35 There are no matching KYC attributes. 36 :http:statuscode:`400 Bad Request`: 37 The request is malformed. Cases include: 38 39 - The ``$H_NORMALIZED_PAYTO`` or ``H_OFFICER_PUB`` path segment 40 is malformed. 41 This response comes with a standard `ErrorDetail` response with 42 a code of ``TALER_EC_GENERIC_PATH_SEGMENT_MALFORMED``. 43 - The required HTTP header with the signature is missing. Returned with 44 ``TALER_EC_GENERIC_HTTP_HEADERS_MALFORMED``. 45 46 :http:statuscode:`403 Forbidden`: 47 Two cases: 48 49 - The signature is invalid. Returned with a code of 50 ``TALER_EC_EXCHANGE_GENERIC_AML_OFFICER_GET_SIGNATURE_INVALID``. 51 - The specific officer is unknown or disabled. Returned with a code of 52 ``TALER_EC_EXCHANGE_GENERIC_AML_OFFICER_ACCESS_DENIED``. 53 54 :http:statuscode:`404 Not found`: 55 The target account is unknown to the exchange. 56 This response comes with a standard `ErrorDetail` response with 57 a code of ``TALER_EC_EXCHANGE_GENERIC_TARGET_ACCOUNT_UNKNOWN``. 58 :http:statuscode:`406 Not Acceptable`: 59 The requested MIME type for the response is not supported. 60 This response comes with a standard `ErrorDetail` response with 61 a code of ``TALER_EC_GENERIC_REQUESTED_FORMAT_UNSUPPORTED``. 62 :http:statuscode:`500 Internal server error`: 63 The server had an internal problem handling the request. 64 The error code is usually a ``TALER_EC_GENERIC_DB_FETCH_FAILED``. 65 :http:statuscode:`501 Not implemented`: 66 The requested functionality is not implemented. 67 Usually returned if the PDF generator is not available 68 at this backend and the requested format was application/pdf. 69 This response comes with a standard `ErrorDetail` response with 70 a code of ``TALER_EC_EXCHANGE_GENERIC_NO_TYPST_OR_PDFTK``. 71 72 .. ts:def:: KycAttributesResponse 73 74 interface KycAttributesResponse { 75 76 // Matching KYC attribute history of the account. 77 details: KycAttributeCollectionEvent[]; 78 79 } 80 81 .. ts:def:: KycAttributeCollectionEvent 82 83 interface KycAttributeCollectionEvent { 84 85 // Row ID of the record. Used to filter by offset. 86 rowid: Integer; 87 88 // True if the attributes were filed by an AML officer, 89 // otherwise they were provided directly by the customer. 90 by_aml_officer: boolean; 91 92 // The collected KYC data. NULL if the attribute data could not 93 // be decrypted (internal error of the exchange, likely the 94 // attribute key was changed). 95 attributes?: CustomerKycAttributes; 96 97 // Time when the KYC data was collected 98 collection_time: Timestamp; 99 100 } 101 102 .. ts:def:: CustomerKycAttributes 103 104 interface CustomerKycAttributes { 105 106 // ID of the Form that was used to submit the attributes and/or 107 // that should be used to *render* the attributes. 108 // Mandatory since **v31**. 109 FORM_ID: string; 110 111 // Version of the form completed by the user. 112 FORM_VERSION?: Integer; 113 114 // High entropy value used in forms where hash is going to be stored in 115 // plain text. 116 FORM?_SALT: string; 117 118 // Attributes can have basically arbitrary additional 119 // Key-value pairs. See the 120 // gnu-taler-form-attributes registry in GANA 121 // for possible keys! For attributes that are 122 // files, see `KycFileUploadAttribute` and 123 // `KycBulkUploadAttribute` below. 124 125 } 126 127 .. ts:def:: KycFileUploadAttribute 128 129 // File uploads should always use a single field named 130 // ``FILE`` with the following nested attributes. 131 interface KycFileUploadAttribute { 132 133 // Encoded file contents as a string. 134 CONTENTS: string; 135 136 // Encoding of contents, currently only ``base64`` is supported. 137 ENCODING: "base64"; 138 139 // Optional name of the file. 140 FILENAME?: string; 141 142 // MIME type of the uploaded file. 143 MIME_TYPE: string; 144 145 } 146 147 .. ts:def:: KycBulkUploadAttribute 148 149 // This attribute references a previous bulk file upload 150 // via the POST ``/kyc-bulk/`` endpoint. 151 // Bulk uploads should always use a single field named 152 // ``BULK`` with the following nested attributes. 153 // Bulk file uploads were introduced in protocol **vIMPORT**. 154 interface KycBulkUploadAttribute { 155 156 // Reference to the bulk upload via SHA512 hash. 157 BULK_REF: HashCode; 158 159 // Optional name of the file, required to reference a specific 160 // file within a ZIP archive where the ZIP was uploaded as a bulk. 161 FILENAME?: string; 162 163 // MIME type of the referenced file. 164 MIME_TYPE: string; 165 166 }