API Portal

πŸ’° Cash Report Endpoint

The Cash Report API provides a detailed summary of all player transactions (cash in/out/wager) for a selected cashier or manager within a specific date range. This endpoint helps managers track the total balance flow and wager activity per user.

ℹ️ Description
  • Returns aggregated cash in, cash out, and wager data per user.
  • Supports filtering by date range and cashier ID.
  • Automatically converts all transactions into shop currency format.
  • Periodically reset using the manager's last_cash_reset from backoffice
Endpoint
GET https://proapi.gapi.lol/api/cashier/cash-report
Query Parameters
{
  "from": "2025-11-02 00:00:00",   // optional (start date)
  "to": "2025-11-02 23:59:59",     // optional (end date)
  "cashier_id": 312                // optional (specific cashier or leave empty for self)
}

Dates are in shop timezone and automatically converted to UTC on the server.

Successful Response

Returns a JSON object with aggregated totals and transaction data per user:

{
  "success": true,
  "period": "2025-11-02 00:00 β†’ 2025-11-02 23:59",
  "count": 2,
  "data": [
  {
            "user_id": 2976,
            "name": "PC1",
            "email": "XXX-11",
            "sum": "-69.90",
            "in": "1.00",
            "out": "70.90",
            "wager": "0.00"
        },
        {
            "user_id": 2977,
            "name": "PC2",
            "email": "XXX-12",
            "sum": "1.00",
            "in": "1.00",
            "out": "0.00",
            "wager": "0.00"
        },
  ]
}
Example Request (cURL)
curl -X GET "https://proapi.gapi.lol/api/cashier/cash-report?from=2025-11-02%2000:00:00&to=2025-11-02%2023:59:59" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <your_token>"

To filter by a specific cashier, include cashier_id:

curl -X GET "https://proapi.gapi.lol/api/cashier/cash-report?cashier_id=312" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <your_token>"
Error Responses

401 Unauthorized β€” Wrong username or password:

{
  "success": false,
  "message": "Please login via API token"
}

403 Forbidden β€” Account suspended or disabled:

{
  "success": false,
  "message": "Account suspended"
}

429 Too Many Requests β€” Rate limit exceeded:

{
  "success": false,
  "message": "Too many attempts. Try again later."
}

500 Internal Server Error β€” Server-side issue:

{
  "success": false,
  "message": "Unexpected server error"
}