# History


## List v2 New

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

Use this end point to get list of cash transactions history

> Example request:

```bash
curl -X GET \
    -G "https://apiqa.bettorfantasy.com/v2/histories?page=9" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
```


> Example response (200):

```json

{
      "message": "History List",
      "data": {
          "transactions": {
          "current_page": 1,
          "data": [
              {
                  "id": 50,
                  "type": "Referral Tier Bonus",
                  "description": "Referral Tier Bonus : ankita2210 | Tier 2 Achieved",
                  "currency_type": 30,
                  "value": 70,
                  "date": "01/10/2025"
              },
              {
                  "id": 49,
                  "type": "Referral Bonus",
                  "description": "New Recruit: ankita16",
                  "currency_type": 30,
                  "value": 20,
                  "date": "01/10/2025"
              },
              {
                  "id": 46,
                  "type": "Referral Tier Bonus",
                  "description": "Referral Tier Bonus : ankita2210 | Tier 1 Achieved",
                  "currency_type": 30,
                  "value": 20,
                  "date": "01/10/2025"
              },
              {
                  "id": 45,
                  "type": "Referral Bonus",
                  "description": "New Recruit: ankita15",
                  "currency_type": 30,
                  "value": 20,
                  "date": "01/10/2025"
              },
              {
                  "id": 42,
                  "type": "Referral Tier Bonus",
                  "description": "Referral Tier Bonus",
                  "currency_type": 30,
                  "value": 20,
                  "date": "01/09/2025"
              },
              {
                  "id": 41,
                  "type": "Referral Tier Bonus",
                  "description": "Referral Tier Bonus",
                  "currency_type": 30,
                  "value": 70,
                  "date": "01/09/2025"
              },
          ],
          "first_page_url": "http://127.0.0.1:8000/v2/histories?page=1",
          "from": 1,
          "last_page": 2,
          "last_page_url": "http://127.0.0.1:8000/v2/histories?page=2",
          "links": [
              {
                  "url": null,
                  "label": "pagination.previous",
                  "active": false
              },
              {
                  "url": "http://127.0.0.1:8000/v2/histories?page=1",
                  "label": "1",
                  "active": true
              },
              {
                  "url": "http://127.0.0.1:8000/v2/histories?page=2",
                  "label": "2",
                  "active": false
              },
              {
                  "url": "http://127.0.0.1:8000/v2/histories?page=2",
                  "label": "pagination.next",
                  "active": false
              }
          ],
          "next_page_url": "http://127.0.0.1:8000/v2/histories?page=2",
          "path": "http://127.0.0.1:8000/v2/histories",
          "per_page": 10,
          "prev_page_url": null,
            "to": 10,
          "total": 17
      }
     }
  }
```
> Example response (422):

```json
{
    "message": "Validation Failed!",
    "errors": {
        "per_page": [
            "The per page must be a number."
        ]
    }
}
```
<div id="execution-results-GETv2-histories" hidden>
    <blockquote>Received response<span id="execution-response-status-GETv2-histories"></span>:</blockquote>
    <pre class="json"><code id="execution-response-content-GETv2-histories"></code></pre>
</div>
<div id="execution-error-GETv2-histories" hidden>
    <blockquote>Request failed with error:</blockquote>
    <pre><code id="execution-error-message-GETv2-histories"></code></pre>
</div>
<form id="form-GETv2-histories" data-method="GET" data-path="v2/histories" 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-histories', 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-histories" onclick="tryItOut('GETv2-histories');">Try it out ⚡</button>
    <button type="button" style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-canceltryout-GETv2-histories" onclick="cancelTryOut('GETv2-histories');" 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-histories" hidden>Send Request 💥</button>
    </h3>
<p>
<small class="badge badge-green">GET</small>
 <b><code>v2/histories</code></b>
