# New KYC


## Update Kyc Name

<small class="badge badge-darkred">requires authentication</small>

Use this end point to update kyc name

> Example request:

```bash
curl -X POST \
    "https://apiqa.bettorfantasy.com/v2/kyc/update-name" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"kyc_first_name":"neque","kyc_last_name":"quo"}'

```


> Example response (200):

```json

{
      "message": "Kyc name updated successfully!",
          "data": {
              "user": {
                  "id": 145,
                  "email": "ankita40@yopmail.com",
                  "username": "ankita40",
                  "phone": "8765432080",
                  "kyc": {
                      "kyc_status_id": null,
                      "is_kyc_locked": null,
                     "kyc_lock_remark": null,
                      "kyc_first_name": "Clark",
                      "kyc_last_name": "Green",
                      "kyc_dob": "11/02/1976",
                      "kyc_street_address": "222333 Peacht",
                      "kyc_full_address": "539 Mission Drive, San Gabriel, Los Angeles, California",
                      "kyc_state_id": "5",
                      "kyc_city": "San Francisco",
                      "kyc_zip": "91119",
                      "kyc_address_place_id": "ChIJgUbEo8cfqokR5lP9_Wh_DaM",
                      "kyc_attempts": 0
                  }
              }
          }
```
> Example response (422):

```json
{
    "message": "Validation Failed!",
    "errors": {
        "kyc_first_name": [
            "The kyc_first_name field is required."
        ],
        "kyc_last_name": [
            "The kyc_last_name field is required."
        ]
    }
}
```
<div id="execution-results-POSTv2-kyc-update-name" hidden>
    <blockquote>Received response<span id="execution-response-status-POSTv2-kyc-update-name"></span>:</blockquote>
    <pre class="json"><code id="execution-response-content-POSTv2-kyc-update-name"></code></pre>
</div>
<div id="execution-error-POSTv2-kyc-update-name" hidden>
    <blockquote>Request failed with error:</blockquote>
    <pre><code id="execution-error-message-POSTv2-kyc-update-name"></code></pre>
</div>
<form id="form-POSTv2-kyc-update-name" data-method="POST" data-path="v2/kyc/update-name" data-authed="1" data-hasfiles="0" data-headers='{"Authorization":"Bearer {YOUR_AUTH_KEY}","Content-Type":"application\/json","Accept":"application\/json"}' onsubmit="event.preventDefault(); executeTryOut('POSTv2-kyc-update-name', this);">
<h3>
    Request&nbsp;&nbsp;&nbsp;
        <button type="button" style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-tryout-POSTv2-kyc-update-name" onclick="tryItOut('POSTv2-kyc-update-name');">Try it out ⚡</button>
    <button type="button" style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-canceltryout-POSTv2-kyc-update-name" onclick="cancelTryOut('POSTv2-kyc-update-name');" hidden>Cancel</button>&nbsp;&nbsp;
    <button type="submit" style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-executetryout-POSTv2-kyc-update-name" hidden>Send Request 💥</button>
    </h3>
<p>
<small class="badge badge-black">POST</small>
 <b><code>v2/kyc/update-name</code></b>
</p>
<p>
<label id="auth-POSTv2-kyc-update-name" hidden>Authorization header: <b><code>Bearer </code></b><input type="text" name="Authorization" data-prefix="Bearer " data-endpoint="POSTv2-kyc-update-name" data-component="header"></label>
</p>
<h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
<p>
<b><code>kyc_first_name</code></b>&nbsp;&nbsp;<small>string</small>  &nbsp;
<input type="text" name="kyc_first_name" data-endpoint="POSTv2-kyc-update-name" data-component="body" required  hidden>
<br>
First Name of the user. Min: 5. Max: 25. Alphanumeric. No space in between Ex: Clark
</p>
<p>
<b><code>kyc_last_name</code></b>&nbsp;&nbsp;<small>string</small>  &nbsp;
<input type="text" name="kyc_last_name" data-endpoint="POSTv2-kyc-update-name" data-component="body" required  hidden>
<br>
Last Name of the user. Min: 5. Max: 25. Alphanumeric. No space in between Ex: Green
</p>

</form>


## Update Kyc DOB

<small class="badge badge-darkred">requires authentication</small>

Use this end point to update kyc dob

> Example request:

