# Update Guest Information

The **`update guest-informations`** endpoint allows partners to modify the information associated with a specific customer in the loyalty program. By utilizing the authentication token obtained during the login process, partners can securely update various fields of the customer's profile. This endpoint is essential for maintaining accurate and up-to-date customer information, enhancing engagement and service delivery.

### Request

<mark style="color:blue;">**PUT**</mark>

```url
https://interface.experience-hotel.com/api/xp-guest-account/guest-informations
```

To utilize this endpoint, partners must send a PUT request with the following details:

* **Header**:
  * `x-guest-token`: The token assigned to the authenticated customer.
* **Payload**:\
  The body of the request should contain a JSON object with any combination of the following fields that need to be updated. It is not necessary to include all fields, only those that are being modified. However, certain fields must have valid data when included:
  * **title**: The customer's title, english format (e.g., Mr., Mrs.).
  * **firstname**: The customer's first name.
  * **lastname**: The customer's last name.
  * **phone**: The customer's phone number.
  * **mobile**: The customer's mobile number (must be in international format, example for a French number: "+33601020304", cannot be empty).
  * **email**: The customer's email address.
  * **street**: The customer's street address.
  * **zip\_code**: The customer's zip code.
  * **city**: The customer's city.
  * **state**: The customer's state (or equivalent).
  * **country**: The customer's country (must be an ISO 3166-1 alpha-2 code, e.g., "FR" for France, "US" for the United States).
  * **birthdate**: The customer's birthdate (must be in the format YYYY-MM-DD, e.g., "1990-01-01", and cannot be empty).
  * **language**: The customer's preferred language (must be provided as a two-letter ISO 639-1 code, e.g., "fr" for French, "en" for English).
  * **nationality**: The customer's nationality (must be an ISO 3166-1 alpha-2 code, e.g., "FR", "US").

{% hint style="info" %}

#### Important Notes

If the fields **birthdate**, **language**, and **mobile** are included in the request, they cannot be empty and must follow the specified formats.

If a field that allows an empty value is included in the request with an empty value (e.g., `email`, `street`, `zip_code`, `city`, `state`), it will result in the clearing of that specific field.
{% endhint %}

#### Example Payload

If the customer's birthdate, language, and mobile number need to be updated, the request body might look like this:

```json
{
    "birthdate": "1990-01-01",
    "language": "fr",
    "mobile": "+33601020304"
}
```

### Response

Upon successful processing of the request, the API will return:

* **Status Code**: <mark style="color:green;">**`200 OK`**</mark>\
  This indicates that the requested updates have been successfully applied to the customer's profile.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://experience-crm.gitbook.io/experience-crm-api/guests/guests-personal-space/update-guest-information.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
