Welcome to our new docs! Please keep in mind we are still working on making everything is as accurate as possible. Join us on discord and ask us questions if you are unsure.
DezerX Spartan Logo
Market

Get Categories List

Retrieve a paginated list of categories with optional filtering by search term and status

GET
/api/application/categories
AuthorizationBearer <token>

Bearer token authentication

In: header

Query Parameters

per_page?integer

Number of categories per page

Default15
Range1 <= value <= 100
search?string

Search term for category name or description

parent_id?integer

Filter by parent category ID (not used in current implementation)

status?string

Filter by category status (not used in current implementation)

Value in"active" | "inactive"

Response Body

curl -X GET "https://api.example.com/api/application/categories?per_page=15&search=string&parent_id=0&status=active"
{
  "success": true,
  "data": {
    "current_page": 1,
    "first_page_url": "https://api.example.com/api/application/products?page=1",
    "from": 1,
    "last_page": 10,
    "last_page_url": "https://api.example.com/api/application/products?page=10",
    "links": [
      {
        "url": "string",
        "label": "string",
        "active": true
      }
    ],
    "next_page_url": "https://api.example.com/api/application/products?page=2",
    "path": "https://api.example.com/api/application/products",
    "per_page": 15,
    "prev_page_url": null,
    "to": 15,
    "total": 150,
    "data": [
      {
        "id": 1,
        "name": "Web Hosting",
        "description": "Professional web hosting solutions for all business sizes",
        "image": "/images/categories/web-hosting.jpg",
        "position": 1,
        "created_at": "2025-08-02T16:38:59.000000Z",
        "updated_at": "2025-08-02T16:38:59.000000Z",
        "products_count": 3
      }
    ]
  }
}
{
  "success": false,
  "message": "Unauthenticated"
}
{
  "success": false,
  "message": "This action is unauthorized"
}
{
  "success": false,
  "message": "Validation failed",
  "errors": {
    "field_name": [
      "This field is required"
    ]
  }
}