# 🧾 Receipt Configuration API Documentation

This document describes the API endpoints for managing the Receipt Configuration for the Hotel Billing System.

## 🚀 Base URL
- **URL:** `http://localhost:4000/api/receipt-config`

---

## 🔑 Authentication
All endpoints are **[Protected]** and require a valid Admin JWT token.

**Header:** `Authorization: Bearer <your_jwt_token>`

---

## 📡 Endpoints

### 1. Initialize Configuration
Creates a new receipt configuration entry.

- **URL:** `/`
- **Method:** `POST`
- **Body:**
  ```json
  {
    "hotel_name": "Grand Plaza Hotel",
    "logo_url": "https://example.com/logo.png",
    "address": "123 Main St, City, Country",
    "phone": "9876543210",
    "email": "contact@grandplaza.com",
    "gst_number": "22AAAAA0000A1Z5",
    "footer_text": "Thank you, visit again!",
    "show_logo": true,
    "show_gst": true,
    "currency": "INR",
    "tax_percentage": 18.00
  }
  ```

### 2. Get Current Active Configuration
Retrieves the most recently created configuration.

- **URL:** `/`
- **Method:** `GET`
- **Description:** Returns the latest configuration entry available in the database.

### 3. Get Configuration by ID
Retrieves a specific configuration entry.

- **URL:** `/:id`
- **Method:** `GET`

### 4. Update Configuration
Updates an existing configuration entry.

- **URL:** `/:id`
- **Method:** `PUT`
- **Body:** Same as Initialize Configuration.
  - *Note: `hotel_name` is required. Optional fields will be set to their default/null if omitted.*
