# KYC Flow
## Screen #1 Personal Details KYC

### Step 1: Call upload-KYC-document endpoint
```
{
"fileData": {
"type": "id_proof_front",
"file": "data:image/base64…",
"ext": "png"
}
}
```
### Step 2: Call update_app_user_profile_v2
```
{
"data": {
"documents": [
{
"document_type": "id_proof_front",
"identification_type": "Passport",
"identification_value": "NMD138JH9",
"identification_doc_expiry": "2024-06-17",
"identification_issuing_date": "2019-06-18",
"identification_doc_issuance_country": "Thailand",
"identification_doc_holder_name": "Chattarin Hongladarom",
"identification_issuing_authority": "Department of Consular Affairs"
}
],
},
"method": "POST",
"endpoint": "/update_app_user_profile_v2",
"headers": {
"Content-Type": "application/json",
"Accept-Language": "en"
}
}
```
### Step 3: Call get_app_user_profile_v2 and check if the response is ok
```
{
"profile": {
"access_id": "8tGTAXVzi4UXVThKNR3xOKcWocL2",
"last_name": "Hongladarom",
"birth_date": "1980-06-21",
"first_name": "Chattarin",
"kyc_status": "PENDING",
"updated_by": null,
"middle_name": "",
"nationality": "JP",
"country_code": "JP",
"phone_number": "42342348",
"failed_reason": null,
"phone_isd_code": "81"
},
"documents": [
{
"access_id": "8tGTAXVzi4UXVThKNR3xOKcWocL2",
"kyc_status": "PENDING",
"when_created": "2022-06-21T07:56:25.002872+00:00",
"document_type": "id_proof_front",
"failed_reason": null,
"document_file_name": "id_proof_front_8tGTAXVzi4UXVThKNR3xOKcWocL2.png",
"document_mime_type": "image/png",
"document_reference": "pre-stage/pre-stage/v1/8tGTAXVzi4UXVThKNR3xOKcWocL2/xtKNMxewBWzwfgma2dSoySjMYw7CQX6VAhG9TaXM7YS2ftEYvGdYajgTBbxYm5wb1AU3bRR6hv3SrV1tQAo6aTi.png",
"identification_type": "Passport",
"identification_value": "NMD138JH9",
"identification_doc_expiry": "2024-06-17",
"identification_issuing_date": "2019-06-18",
"identification_doc_holder_name": "Chattarin Hongladarom",
"identification_issuing_authority": "Department of Consular Affairs",
"identification_doc_issuance_country": "Thailand",
"identification_doc_reference_number": null
}
],
"kyc_status": {
"status": "verification_pending"
}
}
```
## Screen #2 Selfie

### Step 1: Call upload-KYC-document endpoint
```
{
"fileData": {
"type": "id_proof_live",
"file": "data:image/base64…",
"ext": "png"
},
"headers": {
"Accept-Language": "en"
}
}
```
### Step 2: Call update_app_user_profile_v2
```
{
"data": {
"documents": [
{
"document_type": "id_proof_live"
}
]
},
"method": "POST",
"endpoint": "/update_app_user_profile_v2",
"headers": {
"Content-Type": "application/json",
"Accept-Language": "en"
}
}
```
### Step 3: Call get_app_user_profile_v2 and check if the response is ok
```
{
"profile": {
"access_id": "8tGTAXVzi4UXVThKNR3xOKcWocL2",
"addresses": [
{
"city": "Tokyo",
"state": "Tokyo",
"building": "",
"zip_code": "51234",
"access_id": "8tGTAXVzi4UXVThKNR3xOKcWocL2",
"kyc_status": "PENDING",
"updated_by": null,
"address_type": "personal",
"country_code": "JP",
"when_created": "2022-06-21T07:18:43.156274+00:00",
"failed_reason": null,
"address_line_1": "Baker street 221b",
"address_line_2": ""
}
],
"last_name": "Hongladarom",
"birth_date": "1980-06-21",
"first_name": "Chattarin",
"kyc_status": "PENDING",
"updated_by": null,
"middle_name": "",
"nationality": "JP",
"country_code": "JP",
"phone_number": "42342348",
"failed_reason": null,
"phone_isd_code": "81"
},
"documents": [
{
"access_id": "8tGTAXVzi4UXVThKNR3xOKcWocL2",
"kyc_status": "PENDING",
"when_created": "2022-06-21T07:56:25.002872+00:00",
"document_type": "id_proof_front",
"failed_reason": null,
"document_file_name": "id_proof_front_8tGTAXVzi4UXVThKNR3xOKcWocL2.png",
"document_mime_type": "image/png",
"document_reference": "pre-stage/pre-stage/v1/8tGTAXVzi4UXVThKNR3xOKcWocL2/xtKNMxewBWzwfgma2dSoySjMYw7CQX6VAhG9TaXM7YS2ftEYvGdYajgTBbxYm5wb1AU3bRR6hv3SrV1tQAo6aTi.png",
"identification_type": "Passport",
"identification_value": "NMD138JH9",
"identification_doc_expiry": "2024-06-17",
"identification_issuing_date": "2019-06-18",
"identification_doc_holder_name": "Chattarin Hongladarom",
"identification_issuing_authority": "Department of Consular Affairs",
"identification_doc_issuance_country": "Thailand",
"identification_doc_reference_number": null
},
{
"access_id": "8tGTAXVzi4UXVThKNR3xOKcWocL2",
"kyc_status": "PENDING",
"when_created": "2022-06-21T08:05:16.29286+00:00",
"document_type": "id_proof_live",
"failed_reason": null,
"document_file_name": "id_proof_live_8tGTAXVzi4UXVThKNR3xOKcWocL2.jpg",
"document_mime_type": "image/jpeg",
"document_reference": "pre-stage/pre-stage/v1/8tGTAXVzi4UXVThKNR3xOKcWocL2/272usZphwmnMqkLp7Yo2Ge8ZtQ9qXxiNnC7ah4kRRQGaiLt7htjoyz5BWknsmjJ9sATdpSev15mFzW7b9z9hNgCx.jpg",
"identification_type": null,
"identification_value": null,
"identification_doc_expiry": null,
"identification_issuing_date": null,
"identification_doc_holder_name": null,
"identification_issuing_authority": null,
"identification_doc_issuance_country": null,
"identification_doc_reference_number": null
}
],
"kyc_status": {
"status": "verification_pending"
}
}
```
## Screen #3 Address