```bash
curl -X POST \
    "https://apiqa.bettorfantasy.com/v2/kyc/update-dob" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"kyc_dob":"qui"}'

```


> Example response (200):

```json

{
      "message": "Kyc dob updated successfully!",
          "data": {
              "user": {
                  "id": 145,
                  "email": "ankita40@yopmail.com",
                  "username": "ankita40",
                  "phone": "8765432080",
                  "kyc": {
                      "kyc_status_id": null,
                      "is_kyc_locked": null,
                     "kyc_lock_remark": null,
                      "kyc_first_name": "Clark",
                      "kyc_last_name": "Green",
                      "kyc_dob": "11/02/1976",
                      "kyc_street_address": "222333 Peacht",
                      "kyc_full_address": "539 Mission Drive, San Gabriel, Los Angeles, California",
                      "kyc_state_id": "5",
                      "kyc_city": "San Francisco",
                      "kyc_zip": "91119",
                      "kyc_address_place_id": "ChIJgUbEo8cfqokR5lP9_Wh_DaM",
                      "kyc_attempts": 0
                  }
              }
          }
```
> Example response (422):

```json
{
    "message": "Validation Failed!",
    "errors": {
        "kyc_dob": [
            "The kyc_dob field is required."
        ]
    }
}
```
<div id="execution-results-POSTv2-kyc-update-dob" hidden>
    <blockquote>Received response<span id="execution-response-status-POSTv2-kyc-update-dob"></span>:</blockquote>
    <pre class="json"><code id="execution-response-content-POSTv2-kyc-update-dob"></code></pre>
</div>
<div id="execution-error-POSTv2-kyc-update-dob" hidden>
    <blockquote>Request failed with error:</blockquote>
    <pre><code id="execution-error-message-POSTv2-kyc-update-dob"></code></pre>
</div>
<form id="form-POSTv2-kyc-update-dob" data-method="POST" data-path="v2/kyc/update-dob" data-authed="1" data-hasfiles="0" data-headers='{"Authorization":"Bearer {YOUR_AUTH_KEY}","Content-Type":"application\/json","Accept":"application\/json"}' onsubmit="event.preventDefault(); executeTryOut('POSTv2-kyc-update-dob', this);">
<h3>
    Request&nbsp;&nbsp;&nbsp;
        <button type="button" style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-tryout-POSTv2-kyc-update-dob" onclick="tryItOut('POSTv2-kyc-update-dob');">Try it out ⚡</button>
    <button type="button" style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-canceltryout-POSTv2-kyc-update-dob" onclick="cancelTryOut('POSTv2-kyc-update-dob');" hidden>Cancel</button>&nbsp;&nbsp;
    <button type="submit" style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-executetryout-POSTv2-kyc-update-dob" hidden>Send Request 💥</button>
    </h3>
<p>
<small class="badge badge-black">POST</small>
 <b><code>v2/kyc/update-dob</code></b>
</p>
<p>
<label id="auth-POSTv2-kyc-update-dob" hidden>Authorization header: <b><code>Bearer </code></b><input type="text" name="Authorization" data-prefix="Bearer " data-endpoint="POSTv2-kyc-update-dob" data-component="header"></label>
</p>
<h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
<p>
<b><code>kyc_dob</code></b>&nbsp;&nbsp;<small>string</small>  &nbsp;
<input type="text" name="kyc_dob" data-endpoint="POSTv2-kyc-update-dob" data-component="body" required  hidden>
<br>
Date of birth. Format: MM/DD/YYYY. Ex: 12/05/1957
</p>

</form>


## Update Kyc Street Address

<small class="badge badge-darkred">requires authentication</small>

Use this end point to update kyc street address

> Example request:

```bash
curl -X POST \
    "https://apiqa.bettorfantasy.com/v2/kyc/update-address" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"kyc_full_address":"voluptatum","kyc_street_address":"magni","kyc_zip":"laboriosam","kyc_state":"odit","kyc_city":"quod","kyc_address_place_id":"exercitationem"}'

```


> Example response (200):

