# Navigation


## List

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

Use this end point to get the list of navigations

> Example request:

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


> Example response (200):

```json
{
    "message": "Navigations",
    "data": {
        "navigations": [
            {
                "id": 1,
                "name": "Fantasy",
                "status": "Active",
                "sequence": 1
            },
            {
                "id": 2,
                "name": "Props",
                "status": "Active",
                "sequence": 2
            },
            {
                "id": 3,
                "name": "Survival",
                "status": "Active",
                "sequence": 3
            },
            {
                "id": 4,
                "name": "Pools",
                "status": "Active",
                "sequence": 4
            }
        ]
    }
}
```
<div id="execution-results-GETnavigations" hidden>
    <blockquote>Received response<span id="execution-response-status-GETnavigations"></span>:</blockquote>
    <pre class="json"><code id="execution-response-content-GETnavigations"></code></pre>
</div>
<div id="execution-error-GETnavigations" hidden>
    <blockquote>Request failed with error:</blockquote>
    <pre><code id="execution-error-message-GETnavigations"></code></pre>
</div>
<form id="form-GETnavigations" data-method="GET" data-path="navigations" data-authed="1" data-hasfiles="0" data-headers='{"Authorization":"Bearer {YOUR_AUTH_KEY}","Content-Type":"application\/json","Accept":"application\/json"}' onsubmit="event.preventDefault(); executeTryOut('GETnavigations', 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-GETnavigations" onclick="tryItOut('GETnavigations');">Try it out ⚡</button>
    <button type="button" style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-canceltryout-GETnavigations" onclick="cancelTryOut('GETnavigations');" hidden>Cancel</button>&nbsp;&nbsp;
    <button type="submit" style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-executetryout-GETnavigations" hidden>Send Request 💥</button>
    </h3>
<p>
<small class="badge badge-green">GET</small>
 <b><code>navigations</code></b>
</p>
<p>
<label id="auth-GETnavigations" hidden>Authorization header: <b><code>Bearer </code></b><input type="text" name="Authorization" data-prefix="Bearer " data-endpoint="GETnavigations" data-component="header"></label>
</p>
</form>


## Update

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

Use this end point to update navigation.

> Example request:

```bash
curl -X POST \
    "https://apiqa.bettorfantasy.com/navigations/2/update" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"status":"quam","sequence":4}'

```


> Example response (200):

```json
{
    "message": "Navigation updated successfully",
    "data": {
        "navigation": {
            "id": 2,
            "name": "Props",
            "status": "Active",
            "sequence": 2
        }
    }
}
```
> Example response (422):

```json
{
    "message": "Please enter required information",
    "errors": {
        "sequence": [
            "The sequence field is required."
        ]
    }
}
```
> Example response (404):

```json
{
    "message": "Navigation not found"
}
```
> Example response (403):

```json
{
    "message": "Access Forbidden!"
}
```
<div id="execution-results-POSTnavigations--id--update" hidden>
    <blockquote>Received response<span id="execution-response-status-POSTnavigations--id--update"></span>:</blockquote>
    <pre class="json"><code id="execution-response-content-POSTnavigations--id--update"></code></pre>
</div>
<div id="execution-error-POSTnavigations--id--update" hidden>
    <blockquote>Request failed with error:</blockquote>
    <pre><code id="execution-error-message-POSTnavigations--id--update"></code></pre>
</div>
<form id="form-POSTnavigations--id--update" data-method="POST" data-path="navigations/{id}/update" data-authed="1" data-hasfiles="0" data-headers='{"Authorization":"Bearer {YOUR_AUTH_KEY}","Content-Type":"application\/json","Accept":"application\/json"}' onsubmit="event.preventDefault(); executeTryOut('POSTnavigations--id--update', 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-POSTnavigations--id--update" onclick="tryItOut('POSTnavigations--id--update');">Try it out ⚡</button>
    <button type="button" style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-canceltryout-POSTnavigations--id--update" onclick="cancelTryOut('POSTnavigations--id--update');" hidden>Cancel</button>&nbsp;&nbsp;
    <button type="submit" style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-executetryout-POSTnavigations--id--update" hidden>Send Request 💥</button>
    </h3>
<p>
<small class="badge badge-black">POST</small>
 <b><code>navigations/{id}/update</code></b>
</p>
<p>
<label id="auth-POSTnavigations--id--update" hidden>Authorization header: <b><code>Bearer </code></b><input type="text" name="Authorization" data-prefix="Bearer " data-endpoint="POSTnavigations--id--update" data-component="header"></label>
</p>
<h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
<p>
<b><code>id</code></b>&nbsp;&nbsp;<small>integer</small>  &nbsp;
<input type="number" name="id" data-endpoint="POSTnavigations--id--update" data-component="url" required  hidden>
<br>
The ID of the navigation. Ex: 1
</p>
<h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
<p>
<b><code>status</code></b>&nbsp;&nbsp;<small>string</small>  &nbsp;
<input type="text" name="status" data-endpoint="POSTnavigations--id--update" data-component="body" required  hidden>
<br>
Status of the navigation. Possible values: Active, Inactive. Ex: Active
</p>
<p>
<b><code>sequence</code></b>&nbsp;&nbsp;<small>integer</small>  &nbsp;
<input type="number" name="sequence" data-endpoint="POSTnavigations--id--update" data-component="body" required  hidden>
<br>
Sequence of the navigation (Ascending). Ex: 2
</p>

</form>



