# Configuration


## View Image Configuration

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

Use this end point to view image configuration

> Example request:

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


> Example response (200):

```json
{
    "message": "Configuration",
    "configurations": [
        {
            "id": 10,
            "type": 100,
            "name": "Challenge Completion Image",
            "description": "Challenge Completion Image",
            "value": "http:\/\/127.0.0.1:8000\/images\/1629706786.jpg"
        },
        {
            "id": 11,
            "type": 110,
            "name": "Bet Placed Image",
            "description": "Bet Placed Image",
            "value": "http:\/\/127.0.0.1:8000\/images\/1629706981.jpg"
        }
    ]
}
```
<div id="execution-results-GETconfigurations" hidden>
    <blockquote>Received response<span id="execution-response-status-GETconfigurations"></span>:</blockquote>
    <pre class="json"><code id="execution-response-content-GETconfigurations"></code></pre>
</div>
<div id="execution-error-GETconfigurations" hidden>
    <blockquote>Request failed with error:</blockquote>
    <pre><code id="execution-error-message-GETconfigurations"></code></pre>
</div>
<form id="form-GETconfigurations" data-method="GET" data-path="configurations" data-authed="1" data-hasfiles="0" data-headers='{"Authorization":"Bearer {YOUR_AUTH_KEY}","Content-Type":"application\/json","Accept":"application\/json"}' onsubmit="event.preventDefault(); executeTryOut('GETconfigurations', 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-GETconfigurations" onclick="tryItOut('GETconfigurations');">Try it out ⚡</button>
    <button type="button" style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-canceltryout-GETconfigurations" onclick="cancelTryOut('GETconfigurations');" hidden>Cancel</button>&nbsp;&nbsp;
    <button type="submit" style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-executetryout-GETconfigurations" hidden>Send Request 💥</button>
    </h3>
<p>
<small class="badge badge-green">GET</small>
 <b><code>configurations</code></b>
</p>
<p>
<label id="auth-GETconfigurations" hidden>Authorization header: <b><code>Bearer </code></b><input type="text" name="Authorization" data-prefix="Bearer " data-endpoint="GETconfigurations" data-component="header"></label>
</p>
</form>


## Update

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

Use this end point to update image configuration

> Example request:

```bash
curl -X POST \
    "https://apiqa.bettorfantasy.com/configurations/update" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: multipart/form-data" \
    -H "Accept: application/json" \
    -F "type=17" \
    -F "value=@/tmp/phpXl01pC" 
```


> Example response (200):

```json
{
    "message": "Configuration updated successfully"
}
```
> Example response (422):

```json
{
    "errors": {
        "type": [
            "The type field is required."
        ],
        "value": [
            "The value field is required."
        ]
    }
}
```
> Example response (403):

```json
{
    "message": "Access Forbidden"
}
```
<div id="execution-results-POSTconfigurations-update" hidden>
    <blockquote>Received response<span id="execution-response-status-POSTconfigurations-update"></span>:</blockquote>
    <pre class="json"><code id="execution-response-content-POSTconfigurations-update"></code></pre>
</div>
<div id="execution-error-POSTconfigurations-update" hidden>
    <blockquote>Request failed with error:</blockquote>
    <pre><code id="execution-error-message-POSTconfigurations-update"></code></pre>
</div>
<form id="form-POSTconfigurations-update" data-method="POST" data-path="configurations/update" data-authed="1" data-hasfiles="1" data-headers='{"Authorization":"Bearer {YOUR_AUTH_KEY}","Content-Type":"multipart\/form-data","Accept":"application\/json"}' onsubmit="event.preventDefault(); executeTryOut('POSTconfigurations-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-POSTconfigurations-update" onclick="tryItOut('POSTconfigurations-update');">Try it out ⚡</button>
    <button type="button" style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-canceltryout-POSTconfigurations-update" onclick="cancelTryOut('POSTconfigurations-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-POSTconfigurations-update" hidden>Send Request 💥</button>
    </h3>
<p>
<small class="badge badge-black">POST</small>
 <b><code>configurations/update</code></b>
</p>
<p>
<label id="auth-POSTconfigurations-update" hidden>Authorization header: <b><code>Bearer </code></b><input type="text" name="Authorization" data-prefix="Bearer " data-endpoint="POSTconfigurations-update" data-component="header"></label>
</p>
<h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
<p>
<b><code>type</code></b>&nbsp;&nbsp;<small>integer</small>  &nbsp;
<input type="number" name="type" data-endpoint="POSTconfigurations-update" data-component="body" required  hidden>
<br>
Type of the configuration. Possible values: 100 (Challenge Completion Image), 110 (Bet Placed Image). Ex: 100
</p>
<p>
<b><code>value</code></b>&nbsp;&nbsp;<small>file</small>  &nbsp;
<input type="file" name="value" data-endpoint="POSTconfigurations-update" data-component="body" required  hidden>
<br>
Image.
</p>

</form>



