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

# Service Categories

> Hierarchical service catalog with per-vehicle-type pricing for MechZie jobs.

# Service Categories

MechZie uses a two-level service catalog:

* **Groups** — top-level categories (e.g., Engine, Tyre Service, Battery Service)
* **Services** — specific sub-services within a group (e.g., Plug Cleaning, Puncher, New Battery)

## Common vs Exclusive Services

| Vehicle Type  | Price Columns                  |
| ------------- | ------------------------------ |
| Two Wheeler   | `min_price_2w`, `max_price_2w` |
| Three Wheeler | `min_price_3w`, `max_price_3w` |
| Four Wheeler  | `min_price_4w`, `max_price_4w` |

`null` values mean the service is **not offered** for that vehicle type.

A service is **common** when multiple vehicle types have price ranges set.
A service is **exclusive** when only one vehicle type has prices.

## Mechanic Pricing

Price ranges are **guidance only**. Mechanics quote the actual price at job acceptance.
Customers see the price range before booking so they know what to expect.

## Filtering by Vehicle Type

```http theme={null}
GET /api/v1/service-categories?vehicle_type=two_wheeler
```

Returns only services where `min_price_2w` is not null.

## Endpoints

### Groups

| Method  | Path                             | Access        |
| ------- | -------------------------------- | ------------- |
| `GET`   | `/service-categories/groups`     | Authenticated |
| `POST`  | `/service-categories/groups`     | Admin only    |
| `PATCH` | `/service-categories/groups/:id` | Admin only    |

### Services

| Method   | Path                      | Access        |
| -------- | ------------------------- | ------------- |
| `GET`    | `/service-categories`     | Authenticated |
| `GET`    | `/service-categories/:id` | Authenticated |
| `POST`   | `/service-categories`     | Admin only    |
| `PATCH`  | `/service-categories/:id` | Admin only    |
| `DELETE` | `/service-categories/:id` | Admin only    |

## Example Response

```json theme={null}
{
  "data": [
    {
      "id": "uuid",
      "name": "Puncher",
      "slug": "puncher",
      "group": { "id": "uuid", "name": "Tyre Service", "slug": "tyre-service" },
      "min_price_2w": 15000,
      "max_price_2w": 15000,
      "min_price_3w": 15000,
      "max_price_3w": 15000,
      "min_price_4w": 20000,
      "max_price_4w": 20000,
      "is_active": true,
      "sort_order": 10
    }
  ]
}
```

> All prices are in **paisa** (1 INR = 100 paisa). Divide by 100 to display in INR.
