> ## Documentation Index
> Fetch the complete documentation index at: https://docs-restapi.wplimit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Service Categories

> Retrieve a list of all service categories with service count and pagination support.

## Query Parameters

<ParamField query="per_page" type="integer" default="10">
  Number of categories per page (1-100)
</ParamField>

<ParamField query="page" type="integer" default="1">
  Page number for pagination
</ParamField>

## Example Requests

### Basic Request

```bash theme={null}
GET /wp-json/latepoint-api/v1/services/categories
X-API-Key: YOUR_API_KEY
```

### Paginated Request

```bash theme={null}
GET /wp-json/latepoint-api/v1/services/categories?page=1&per_page=5
X-API-Key: YOUR_API_KEY
```

## Response Example

```json theme={null}
{
  "success": true,
  "data": [
    {
      "id": "1",
      "name": "Consultas Médicas",
      "short_description": "Consultas médicas generales y especializadas",
      "parent_id": "0",
      "selection_image_id": "0",
      "order_number": "1",
      "services_count": 5
    },
    {
      "id": "2",
      "name": "Terapias",
      "short_description": "Diferentes tipos de terapias",
      "parent_id": "0",
      "selection_image_id": "0",
      "order_number": "2",
      "services_count": 3
    },
    {
      "id": "3",
      "name": "Exámenes",
      "short_description": "Exámenes médicos y diagnósticos",
      "parent_id": "0",
      "selection_image_id": "0",
      "order_number": "3",
      "services_count": 2
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 10,
    "total_items": 3,
    "total_pages": 1
  }
}
```

## Response Fields

<ResponseField name="id" type="string">
  Unique identifier for the category
</ResponseField>

<ResponseField name="name" type="string">
  Category name
</ResponseField>

<ResponseField name="short_description" type="string">
  Brief description of the category
</ResponseField>

<ResponseField name="parent_id" type="string">
  ID of parent category (0 for top-level categories)
</ResponseField>

<ResponseField name="selection_image_id" type="string">
  ID of the selection image for the category
</ResponseField>

<ResponseField name="order_number" type="string">
  Display order number for sorting
</ResponseField>

<ResponseField name="services_count" type="integer">
  Number of active services in this category
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination information including current page, items per page, total items, and total pages
</ResponseField>

## Notes

* Only active service categories are returned
* The `services_count` field shows the number of active services associated with each category
* Categories are ordered by their `order_number` field in ascending order
* This endpoint supports standard pagination parameters for large datasets
* Authentication is required via API key in headers or query parameters
