Flavours API
Market

List Markets

GET
/api/v2/markets

List all markets 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 name_en or name_ar.

sort?|

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

key_by?|

Key the results by this field.

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

The key of an existing record in the plans table.

filter.markets_ids*array<>

The id of an existing record in the markets table.

filter.merchant_id?|

The id of an existing record in the merchants table.

filter.reseller_id?|

The id of an existing record in the user_merchants table.

filter.sector_id?|

The id of an existing record in the sectors table.

filter.created_by?|

The id of an existing record in the users table.

filter.created_at_min?|

Must be 13 digits.

filter.created_at_max?|

Must be 13 digits.

filter.last_active_at_min?|

Must be 13 digits.

filter.last_active_at_max?|

Must be 13 digits.

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/markets?page=1&per_page=20&search=market&sort=-created_at&key_by=id&includes=dolores&filter.plan_key=soluta&filter.markets_ids=aut&filter.merchant_id=recusandae&filter.reseller_id=quaerat&filter.sector_id=14&filter.created_by=architecto&filter.created_at_min=7046255696255&filter.created_at_max=4440747771814&filter.last_active_at_min=5466126469013&filter.last_active_at_max=3333456973735" \  -H "X-API-Version: 2.3.0"
{
  "meta": {
    "code": 200,
    "status": "success",
    "message": "Business list retrieved successfully."
  },
  "data": {
    "current_page": 1,
    "current_page_url": "http://localhost:8000/api/v2/markets?page=1",
    "data": [
      {
        "id": "07928d80-350c-46eb-8786-91a40ca509a0",
        "sector_id": 13,
        "name_en": "Donnelly-Swaniawski",
        "name_ar": "Donnelly-Swaniawski",
        "description_en": null,
        "description_ar": null,
        "logo_img": "https://via.placeholder.com/200x200.png/00ffff?text=business+logo+et",
        "cover_img": "https://via.placeholder.com/200x200.png/00ee66?text=business+cover+animi",
        "email": "[email protected]",
        "phone_prefix": "212",
        "phone_number": "4769320137",
        "crn": "124-313-2863",
        "tax_number": "72043015227",
        "created_by": null,
        "email_verified_at": 1782824824410,
        "phone_verified_at": 1782824824410,
        "created_at": 1782824824152,
        "updated_at": 1782824824152,
        "deleted_at": null,
        "is_active": true,
        "merchant_id": null,
        "reseller_id": null,
        "slug": "donnelly-swaniawski",
        "code": "ENT-0000000001",
        "links": {
          "website": null,
          "instagram": null,
          "youtube": null,
          "x": null,
          "call_center": null
        },
        "phone": "4769320137"
      }
    ],
    "first_page_url": "http://localhost:8000/api/v2/markets?page=1",
    "from": 1,
    "next_page_url": null,
    "path": "http://localhost:8000/api/v2/markets",
    "per_page": 20,
    "prev_page_url": null,
    "to": 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
}