# User API Documentation

**Version:** v42 — generated 2026-11-02 13:26:04 UTC

Comprehensive API endpoints for **User** users.

--- 

## Enums & Constants Reference

The Bateel API uses standardized PHP BackedEnums and strict choice values across request parameters and search filters:

| Enum / Constant | Backing Type | Allowed Values | Description / Labels | Related Fields & Search Filters |
|---|---|---|---|---|
| `Continent` | `string` | `africa`, `europe`, `asia`, `south_america`, `north_america`, `australia` | Continents for geographical classification | `filters[continent]`, `countries.continent` |
| `CourseMaterialType` | `string` | `pdf`, `image` | Material attachment format (Narrow bucket for icons) | `material_type`, `materials.material_type` |
| `EducationalDegree` | `string` | `high_school`, `diploma`, `bachelor`, `master`, `phd` | User educational qualification levels | `educational_degree`, auth registration |
| `FAQType` | `integer` | `1` (General), `2` (Trainer), `3` (User) | FAQ category target audience | `type`, `faqs.type` |
| `MediaType` | `string` | `image`, `video` | Core media asset format types | `type`, `media.type` |
| `NotificationScenario` | `string` | `user_registered`, `withdraw_request_created`, `withdraw_request_approved`, `withdraw_request_rejected` | System notification trigger scenarios | `scenario`, notification settings |
| `PaymentMethod` | `integer` | `1` (Wallet), `2` (Credit Card) | Transaction payment method codes | `payment_method`, payments / checkout |
| `SessionStatus` | `string` | `unscheduled`, `upcoming`, `running`, `completed` | Live session calendar status | `session.status`, live sessions index |
| `StaticPageType` | `string` | `about_us`, `privacy_policy`, `warranty_policy`, `return_policy`, `shipping_policy` | CMS static page system identifiers | `type`, static page endpoints |
| `TrainerType` | `string` | `educational`, `consultant`, `both` | Trainer specialization profile type | `trainer_type`, `trainers.trainer_type` |
| `UserType` | `string` | `super_admin`, `supervisor`, `trainer`, `user` | Core user global role classification | `user_type`, `filters[user_type]` |
| `VerificationToken` | `string` | `register`, `login-verify`, `forgot-password`, `change-phone`, `change-email` | OTP / Auth verification action scope | `type` in auth verification endpoints |
| `WithdrawStatus` | `integer` | `1` (Pending), `2` (Approved), `3` (Rejected) | Withdrawal request processing state | `status`, `withdrawals.status` |
| *Content Status* | `string` | `draft`, `pending_review`, `needs_revision`, `approved` | Program/Course publishing state | `content_status` |
| *Session Mode* | `string` | `online`, `onsite`, `hybrid` | Class session delivery format | `mode`, `attendance_mode` |
| *Quiz Question Type* | `string` | `multiple_choice`, `true_false` | Quiz question format | `question_type` |
| *Gender* | `string` | `male`, `female` | Gender selection | `gender` |

---

## Media

### List All Media

**Method:** `GET` | **Endpoint:** `{{base_host}}/media?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[is_active]=1` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[is_active]` | `boolean` | `1` | Filter by active status: 1 or 0 | Optional |

**Payload & Validation Field Details:**

**Route:** `shared.media.index`
**Middleware:** `auth:api, active`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[is_active]` — Filter by active status: 1 or 0 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:03+00:00"
        }
    ]
}
```

---

### Create New Medium

**Method:** `POST` | **Endpoint:** `{{base_host}}/media` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

| Key | Type | Description | Example |
|---|---|---|---|
| `file` | `file` | File (Required). Rules: required, file, max:10240, mimes:jpg,jpeg,png,gif,webp,pdf,avi,mov,wmv,flv,mkv,mp4,mp3,wav, extensions:jpg,jpeg,png,gif,webp,pdf,avi,mov,wmv,flv,mkv,mp4,mp3,wav | `` |
| `collection` | `text` | Collection (Required). Rules: required, string, max:100, regex:/\A[A-Za-z0-9][A-Za-z0-9_-]*\z/ | `video` |

**Payload & Validation Field Details:**

**Route:** `shared.media.store`
**Middleware:** `auth:api, active`

**Payload:**
Send as `multipart/form-data`. Select a local file for fields marked as `file`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `file` | `file` | yes | File | `{{media_hash}}` | `required, file, max:10240, mimes:jpg,jpeg,png,gif,webp,pdf,avi,mov,wmv,flv,mkv,mp4,mp3,wav, extensions:jpg,jpeg,png,gif,webp,pdf,avi,mov,wmv,flv,mkv,mp4,mp3,wav` |
| `collection` | `string` | yes | Collection | `video` | `required, string, max:100, regex:/\A[A-Za-z0-9][A-Za-z0-9_-]*\z/` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_201 Created_
```json
{
    "status": "success",
    "message": "Data saved successfully",
    "data": {
        "id": 1,
        "hash": "media-hash-uuid-12345",
        "url": "http://localhost:8000/storage/media/example.jpg",
        "mime_type": "image/jpeg",
        "size": 102400,
        "original_name": "photo.jpg"
    }
}
```

---

### Delete Medium

**Method:** `DELETE` | **Endpoint:** `{{base_host}}/media/:media_id` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `media_id` | `{{media_id}}` | Media_id ID |

**Payload & Validation Field Details:**

**Route:** `shared.media.destroy`
**Middleware:** `auth:api, active`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Deleted successfully",
    "data": []
}
```

---

### Chunk Video

**Method:** `POST` | **Endpoint:** `{{base_host}}/media/videos/chunk` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

| Key | Type | Description | Example |
|---|---|---|---|
| `upload_id` | `text` | Upload id (Optional). Rules: sometimes, nullable, string, max:64, regex:/^[A-Za-z0-9\-]+$/ | `{{upload_id}}` |
| `chunk` | `file` | Chunk (Required). Rules: required, file, max:20480 | `` |
| `chunk_index` | `text` | Chunk index (Required). Rules: required, integer, min:0 | `0` |
| `total_chunks` | `text` | Total chunks (Required). Rules: required, integer, min:1, max:10000 | `4` |
| `file_name` | `text` | File name (Required). Rules: required, string, max:255 | `lecture-01.mp4` |
| `total_size` | `text` | Total size (Optional). Rules: sometimes, nullable, integer, min:1, max:2147483648 | `52428800` |
| `collection` | `text` | Collection (Optional). Rules: sometimes, nullable, string, max:100, regex:/\A[A-Za-z0-9][A-Za-z0-9_-]*\z/ | `video` |

**Payload & Validation Field Details:**

**Route:** `shared.media.videos.chunk`
**Middleware:** `auth:api, active, throttle:120,1`

**Payload:**
Send as `multipart/form-data`. Select a local file for fields marked as `file`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `upload_id` | `integer` | no | Upload id | `{{upload_id}}` | `sometimes, nullable, string, max:64, regex:/^[A-Za-z0-9\-]+$/` |
| `chunk` | `file` | yes | Chunk | `value` | `required, file, max:20480` |
| `chunk_index` | `integer` | yes | Chunk index | `0` | `required, integer, min:0` |
| `total_chunks` | `integer` | yes | Total chunks | `4` | `required, integer, min:1, max:10000` |
| `file_name` | `string` | yes | File name | `lecture-01.mp4` | `required, string, max:255` |
| `total_size` | `integer` | no | Total size | `52428800` | `sometimes, nullable, integer, min:1, max:2147483648` |
| `collection` | `string` | no | Collection | `video` | `sometimes, nullable, string, max:100, regex:/\A[A-Za-z0-9][A-Za-z0-9_-]*\z/` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

### Status Video

**Method:** `GET` | **Endpoint:** `{{base_host}}/media/videos/:upload_id/status` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `upload_id` | `{{upload_id}}` | Upload_id ID |