### Step 1: Call upload-KYC-document endpoint
```
{
"fileData": {
"type": "address_proof",
"file": "data:image/base64…",
"ext": "png"
},
"headers": {
"Accept-Language": "en"
}
}
```
### Step 2: Call update_app_user_profile_v2
```
{
"documents": [
{
"document_type": "address_proof",
"identification_type": "Electricity bill",
"identification_value": "",
"identification_doc_reference_number": "",
"identification_issuing_date": "2022-05-21",
"identification_issuing_authority": "51235"
}
],
"user_addresses": [
{
"address_line_1": "Baker street 221b",
"address_line_2": "",
"building": "",
"city": "Tokyo",
"state": "Tokyo",
"zip_code": "51234"
}
]
}
```
### Step 3: Call get_app_user_profile_v2 and check if the response is ok
```
{
{
"profile": {
"access_id": "8tGTAXVzi4UXVThKNR3xOKcWocL2",
"addresses": [
{
"city": "Tokyo",
"state": "Tokyo",
"building": "",
"zip_code": "51234",
"access_id": "8tGTAXVzi4UXVThKNR3xOKcWocL2",
"kyc_status": "PENDING",
"updated_by": null,
"address_type": "personal",
"country_code": "JP",
"when_created": "2022-06-21T07:18:43.156274+00:00",
"failed_reason": null,
"address_line_1": "Baker street 221b",
"address_line_2": ""
}
],
"last_name": "Hongladarom",
"birth_date": "1980-06-21",
"first_name": "Chattarin",
"kyc_status": "PENDING",
"updated_by": null,
"middle_name": "",
"nationality": "JP",
"country_code": "JP",
"phone_number": "42342348",
"failed_reason": null,
"phone_isd_code": "81"
},
"documents": [
{
"access_id": "8tGTAXVzi4UXVThKNR3xOKcWocL2",
"kyc_status": "PENDING",
"when_created": "2022-06-21T07:56:25.002872+00:00",
"document_type": "id_proof_front",
"failed_reason": null,
"document_file_name": "id_proof_front_8tGTAXVzi4UXVThKNR3xOKcWocL2.png",
"document_mime_type": "image/png",
"document_reference": "pre-stage/pre-stage/v1/8tGTAXVzi4UXVThKNR3xOKcWocL2/xtKNMxewBWzwfgma2dSoySjMYw7CQX6VAhG9TaXM7YS2ftEYvGdYajgTBbxYm5wb1AU3bRR6hv3SrV1tQAo6aTi.png",
"identification_type": "Passport",
"identification_value": "NMD138JH9",
"identification_doc_expiry": "2024-06-17",
"identification_issuing_date": "2019-06-18",
"identification_doc_holder_name": "Chattarin Hongladarom",
"identification_issuing_authority": "Department of Consular Affairs",
"identification_doc_issuance_country": "Thailand",
"identification_doc_reference_number": null
},
{
"access_id": "8tGTAXVzi4UXVThKNR3xOKcWocL2",
"kyc_status": "PENDING",
"when_created": "2022-06-21T08:05:16.29286+00:00",
"document_type": "id_proof_live",
"failed_reason": null,
"document_file_name": "id_proof_live_8tGTAXVzi4UXVThKNR3xOKcWocL2.jpg",
"document_mime_type": "image/jpeg",
"document_reference": "pre-stage/pre-stage/v1/8tGTAXVzi4UXVThKNR3xOKcWocL2/272usZphwmnMqkLp7Yo2Ge8ZtQ9qXxiNnC7ah4kRRQGaiLt7htjoyz5BWknsmjJ9sATdpSev15mFzW7b9z9hNgCx.jpg",
"identification_type": null,
"identification_value": null,
"identification_doc_expiry": null,
"identification_issuing_date": null,
"identification_doc_holder_name": null,
"identification_issuing_authority": null,
"identification_doc_issuance_country": null,
"identification_doc_reference_number": null
},
{
"access_id": "8tGTAXVzi4UXVThKNR3xOKcWocL2",
"kyc_status": "PENDING",
"when_created": "2022-06-21T08:21:35.341918+00:00",
"document_type": "address_proof",
"failed_reason": null,
"document_file_name": "address_proof_8tGTAXVzi4UXVThKNR3xOKcWocL2.png",
"document_mime_type": "image/png",
"document_reference": "pre-stage/pre-stage/v1/8tGTAXVzi4UXVThKNR3xOKcWocL2/33XnKcL18Q99aWVr6rekcjgiEA2nqjphcTUXchrwUsUtYGbZYc1uyDsYHjiWdTxd2WHY3rtJaYgETfwcke9dwuLg.png",
"identification_type": "Electricity bill",
"identification_value": "",
"identification_doc_expiry": null,
"identification_issuing_date": "2022-05-21",
"identification_doc_holder_name": null,
"identification_issuing_authority": "51235",
"identification_doc_issuance_country": null,
"identification_doc_reference_number": ""
}
],
"kyc_status": {
"status": "verification_pending"
}
}
```