Flavours API
Drawer

List Drawers

GET
/api/v2/drawers

List all drawers with pagination and filtering options.

AuthorizationBearer <token>

You can retrieve your token by logging in.

In: header

Query Parameters

page?|

Page number for pagination. Must be at least 1.

per_page?|

Number of items per page. Must be at least 1.

search?|

Search in notes.

sort?|

Sort field and direction (e.g., created_at, -created_at).

key_by?|

Key the results by this field.

includes*array<>
filter?object
filter.attendance_id?|

Filter by attendance ID. Must match an existing stored value.

filter.market_id?|

Filter by market ID. Must match an existing stored value.

filter.branch_id?|

Filter by branch ID. Must match an existing stored value.

filter.type?|

Filter by transaction type.

Value in"INCREASE" | "DECREASE" | "OTHER"

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/drawers?page=1&per_page=20&search=cash&sort=-created_at&key_by=id&includes=est&filter.attendance_id=1&filter.market_id=uuid&filter.branch_id=uuid&filter.type=INCREASE" \  -H "X-API-Version: 2.3.0"
{
  "meta": {
    "code": 200,
    "status": "success",
    "message": "Drawers retrieved successfully."
  },
  "data": {
    "current_page": 1,
    "data": [
      {
        "id": 717712153172636,
        "market_id": "4e9e25f3-e476-495b-9b32-5dee0ed3b47f",
        "branch_id": "f40cafb9-bf5a-4453-898f-d3837f4ec78d",
        "attendance_id": "3",
        "type": "DECREASE",
        "amount": 911.08,
        "notes": "Repellat repellat non voluptatem voluptas ex.",
        "created_at": 1787446693617,
        "updated_at": 1787446693617
      },
      {
        "id": 717712153178281,
        "market_id": "ce34b673-857a-45d0-9e38-da220b5042d0",
        "branch_id": "853ac92a-5cd5-4181-91b2-520e402741c5",
        "attendance_id": "4",
        "type": "INCREASE",
        "amount": 610.01,
        "notes": "Repellat eos pariatur quia mollitia modi quas perferendis eum.",
        "created_at": 1787446693617,
        "updated_at": 1787446693617
      },
      {
        "id": 717712153189852,
        "market_id": "fbf0a4dc-5197-4dc5-ada2-25d46298a770",
        "branch_id": "3be962c0-1824-44e6-b6c0-2d359f186bd9",
        "attendance_id": "5",
        "type": "DECREASE",
        "amount": 944.61,
        "notes": "Voluptas sint voluptatem deserunt explicabo.",
        "created_at": 1787446693617,
        "updated_at": 1787446693617
      },
      {
        "id": 717712153193503,
        "market_id": "89dc2e93-a679-46d8-a60c-f7d5821012ac",
        "branch_id": "0c032389-8645-4f69-8bd5-157b9808e5bd",
        "attendance_id": "6",
        "type": "DECREASE",
        "amount": 949.07,
        "notes": "Qui omnis deserunt totam quas pariatur delectus ut.",
        "created_at": 1787446693617,
        "updated_at": 1787446693617
      },
      {
        "id": 717712153202432,
        "market_id": "7fb3a48f-01a3-4a35-839f-b7c58cb71dda",
        "branch_id": "97451d92-fdc2-432f-a5cf-f97f8dd6e6e5",
        "attendance_id": "7",
        "type": "DECREASE",
        "amount": 374.14,
        "notes": "Quia voluptatem quae ut illum tempore ut sint magni.",
        "created_at": 1787446693617,
        "updated_at": 1787446693617
      },
      {
        "id": 717712153206694,
        "market_id": "704c111b-987b-43ec-893f-29969894072c",
        "branch_id": "c64de436-67cf-404c-aa56-b28550454d2d",
        "attendance_id": "8",
        "type": "DECREASE",
        "amount": 604.08,
        "notes": "Temporibus dignissimos accusantium quam eum ducimus explicabo atque vero.",
        "created_at": 1787446693617,
        "updated_at": 1787446693617
      },
      {
        "id": 717712153210927,
        "market_id": "3e590b7b-9c81-49c5-ba0a-0e6a020b281a",
        "branch_id": "cc0f6b87-0216-45fb-a392-35f3e52ba674",
        "attendance_id": "9",
        "type": "DECREASE",
        "amount": 284.55,
        "notes": "Consequatur eligendi suscipit consequatur sit quae sint dicta.",
        "created_at": 1787446693617,
        "updated_at": 1787446693617
      },
      {
        "id": 717712153216810,
        "market_id": "3b952e9e-7b1f-4a7c-a683-dc08d044b176",
        "branch_id": "62312bfd-de01-4ebe-8456-fd7098503ab8",
        "attendance_id": "10",
        "type": "OTHER",
        "amount": 239.45,
        "notes": "Omnis maiores rerum nobis.",
        "created_at": 1787446693617,
        "updated_at": 1787446693617
      },
      {
        "id": 717712153221954,
        "market_id": "3ec67807-1fb2-4eab-94bd-ed9a47900474",
        "branch_id": "c1971f42-7cc4-4fad-890f-7052424986d0",
        "attendance_id": "11",
        "type": "DECREASE",
        "amount": 313.16,
        "notes": "Occaecati facilis voluptatem voluptas.",
        "created_at": 1787446693617,
        "updated_at": 1787446693617
      },
      {
        "id": 717712153224064,
        "market_id": "83564cc1-adea-4abb-8c51-2dfcf7ee7480",
        "branch_id": "ea953f59-3b4d-4307-9217-7ccfed989050",
        "attendance_id": "12",
        "type": "DECREASE",
        "amount": 644.14,
        "notes": "Perspiciatis quisquam minima ut dolorem omnis ad id.",
        "created_at": 1787446693617,
        "updated_at": 1787446693617
      }
    ],
    "first_page_url": "http://localhost:8000/api/v2/drawers?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "http://localhost:8000/api/v2/drawers?page=1",
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "page": null,
        "active": false
      },
      {
        "url": "http://localhost:8000/api/v2/drawers?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/drawers",
    "per_page": 20,
    "prev_page_url": null,
    "to": 10,
    "total": 10
  }
}
{
  "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
}