post-kyc-upload-ID.rst (2070B)
1 .. http:post:: /kyc-upload/$ID 2 3 The ``/kyc-upload/$ID`` POST endpoint allows the SPA to upload 4 client-provided evidence. The ``$ID`` will be provided as part of the 5 ``/kyc-info`` body. This is for checks of type ``FORM``. In practice, 6 ``$ID`` will encode the ``$ACCESS_TOKEN``, legitimization measure serial ID 7 (to disambiguate) and the index of the selected measure (but these details 8 should be irrelevant for the client). 9 10 This endpoint was introduced in protocol **v20**. 11 12 **Request:** 13 14 JSON body with data depending on the form being submitted. 15 Details will thus completely depend on the form, but it 16 MUST include a form ID and be generally of type 17 `CustomerKycAttributes`. 18 19 **Response:** 20 21 :http:statuscode:`204 No Content`: 22 The information was successfully uploaded. The SPA should fetch 23 an updated ``/kyc-info/``. 24 :http:statuscode:`400 Bad Request`: 25 The request body is malformed or a parameter is invalid. 26 This response comes with a standard `ErrorDetail` response with 27 a code of ``TALER_EC_GENERIC_PARAMETER_MALFORMED``. 28 :http:statuscode:`404 Not Found`: 29 The ``$ID`` is unknown to the exchange. 30 This response comes with a standard `ErrorDetail` response. 31 Possible error codes include 32 ``TALER_EC_EXCHANGE_KYC_CHECK_REQUEST_UNKNOWN`` or 33 ``TALER_EC_GENERIC_ENDPOINT_UNKNOWN``. 34 :http:statuscode:`409 Conflict`: 35 The upload conflicts with a previous upload. 36 This response comes with a standard `ErrorDetail` response with 37 a code of ``TALER_EC_EXCHANGE_KYC_FORM_ALREADY_UPLOADED``. 38 :http:statuscode:`413 Request Entity Too Large`: 39 The body is too large. 40 :http:statuscode:`500 Internal Server Error`: 41 The server experienced an internal error. 42 This response comes with a standard `ErrorDetail` response. 43 Possible error codes include 44 ``TALER_EC_GENERIC_DB_FETCH_FAILED``, 45 ``TALER_EC_GENERIC_DB_STORE_FAILED``, 46 ``TALER_EC_GENERIC_DB_INVARIANT_FAILURE``, 47 ``TALER_EC_GENERIC_DB_SETUP_FAILED``, or 48 ``TALER_EC_EXCHANGE_KYC_GENERIC_AML_LOGIC_BUG``.