**Payload & Validation Field Details:**

**Route:** `shared.media.videos.status`
**Middleware:** `auth:api, active, throttle:120,1`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

### Cancel Video

**Method:** `DELETE` | **Endpoint:** `{{base_host}}/media/videos/:upload_id` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `upload_id` | `{{upload_id}}` | Upload_id ID |

**Payload & Validation Field Details:**

**Route:** `shared.media.videos.cancel`
**Middleware:** `auth:api, active, throttle:120,1`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

## Search

### List All Search

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/search?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[is_active]=1` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[is_active]` | `boolean` | `1` | Filter by active status: 1 or 0 | Optional |

**Payload & Validation Field Details:**

**Route:** `user.search.index`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[is_active]` — Filter by active status: 1 or 0 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:03+00:00"
        }
    ]
}
```

---

### Recent Search

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/search/recent?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&limit=10` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `limit` | `integer` | `10` | Max recent searches to return | Optional |

**Payload & Validation Field Details:**

**Route:** `user.search.recent`
**Middleware:** `api, set_locale, cors, auth:api, active`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `limit` — Max recent searches to return (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:04+00:00"
        }
    ]
}
```

---

## Home

### Fetch Home Content Home

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/home/fetch_home_content` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Payload & Validation Field Details:**

**Route:** `user.home.fetch_home_content`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

## Auth

### Register New Account

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/auth/register` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "full_name": "Ahmed Al-Mansoor",
    "email": "user@example.com",
    "phone": "1000000001",
    "phone_code": "20",
    "country_id": "{{country_id}}",
    "password": "12345678",
    "password_confirmation": "12345678",
    "educational_degree": "high_school",
    "device_token": "fcm-token-here",
    "device_type": "ios",
    "guest_token": "{{guest_token}}"
}
```

**Payload & Validation Field Details:**

**Route:** `user.auth.register`
**Middleware:** `api, set_locale, cors`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `full_name` | `string` | yes | Full Name | `Ahmed Al-Mansoor` | `required, string, max:100` |
| `email` | `string` | yes | Email | `user@example.com` | `required, email, unique:users,email` |
| `phone` | `string` | yes | Phone | `1000000001` | `required, string, max:20, unique:users,phone,NULL,id,deleted_at,"NULL"` |
| `phone_code` | `string` | yes | Phone code | `20` | `required, string, max:5` |
| `country_id` | `integer` | no | Country id | `{{country_id}}` | `sometimes, nullable, integer, exists:countries,id` |
| `password` | `string` | yes | Password | `12345678` | `required, string, min:8, confirmed` |
| `password_confirmation` | `string` | yes | Password confirmation | `12345678` | `required, same:password` |
| `educational_degree` | `enum (string)` | yes | Educational Degree<br>**One of:** `high_school` · `diploma` · `bachelor` · `master` · `phd` | `high_school` | `required, enum:App\Enums\EducationalDegree` |
| `device_token` | `string` | no | Device token | `fcm-token-here` | `nullable, string, max:500` |
| `device_type` | `enum (string)` | no | Device type<br>**One of:** `ios` · `android` · `web` | `ios` | `nullable, in:ios,android,web` |
| `guest_token` | `string` | no | Guest token | `{{guest_token}}` | `nullable, string, max:128` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

### Verify Account (OTP)

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/auth/verify` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "login": "user@info.com",
    "code": "1234",
    "token": "{{verification_token}}",
    "guest_token": "{{guest_token}}"
}
```

**Payload & Validation Field Details:**

**Route:** `user.auth.verify`
**Middleware:** `api, set_locale, cors`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `login` | `string` | yes | Email or Phone | `user@info.com` | `required, string` |
| `code` | `string` | yes | Verification Code | `1234` | `required, string, size:4` |
| `token` | `string` | yes | Token | `{{verification_token}}` | `required, string` |
| `guest_token` | `string` | no | Guest token | `{{guest_token}}` | `nullable, string, max:128` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

### Resend Code

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/auth/resend-code` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "verification_token": "{{verification_token}}"
}
```

**Payload & Validation Field Details:**

**Route:** `user.auth.resend-code`
**Middleware:** `api, set_locale, cors`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `verification_token` | `string` | yes | Verification Token | `{{verification_token}}` | `required, string` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

### Login

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/auth/login` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "login": "user@info.com",
    "password": "12345678",
    "phone_code": "20",
    "device_token": "fcm-token-here",
    "device_type": "ios",
    "guest_token": "{{guest_token}}"
}
```

**Payload & Validation Field Details:**

**Route:** `user.auth.login`
**Middleware:** `api, set_locale, cors`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `login` | `string` | yes | Email or Phone | `user@info.com` | `required, string` |
| `password` | `string` | yes | Password | `12345678` | `required, string, min:6` |
| `phone_code` | `string` | no | Phone Code | `20` | `nullable, string, max:10` |
| `device_token` | `string` | no | Device Token | `fcm-token-here` | `nullable, string, max:500` |
| `device_type` | `enum (string)` | no | Device Type<br>**One of:** `ios` · `android` · `web` | `ios` | `nullable, in:ios,android,web` |
| `guest_token` | `string` | no | Guest token | `{{guest_token}}` | `nullable, string, max:128` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "name": "User Account",
        "email": "user@example.com",
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
        "verification_token": null
    }
}
```

---

### Forgot Password

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/auth/forgot-password` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "login": "user@info.com"
}
```

**Payload & Validation Field Details:**

**Route:** `user.auth.forgot-password`
**Middleware:** `api, set_locale, cors`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `login` | `string` | yes | Email or Phone | `user@info.com` | `required, string` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

### Reset Password

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/auth/reset-password` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "token": "{{verification_token}}",
    "password": "12345678",
    "password_confirmation": "12345678"
}
```

**Payload & Validation Field Details:**

**Route:** `user.auth.reset-password`
**Middleware:** `api, set_locale, cors`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `token` | `string` | yes | Token | `{{verification_token}}` | `required, string` |
| `password` | `string` | yes | New Password | `12345678` | `required, string, min:8, confirmed` |
| `password_confirmation` | `string` | yes | Password confirmation | `12345678` | `required, same:password` |
| `password_confirmation` | `string` | yes | Password confirmation | `12345678` | `required, string` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

### Logout

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/auth/logout` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "device_token": "fcm-token-here"
}
```

**Payload & Validation Field Details:**

**Route:** `user.auth.logout`
**Middleware:** `api, set_locale, cors, auth:api, active`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `device_token` | `string` | no | Device Token | `fcm-token-here` | `nullable, string, max:500` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

## Categories

### List All Categories

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/categories?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[is_active]=1` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[is_active]` | `boolean` | `1` | Filter by active status: 1 or 0 | Optional |

**Payload & Validation Field Details:**

**Route:** `user.categories.index`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[is_active]` — Filter by active status: 1 or 0 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:03+00:00"
        }
    ]
}
```

---

## Countries

### List All Countries

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/countries?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[is_active]=1&filters[continent]=asia` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[is_active]` | `boolean` | `1` | Filter by active status: 1 or 0 | Optional |
| `filters[continent]` | `enum (string)` | `asia` | Filter by continent (Enum: Continent: africa, europe, asia, south_america, north_america, australia) | Optional |

**Payload & Validation Field Details:**

**Route:** `user.countries.index`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[is_active]` — Filter by active status: 1 or 0 (optional)
- `filters[continent]` — Filter by continent (Enum: Continent: africa, europe, asia, south_america, north_america, australia) (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:03+00:00"
        }
    ]
}
```

---

## Faqs

### List All Faqs

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/faqs?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[is_active]=1` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[is_active]` | `boolean` | `1` | Filter by active status: 1 or 0 | Optional |

**Payload & Validation Field Details:**

**Route:** `user.faqs.index`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[is_active]` — Filter by active status: 1 or 0 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:03+00:00"
        }
    ]
}
```

