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
Key | Type | Description |
---|---|---|
name | string | the new value for the user's first name. |
last_name | string | the new value for the user's last name. |
image | string | It 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. |
birthdate | string | the 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:
You can check more details about Customer Resource.
{
"code": 200,
"data": {
//...
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..",
}
}
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:
Key | Type | Description |
---|---|---|
phone | string | the 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:
You can check more details about Customer Resource.
{
"code": 200,
"data": {
//...
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..",
}
}
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
After updating the email address, the user will receive a verification email to confirm the change.
- Request Body:
Key | Type | Description |
---|---|---|
email | string | the 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": []
}
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
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:
Key | Type | Description |
---|---|---|
email | string | the new value for the user's email address. |
name | string | the new value for the user's first name. |
last_name | string | the new value for the user's last name. |
image | string | It 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. |
phone | string | the 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:
You can check more details about Customer Resource.
{
"code": 200,
"data": {
//...
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..",
}
}
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:
Key | Type | Description |
---|---|---|
language | String | The 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:
You can check more details about Customer Resource.
{
"code": 200,
"data": {
//...
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..",
}
}
Check the following section to learn more about the Update Language Preference API Reference