Flavours API
Carousel

List Carousels

GET
/api/v2/carousels

List all carousels 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 term for filtering carousels.

sort?|

Sort column (e.g. created_at, market_id).

key_by?|

Key response by column.

includes*array<>
filter?object
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.

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/carousels?page=1&per_page=20&search=summer&sort=created_at&key_by=id&includes=doloremque&filter.market_id=uuid&filter.branch_id=uuid" \  -H "X-API-Version: 2.3.0"
{
  "meta": {
    "code": 200,
    "status": "success",
    "message": "Carousels retrieved successfully."
  },
  "data": {
    "current_page": 1,
    "data": [
      {
        "id": "afda9ff2-1376-4659-9216-5ee32e3d245d",
        "market_id": "07928d80-350c-46eb-8786-91a40ca509a0",
        "branch_id": "baf2460b-f254-43d5-9d9a-e951fa9aa0f4",
        "title": "Sed neque quisquam.",
        "image_url": "https://via.placeholder.com/640x480.png/0055ff?text=business+carousel+laudantium",
        "order": 1,
        "created_at": 1782824834694,
        "updated_at": 1782824834694
      },
      {
        "id": "65c2374a-7034-47da-8334-1326e5355e9c",
        "market_id": "07928d80-350c-46eb-8786-91a40ca509a0",
        "branch_id": "baf2460b-f254-43d5-9d9a-e951fa9aa0f4",
        "title": "Et et nam qui.",
        "image_url": "https://via.placeholder.com/640x480.png/002299?text=business+carousel+ullam",
        "order": 2,
        "created_at": 1782824834694,
        "updated_at": 1782824834694
      },
      {
        "id": "0a283ae7-4ea9-4a84-a35c-db1c8ced18cf",
        "market_id": "07928d80-350c-46eb-8786-91a40ca509a0",
        "branch_id": "baf2460b-f254-43d5-9d9a-e951fa9aa0f4",
        "title": "Laboriosam expedita quaerat.",
        "image_url": "https://via.placeholder.com/640x480.png/008855?text=business+carousel+mollitia",
        "order": 3,
        "created_at": 1782824834694,
        "updated_at": 1782824834694
      }
    ],
    "first_page_url": "http://localhost:8000/api/v2/carousels?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "http://localhost:8000/api/v2/carousels?page=1",
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "page": null,
        "active": false
      },
      {
        "url": "http://localhost:8000/api/v2/carousels?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/carousels",
    "per_page": 20,
    "prev_page_url": null,
    "to": 3,
    "total": 3
  }
}
{
  "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
}