# 🚀 JSON File Testing Guide - Employee Engagement API

## 📁 File Location:
- **JSON File:** `public/api-docs/employee-engagement-api.json`
- **Copy Location:** Current directory mein copy kar di gai hai

## 🔥 **Method 1: Postman Import (Recommended)**

### Step 1: Postman Open karo
1. Postman app open karo
2. "Import" button pe click karo
3. "File" tab select karo
4. `employee-engagement-api.json` file select karo
5. "Import" click karo

### Step 2: Environment Setup
1. Postman mein Environment banao: "Employee-Engagement"
2. Variables add karo:
   ```
   base_url: https://postcerebral-bess-papaveraceous.ngrok-free.dev/api/v1
   local_url: http://localhost:8000/api/v1
   token: (login ke baad ye auto-fill ho jayega)
   ```

### Step 3: Testing Flow
1. **Health Check** (No auth needed)
2. **Super Admin Login** → Token copy karo
3. **Bearer Token** all requests mein add karo
4. **Test any endpoint**

## 🎯 **Method 2: Direct URL Testing**

### Quick Test Commands:

```bash
# Health Check
curl https://postcerebral-bess-papaveraceous.ngrok-free.dev/api/v1/health

# Super Admin Login
curl -X POST https://postcerebral-bess-papaveraceous.ngrok-free.dev/api/v1/auth/super-admin/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "superadmin@example.com",
    "password": "SuperAdmin@123"
  }'

# Employee Registration
curl -X POST https://postcerebral-bess-papaveraceous.ngrok-free.dev/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Test User",
    "email": "test@company.com",
    "password": "password123",
    "password_confirmation": "password123"
  }'
```

## 📱 **Method 3: Browser Testing**

### Direct Browser URLs:
```
Documentation: https://postcerebral-bess-papaveraceous.ngrok-free.dev/api-docs/index.html
Health Check: https://postcerebral-bess-papaveraceous.ngrok-free.dev/api/v1/health
```

## 📋 **External Teams ke liye:**

### Files to Share:
1. **`employee-engagement-api.json`** - Postman import file
2. **Ngrok URL:** `https://postcerebral-bess-papaveraceous.ngrok-free.dev`
3. **Test Credentials:** Super Admin login details

### Quick Setup for External Teams:
```
1. Download employee-engagement-api.json
2. Import in Postman/Insomnia
3. Change base URL to: https://postcerebral-bess-papaveraceous.ngrok-free.dev/api/v1
4. Test with Super Admin: superadmin@example.com / SuperAdmin@123
```

## ⚡ **Instant Testing Steps:**

### 1. Browser Test (Immediate):
- Open: `https://postcerebral-bess-papaveraceous.ngrok-free.dev/api/v1/health`
- Should show: `{"success":true,"message":"API is running"...}`

### 2. Postman Test (5 minutes):
- Import JSON file
- Test "Super Admin Login" 
- Copy token from response
- Test any other endpoint with Bearer token

### 3. Team Sharing (Send these):
- JSON file
- Ngrok URL  
- Login credentials
- This testing guide

## 🔑 **Default Test Accounts:**

```json
Super Admin:
{
  "email": "superadmin@example.com",
  "password": "SuperAdmin@123"
}

New Employee (Registration):
{
  "name": "Your Name",
  "email": "your@email.com", 
  "password": "password123",
  "password_confirmation": "password123"
}
```

## 🎉 **Ready to Test!**

**Sabse easy:** Browser mein health check try karo
**Most powerful:** Postman import karke systematic testing karo
**For sharing:** JSON file + ngrok URL send kar do external teams ko