Skip to content

Update Customer Profile

Update the authenticated customer's profile information.

Authentication

This query requires a valid customer authentication token in the Authorization header. Use the Customer Login API to retrieve the token.

Authorization: Bearer <accessToken>

Arguments

NameTypeRequiredDescription
firstNameString❌ NoCustomer's first name
lastNameString❌ NoCustomer's last name
emailString❌ NoCustomer's email address
dateOfBirthString❌ NoDate of birth (YYYY-MM-DD format)
genderString❌ NoGender (male/female/other)
phoneString❌ NoPhone number

Response

FieldTypeDescription
customerCustomerUpdated customer object
messageStringSuccess or error message
successBooleanUpdate success status

Validation Rules

  • First name and last name can contain letters and spaces
  • Email must be in valid format and unique (if changed)
  • Date of birth must be in YYYY-MM-DD format
  • Gender must be one of: male, female, other

Error Responses

json
{
  "errors": {
    "email": ["The email has already been taken."],
    "dateOfBirth": ["The date of birth is invalid."]
  }
}

Released under the MIT License.