---

## Pages

### Show Page Details

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/pages/:type` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `type` | `{{type_id}}` | Type ID |

**Payload & Validation Field Details:**

**Route:** `user.pages.show`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

## Our services

### List All Our services

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/our-services?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[is_active]=1` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[is_active]` | `boolean` | `1` | Filter by active status: 1 or 0 | Optional |

**Payload & Validation Field Details:**

**Route:** `user.our-services.index`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[is_active]` — Filter by active status: 1 or 0 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:03+00:00"
        }
    ]
}
```

---

## Contact

### Create New Contact

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/contact` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "name": "Example Name",
    "email": "user@example.com",
    "phone": "1000000001",
    "type": "consultation",
    "subject": "Inquiry about your service",
    "message": "Example message body text."
}
```

**Payload & Validation Field Details:**

**Route:** `user.contact.store`
**Middleware:** `api, set_locale, cors`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `name` | `string` | yes | Name | `Example Name` | `required, string, max:100` |
| `email` | `string` | yes | Email | `user@example.com` | `required, email` |
| `phone` | `string` | no | Phone | `1000000001` | `nullable, string, max:20` |
| `type` | `enum (string)` | no | Request Type<br>**One of:** `consultation` · `program` · `book` · `other` | `consultation` | `nullable, in:"consultation","program","book","other"` |
| `subject` | `string` | yes | Subject | `Inquiry about your service` | `required, string, max:200` |
| `message` | `string` | yes | Message | `Example message body text.` | `required, string, max:2000` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_201 Created_
```json
{
    "status": "success",
    "message": "Data saved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

## Subscribe

### Create New Subscribe

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/subscribe` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "email": "user@example.com"
}
```

**Payload & Validation Field Details:**

**Route:** `user.subscribe.store`
**Middleware:** `api, set_locale, cors, throttle:5,1`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `email` | `string` | yes | Email | `user@example.com` | `required, email, max:255` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_201 Created_
```json
{
    "status": "success",
    "message": "Data saved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

## Unsubscribe

### Unsubscribe Subscriber

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/unsubscribe/:subscriber` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `subscriber` | `{{subscriber_id}}` | Subscriber ID |

**Payload & Validation Field Details:**

**Route:** `user.subscribers.unsubscribe`
**Middleware:** `api, set_locale, cors, signed:relative, throttle:60,1`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

## Programs

### Fetch My Programs Program

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/programs/fetch_my_programs` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Payload & Validation Field Details:**

**Route:** `user.programs.fetch_my_programs`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

### List All Programs

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/programs?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[is_active]=1` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[is_active]` | `boolean` | `1` | Filter by active status: 1 or 0 | Optional |

**Payload & Validation Field Details:**

**Route:** `user.programs.index`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[is_active]` — Filter by active status: 1 or 0 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:03+00:00"
        }
    ]
}
```

---

### Show Program Details

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/programs/:program` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `program` | `{{program_id}}` | Program ID |

**Payload & Validation Field Details:**

**Route:** `user.programs.show`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

### List All Reviews

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/programs/:program/reviews?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[rating]=5` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `program` | `{{program_id}}` | Program ID |

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[rating]` | `integer` | `5` | Filter by star rating: 1 to 5 | Optional |

**Payload & Validation Field Details:**

**Route:** `user.programs.reviews.index`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[rating]` — Filter by star rating: 1 to 5 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:03+00:00"
        }
    ]
}
```

---

### Enroll Program

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/programs/:program/enroll` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `program` | `{{program_id}}` | Program ID |

**Request Body:**

```json
{
    "payment_method": "credit_card"
}
```

**Payload & Validation Field Details:**

**Route:** `user.programs.enroll`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `payment_method` | `string` | no | Payment method | `credit_card` | `nullable, string, max:50` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Join Session

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/programs/:program/sessions/:session/join` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `program` | `{{program_id}}` | Program ID |
| `session` | `{{session_id}}` | Session ID |

**Request Body:**

```json
[]
```

**Payload & Validation Field Details:**

**Route:** `user.programs.sessions.join`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No fields. Send an empty JSON object `{}`.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Create New Review

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/programs/:program/reviews` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `program` | `{{program_id}}` | Program ID |

**Request Body:**

```json
{
    "rating": 5,
    "comment": "Excellent content and very well structured."
}
```

**Payload & Validation Field Details:**

**Route:** `user.programs.reviews.store`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `rating` | `integer` | yes | Rating | `5` | `required, integer, between:1,5` |
| `comment` | `string` | no | Comment | `Excellent content and very well structured.` | `nullable, string, max:2000` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_201 Created_
```json
{
    "status": "success",
    "message": "Data saved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Current Quiz

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/programs/:program/quiz/current-attempt` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `program` | `{{program_id}}` | Program ID |

**Payload & Validation Field Details:**

**Route:** `user.programs.quiz.current`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Start Quiz

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/programs/:program/quiz/start` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `program` | `{{program_id}}` | Program ID |

**Request Body:**

```json
[]
```

**Payload & Validation Field Details:**

**Route:** `user.programs.quiz.start`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No fields. Send an empty JSON object `{}`.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Submit Quiz

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/programs/:program/quiz-attempts` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `program` | `{{program_id}}` | Program ID |

**Request Body:**

```json
{
    "attempt_id": "{{attempt_id}}",
    "answers": [
        {
            "question_id": "{{question_id}}",
            "option_id": "{{option_id}}"
        }
    ]
}
```

**Payload & Validation Field Details:**

**Route:** `user.programs.quiz.submit`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `attempt_id` | `integer` | yes | Attempt | `{{attempt_id}}` | `required, string, uuid, exists:quiz_attempts,uuid` |
| `answers` | `array` | yes | Answers | `[{"question_id":"{{question_id}}","option_id":"{{option_id}}"}]` | `required, array, min:1` |
| `answers.*.question_id` | `integer` | yes | Question | `{{question_id}}` | `required, string, uuid, exists:quiz_questions,uuid` |
| `answers.*.option_id` | `integer` | yes | Selected Option | `{{option_id}}` | `present, nullable, string, uuid, exists:quiz_options,uuid` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

## Courses

### List All Courses

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/courses?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[is_active]=1` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[is_active]` | `boolean` | `1` | Filter by active status: 1 or 0 | Optional |

**Payload & Validation Field Details:**

**Route:** `user.courses.index`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[is_active]` — Filter by active status: 1 or 0 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:03+00:00"
        }
    ]
}
```

---

### Show Course Details

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/courses/:course` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `course` | `{{course_id}}` | Course ID |

**Payload & Validation Field Details:**

**Route:** `user.courses.show`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

### List All Reviews

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/courses/:course/reviews?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[rating]=5` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `course` | `{{course_id}}` | Course ID |

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[rating]` | `integer` | `5` | Filter by star rating: 1 to 5 | Optional |

**Payload & Validation Field Details:**

**Route:** `user.courses.reviews.index`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[rating]` — Filter by star rating: 1 to 5 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:03+00:00"
        }
    ]
}
```

---