```json

{
      "message": "Kyc street address updated successfully!",
          "data": {
              "user": {
                  "id": 145,
                  "email": "ankita40@yopmail.com",
                  "username": "ankita40",
                  "phone": "8765432080",
                  "kyc": {
                      "kyc_status_id": null,
                      "is_kyc_locked": null,
                     "kyc_lock_remark": null,
                      "kyc_first_name": "Clark",
                      "kyc_last_name": "Green",
                      "kyc_dob": "11/02/1976",
                      "kyc_street_address": "222333 Peacht",
                      "kyc_full_address": "539 Mission Drive, San Gabriel, Los Angeles, California",
                      "kyc_state_id": "5",
                      "kyc_city": "San Francisco",
                      "kyc_zip": "91119",
                      "kyc_address_place_id": "ChIJgUbEo8cfqokR5lP9_Wh_DaM",
                      "kyc_attempts": 0
                  }
              }
          }
```
> Example response (422):

```json
{
    "message": "Validation Failed!",
    "errors": {
        "kyc_full_address": [
            "The kyc_full_address field is required."
        ],
        "kyc_street_address": [
            "The street address field is required."
        ],
        "kyc_state": [
            "The state field is required."
        ],
        "kyc_city": [
            "The city field is required."
        ],
        "kyc_zip": [
            "The zip field is required."
        ]
    }
}
```
<div id="execution-results-POSTv2-kyc-update-address" hidden>
    <blockquote>Received response<span id="execution-response-status-POSTv2-kyc-update-address"></span>:</blockquote>
    <pre class="json"><code id="execution-response-content-POSTv2-kyc-update-address"></code></pre>
</div>
<div id="execution-error-POSTv2-kyc-update-address" hidden>
    <blockquote>Request failed with error:</blockquote>
    <pre><code id="execution-error-message-POSTv2-kyc-update-address"></code></pre>
</div>
<form id="form-POSTv2-kyc-update-address" data-method="POST" data-path="v2/kyc/update-address" data-authed="1" data-hasfiles="0" data-headers='{"Authorization":"Bearer {YOUR_AUTH_KEY}","Content-Type":"application\/json","Accept":"application\/json"}' onsubmit="event.preventDefault(); executeTryOut('POSTv2-kyc-update-address', this);">
<h3>
    Request&nbsp;&nbsp;&nbsp;
        <button type="button" style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-tryout-POSTv2-kyc-update-address" onclick="tryItOut('POSTv2-kyc-update-address');">Try it out ⚡</button>
    <button type="button" style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-canceltryout-POSTv2-kyc-update-address" onclick="cancelTryOut('POSTv2-kyc-update-address');" hidden>Cancel</button>&nbsp;&nbsp;
    <button type="submit" style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-executetryout-POSTv2-kyc-update-address" hidden>Send Request 💥</button>
    </h3>
<p>
<small class="badge badge-black">POST</small>
 <b><code>v2/kyc/update-address</code></b>
</p>
<p>
<label id="auth-POSTv2-kyc-update-address" hidden>Authorization header: <b><code>Bearer </code></b><input type="text" name="Authorization" data-prefix="Bearer " data-endpoint="POSTv2-kyc-update-address" data-component="header"></label>
</p>
<h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
<p>
<b><code>kyc_full_address</code></b>&nbsp;&nbsp;<small>string</small>  &nbsp;
<input type="text" name="kyc_full_address" data-endpoint="POSTv2-kyc-update-address" data-component="body" required  hidden>
<br>
Street address of the user.
</p>
<p>
<b><code>kyc_street_address</code></b>&nbsp;&nbsp;<small>string</small>  &nbsp;
<input type="text" name="kyc_street_address" data-endpoint="POSTv2-kyc-update-address" data-component="body" required  hidden>
<br>
Street address of the user. Max: 40 character. Ex: 81 Flat Rock
</p>
<p>
<b><code>kyc_zip</code></b>&nbsp;&nbsp;<small>string</small>  &nbsp;
<input type="text" name="kyc_zip" data-endpoint="POSTv2-kyc-update-address" data-component="body" required  hidden>
<br>
Kyc Zip code of the user. 5 digits (numbers only). Ex: 91119
</p>
<p>
<b><code>kyc_state</code></b>&nbsp;&nbsp;<small>string</small>  &nbsp;
<input type="text" name="kyc_state" data-endpoint="POSTv2-kyc-update-address" data-component="body" required  hidden>
<br>
Kyc State of the user. Max: 40 character. Ex: California
</p>
<p>
<b><code>kyc_city</code></b>&nbsp;&nbsp;<small>string</small>  &nbsp;
<input type="text" name="kyc_city" data-endpoint="POSTv2-kyc-update-address" data-component="body" required  hidden>
<br>
Kyc City of the user. Max: 40 character. Ex: San Francisco
</p>
<p>
<b><code>kyc_address_place_id</code></b>&nbsp;&nbsp;<small>string</small>     <i>optional</i> &nbsp;
<input type="text" name="kyc_address_place_id" data-endpoint="POSTv2-kyc-update-address" data-component="body"  hidden>
<br>
Kyc address place id of the user. Ex: ChIJgUbEo8cfqokR5lP9_Wh_DaM
</p>

