# कैटेगरी

> अपने कैटलॉग की कैटेगरी की लिस्ट

- पेज: https://tbit.app/hi/docs/api/categories
- Base URL: `https://rest-api.tbit.app/v1`
- ऑथेंटिकेशन: हर request में आपकी key के साथ `X-API-Key` header (उदाहरण इसे `TBIT_API_KEY` environment variable से पढ़ते हैं)

## परिचय

कैटेगरी आपके active प्रोडक्ट्स के category_tags से बनती हैं। हर कैटेगरी में बताया जाता है कि कितने प्रोडक्ट्स पर वह टैग लगा है। प्रोडक्ट्स की लिस्ट निकालते समय कैटेगरी का नाम tag parameter में दें।

## Endpoints

| Method | Path | विवरण |
| --- | --- | --- |
| `GET` | `/v1/categories` | List category facets |

## कैटेगरी की लिस्ट

`GET /v1/categories`

```bash
curl "https://rest-api.tbit.app/v1/categories" \
  -H "X-API-Key: $TBIT_API_KEY"
```

## Response फ़ॉर्मेट

कैटेगरी उनके प्रोडक्ट काउंट के साथ, और कैटलॉग में कुल active items:

```json
{
  "data": {
    "categories": [
      { "name": "fiestas", "count": 42 },
      { "name": "infantil", "count": 27 },
      { "name": "decoracion", "count": 18 }
    ],
    "total_items": 134
  }
}
```