### Create New Review

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/courses/:course/reviews` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `course` | `{{course_id}}` | Course ID |

**Request Body:**

```json
{
    "rating": 5,
    "comment": "Excellent content and very well structured."
}
```

**Payload & Validation Field Details:**

**Route:** `user.courses.reviews.store`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `rating` | `integer` | yes | Rating | `5` | `required, integer, between:1,5` |
| `comment` | `string` | no | Comment | `Excellent content and very well structured.` | `nullable, string, max:2000` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_201 Created_
```json
{
    "status": "success",
    "message": "Data saved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Enroll Course

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/courses/:course/enroll` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `course` | `{{course_id}}` | Course ID |

**Request Body:**

```json
{
    "payment_method": "credit_card"
}
```

**Payload & Validation Field Details:**

**Route:** `user.courses.enroll`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `payment_method` | `string` | no | Payment method | `credit_card` | `nullable, string, max:50` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Materials Course

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/courses/:course/materials` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `course` | `{{course_id}}` | Course ID |

**Payload & Validation Field Details:**

**Route:** `user.courses.materials`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Curriculum Course

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/courses/:course/curriculum` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `course` | `{{course_id}}` | Course ID |

**Payload & Validation Field Details:**

**Route:** `user.courses.curriculum`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

## Books

### List Book Categories

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/book-categories` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Payload & Validation Field Details:**

**Route:** `user.books.categories`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

### List All Books

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/books?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[content_type]=digital_book&filters[category_id]={{category_id}}&filters[is_available]=1&country_id={{country_id}}` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[content_type]` | `string` | `digital_book` | Filter by content type: physical_book, digital_book, research | Optional |
| `filters[category_id]` | `integer` | `{{category_id}}` | Filter by category UUID or ID | Optional |
| `filters[is_available]` | `integer` | `1` | Filter by availability: 1 or 0 | Optional |
| `country_id` | `integer` | `{{country_id}}` | Pricing country ID for localized currency and prices | Optional |

**Payload & Validation Field Details:**

**Route:** `user.books.index`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[content_type]` — Filter by content type: physical_book, digital_book, research (optional)
- `filters[category_id]` — Filter by category UUID or ID (optional)
- `filters[is_available]` — Filter by availability: 1 or 0 (optional)
- `country_id` — Pricing country ID for localized currency and prices (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:03+00:00"
        }
    ]
}
```

---

### Show Book Details

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/books/:book` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `book` | `{{book_id}}` | Book ID |

**Payload & Validation Field Details:**

**Route:** `user.books.show`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

### List Book Reviews

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/books/:book/reviews?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[rating]=5` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `book` | `{{book_id}}` | Book ID |

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[rating]` | `integer` | `5` | Filter by star rating: 1 to 5 | Optional |

**Payload & Validation Field Details:**

**Route:** `user.books.reviews.index`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[rating]` — Filter by star rating: 1 to 5 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:03+00:00"
        }
    ]
}
```

---

### Stream Book PDF File (Signed Reader URL)

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/books/:book/file` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `book` | `{{book_id}}` | Book ID |

**Payload & Validation Field Details:**

**Route:** `user.books.file`
**Middleware:** `api, set_locale, cors, signed:relative, throttle:60,1`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

### Purchase Book (Buy Now)

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/books/:book/purchase` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `book` | `{{book_id}}` | Book ID |

**Request Body:**

```json
{
    "payment_method": "credit_card"
}
```

**Payload & Validation Field Details:**

**Route:** `user.books.purchase`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user, idempotency`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `payment_method` | `string` | no | Payment Method | `credit_card` | `nullable, string, max:50` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Book purchased successfully",
    "data": {
        "id": "00000000-0000-0000-0000-000000000001",
        "title": "Sample Book Title",
        "content_type": "digital_book",
        "has_file": true,
        "purchased_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Add Book Review

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/books/:book/reviews` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `book` | `{{book_id}}` | Book ID |

**Request Body:**

```json
{
    "rating": 5,
    "comment": "Excellent content and very well structured."
}
```

**Payload & Validation Field Details:**

**Route:** `user.books.reviews.store`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `rating` | `integer` | yes | Rating | `5` | `required, integer, between:1,5` |
| `comment` | `string` | no | Comment | `Excellent content and very well structured.` | `nullable, string, max:2000` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_201 Created_
```json
{
    "status": "success",
    "message": "Data saved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

## Materials

### File Material

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/materials/:kind/:material/file` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `kind` | `{{kind_id}}` | Kind ID |
| `material` | `{{material_id}}` | Material ID |

**Payload & Validation Field Details:**

**Route:** `user.materials.file`
**Middleware:** `api, set_locale, cors, signed:relative, throttle:60,1`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

## Cart

### Show Cart Details

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/cart?address_id={{address_id}}` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`
- `X-Guest-Token: {{guest_token}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `address_id` | `integer` | `{{address_id}}` | Address ID to evaluate shipping fees | Optional |

**Payload & Validation Field Details:**

**Route:** `user.cart.show`
**Middleware:** `api, set_locale, cors, throttle:60,1`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `address_id` — Address ID to evaluate shipping fees (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "guest_token": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
        "guest_token_expires_at": "2026-12-02T13:26:03+00:00",
        "country": {
            "code": "SA"
        },
        "currency": {
            "code": "SAR",
            "symbol": "ر.س"
        },
        "items": [
            {
                "book": {
                    "id": "00000000-0000-0000-0000-000000000001",
                    "title": "Financial Management in GCC Enterprises",
                    "author": "Sara Al-Mansouri",
                    "content_type": "physical_book",
                    "cover_image": null
                },
                "quantity": 1,
                "unit_price": "49.99",
                "line_total": "49.99",
                "available_quantity": 10,
                "blocker": null
            }
        ],
        "items_count": 1,
        "subtotal": "49.99",
        "shipping_fee": "15.00",
        "total": "64.99",
        "checkout_blockers": [],
        "can_checkout": false
    }
}
```

---

### Clear Cart

**Method:** `DELETE` | **Endpoint:** `{{base_url}}/user/cart` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`
- `X-Guest-Token: {{guest_token}}`

**Payload & Validation Field Details:**

**Route:** `user.cart.clear`
**Middleware:** `api, set_locale, cors, throttle:60,1`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "guest_token": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
        "guest_token_expires_at": "2026-12-02T13:26:03+00:00",
        "country": {
            "code": "SA"
        },
        "currency": {
            "code": "SAR",
            "symbol": "ر.س"
        },
        "items": [
            {
                "book": {
                    "id": "00000000-0000-0000-0000-000000000001",
                    "title": "Financial Management in GCC Enterprises",
                    "author": "Sara Al-Mansouri",
                    "content_type": "physical_book",
                    "cover_image": null
                },
                "quantity": 1,
                "unit_price": "49.99",
                "line_total": "49.99",
                "available_quantity": 10,
                "blocker": null
            }
        ],
        "items_count": 1,
        "subtotal": "49.99",
        "shipping_fee": "15.00",
        "total": "64.99",
        "checkout_blockers": [],
        "can_checkout": false
    }
}
```

---

### Add Item to Cart

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/cart/items` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`
- `X-Guest-Token: {{guest_token}}`

**Request Body:**

```json
{
    "book_id": "{{book_id}}",
    "quantity": 1
}
```

**Payload & Validation Field Details:**

**Route:** `user.cart.items.store`
**Middleware:** `api, set_locale, cors, throttle:60,1`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `book_id` | `integer` | yes | Book | `{{book_id}}` | `required, string, uuid` |
| `quantity` | `integer` | yes | Quantity | `1` | `required, integer, min:1` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_201 Created_
```json
{
    "status": "success",
    "message": "Data saved successfully",
    "data": {
        "guest_token": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
        "guest_token_expires_at": "2026-12-02T13:26:03+00:00",
        "country": {
            "code": "SA"
        },
        "currency": {
            "code": "SAR",
            "symbol": "ر.س"
        },
        "items": [
            {
                "book": {
                    "id": "00000000-0000-0000-0000-000000000001",
                    "title": "Financial Management in GCC Enterprises",
                    "author": "Sara Al-Mansouri",
                    "content_type": "physical_book",
                    "cover_image": null
                },
                "quantity": 1,
                "unit_price": "49.99",
                "line_total": "49.99",
                "available_quantity": 10,
                "blocker": null
            }
        ],
        "items_count": 1,
        "subtotal": "49.99",
        "shipping_fee": "15.00",
        "total": "64.99",
        "checkout_blockers": [],
        "can_checkout": false
    }
}
```

---

### Update Cart Item Quantity

**Method:** `PUT` | **Endpoint:** `{{base_url}}/user/cart/items/:book` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`
- `X-Guest-Token: {{guest_token}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `book` | `{{book_id}}` | Book ID |

**Request Body:**

```json
{
    "quantity": 1
}
```

**Payload & Validation Field Details:**

**Route:** `user.cart.items.update`
**Middleware:** `api, set_locale, cors, throttle:60,1`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `book_id` | `integer` | no | Book | `null` | `prohibited` |
| `quantity` | `integer` | no | Quantity | `1` | `sometimes, integer, min:1` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "guest_token": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
        "guest_token_expires_at": "2026-12-02T13:26:03+00:00",
        "country": {
            "code": "SA"
        },
        "currency": {
            "code": "SAR",
            "symbol": "ر.س"
        },
        "items": [
            {
                "book": {
                    "id": "00000000-0000-0000-0000-000000000001",
                    "title": "Financial Management in GCC Enterprises",
                    "author": "Sara Al-Mansouri",
                    "content_type": "physical_book",
                    "cover_image": null
                },
                "quantity": 1,
                "unit_price": "49.99",
                "line_total": "49.99",
                "available_quantity": 10,
                "blocker": null
            }
        ],
        "items_count": 1,
        "subtotal": "49.99",
        "shipping_fee": "15.00",
        "total": "64.99",
        "checkout_blockers": [],
        "can_checkout": false
    }
}
```

