Skip to content

Update Customer Profile

Update the authenticated customer's profile information.

Endpoint

PUT /api/shop/customers/profile

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
X-STOREFRONT-KEYYesYour storefront API key
AuthorizationYesBearer token (customer login required)

Request Body

json
{
  "firstName": "John",
  "lastName": "Doe",
  "email": "[email protected]",
  "phone": "1234567890",
  "gender": "M",
  "dateOfBirth": "1990-01-15"
}

Request Parameters

ParameterTypeRequiredDescription
firstNamestringYesFirst name (max 255 chars)
lastNamestringYesLast name (max 255 chars)
emailstringYesValid email address
phonestringNoPhone number
genderstringNoGender (M/F/Other)
dateOfBirthstringNoBirth date (YYYY-MM-DD)

Response Fields (200 OK)

FieldTypeDescription
customerobjectUpdated customer profile
messagestringSuccess message

Validation Rules

  • First name: required, max 255 characters
  • Last name: required, max 255 characters
  • Email: must be unique, valid format
  • Phone: optional, valid format
  • Date of birth: optional, valid date format

Use Cases

  • Update account information
  • Change email address
  • Modify personal details
  • Update phone number
  • Add/change birth date

Important Notes

  • Changing email requires verification
  • Some fields may be locked by admin
  • Updates reflected immediately
  • Original email may be required for verification

Released under the MIT License.