Skip to main content

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

HeaderValueRequired
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
AuthorizationBearer tokenYes

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

HeaderValueRequired
Content-Typemultipart/form-dataYes
Acceptapplication/jsonYes
AuthorizationBearer tokenYes

Request Body

ParameterTypeDescriptionRequired
usernamestringUnique username (3-255 characters)No
full_namestringFull name (3-255 characters)No
emailstringValid unique email addressNo
phonestringValid unique phone number (7-15 digits)No
birthstringBirth date (Y-m-d format)No
old_passwordstringCurrent password (min 6 characters)No
new_passwordstringNew password (min 6 characters)Required with old_password
new_password_confirmationstringConfirm new passwordRequired with new_password
avatarfileProfile image (jpeg,png,jpg, max 1MB)No
genderstringGender (FEMALE or MALE)No
country_idintegerValid country IDNo
social_media[facebook]stringFacebook usernameNo
social_media[twitter]stringTwitter usernameNo
social_media[instagram]stringInstagram usernameNo
social_media[tiktok]stringTikTok usernameNo

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