# States


## Update

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

Use this end point to update states

> Example request:

```bash
curl -X POST \
    "https://apiqa.bettorfantasy.com/state/omnis/update" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"min_age_required":18,"is_ncaa_cash_contest_allowed":true,"is_cash_eligible":true,"is_pickem_cash_eligible":true,"daily_limit":"500","weekly_limit":"1000","monthly_limit":"3000"}'

```


> Example response (200):

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

```json
{
    "message": "Please enter required information",
    "errors": {
        "min_age_required": [
            "The min age field is required."
        ],
        "daily_limit": [
            "The daily limit field is required."
        ],
        "weekly_limit": [
            "The weekly limit field is required."
        ],
        "monthly_limit": [
            "The monthly limit field is required."
        ]
    }
}
```
> Example response (403):

```json
{
    "message": "Access Forbidden"
}
```
<div id="execution-results-POSTstate--id--update" hidden>
    <blockquote>Received response<span id="execution-response-status-POSTstate--id--update"></span>:</blockquote>
    <pre class="json"><code id="execution-response-content-POSTstate--id--update"></code></pre>
</div>
<div id="execution-error-POSTstate--id--update" hidden>
    <blockquote>Request failed with error:</blockquote>
    <pre><code id="execution-error-message-POSTstate--id--update"></code></pre>
</div>
<form id="form-POSTstate--id--update" data-method="POST" data-path="state/{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('POSTstate--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-POSTstate--id--update" onclick="tryItOut('POSTstate--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-POSTstate--id--update" onclick="cancelTryOut('POSTstate--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-POSTstate--id--update" hidden>Send Request 💥</button>
    </h3>
<p>
<small class="badge badge-black">POST</small>
 <b><code>state/{id}/update</code></b>
</p>
<p>
<label id="auth-POSTstate--id--update" hidden>Authorization header: <b><code>Bearer </code></b><input type="text" name="Authorization" data-prefix="Bearer " data-endpoint="POSTstate--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>string</small>  &nbsp;
<input type="text" name="id" data-endpoint="POSTstate--id--update" data-component="url" required  hidden>
<br>

</p>
<h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
<p>
<b><code>min_age_required</code></b>&nbsp;&nbsp;<small>integer</small>     <i>optional</i> &nbsp;
<input type="number" name="min_age_required" data-endpoint="POSTstate--id--update" data-component="body"  hidden>
<br>
required.
</p>
<p>
<b><code>is_ncaa_cash_contest_allowed</code></b>&nbsp;&nbsp;<small>boolean</small>     <i>optional</i> &nbsp;
<label data-endpoint="POSTstate--id--update" hidden><input type="radio" name="is_ncaa_cash_contest_allowed" value="true" data-endpoint="POSTstate--id--update" data-component="body" ><code>true</code></label>
<label data-endpoint="POSTstate--id--update" hidden><input type="radio" name="is_ncaa_cash_contest_allowed" value="false" data-endpoint="POSTstate--id--update" data-component="body" ><code>false</code></label>
<br>
Possible values: 0 (No), 1 (Yes).
</p>
<p>
<b><code>is_cash_eligible</code></b>&nbsp;&nbsp;<small>boolean</small>     <i>optional</i> &nbsp;
<label data-endpoint="POSTstate--id--update" hidden><input type="radio" name="is_cash_eligible" value="true" data-endpoint="POSTstate--id--update" data-component="body" ><code>true</code></label>
<label data-endpoint="POSTstate--id--update" hidden><input type="radio" name="is_cash_eligible" value="false" data-endpoint="POSTstate--id--update" data-component="body" ><code>false</code></label>
<br>
Possible values: 0 (No), 1 (Yes).
</p>
<p>
<b><code>is_pickem_cash_eligible</code></b>&nbsp;&nbsp;<small>boolean</small>     <i>optional</i> &nbsp;
<label data-endpoint="POSTstate--id--update" hidden><input type="radio" name="is_pickem_cash_eligible" value="true" data-endpoint="POSTstate--id--update" data-component="body" ><code>true</code></label>
<label data-endpoint="POSTstate--id--update" hidden><input type="radio" name="is_pickem_cash_eligible" value="false" data-endpoint="POSTstate--id--update" data-component="body" ><code>false</code></label>
<br>
Possible values: 0 (No), 1 (Yes).
</p>
<p>
<b><code>daily_limit</code></b>&nbsp;&nbsp;<small>decimal</small>     <i>optional</i> &nbsp;
<input type="text" name="daily_limit" data-endpoint="POSTstate--id--update" data-component="body"  hidden>
<br>
required.
</p>
<p>
<b><code>weekly_limit</code></b>&nbsp;&nbsp;<small>decimal</small>     <i>optional</i> &nbsp;
<input type="text" name="weekly_limit" data-endpoint="POSTstate--id--update" data-component="body"  hidden>
<br>
required.
</p>
<p>
<b><code>monthly_limit</code></b>&nbsp;&nbsp;<small>decimal</small>     <i>optional</i> &nbsp;
<input type="text" name="monthly_limit" data-endpoint="POSTstate--id--update" data-component="body"  hidden>
<br>
required.
</p>

</form>



