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. The id of an existing record in the attendances table.

filter.market_id?|

Filter by market ID. The id of an existing record in the markets table.

filter.branch_id?|

Filter by branch ID. The id of an existing record in the branches table.

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 "http://localhost:8000/api/v2/drawers?page=1&per_page=20&search=cash&sort=-created_at&key_by=id&includes=sunt&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": 698781024567094,
        "market_id": "1e1226ad-a47d-4fc8-ae9f-9a2b606154b5",
        "branch_id": "e8ae4513-f342-454a-8b8d-cdfd1b8a29ce",
        "attendance_id": "2",
        "type": "INCREASE",
        "amount": 733.87,
        "notes": "Vel similique qui repellat praesentium minima voluptatem.",
        "created_at": 1782824836004,
        "updated_at": 1782824836004
      },
      {
        "id": 698781024599560,
        "market_id": "24c8a1a3-a9f3-47b6-942a-15eb44ab2528",
        "branch_id": "3ac92a45-6ff7-44fd-b0e4-95805251b3b7",
        "attendance_id": "3",
        "type": "DECREASE",
        "amount": 225.25,
        "notes": "Animi ut quisquam sit laudantium laudantium aut ut qui.",
        "created_at": 1782824836004,
        "updated_at": 1782824836004
      },
      {
        "id": 698781024617348,
        "market_id": "c9f9f252-6312-444f-86c9-b7685bc8ddb5",
        "branch_id": "a8f88b25-b0c7-43b1-a551-1b88a75b0248",
        "attendance_id": "4",
        "type": "INCREASE",
        "amount": 193.09,
        "notes": "Provident rerum quam molestiae minus.",
        "created_at": 1782824836004,
        "updated_at": 1782824836004
      },
      {
        "id": 698781024639497,
        "market_id": "1a3a458c-93db-4fc8-a483-fde3bfe7b663",
        "branch_id": "509bc112-5614-41ad-843a-070e630fbe1e",
        "attendance_id": "5",
        "type": "DECREASE",
        "amount": 911.92,
        "notes": "Voluptate ad nam et veniam qui sint sit nihil.",
        "created_at": 1782824836004,
        "updated_at": 1782824836004
      },
      {
        "id": 698781024660434,
        "market_id": "eacdcf20-402c-45d3-9ffb-8e3e1f2e39ac",
        "branch_id": "bcc7108a-efd1-4286-8d0d-dd3a645a9884",
        "attendance_id": "6",
        "type": "DECREASE",
        "amount": 57.01,
        "notes": "Odio minus non modi.",
        "created_at": 1782824836004,
        "updated_at": 1782824836004
      },
      {
        "id": 698781024685200,
        "market_id": "262cfbc1-a54e-4ca2-b22a-ad759755717a",
        "branch_id": "8b48811c-5343-4a93-96f4-4e91ddda1e35",
        "attendance_id": "7",
        "type": "DECREASE",
        "amount": 928.91,
        "notes": "Eos nulla ea accusamus aut suscipit accusamus consequatur sed.",
        "created_at": 1782824836004,
        "updated_at": 1782824836004
      },
      {
        "id": 698781024703562,
        "market_id": "82c27e94-e849-459e-8d0b-07373802f004",
        "branch_id": "796e1702-a790-419d-9885-e54a5290dd68",
        "attendance_id": "8",
        "type": "INCREASE",
        "amount": 521.02,
        "notes": "Assumenda aut eum consectetur incidunt.",
        "created_at": 1782824836004,
        "updated_at": 1782824836004
      },
      {
        "id": 698781024726953,
        "market_id": "aa557b04-0b08-4569-b7e7-22d7ba226608",
        "branch_id": "39cb8022-421d-4dea-9b27-da73a22c7350",
        "attendance_id": "9",
        "type": "OTHER",
        "amount": 16.23,
        "notes": "Distinctio ipsa et laborum omnis expedita amet consequatur.",
        "created_at": 1782824836004,
        "updated_at": 1782824836004
      },
      {
        "id": 698781024741166,
        "market_id": "1c814121-7270-497a-9844-f63f28101599",
        "branch_id": "ed3609fd-f8ec-4605-8d7d-9fde4cc2b2f0",
        "attendance_id": "10",
        "type": "OTHER",
        "amount": 463.76,
        "notes": "Voluptas repellat repudiandae repellendus accusantium est illo maiores.",
        "created_at": 1782824836004,
        "updated_at": 1782824836004
      },
      {
        "id": 698781024764809,
        "market_id": "92be4990-5d34-4215-b435-f8dc558b52b2",
        "branch_id": "f79b38a1-0eeb-4eec-ad4d-fc7277482011",
        "attendance_id": "11",
        "type": "INCREASE",
        "amount": 656.22,
        "notes": "Rerum itaque accusantium asperiores repellat corporis exercitationem et.",
        "created_at": 1782824836004,
        "updated_at": 1782824836004
      }
    ],
    "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
}