---

### Remove Item from Cart

**Method:** `DELETE` | **Endpoint:** `{{base_url}}/user/cart/items/:book` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`
- `X-Guest-Token: {{guest_token}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `book` | `{{book_id}}` | Book ID |

**Payload & Validation Field Details:**

**Route:** `user.cart.items.destroy`
**Middleware:** `api, set_locale, cors, throttle:60,1`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Deleted successfully",
    "data": []
}
```

---

### Checkout Cart (Create Order)

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/cart/checkout` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "address_id": "{{address_id}}",
    "payment_method": "credit_card"
}
```

**Payload & Validation Field Details:**

**Route:** `user.cart.checkout`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user, idempotency`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `address_id` | `integer` | yes | Address | `{{address_id}}` | `required, integer, exists:addresses,id,user_id,"1"` |
| `payment_method` | `string` | no | Payment Method | `credit_card` | `nullable, string, max:50` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Order placed successfully",
    "data": {
        "id": "00000000-0000-0000-0000-000000000001",
        "order_number": "ORD-2026-0001",
        "status": "placed",
        "total_price": "64.99"
    }
}
```

---

## Consultation types

### List All Consultation types

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/consultation-types?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[is_active]=1` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[is_active]` | `boolean` | `1` | Filter by active status: 1 or 0 | Optional |

**Payload & Validation Field Details:**

**Route:** `user.consultation-types.index`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[is_active]` — Filter by active status: 1 or 0 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:03+00:00"
        }
    ]
}
```

---

## Consultants

### List All Consultants

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/consultants?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[is_active]=1` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[is_active]` | `boolean` | `1` | Filter by active status: 1 or 0 | Optional |

**Payload & Validation Field Details:**

**Route:** `user.consultants.index`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[is_active]` — Filter by active status: 1 or 0 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:03+00:00"
        }
    ]
}
```

---

### Show Consultant Details

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/consultants/:trainer` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `trainer` | `{{trainer_id}}` | Trainer ID |

**Payload & Validation Field Details:**

**Route:** `user.consultants.show`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

### List All Reviews

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/consultants/:trainer/reviews?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[rating]=5` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `trainer` | `{{trainer_id}}` | Trainer ID |

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[rating]` | `integer` | `5` | Filter by star rating: 1 to 5 | Optional |

**Payload & Validation Field Details:**

**Route:** `user.consultants.reviews.index`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[rating]` — Filter by star rating: 1 to 5 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:03+00:00"
        }
    ]
}
```

---

## Trainer consultants

### List All Slots

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/trainer-consultants/:trainer_consultant/slots?from=2026-10-01&to=2026-10-31` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `trainer_consultant` | `{{trainer_consultant_id}}` | Trainer_consultant ID |

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `from` | `date` | `2026-10-01` | Only slots starting on/after this day (YYYY-MM-DD, inclusive) | Optional |
| `to` | `date` | `2026-10-31` | Only slots starting on/before this day (YYYY-MM-DD, inclusive, must be >= from) | Optional |

**Payload & Validation Field Details:**

**Route:** `user.trainer-consultants.slots.index`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `from` — Only slots starting on/after this day (YYYY-MM-DD, inclusive) (optional)
- `to` — Only slots starting on/before this day (YYYY-MM-DD, inclusive, must be >= from) (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:03+00:00"
        }
    ]
}
```

---

## Profile

### Show Profile Details

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/profile` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Payload & Validation Field Details:**

**Route:** `user.profile.view`
**Middleware:** `api, set_locale, cors, auth:api, active`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

### Update Profile

**Method:** `PUT` | **Endpoint:** `{{base_url}}/user/profile` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "full_name": "Ahmed Al-Mansoor",
    "country_id": "{{country_id}}",
    "email": "user@example.com",
    "locale": "en",
    "gender": "male",
    "image": "{{media_hash}}"
}
```

**Payload & Validation Field Details:**

**Route:** `user.profile.update`
**Middleware:** `api, set_locale, cors, auth:api, active`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `full_name` | `string` | no | Full Name | `Ahmed Al-Mansoor` | `sometimes, string, max:100` |
| `country_id` | `integer` | no | Country id | `{{country_id}}` | `sometimes, nullable, integer, exists:countries,id` |
| `email` | `string` | no | Email | `user@example.com` | `sometimes, email, unique:users,email,"1",id` |
| `locale` | `string` | no | Locale | `en` | `nullable, string, max:10` |
| `gender` | `enum (string)` | no | Gender<br>**One of:** `male` · `female` | `male` | `sometimes, nullable, in:"male","female"` |
| `image` | `string` | no | Image | `{{media_hash}}` | `nullable, string, custom:MediaExists` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

### Change Password Profile

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/profile/change-password` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "current_password": "12345678",
    "password": "12345678",
    "password_confirmation": "12345678"
}
```

**Payload & Validation Field Details:**

**Route:** `user.profile.change-password`
**Middleware:** `api, set_locale, cors, auth:api, active`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `current_password` | `string` | yes | Current Password | `12345678` | `required, string` |
| `password` | `string` | yes | New Password | `12345678` | `required, string, min:8, confirmed` |
| `password_confirmation` | `string` | yes | Password confirmation | `12345678` | `required, same:password` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

### Change Phone Profile

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/profile/change-phone` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "phone": "1000000001",
    "phone_code": "20"
}
```

**Payload & Validation Field Details:**

**Route:** `user.profile.change-phone`
**Middleware:** `api, set_locale, cors, auth:api, active`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `phone` | `string` | yes | Phone | `1000000001` | `required, string, max:20, unique:users,phone,"1",id` |
| `phone_code` | `string` | no | Phone Code | `20` | `nullable, string, max:5` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:03+00:00"
    }
}
```

---

### Confirm Change phone

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/profile/change-phone/confirm` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "token": "{{verification_token}}",
    "code": "1234"
}
```

**Payload & Validation Field Details:**

**Route:** `user.profile.change-phone.confirm`
**Middleware:** `api, set_locale, cors, auth:api, active`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `token` | `string` | yes | Verification Token | `{{verification_token}}` | `required, string` |
| `code` | `string` | yes | Verification Code | `1234` | `required, string` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Delete Account Profile

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/profile/delete-account` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "password": "12345678"
}
```

**Payload & Validation Field Details:**

**Route:** `user.profile.delete-account`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `password` | `string` | yes | Password | `12345678` | `required, string` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

## Notifications

### Stream Notification

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/notifications/stream` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Payload & Validation Field Details:**