</p>
<p>
<label id="auth-GETv2-histories" hidden>Authorization header: <b><code>Bearer </code></b><input type="text" name="Authorization" data-prefix="Bearer " data-endpoint="GETv2-histories" data-component="header"></label>
</p>
<h4 class="fancy-heading-panel"><b>Query Parameters</b></h4>
<p>
<b><code>page</code></b>&nbsp;&nbsp;<small>integer</small>     <i>optional</i> &nbsp;
<input type="number" name="page" data-endpoint="GETv2-histories" data-component="query"  hidden>
<br>
Page number. Works if paginate is set to 1. Ex: 2
</p>
</form>


## List v2 Token Purchase History

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

Use this end point to get list of token purchase transactions history

> Example request:

```bash
curl -X GET \
    -G "https://apiqa.bettorfantasy.com/v2/token-purchase/histories?page=10" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
```


> Example response (200):

```json
{
    "message": "Token Purchase History List",
    "data": {
        "in_app_purchase_transactions": {
            "current_page": 1,
            "data": [
                {
                    "id": 13566,
                    "type": "1000 Token Purchase",
                    "description": "Transaction ID: 1234",
                    "currency_type": 20,
                    "date": "08\/22\/2025",
                    "value": "-$1.99",
                    "txn_type": "debit"
                },
                {
                    "id": 13565,
                    "type": "1000 Token Purchase",
                    "description": "Transaction ID: TRN12345",
                    "currency_type": 20,
                    "date": "08\/22\/2025",
                    "value": "-$1.90",
                    "txn_type": "debit"
                }
            ],
            "first_page_url": "http:\/\/127.0.0.1:8000\/v2\/token-purchase\/histories?page=1",
            "from": 1,
            "last_page": 1,
            "last_page_url": "http:\/\/127.0.0.1:8000\/v2\/token-purchase\/histories?page=1",
            "links": [
                {
                    "url": null,
                    "label": "pagination.previous",
                    "active": false
                },
                {
                    "url": "http:\/\/127.0.0.1:8000\/v2\/token-purchase\/histories?page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "pagination.next",
                    "active": false
                }
            ],
            "next_page_url": null,
            "path": "http:\/\/127.0.0.1:8000\/v2\/token-purchase\/histories",
            "per_page": 10,
            "prev_page_url": null,
            "to": 2,
            "total": 2
        }
    }
}
```
> Example response (422):

```json
{
    "message": "Validation Failed!",
    "errors": {
        "per_page": [
            "The per page must be a number."
        ]
    }
}
```
<div id="execution-results-GETv2-token-purchase-histories" hidden>
    <blockquote>Received response<span id="execution-response-status-GETv2-token-purchase-histories"></span>:</blockquote>
    <pre class="json"><code id="execution-response-content-GETv2-token-purchase-histories"></code></pre>
</div>
<div id="execution-error-GETv2-token-purchase-histories" hidden>
    <blockquote>Request failed with error:</blockquote>
    <pre><code id="execution-error-message-GETv2-token-purchase-histories"></code></pre>
</div>
<form id="form-GETv2-token-purchase-histories" data-method="GET" data-path="v2/token-purchase/histories" 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-token-purchase-histories', 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-token-purchase-histories" onclick="tryItOut('GETv2-token-purchase-histories');">Try it out ⚡</button>
    <button type="button" style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-canceltryout-GETv2-token-purchase-histories" onclick="cancelTryOut('GETv2-token-purchase-histories');" 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-token-purchase-histories" hidden>Send Request 💥</button>
    </h3>
<p>
<small class="badge badge-green">GET</small>
 <b><code>v2/token-purchase/histories</code></b>
</p>
<p>
<label id="auth-GETv2-token-purchase-histories" hidden>Authorization header: <b><code>Bearer </code></b><input type="text" name="Authorization" data-prefix="Bearer " data-endpoint="GETv2-token-purchase-histories" data-component="header"></label>
</p>
<h4 class="fancy-heading-panel"><b>Query Parameters</b></h4>
<p>
<b><code>page</code></b>&nbsp;&nbsp;<small>integer</small>     <i>optional</i> &nbsp;
<input type="number" name="page" data-endpoint="GETv2-token-purchase-histories" data-component="query"  hidden>
<br>
Page number. Works if paginate is set to 1. Ex: 2
</p>
</form>