</form>


## KYC Check v2

<small class="badge badge-darkred">requires authentication</small>

Use this endpoint to check the KYC (Know Your Customer) status for a user.
The response will vary based on the user's current KYC status and attempts.

> Example request:

```bash
curl -X POST \
    "https://apiqa.bettorfantasy.com/v2/kyc/check-new" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
```


> Example response (200, KYC Verification - More information required):

```json
{
    "message": "KYC check response",
    "data": {
        "kyc_status": {
            "id": 4,
            "name": "Verification - More information required",
            "created_at": "2022-08-17T06:26:44.000000Z",
            "updated_at": "2022-08-17T06:26:44.000000Z"
        },
        "raw_response": {
            "response": {
                "id-number": 5950044412,
                "summary-result": {
                    "key": "id.failure",
                    "message": "FAIL"
                },
                "results": {
                    "key": "result.no.match",
                    "message": "ID Not Located"
                },
                "idliveq-error": {
                    "key": "id.not.eligible.for.questions",
                    "message": "Not Eligible For Questions"
                },
                "id-scan": "yes",
                "id-scan-url": "https:\/\/web.idologylive.com\/idscan\/v2.jsp?id=U4eIF0WT2916b4616a"
            }
        },
        "already_locked": 0,
        "id_scan_required": 1,
        "kyc_attempts": 1,
        "id_scan_url": "https:\/\/web.idologylive.com\/idscan\/v2.jsp?id=U4eIF0WT2916b4616a"
    }
}
```
> Example response (200, KYC Verified &amp; Locked):

```json
{
    "message": "KYC check response",
    "data": {
        "kyc_status": {
            "id": 5,
            "name": "Duplicate Information - Deny",
            "created_at": "2022-08-17T06:26:44.000000Z",
            "updated_at": "2022-08-17T06:26:44.000000Z"
        },
        "raw_response": null,
        "already_locked": 1,
        "kyc_attempts": 1,
        "id_scan_required": 0,
        "id_scan_url": null
    }
}
```
> Example response (200, KYC Failed &amp; Locked):

```json
{
    "message": "Unable to verify your ID, please contact support",
    "data": {
        "kyc_status": {
            "id": 3,
            "name": "Verification Failed",
            "created_at": "2022-08-17T06:26:44.000000Z",
            "updated_at": "2022-08-17T06:26:44.000000Z"
        },
        "raw_response": null,
        "already_locked": 1,
        "kyc_attempts": 1,
        "id_scan_required": 0,
        "id_scan_url": null
    }
}
```
> Example response (200, More Info Required &amp; Max Attempts Reached):

```json
{
    "message": "ID Upload Required",
    "data": {
        "kyc_status": {
            "id": 4,
            "name": "Verification - More Information Required",
            "created_at": "2022-08-17T06:26:44.000000Z",
            "updated_at": "2022-08-17T06:26:44.000000Z"
        },
        "raw_response": null,
        "already_locked": 0,
        "kyc_attempts": 2,
        "id_scan_required": 1,
        "id_scan_url": null
    }
}
```
> Example response (401, Unauthorized):

```json
{
    "message": "Unauthenticated."
}
```
<div id="execution-results-POSTv2-kyc-check-new" hidden>
    <blockquote>Received response<span id="execution-response-status-POSTv2-kyc-check-new"></span>:</blockquote>
    <pre class="json"><code id="execution-response-content-POSTv2-kyc-check-new"></code></pre>
</div>
<div id="execution-error-POSTv2-kyc-check-new" hidden>
    <blockquote>Request failed with error:</blockquote>
    <pre><code id="execution-error-message-POSTv2-kyc-check-new"></code></pre>