**Route:** `user.notifications.stream`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Stream Notification

**Method:** `GET` | **Endpoint:** `{{base_url}}/notifications/stream` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Payload & Validation Field Details:**

**Route:** `shared.notifications.stream`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### List All Notifications

**Method:** `GET` | **Endpoint:** `{{base_url}}/notifications?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[is_active]=1` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[is_active]` | `boolean` | `1` | Filter by active status: 1 or 0 | Optional |

**Payload & Validation Field Details:**

**Route:** `shared.notifications.index`
**Middleware:** `api, set_locale, cors, auth:api, active`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[is_active]` — Filter by active status: 1 or 0 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:04+00:00"
        }
    ]
}
```

---

### Unread Count Notification

**Method:** `GET` | **Endpoint:** `{{base_url}}/notifications/unread-count` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Payload & Validation Field Details:**

**Route:** `shared.notifications.unread-count`
**Middleware:** `api, set_locale, cors, auth:api, active`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Read All Notification

**Method:** `PATCH` | **Endpoint:** `{{base_url}}/notifications/read-all` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "ids": [
        "notification-uuid-1",
        "notification-uuid-2"
    ]
}
```

**Payload & Validation Field Details:**

**Route:** `shared.notifications.read-all`
**Middleware:** `api, set_locale, cors, auth:api, active`

**Payload:**
Example payload is included in the request body. No FormRequest validation rules were detected.

| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `ids.0` | `string` | no | Ids 0 | `notification-uuid-1` | `not specified` |
| `ids.1` | `string` | no | Ids 1 | `notification-uuid-2` | `not specified` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Read Notification

**Method:** `PATCH` | **Endpoint:** `{{base_url}}/notifications/:id/read` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `id` | `{{notification_id}}` | Id ID |

**Request Body:**

```json
{
    "ids": [
        "notification-uuid-1",
        "notification-uuid-2"
    ]
}
```

**Payload & Validation Field Details:**

**Route:** `shared.notifications.read`
**Middleware:** `api, set_locale, cors, auth:api, active`

**Payload:**
Example payload is included in the request body. No FormRequest validation rules were detected.

| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `ids.0` | `string` | no | Ids 0 | `notification-uuid-1` | `not specified` |
| `ids.1` | `string` | no | Ids 1 | `notification-uuid-2` | `not specified` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Mark All Read Notification

**Method:** `POST` | **Endpoint:** `{{base_url}}/notifications/mark-all-read` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
[]
```

**Payload & Validation Field Details:**

**Route:** `shared.notifications.mark-all-read`
**Middleware:** `api, set_locale, cors, auth:api, active`

**Payload:**
No fields. Send an empty JSON object `{}`.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Clear All Notification

**Method:** `DELETE` | **Endpoint:** `{{base_url}}/notifications/clear-all` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Payload & Validation Field Details:**

**Route:** `shared.notifications.clear-all`
**Middleware:** `api, set_locale, cors, auth:api, active`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Show Notification Details

**Method:** `GET` | **Endpoint:** `{{base_url}}/notifications/:id` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `id` | `{{notification_id}}` | Id ID |

**Payload & Validation Field Details:**

**Route:** `shared.notifications.show`
**Middleware:** `api, set_locale, cors, auth:api, active`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Delete Notification

**Method:** `DELETE` | **Endpoint:** `{{base_url}}/notifications/:id` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `id` | `{{notification_id}}` | Id ID |

**Payload & Validation Field Details:**

**Route:** `shared.notifications.destroy`
**Middleware:** `api, set_locale, cors, auth:api, active`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Deleted successfully",
    "data": []
}
```

---

### Stream Ticket Notification

**Method:** `POST` | **Endpoint:** `{{base_url}}/notifications/stream-ticket` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
[]
```

**Payload & Validation Field Details:**

**Route:** `shared.notifications.stream-ticket`
**Middleware:** `api, set_locale, cors, auth:api, active, throttle:20,1`

**Payload:**
No fields. Send an empty JSON object `{}`.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

## Settings

### Show Setting Details

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/settings` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Payload & Validation Field Details:**

**Route:** `user.settings.show`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Update Setting

**Method:** `PUT` | **Endpoint:** `{{base_url}}/user/settings` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "allow_notifications": true,
    "locale": "en"
}
```

**Payload & Validation Field Details:**

**Route:** `user.settings.update`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `allow_notifications` | `boolean` | no | Allow Notifications | `true` | `sometimes, boolean` |
| `locale` | `enum (string)` | no | Language<br>**One of:** `en` · `ar` | `en` | `sometimes, string, in:en,ar` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

## Learning hub

### List All Learning hub

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/learning-hub?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[is_active]=1` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[is_active]` | `boolean` | `1` | Filter by active status: 1 or 0 | Optional |

**Payload & Validation Field Details:**

**Route:** `user.learning-hub.index`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[is_active]` — Filter by active status: 1 or 0 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:04+00:00"
        }
    ]
}
```

---

## My library

### List My Library Books

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/my-library?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[content_type]=digital_book` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[content_type]` | `string` | `digital_book` | Filter by content type: digital_book, research | Optional |

**Payload & Validation Field Details:**

**Route:** `user.library.index`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[content_type]` — Filter by content type: digital_book, research (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:04+00:00"
        }
    ]
}
```

---

### Get Signed Reader URL

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/my-library/:book/read` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `book` | `{{book_id}}` | Book ID |

**Payload & Validation Field Details:**

**Route:** `user.library.read`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user, throttle:30,1`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Reader link created",
    "data": {
        "url": "http://localhost:8000/api/v1/user/books/00000000-0000-0000-0000-000000000001/file?signature=example",
        "expires_at": "2026-11-02T13:36:04+00:00"
    }
}
```

---

### Show Progress Details

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/my-library/:book/progress` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `book` | `{{book_id}}` | Book ID |

**Payload & Validation Field Details:**

**Route:** `user.library.progress.show`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Update Progress

**Method:** `PUT` | **Endpoint:** `{{base_url}}/user/my-library/:book/progress` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `book` | `{{book_id}}` | Book ID |

**Request Body:**

```json
{
    "current_page": 1,
    "progress_percent": 80,
    "position": []
}
```

**Payload & Validation Field Details:**

**Route:** `user.library.progress.update`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `current_page` | `integer` | yes | Current Page | `1` | `required, integer, min:0` |
| `progress_percent` | `number` | yes | Progress Percent | `80` | `required, numeric, between:0,100` |
| `position` | `array` | no | Position | `[]` | `nullable, array` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### List All Annotations

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/my-library/:book/annotations?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[content_type]=digital_book` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `book` | `{{book_id}}` | Book ID |

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[content_type]` | `string` | `digital_book` | Filter by content type: digital_book, research | Optional |

**Payload & Validation Field Details:**

**Route:** `user.library.annotations.index`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[content_type]` — Filter by content type: digital_book, research (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:04+00:00"
        }
    ]
}
```

---

### Create New Annotation

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/my-library/:book/annotations` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `book` | `{{book_id}}` | Book ID |

**Request Body:**

```json
{
    "type": "bookmark",
    "page": 1,
    "position": []
}
```

**Payload & Validation Field Details:**

