Skip to main content

Update Profile

Update User Profile. Allows users to update their profile information (name, email, and phone number) via a POST request to the API endpoint.

  • Endpoint: api/customer/profile/edit

  • HTTP Method: POST

  • Request Body

KeyTypeDescription
namestringthe new value for the user's first name.
last_namestringthe new value for the user's last name.
imagestringIt can be null if there is no change to the profile image, or it can be a string representing the URL of the new profile image.
birthdatestringthe new value for the user's birthday. The birthday should be provided in the format "YYYY-MM-DD".
{
"name": "Test",
"last_name": "Documentation",
"birthdate": "2000-02-01",
"image": null
}
  • Success Response:
Customer Resource

You can check more details about Customer Resource.

{
"code": 200,
"data": {
//...
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..",
}
}
info

Check the following section to learn more about the Update Profile API Reference

Edit Phone Number​

Using the Update Phone Number API, users can easily update their phone number to ensure that they receive important notifications and updates.

  • Endpoint: api/customer/profile/edit_phone

  • HTTP Method: POST

  • Request Body:

KeyTypeDescription
phonestringthe new value for the user's phone number. The phone number should be provided as a string, typically in a specific pattern.
{
"phone": "01111111111"
}
  • Success Response:
Customer Resource

You can check more details about Customer Resource.

{
"code": 200,
"data": {
//...
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..",
}
}
info

Check the following section to learn more about the Update Phone API Reference

Update Email​

The Update Email Address API enables users to update their email address associated with their profile, ensuring that their contact information is up-to-date.

  • Endpoint: api/customer/profile/edit/email

  • HTTP Method: POST

note

After updating the email address, the user will receive a verification email to confirm the change.

  • Request Body:
KeyTypeDescription
emailstringthe new value for the user's email address.
{
"email": "doc@supercommerce.io"
}
  • Success Response:
{
"code": 200,
"message": "Verification link has been sent to this email doc@supercommerce.io",
"data": null,
"meta": []
}
info

Check the following section to learn more about the Update Email API Reference

Add User Information​

The Add User Information API allows users to modify their profile information on our platform. This endpoint enables seamless updates to user-specific data, ensuring accurate and up-to-date user profiles.

  • Endpoint: api/customer/profile/full-edit

  • HTTP Method: POST

tip

This endpoint is typically used during the checkout process, especially when a guest user is making a purchase. It allows the guest user to provide their personal information, such as their name, email, phone number, and address, which is essential for order processing and delivery.

  • Request Body:
KeyTypeDescription
emailstringthe new value for the user's email address.
namestringthe new value for the user's first name.
last_namestringthe new value for the user's last name.
imagestringIt can be null if there is no change to the profile image, or it can be a string representing the URL of the new profile image.
phonestringthe new value for the user's phone number. The phone number should be provided as a string, typically in a specific pattern.
{
"email": "doc@supercommerce.io",
"name": "Test",
"last_name": "Documentation",
"phone": "0100000000",
"image": null
}
  • Success Response:
Customer Resource

You can check more details about Customer Resource.

{
"code": 200,
"data": {
//...
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..",
}
}
info

Check the following section to learn more about the Update Full Profile API Reference

Update Language Preference​

The Update Language Preference API allows users to modify their language preferences on our platform. This endpoint provides a straightforward way for users to customize their language settings, ensuring a personalized experience based on their language choices.

  • Endpoint: api/customer/profile/language_settings

  • HTTP Method: POST

  • Request Body:

KeyTypeDescription
languageStringThe new language code representing the preference. The language codes follow the ISO 639-1 standard "en" for English or "ar" for Arabic.
{
"language": "en"
}
  • Success Response:
Customer Resource

You can check more details about Customer Resource.

{
"code": 200,
"data": {
//...
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..",
}
}
info

Check the following section to learn more about the Update Language Preference API Reference