# API Structure

## Base URL
`http://localhost/helperlink/public`

## Authentication
All mobile APIs require a Bearer token in the header except Login/Register.
`Authorization: Bearer <JWT_TOKEN>`

## Response Format

### Success
```json
{
  "success": true,
  "message": "Data loaded successfully",
  "data": {}
}
```

### Error
```json
{
  "success": false,
  "message": "Validation error",
  "errors": {
    "email": "Email is already registered"
  }
}
```

### Pagination
```json
{
  "success": true,
  "message": "Data loaded successfully",
  "data": [],
  "pagination": {
    "current_page": 1,
    "per_page": 20,
    "total": 150,
    "last_page": 8
  }
}
```

## Customer API Endpoints

### Auth
- `POST /api/customer/register`
- `POST /api/customer/login`
- `POST /api/customer/forgot-password`
- `POST /api/customer/reset-password`
- `POST /api/customer/change-password`
- `GET  /api/customer/profile`
- `POST /api/customer/profile/update`

### Home
- `GET /api/customer/home`

### Lookups
- `GET /api/lookups/countries`
- `GET /api/lookups/cities?country_id=1`
- `GET /api/lookups/nationalities`
- `GET /api/lookups/languages`
- `GET /api/lookups/specialties`
- `GET /api/lookups/skills`
- `GET /api/lookups/service-models`
- `GET /api/lookups/accommodation-types`
- `GET /api/lookups/interview-platforms`

### Vendors & Maids
- `GET /api/customer/search`
- `GET /api/customer/vendors`
- `GET /api/customer/vendors/{id}`
- `GET /api/customer/maids/{id}`

### Favorites
- `GET  /api/customer/favorites/maids`
- `POST /api/customer/favorites/maids`
- `GET  /api/customer/favorites/vendors`
- `POST /api/customer/favorites/vendors`

### Workflows
- **Interviews**: `GET /api/customer/interviews`, `POST /api/customer/interviews/create`, `POST /api/customer/interviews/{id}/cancel`
- **Quotation Requests**: `GET /api/customer/quotation-requests`, `POST /api/customer/quotation-requests/create`, `POST /api/customer/quotation-requests/{id}/cancel`
- **Quotations**: `GET /api/customer/quotations`, `POST /api/customer/quotations/{id}/action`
- **Contracts**: `GET /api/customer/contracts`, `POST /api/customer/contracts/{id}/sign`, `POST /api/customer/contracts/{id}/cancel`

### Communications
- **Chats**: `GET /api/customer/chat/rooms`, `POST /api/customer/chat/rooms/create`
- **Notifications**: `GET /api/customer/notifications`, `POST /api/customer/notifications/{id}/read`, `POST /api/customer/notifications/read-all`
- **Reviews**: `POST /api/customer/reviews`
- **Support**: `GET /api/customer/support/tickets`, `POST /api/customer/support/tickets`

## Vendor API Endpoints

### Auth
- `POST /api/vendor/register`
- `POST /api/vendor/login`
- `POST /api/vendor/profile/*`

### Dashboard & Settings
- `GET /api/vendor/dashboard`
- `GET /api/vendor/interview-settings`
- `POST /api/vendor/interview-settings/update`
- `GET /api/vendor/interview-availability`
- `POST /api/vendor/interview-availability/update`

### Maids & Documents
- `GET    /api/vendor/maids`
- `POST   /api/vendor/maids/create`
- `POST   /api/vendor/maids/{id}/update`
- `GET    /api/vendor/documents`
- `POST   /api/vendor/documents/upload`

### Workflows
- **Interviews**: `GET /api/vendor/interviews`, `GET /api/vendor/interviews/{id}`, `POST /api/vendor/interviews/{id}/status`, `GET /api/vendor/interviews/{id}/availability`, `POST /api/vendor/interviews/{id}/reschedule`
- **Quotation Requests**: `/api/vendor/quotation-requests/*`
- **Quotations**: `/api/vendor/quotations/*`
- **Contracts**: `/api/vendor/contracts/*`

### Billing
- **Subscriptions**: `/api/vendor/subscription-plans`, `/api/vendor/subscribe`
- **Ads**: `/api/vendor/ad-packages`, `/api/vendor/ads/create`
- **Payments**: `/api/vendor/payment-methods/*`
