# Update Customer v2.0Beta

The Update Customer endpoint updates details for an existing customer. Values supplied will be validated against a set of basic validation rules and applied to the customer profile. The updates will reflect immediately on the customer profile.

# Request

PUT /v2.0/customers/{profileKey}

# Authorization

An OAuth 2.0 Bearer token with the Profile.Write scope is required. For more information, see Authentication.

# Path Parameters

A list of the supported path parameters is described below.

Name Required Type Description
profileKey true guid The profile key for the customer. This value can be retrieved from the profileKey claim in the token returned from our SSO solution.

# Request Body

The request body must contain an UpdateCustomer object which is described below.

# UpdateCustomer

Name Required Type Description
firstName true string(50) The first name of the customer.
lastName true string(50) The last name of the customer.
birthDate true date The birth date of the customer. The customer must be over 18 years of age.
emailAddress false string(300) The email address for the customer.
gender false string The gender for the customer. Must either be a valid value from the genders lookup or unspecified if the customer does not wish to specify their gender.
homeLanguage false string The home language for the customer. Must either be a valid value from the home languages lookup or unspecified.

# Sample

{
    "firstName": "Bridget",
    "lastName": "Jones",
    "birthDate": "1978-07-13",
    "emailAddress": "bridgetjones@gmail.com",
    "gender": "Female",
    "homeLanguage": "English"
}

# Response

200
OK
Returns an ApiResponse envelope.

# Response Body

The endpoint returns our ApiResponse envelope.

# Sample

{
    "message": "The operation succeeded!",
    "notifications": [
        {
            "severity": "Success",
            "text": "The customer profile was updated.",
            "code": null,
            "additionalData": null
        }
    ]
}

# Errors

The standard error responses apply.

400
Bad Request
When the request fails validation.
401
Unauthorized
When authentication fails.
403
Forbidden
When authorisation fails.
404
Not Found
When the customer profile cannot be found.