**Route:** `user.library.annotations.store`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `type` | `enum (string)` | yes | Type<br>**One of:** `bookmark` · `highlight` · `note` | `bookmark` | `required, in:"bookmark","highlight","note"` |
| `page` | `integer` | yes | Page | `1` | `required, integer, min:0` |
| `position` | `array` | no | Position | `[]` | `nullable, array` |
| `body` | `string` | no | Body | `null` | `prohibited, nullable, string, max:5000` |
| `color` | `string` | no | Color | `null` | `prohibited, nullable, string, max:30` |
| `parent_id` | `integer` | no | Parent | `null` | `prohibited, nullable, uuid, custom:Closure` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_201 Created_
```json
{
    "status": "success",
    "message": "Data saved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Update Annotation

**Method:** `PUT` | **Endpoint:** `{{base_url}}/user/my-library/:book/annotations/:annotation` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `book` | `{{book_id}}` | Book ID |
| `annotation` | `{{annotation_id}}` | Annotation ID |

**Request Body:**

```json
{
    "body": "Example message body text.",
    "color": "value",
    "position": []
}
```

**Payload & Validation Field Details:**

**Route:** `user.library.annotations.update`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `body` | `string` | no | Body | `Example message body text.` | `nullable, string, max:5000` |
| `color` | `string` | no | Color | `value` | `nullable, string, max:30` |
| `position` | `array` | no | Position | `[]` | `nullable, array` |
| `type` | `string` | no | Type | `null` | `prohibited` |
| `page` | `string` | no | Page | `null` | `prohibited` |
| `parent_id` | `integer` | no | Parent id | `null` | `prohibited` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Delete Annotation

**Method:** `DELETE` | **Endpoint:** `{{base_url}}/user/my-library/:book/annotations/:annotation` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `book` | `{{book_id}}` | Book ID |
| `annotation` | `{{annotation_id}}` | Annotation ID |

**Payload & Validation Field Details:**

**Route:** `user.library.annotations.destroy`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Deleted successfully",
    "data": []
}
```

---

## My orders

### List My Orders

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/my-orders?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[status]=placed` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[status]` | `enum` | `placed` | Filter by order status: placed, delivered, cancelled | Optional |

**Payload & Validation Field Details:**

**Route:** `user.orders.index`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[status]` — Filter by order status: placed, delivered, cancelled (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:04+00:00"
        }
    ]
}
```

---

### Show Order Details

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/my-orders/:order` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `order` | `{{order_id}}` | Order ID |

**Payload & Validation Field Details:**

**Route:** `user.orders.show`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

## Addresses

### List All Addresses

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/addresses?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[is_active]=1` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[is_active]` | `boolean` | `1` | Filter by active status: 1 or 0 | Optional |

**Payload & Validation Field Details:**

**Route:** `user.addresses.index`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[is_active]` — Filter by active status: 1 or 0 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:04+00:00"
        }
    ]
}
```

---

### Create New Address

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/addresses` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "name": "Example Name",
    "address": "123 Main Street, Building A",
    "street_name": "Example Name",
    "building_number": "value",
    "floor": "value",
    "country_id": "{{country_id}}",
    "governorate_id": "{{governorate_id}}",
    "region_id": "{{region_id}}",
    "phone": "1000000001",
    "phone_code": "20",
    "is_default": true
}
```

**Payload & Validation Field Details:**

**Route:** `user.addresses.store`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `name` | `string` | no | Recipient Name | `Example Name` | `nullable, string, max:255` |
| `address` | `string` | yes | Address | `123 Main Street, Building A` | `required, string, max:255` |
| `street_name` | `string` | no | Street Name | `Example Name` | `nullable, string, max:255` |
| `building_number` | `string` | no | Building Number | `value` | `nullable, string, max:255` |
| `floor` | `string` | no | Floor | `value` | `nullable, string, max:255` |
| `country_id` | `integer` | yes | Country | `{{country_id}}` | `required, integer, exists:countries,id` |
| `governorate_id` | `integer` | no | Governorate | `{{governorate_id}}` | `nullable, integer, exists:governorates,id` |
| `region_id` | `integer` | no | Region | `{{region_id}}` | `nullable, integer, exists:regions,id` |
| `phone` | `string` | no | Phone | `1000000001` | `nullable, string, max:20` |
| `phone_code` | `string` | no | Phone Code | `20` | `nullable, string, max:5` |
| `is_default` | `boolean` | no | Default | `true` | `sometimes, boolean` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_201 Created_
```json
{
    "status": "success",
    "message": "Data saved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Show Address Details

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/addresses/:address` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `address` | `{{address_id}}` | Address ID |

**Payload & Validation Field Details:**

**Route:** `user.addresses.show`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Update Address

**Method:** `PUT` | **Endpoint:** `{{base_url}}/user/addresses/:address` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `address` | `{{address_id}}` | Address ID |

**Request Body:**

```json
{
    "name": "Example Name",
    "address": "123 Main Street, Building A",
    "street_name": "Example Name",
    "building_number": "value",
    "floor": "value",
    "country_id": "{{country_id}}",
    "governorate_id": "{{governorate_id}}",
    "region_id": "{{region_id}}",
    "phone": "1000000001",
    "phone_code": "20",
    "is_default": true
}
```

**Payload & Validation Field Details:**

**Route:** `user.addresses.update`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `name` | `string` | no | Recipient Name | `Example Name` | `nullable, string, max:255` |
| `address` | `string` | no | Address | `123 Main Street, Building A` | `sometimes, string, max:255` |
| `street_name` | `string` | no | Street Name | `Example Name` | `nullable, string, max:255` |
| `building_number` | `string` | no | Building Number | `value` | `nullable, string, max:255` |
| `floor` | `string` | no | Floor | `value` | `nullable, string, max:255` |
| `country_id` | `integer` | no | Country | `{{country_id}}` | `sometimes, integer, exists:countries,id` |
| `governorate_id` | `integer` | no | Governorate | `{{governorate_id}}` | `nullable, integer, exists:governorates,id` |
| `region_id` | `integer` | no | Region | `{{region_id}}` | `nullable, integer, exists:regions,id` |
| `phone` | `string` | no | Phone | `1000000001` | `nullable, string, max:20` |
| `phone_code` | `string` | no | Phone Code | `20` | `nullable, string, max:5` |
| `is_default` | `boolean` | no | Default | `true` | `sometimes, boolean` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Delete Address

**Method:** `DELETE` | **Endpoint:** `{{base_url}}/user/addresses/:address` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `address` | `{{address_id}}` | Address ID |

**Payload & Validation Field Details:**

**Route:** `user.addresses.destroy`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Deleted successfully",
    "data": []
}
```

---

### Set Default Address

**Method:** `PUT` | **Endpoint:** `{{base_url}}/user/addresses/:address/set-default` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `address` | `{{address_id}}` | Address ID |

**Request Body:**

```json
[]
```

**Payload & Validation Field Details:**

**Route:** `user.addresses.set-default`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No fields. Send an empty JSON object `{}`.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

## Consultation bookings

### Create New Consultation booking

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/consultation-bookings` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Request Body:**

```json
{
    "trainer_consultant_id": "{{trainer_consultant_id}}",
    "slot_id": "{{slot_id}}",
    "payment_method": "credit_card"
}
```

**Payload & Validation Field Details:**

**Route:** `user.consultation-bookings.store`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `trainer_consultant_id` | `integer` | yes | Trainer consultant id | `{{trainer_consultant_id}}` | `required, string, uuid, exists:trainer_consultants,uuid` |
| `slot_id` | `integer` | yes | Slot id | `{{slot_id}}` | `required, string, uuid, exists:trainer_consultant_slots,uuid` |
| `payment_method` | `string` | no | Payment method | `credit_card` | `nullable, string, max:50` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_201 Created_
```json
{
    "status": "success",
    "message": "Data saved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### List All Consultation bookings

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/consultation-bookings?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[is_active]=1` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[is_active]` | `boolean` | `1` | Filter by active status: 1 or 0 | Optional |

**Payload & Validation Field Details:**

**Route:** `user.consultation-bookings.index`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[is_active]` — Filter by active status: 1 or 0 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:04+00:00"
        }
    ]
}
```

---

### Show Consultation booking Details

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/consultation-bookings/:booking` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `booking` | `{{booking_id}}` | Booking ID |

**Payload & Validation Field Details:**

**Route:** `user.consultation-bookings.show`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Join Consultation booking

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/consultation-bookings/:booking/join` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `booking` | `{{booking_id}}` | Booking ID |

**Request Body:**

```json
[]
```

**Payload & Validation Field Details:**

**Route:** `user.consultation-bookings.join`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No fields. Send an empty JSON object `{}`.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Create New Review

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/consultation-bookings/:booking/reviews` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `booking` | `{{booking_id}}` | Booking ID |

**Request Body:**

```json
{
    "rating": 5,
    "comment": "Excellent content and very well structured."
}
```

**Payload & Validation Field Details:**

**Route:** `user.consultation-bookings.reviews.store`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `rating` | `integer` | yes | Rating | `5` | `required, integer, between:1,5` |
| `comment` | `string` | no | Comment | `Excellent content and very well structured.` | `nullable, string, max:2000` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_201 Created_
```json
{
    "status": "success",
    "message": "Data saved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

## Certificates

### List All Certificates

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/certificates?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[is_active]=1` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[is_active]` | `boolean` | `1` | Filter by active status: 1 or 0 | Optional |

**Payload & Validation Field Details:**

**Route:** `user.certificates.index`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[is_active]` — Filter by active status: 1 or 0 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:04+00:00"
        }
    ]
}
```

---

### Show Certificate Details

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/certificates/:certificate` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `certificate` | `{{certificate_id}}` | Certificate ID |

**Payload & Validation Field Details:**

**Route:** `user.certificates.show`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Verify Certificate

**Method:** `GET` | **Endpoint:** `{{base_url}}/certificates/verify/:qr_token` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `qr_token` | `{{qr_token_id}}` | Qr_token ID |

**Payload & Validation Field Details:**

**Route:** `shared.certificates.verify`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

## Invoices

### List All Invoices

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/invoices?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[is_active]=1` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[is_active]` | `boolean` | `1` | Filter by active status: 1 or 0 | Optional |

**Payload & Validation Field Details:**

**Route:** `user.invoices.index`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[is_active]` — Filter by active status: 1 or 0 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:04+00:00"
        }
    ]
}
```

---

### Show Invoice Details

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/invoices/:invoice` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `invoice` | `{{invoice_id}}` | Invoice ID |

