Profile Management
This guide explains how to manage customer profiles in the Sumaya369 mobile application.
Get Profile
Endpoint
- Method: GET
- URL:
/v1/mobile/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": {
"user": {
"username": "sumaya_content",
"first_name": "Hamad",
"last_name": "Alshabanah",
"full_name": "Hamad Alshabanah",
"email": "developer@sumaya369.net",
"birth": "1993-05-15",
"phone": "501968815",
"phone_code": "+966",
"gender": "انثى",
"avatar": "https://i.ibb.co/YhTw0wR/7-512.png",
"role": "affiliate_marketer",
"country_id": "18e1ceab-f28a-4fcc-929f-526b8f6e1557",
"created_at": "2025-01-01 00:00:00",
"updated_at": "2025-02-02 12:38:39",
"has_completed_profile": true,
"cart_count": 0,
"level_name": "نقاطي",
"level_icon": "http://127.0.0.1:8000/storage/4090/0--النقاط---عام-للجميع-قبل-الدخول-لأي-مستوى.png",
"permissions": null,
"groups_application_request": "unknown",
"groups_application_request_id": "unknown",
"gar_information": "unknown",
"is_alert_closed": false,
"social_media": {
"facebook": {
"username": null,
"status": null
},
"tiktok": {
"username": "null",
"status": "verifing"
},
"instagram": {
"username": "null",
"status": "verifing"
},
"twitter": {
"username": "null",
"status": "verifing"
}
},
"wallet_balance": 0
}
},
"status_code": 200
}
Update Profile
Endpoint
- Method: POST
- URL:
/v1/mobile/profile
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | multipart/form-data | Yes |
| Accept | application/json | Yes |
| Authorization | Bearer token | Yes |
Request Body
| Parameter | Type | Description | Required |
|---|---|---|---|
| username | string | Unique username (3-255 characters) | No |
| full_name | string | Full name (3-255 characters) | No |
| string | Valid unique email address | No | |
| phone | string | Valid unique phone number (7-15 digits) | No |
| birth | string | Birth date (Y-m-d format) | No |
| old_password | string | Current password (min 6 characters) | No |
| new_password | string | New password (min 6 characters) | Required with old_password |
| new_password_confirmation | string | Confirm new password | Required with new_password |
| avatar | file | Profile image (jpeg,png,jpg, max 1MB) | No |
| gender | string | Gender (FEMALE or MALE) | No |
| country_id | integer | Valid country ID | No |
| social_media[facebook] | string | Facebook username | No |
| social_media[twitter] | string | Twitter username | No |
| social_media[instagram] | string | Instagram username | No |
| social_media[tiktok] | string | TikTok username | No |
Success Response
{
"success": true,
"message": "تم تحديث البيانات بنجاح.",
"data": {
"username": "wotname",
"first_name": "Hamad",
"last_name": "Alshabanah",
"full_name": "Hamad Alshabanah",
"email": "developer@sumaya369.net",
"birth": "1993-05-15",
"phone": "501968815",
"phone_code": "+966",
"gender": "انثى",
"avatar": "https://i.ibb.co/YhTw0wR/7-512.png",
"role": "affiliate_marketer",
"country_id": "18e1ceab-f28a-4fcc-929f-526b8f6e1557",
"created_at": "2025-01-01 00:00:00",
"updated_at": "2025-03-13 10:20:13",
"has_completed_profile": true,
"cart_count": 0,
"level_name": "نقاطي",
"level_icon": "http://127.0.0.1:8000/storage/4090/0--النقاط---عام-للجميع-قبل-الدخول-لأي-مستوى.png",
"permissions": null,
"groups_application_request": "unknown",
"groups_application_request_id": "unknown",
"gar_information": null,
"is_alert_closed": false,
"social_media": {
"facebook": {
"username": null,
"status": null
},
"tiktok": {
"username": "null",
"status": "verifing"
},
"instagram": {
"username": "null",
"status": "verifing"
},
"twitter": {
"username": "null",
"status": "verifing"
}
},
"wallet_balance": 0
},
"status_code": 200
}
Implementation Notes
- The profile update endpoint supports partial updates
- Password update requires both old and new password
- Social media usernames must be unique across all users
- Country ID cannot be updated for users from Saudi Arabia
- Avatar file size is limited to 1MB
- Phone numbers must be unique and valid
- Email addresses must be unique and properly formatted