</div>
<form id="form-POSTv2-kyc-check-new" data-method="POST" data-path="v2/kyc/check-new" data-authed="1" data-hasfiles="0" data-headers='{"Authorization":"Bearer {YOUR_AUTH_KEY}","Content-Type":"application\/json","Accept":"application\/json"}' onsubmit="event.preventDefault(); executeTryOut('POSTv2-kyc-check-new', this);">
<h3>
    Request&nbsp;&nbsp;&nbsp;
        <button type="button" style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-tryout-POSTv2-kyc-check-new" onclick="tryItOut('POSTv2-kyc-check-new');">Try it out ⚡</button>
    <button type="button" style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-canceltryout-POSTv2-kyc-check-new" onclick="cancelTryOut('POSTv2-kyc-check-new');" hidden>Cancel</button>&nbsp;&nbsp;
    <button type="submit" style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-executetryout-POSTv2-kyc-check-new" hidden>Send Request 💥</button>
    </h3>
<p>
<small class="badge badge-black">POST</small>
 <b><code>v2/kyc/check-new</code></b>
</p>
<p>
<label id="auth-POSTv2-kyc-check-new" hidden>Authorization header: <b><code>Bearer </code></b><input type="text" name="Authorization" data-prefix="Bearer " data-endpoint="POSTv2-kyc-check-new" data-component="header"></label>
</p>
</form>


## KYC Upload Document

<small class="badge badge-darkred">requires authentication</small>

Use this endpoint to initiate the Scan Onboard document capture for KYC verification.
It calls the GBG Scan Onboard API to generate a unique capture URL for the user.

> Example request:

```bash
curl -X GET \
    -G "https://apiqa.bettorfantasy.com/v2/kyc/upload-document" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
```


> Example response (200):

```json
{
    "message": "KYC document upload response",
    "data": {
        "scan_capture_url": "web.idologylive.com\/api\/idscancapture.jsp?referenceId=Ja3%2B8q%2Bdkk",
        "query_id": "150352661"
    }
}
```
> Example response (500, GBG API Error):

```json
{
    "message": "Something went wrong! Please try again later."
}
```
> Example response (500, GBG Error Response):

```json
{
    "message": "GBG error message"
}
```
> Example response (500, GBG Failed Response):

```json
{
    "message": "GBG failed message"
}
```
> Example response (401, Unauthorized):

```json
{
    "message": "Unauthenticated."
}
```
<div id="execution-results-GETv2-kyc-upload-document" hidden>
    <blockquote>Received response<span id="execution-response-status-GETv2-kyc-upload-document"></span>:</blockquote>
    <pre class="json"><code id="execution-response-content-GETv2-kyc-upload-document"></code></pre>
</div>
<div id="execution-error-GETv2-kyc-upload-document" hidden>
    <blockquote>Request failed with error:</blockquote>
    <pre><code id="execution-error-message-GETv2-kyc-upload-document"></code></pre>
</div>
<form id="form-GETv2-kyc-upload-document" data-method="GET" data-path="v2/kyc/upload-document" data-authed="1" data-hasfiles="0" data-headers='{"Authorization":"Bearer {YOUR_AUTH_KEY}","Content-Type":"application\/json","Accept":"application\/json"}' onsubmit="event.preventDefault(); executeTryOut('GETv2-kyc-upload-document', this);">
<h3>
    Request&nbsp;&nbsp;&nbsp;
        <button type="button" style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-tryout-GETv2-kyc-upload-document" onclick="tryItOut('GETv2-kyc-upload-document');">Try it out ⚡</button>
    <button type="button" style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-canceltryout-GETv2-kyc-upload-document" onclick="cancelTryOut('GETv2-kyc-upload-document');" hidden>Cancel</button>&nbsp;&nbsp;
    <button type="submit" style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-executetryout-GETv2-kyc-upload-document" hidden>Send Request 💥</button>
    </h3>
<p>
<small class="badge badge-green">GET</small>
 <b><code>v2/kyc/upload-document</code></b>
</p>
<p>
<label id="auth-GETv2-kyc-upload-document" hidden>Authorization header: <b><code>Bearer </code></b><input type="text" name="Authorization" data-prefix="Bearer " data-endpoint="GETv2-kyc-upload-document" data-component="header"></label>
</p>
</form>