**Payload & Validation Field Details:**

**Route:** `user.invoices.show`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

## My courses

### Mine Course

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/my-courses` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Payload & Validation Field Details:**

**Route:** `user.courses.mine`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

## Is enrolled

### Is Enrolled Course

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/is-enrolled` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Payload & Validation Field Details:**

**Route:** `user.courses.is-enrolled`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

## Lessons

### Progress Course

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/lessons/:lesson/progress` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `lesson` | `{{lesson_id}}` | Lesson ID |

**Request Body:**

```json
{
    "watched_percent": 75,
    "position_seconds": 420
}
```

**Payload & Validation Field Details:**

**Route:** `user.courses.progress`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `watched_percent` | `number` | yes | Watched Percentage | `75` | `required, numeric, between:0,100` |
| `position_seconds` | `integer` | no | Position (seconds) | `420` | `sometimes, nullable, integer, min:0` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Current Quiz

**Method:** `GET` | **Endpoint:** `{{base_url}}/user/lessons/:lesson/quiz/current-attempt` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `lesson` | `{{lesson_id}}` | Lesson ID |

**Payload & Validation Field Details:**

**Route:** `user.courses.quiz.current`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Start Quiz

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/lessons/:lesson/quiz/start` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `lesson` | `{{lesson_id}}` | Lesson ID |

**Request Body:**

```json
[]
```

**Payload & Validation Field Details:**

**Route:** `user.courses.quiz.start`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No fields. Send an empty JSON object `{}`.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

### Submit Quiz

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/lessons/:lesson/quiz-attempts` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `lesson` | `{{lesson_id}}` | Lesson ID |

**Request Body:**

```json
{
    "attempt_id": "{{attempt_id}}",
    "answers": [
        {
            "question_id": "{{question_id}}",
            "option_id": "{{option_id}}"
        }
    ]
}
```

**Payload & Validation Field Details:**

**Route:** `user.courses.quiz.submit`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
Send as `application/json`.

**Field documentation:**
| Key | Type | Required | Description | Example | Validation Rules |
|---|---|---|---|---|---|
| `attempt_id` | `integer` | yes | Attempt | `{{attempt_id}}` | `required, string, uuid, exists:quiz_attempts,uuid` |
| `answers` | `array` | yes | Answers | `[{"question_id":"{{question_id}}","option_id":"{{option_id}}"}]` | `required, array, min:1` |
| `answers.*.question_id` | `integer` | yes | Question | `{{question_id}}` | `required, string, uuid, exists:quiz_questions,uuid` |
| `answers.*.option_id` | `integer` | yes | Selected Option | `{{option_id}}` | `present, nullable, string, uuid, exists:quiz_options,uuid` |

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

## Sessions

### Join Session

**Method:** `POST` | **Endpoint:** `{{base_url}}/user/sessions/:session/join` | **Auth:** `Bearer {{user_token}}`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Path Variables:**

| Key | Value | Description |
|---|---|---|
| `session` | `{{session_id}}` | Session ID |

**Request Body:**

```json
[]
```

**Payload & Validation Field Details:**

**Route:** `user.courses.sessions.join`
**Middleware:** `api, set_locale, cors, auth:api, active, user_type:user`

**Payload:**
No fields. Send an empty JSON object `{}`.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

## Health

### List All Health

**Method:** `GET` | **Endpoint:** `{{base_url}}/health?page=1&per_page=15&search=&sort[created_at]=desc&paginate=false&filters[is_active]=1` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Query Parameters:**

| Key | Type | Value | Description | Supported |
|---|---|---|---|---|
| `page` | `integer` | `1` | Page number | Active |
| `per_page` | `integer` | `15` | Items per page (max: 100) | Optional |
| `search` | `string` | `` | Search term (searches across model searchable fields) | Optional |
| `sort[created_at]` | `string` | `desc` | Sort by field: asc or desc | Optional |
| `paginate` | `boolean` | `false` | Set to false to disable pagination | Optional |
| `filters[is_active]` | `boolean` | `1` | Filter by active status: 1 or 0 | Optional |

**Payload & Validation Field Details:**

**Route:** `shared.health.index`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Query parameters:**
- `page` — Page number (supported)
- `per_page` — Items per page (max: 100) (optional)
- `search` — Search term (searches across model searchable fields) (optional)
- `sort[created_at]` — Sort by field: asc or desc (optional)
- `paginate` — Set to false to disable pagination (optional)
- `filters[is_active]` — Filter by active status: 1 or 0 (optional)

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": [
        {
            "id": 1,
            "uuid": "00000000-0000-0000-0000-000000000001",
            "name": "Fitness & Strength Training 101",
            "is_active": true,
            "created_at": "2026-11-02T13:26:04+00:00"
        }
    ]
}
```

---

## Config

### Bootstrap Config

**Method:** `GET` | **Endpoint:** `{{base_url}}/config/bootstrap` | **Auth:** `Public`

**Headers:**
- `Accept: application/json`
- `Content-Type: application/json`
- `Accept-Language: {{locale}}`

**Payload & Validation Field Details:**

**Route:** `shared.config.bootstrap`
**Middleware:** `api, set_locale, cors`

**Payload:**
No request body. Use the documented path and query parameters.

**Response Format:**
```json
{ "status": "success", "message": "...", "data": {...} }
```

**Example Response:**

_200 OK_
```json
{
    "status": "success",
    "message": "Data retrieved successfully",
    "data": {
        "id": 1,
        "uuid": "00000000-0000-0000-0000-000000000001",
        "name": "Fitness & Strength Training 101",
        "is_active": true,
        "created_at": "2026-11-02T13:26:04+00:00"
    }
}
```

---

