Flavours API
Attendance

Attendance Stats — Payments

GET
/api/v2/attendances/{attendanceId}/stats/payments

Paginated on-demand breakdown of payments collected in the attendance window grouped by payment method (enriched with method name/logo). full=true splits each method into SUCCESS/PENDING/RETURN buckets (rows with count>0); full=false collapses to one row per method. Paginated via page/per_page.

AuthorizationBearer <token>

You can retrieve your token by logging in.

In: header

Path Parameters

attendanceId*string

Query Parameters

full?|

When true, ignore the report filter and group by dimension x payment-state (rows with count>0). When false, apply the filter and collapse to one row per dimension value.

page?|

Page number for pagination. Must be at least 1.

per_page?|

Rows per page (max 100). Must be at least 1. Must not be greater than 100.

filter?object
filter.entirely?|

When false, scope to this attendance user. When true, whole branch (all cashiers).

filter.statuses*array<>

Order statuses to include. Applied only when full=false.

filter.types*array<>

Order types to include. Applied only when full=false.

filter.transaction?object
filter.transaction.statuses*array<>

Transaction statuses (PAID/UNPAID) to include. Applied only when full=false.

Header Parameters

X-API-Version*string

API contract version to target. See the Changelog for what changed in each version.

Default"2.0.0"
Value in"2.3.0" | "2.2.0" | "2.1.0" | "2.0.0"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.flavours.sa/dev/api/v2/attendances/doloremque/stats/payments?full=true&page=1&per_page=60&filter.entirely=false&filter.statuses=PROCESS&filter.types=DINING&filter.transaction.statuses=PAID" \  -H "X-API-Version: 2.3.0"
{
  "meta": {
    "code": 200,
    "status": "success",
    "message": "Data Loaded Successfully"
  },
  "data": {
    "current_page": 1,
    "data": [
      {
        "key": "CASH",
        "count": 2,
        "total": "140.00",
        "breakdown": [
          {
            "state": "PENDING",
            "count": 1,
            "total": "40.00"
          },
          {
            "state": "SUCCESS",
            "count": 1,
            "total": "100.00"
          }
        ],
        "name": "Cash",
        "logo_img": null
      }
    ],
    "first_page_url": "http://localhost:8000/api/v2/attendances/2/stats/payments?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "http://localhost:8000/api/v2/attendances/2/stats/payments?page=1",
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "page": null,
        "active": false
      },
      {
        "url": "http://localhost:8000/api/v2/attendances/2/stats/payments?page=1",
        "label": "1",
        "page": 1,
        "active": true
      },
      {
        "url": null,
        "label": "Next &raquo;",
        "page": null,
        "active": false
      }
    ],
    "next_page_url": null,
    "path": "http://localhost:8000/api/v2/attendances/2/stats/payments",
    "per_page": 20,
    "prev_page_url": null,
    "to": 1,
    "total": 1
  }
}
{
  "meta": {
    "code": 401,
    "status": "error",
    "message": "Unauthenticated."
  },
  "data": null
}
{
  "meta": {
    "code": 403,
    "status": "error",
    "message": "Unauthorized."
  },
  "data": null
}
{
  "meta": {
    "code": 404,
    "status": "error",
    "message": "Resource not found."
  },
  "data": null
}
{
  "meta": {
    "code": 500,
    "status": "error",
    "message": "Internal server error."
  },
  "data": null
}