Coach Profile
This guide explains how to interact with the coach profile API endpoints in the Mentor Calwe application.
Get Coach Profile
Endpoint
- Method: GET
- URL:
/v1/coach/profile
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Accept | application/json | Yes |
| Authorization | Bearer token | Yes |
Success Response
{
"success": true,
"message": "تم جلب بيانات المدرب بنجاح",
"data": {
"id": "uuid",
"status": "قيد المراجعة",
"gender": "MALE",
"birthDate": "1993-12-31",
"nationalityId": "uuid",
"countryId": "uuid",
"residencePlace": "city",
"avatar": "avatar_url",
"isPhoneVerified": true,
"isEmailVerified": true,
"about": "About text",
"university": "University name",
"coachLevelId": "uuid",
"personalInformation": {
"firstName": "Ahmed",
"middleName": "Mohammed",
"lastName": "Ali",
"email": "example@gmail.com",
"phone": "966000000000",
},
"professionalInformation": {
"about": "نبذة عنيي",
"cvFiles": [
"id": 767,
"path": "file_url"
],
"certificateFiles": [
{
"id": 767,
"path": "file_url"
},
]
},
"consultantInformation": {
"categories": [
{
"id": "uuid",
"name": "استشارة طبية"
}
],
"coachLevel": {
"id": "uuid",
"name": "string"
}
},
"paymentInformation": {
"id": "uuid",
"paymentType": "STC",
"accountIdentifier": "966553182153"
}
},
"statusCode": 200
}
Error Response
Unauthorized (401)
{
"success": false,
"message": "غير مصرح",
"data": null,
"statusCode": 401
}
Update Personal Information
Endpoint
- Method: PATCH
- URL:
/v1/coach/profile/personal-information
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Accept | application/json | Yes |
| Authorization | Bearer token | Yes |
Request Body
| Parameter | Type | Description | Required | Validation Rules |
|---|---|---|---|---|
| first_name | string | Mentor's first name | No | required, string, max:255 |
| middle_name | string | Mentor's middle name | No | required, string, max:255 |
| last_name | string | Mentor's last name | No | required, string, max:255 |
| string | Mentor's email | No | required, email, unique:mentors,email | |
| phone | string | Mentor's phone | No | required, phone:SA,unique:mentors,phone |
| gender | string | Mentor's gender | No | required, in:MALE,FEMALE |
| birth_date | string | Mentor's birth date | No | required, date |
| nationality_id | string | Mentor's nationality ID | No | required, exists:nationalities,id |
| country_id | string | Mentor's country ID | No | required, exists:countries,id |
| residence_place | string | Mentor's residence place | No | required, string, max:255 |
| avatar | file | Mentor's avatar image | No | image, max:2048 |
| old_password | string | Mentor's old password | No | |
| password | string | Mentor's new password | No | |
| password_confirmation | string | Mentor's new password confirmation | No | |
| is_busy | boolean | Mentor's is busy | No | |
| is_logged_in_before | boolean | Mentor's is logged in before | No |
Update Professional Information
Endpoint
- Method: PATCH
- URL:
/v1/coach/profile/professional-information
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Accept | application/json | Yes |
| Authorization | Bearer token | Yes |
Request Body
| Parameter | Type | Description | Required | Validation Rules |
|---|---|---|---|---|
| about | string | Mentor's about text | No | string, max:1000 |
| specialization | string | Mentor's specialization | No | string, max:255 |
| certificate_name | string | Mentor's certificate name | No | string, max:255 |
| university | string | Mentor's university | No | string, max:255 |
| Mentor_level_id | string | Mentor's level ID | No | exists:Mentor_levels,id |
| degree_id | string | Mentor's degree ID | No | exists:degrees,id |
| qualified_id | string | Mentor's qualification ID | No | exists:qualifications,id |
| languages_ids | array | Mentor's language IDs | No | array, exists:languages,id |
| certificate_files | file | Mentor's certificate files | No | file, max:10240 |
| categories_ids | array | Mentor's category IDs | No | required, array, exists:categories,id |
| cv_files | file | Mentor's CV file | No | file, max:10240 |
| deleted_certificate_files | array | Mentor's certificate files URLs | No | array, urls |
| deleted_cv_files | array | Mentor's cv files URLs | No | array, urls |
| years_of_experience | string | Mentor's years of experience | No | required, string |
| experiences | string | Mentor's experiences | No | required, string |
| interests | string | Mentor's interests | No | string, max:1000 |
| achievements | string | Mentor's achievements | No | string, max:1000 |
| community_participation | string | Mentor's community participation | No | string, max:1000 |
| experience_file | file | Mentor's experience file | No | file, max:10240 |
| has_accreditation | bool | Mentor's has accreditation | No | |
| clear_avatar | bool | Mentor's clear avatar | No |
Update Payment Account Information
Endpoint
- Method: PATCH
- URL:
/v1/coach/profile/payment-account-information
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Accept | application/json | Yes |
| Authorization | Bearer token | Yes |
Request Body
| Parameter | Type | Description | Required | Validation Rules |
|---|---|---|---|---|
| payment_type | number | Payment method type | Yes | required, numeric |
| phone | string | Mentor's payment method phone | No | |
| string | Mentor's payment method email | No | ||
| avatar | file | Mentor's avatar image | No | image, max:2048 |
Send Verification Code
Endpoint
- Method: POST
- URL:
/v1/coach/profile/send-verification-code
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Accept | application/json | Yes |
| Authorization | Bearer token | Yes |
Request Body
| Parameter | Type | Description | Required | Validation Rules |
|---|---|---|---|---|
| phone | string | Mentor's phone | Yes | required, phone:SA,unique:mentors,phone |
Success Response
{
"success": true,
"message": "تم ارسال كود التفعيل بنجاح",
"data": {
"phone": "966553182155"
},
"statusCode": 200
}
Verify Phone
Endpoint
- Method: POST
- URL:
/v1/coach/profile/verify-phone
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Accept | application/json | Yes |
| Authorization | Bearer token | Yes |
Request Body
| Parameter | Type | Description | Required | Validation Rules |
|---|---|---|---|---|
| phone_verified_code | string | Verification code | Yes | required, string, size:6 |
Success Response
{
"success": true,
"message": "تم التحقق من رقم جوالك بنجاح",
"data": {
"phone": "966553182155"
},
"statusCode": 200
}
Send Change Coach Level Order
Endpoint
- Method: POST
- URL:
/v1/coach/profile/send-change-coach-level-order
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Accept | application/json | Yes |
| Authorization | Bearer token | Yes |
Request Body
| Parameter | Type | Description | Required | Validation Rules |
|---|---|---|---|---|
| coach_level_id | string | New coach level ID | Yes | required, exists:coach_levels,id |
Error Responses
{
"success": false,
"message": "لا يمكن ارسال طلب تغيير فئة الى ان تتم معالجة طلبك السابق",
"data": [],
"statusCode": 403
}
Send Change Coach Category Order
Endpoint
- Method: POST
- URL:
/v1/coach/profile/send-change-coach-category-order
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Accept | application/json | Yes |
| Authorization | Bearer token | Yes |
Request Body
| Parameter | Type | Description | Required | Validation Rules |
|---|---|---|---|---|
| category_id | string | New category ID | Yes | required, exists:categories,id |
Error Responses
{
"success": false,
"message": "لا يمكن ارسال طلب تغيير تصنيف الى ان تتم معالجة طلبك السابق",
"data": [],
"statusCode": 403
}
Delete Category
Endpoint
- Method: POST
- URL:
/v1/coach/profile/delete-category
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Accept | application/json | Yes |
| Authorization | Bearer token | Yes |
Request Body
| Parameter | Type | Description | Required | Validation Rules |
|---|---|---|---|---|
| category_id | string | Category ID to delete | Yes | required, exists:categories,id |
Error Responses
{
"success": false,
"message": "عذراً.. لايمكنك حذف التصنيف",
"errors": [
"عذراً.. لايمكنك حذف التصنيف"
],
"data": [],
"statusCode": 406
}
Clear Avatar
Endpoint
- Method: PATCH
- URL:
/v1/coach/profile/clear-avatar
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Accept | application/json | Yes |
| Authorization | Bearer token | Yes |
Success Response
{
"success": true,
"message": "تم حذف الصورة الشخصية بنجاح",
"data": [],
"statusCode": 200
}
Check If Coach Logged In Before
Endpoint
- Method: PATCH
- URL:
/v1/coach/is-logged-in-before
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Accept | application/json | Yes |
| Authorization | Bearer token | Yes |
Success Response
{
"success": true,
"message": "تم تحديث البيانات بنجاح.",
"data": [],
"statusCode": 200
}
Important Notes
Profile Management
- Comprehensive profile information
- Multi-step profile completion
- File upload support
- Profile verification status
- Profile completion tracking
- Profile visibility settings
Data Validation
- Required field validation
- File type validation
- File size limits
- Unique value checks
- Format validation
- Data integrity checks
File Management
- Multiple file types supported
- File size restrictions
- File type validation
- Secure file storage
- File access control
- File update tracking
Security Features
- Authentication required
- Data encryption
- Secure file handling
- Access control
- Activity logging
- Data protection
User Experience
- Clear validation messages
- Progress tracking
- File upload feedback
- Status notifications
- Error handling
- Success confirmation
Technical Requirements
- File size limits
- Supported file types
- Image optimization
- Cache management
- Performance optimization
- Error logging
Compliance
- Data protection
- Privacy policy
- User consent
- Regulatory compliance
- Audit logging
- Data retention