Salla Docs
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Salla - Opensource
Salla - Developers Community
  1. Profile
  • Overview
  • Languages
  • Notify
  • Event
  • Storage
  • Configuration
  • Forms
  • Helpers
  • Auth
    • Login
    • Logout
    • Verify
    • Resend
    • Register
    • Refresh
  • Cart
    • Latest
    • Details
    • Quick Add
    • Add Item
    • Delete Item
    • Delete Image
    • Add Coupon
    • Remove Coupon
    • Get Upload Image
    • Get Quick Order Settings
    • Create Quick Order
    • Order Status
    • Get Current Cart Id
    • Price Quote
  • Wishlist
    • Add
    • Remove
    • Toggle
  • Loyalty
    • Get Program
    • Exchange
    • Reset
  • Comment
    • Add Comment
    • Fetch
    • Get Page Comments
    • Get Product Comments
  • Profile
    • Update profile
    • Update contact
  • Product
    • Get price
    • Product availability
    • Categories
    • Offer details
    • Search products
    • Get Gift Details
    • Add Gift To Cart
    • Upload Gift Image
    • Get Product Details
    • Fetch
    • Fetch Options
    • Size Guides
  • Order
    • Create cart from order
    • Cancel
    • Send invoice
    • Show order
  • Booking
    • Add
  • Rating
    • Order
    • Store
    • Products
    • Shipping
  • Currency
    • Change
    • List
  • Component
    • Reviews
    • Menus
  1. Profile

Update profile

This endpoint is used to update a customer's profile. The profile contains information such as the customer's first_name, last_name, birthday, gender, and avatar.

Payload authenticated#

UpdateProfilePayload
first_name
string 
required
Customer first name.
last_name
string 
required
Customer last name
birthday
string 
optional
Customer date of birth.
Example:
2022-02-22
gender
enum<string> 
optional
Customer gender.
Allowed values:
malefemale
email
string 
required
Customer email.
mobile
string 
required
Customer mobile.
country_code
string 
required
Customer code of country.
Default:
SA
country_key
string 
required
Customer key of country.
Default:
+966
avatar
object 
BinaryType
optional
Customer profile's avatar image.

Response#

Success
Error
UpdateProfileSuccess
success
boolean 
success
required
Response flag
status
enum<number> 
status
required
Allowed values:
200201202
data
object 
data
optional
Response data.
first_name
string 
first_name
required
Customer first name
last_name
string 
last_name
required
Customer last name
phone
object 
phone
required
Customer phone number
email
string 
email
required
Customer email
avatar
string 
avatar
required
Customer avatar
gender
gender
optional
Customer gender
birthday
string 
birthday
required
Customer date of birth
verification
object 
optional
The verification details

Usage#

To update the content of the customer's profile, the developer may call the methos update() along with the customer's new information as below.
in case the user change the phone/email a OTP required to complete the changes, you can take advancige of salla-verify-modal to hanlde the OTP verifation

Without web componenet#

Events#

This endpoint may trigger two events, the onUpdated and onUpdateFailed events.

onUpdated#

This event is triggered when updating the content of the customer's profile is done without having any errors coming back from the backend.

onUpdateFailed#

This event is triggered when updating the content of the customer's profile is not completed and an error has occurred.
Previous
Profile
Next
Update contact