# Geo location


## Capture

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

Use this end point to capture the geo location status

> Example request:

```bash
curl -X POST \
    "https://apiqa.bettorfantasy.com/geolocation/capture" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"geo_location_status_id":1,"xpoint_response":"autem"}'

```


> Example response (201):

```json
{
    "message": "Geo location captured",
    "data": {
        "geo_location_status": {
            "id": 3,
            "name": "ALLOWED",
            "created_at": "2022-05-17T07:31:13.000000Z",
            "updated_at": "2022-05-17T07:31:13.000000Z"
        },
        "is_dfs_geolocation_step_passed": 1
    }
}
```
> Example response (422):

```json
{
    "message": "Please enter required information",
    "errors": {
        "geo_location_status_id": [
            "The geo location status id field is required."
        ]
    }
}
```
<div id="execution-results-POSTgeolocation-capture" hidden>
    <blockquote>Received response<span id="execution-response-status-POSTgeolocation-capture"></span>:</blockquote>
    <pre class="json"><code id="execution-response-content-POSTgeolocation-capture"></code></pre>
</div>
<div id="execution-error-POSTgeolocation-capture" hidden>
    <blockquote>Request failed with error:</blockquote>
    <pre><code id="execution-error-message-POSTgeolocation-capture"></code></pre>
</div>
<form id="form-POSTgeolocation-capture" data-method="POST" data-path="geolocation/capture" data-authed="1" data-hasfiles="0" data-headers='{"Authorization":"Bearer {YOUR_AUTH_KEY}","Content-Type":"application\/json","Accept":"application\/json"}' onsubmit="event.preventDefault(); executeTryOut('POSTgeolocation-capture', 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-POSTgeolocation-capture" onclick="tryItOut('POSTgeolocation-capture');">Try it out ⚡</button>
    <button type="button" style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-canceltryout-POSTgeolocation-capture" onclick="cancelTryOut('POSTgeolocation-capture');" hidden>Cancel</button>&nbsp;&nbsp;
    <button type="submit" style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-executetryout-POSTgeolocation-capture" hidden>Send Request 💥</button>
    </h3>
<p>
<small class="badge badge-black">POST</small>
 <b><code>geolocation/capture</code></b>
</p>
<p>
<label id="auth-POSTgeolocation-capture" hidden>Authorization header: <b><code>Bearer </code></b><input type="text" name="Authorization" data-prefix="Bearer " data-endpoint="POSTgeolocation-capture" data-component="header"></label>
</p>
<h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
<p>
<b><code>geo_location_status_id</code></b>&nbsp;&nbsp;<small>integer</small>  &nbsp;
<input type="number" name="geo_location_status_id" data-endpoint="POSTgeolocation-capture" data-component="body" required  hidden>
<br>
Possible: 1 -> IDLE, 2 -> WAITING, 3 -> ALLOWED, 4 -> DENIED. Ex: 3
</p>
<p>
<b><code>xpoint_response</code></b>&nbsp;&nbsp;<small>string</small>     <i>optional</i> &nbsp;
<input type="text" name="xpoint_response" data-endpoint="POSTgeolocation-capture" data-component="body"  hidden>
<br>
Xpoint response. Ex: {.....}
</p>

</form>



