# Update Room Reservation Guest Contact

<mark style="color:green;">`POST`</mark> `[PlatformAddress]/api/1.0/venue?action=updateBookingRoomReservationGuestContact`

Updates the details of a venue booking room reservetion guest contact. It will only allow api callers to update a guest contact details. The only way new guests can be created is with addOrUpdateBookingRoomReservation API. NOTE: The venue must have access to update venue guest in order to call this api action.

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "success": true,
  "id": 8821,
}
```

{% endtab %}

{% tab title="200 " %}

```javascript
{
  "errorCode": 400,
  "message": "The request contains invalid data",
  "specificCode": 24424,
  "additionalMessages": [
      "firstName: *Value is required and can't be empty*"
  ]
}
```

{% endtab %}

{% tab title="200 " %}

```javascript
{
  "errorCode": 500,
  "message": "An error has occurred",
  "specificCode": 24423,
  "additionalMessages": []
}
```

{% endtab %}
{% endtabs %}

### Guest Contact

| Property  | Type    | Required | Description                                   |
| --------- | ------- | -------- | --------------------------------------------- |
| id        | integer | optional | The unique id of the guest contact to update. |
| firstName | string  | required | The first name of the guest contact.          |
| lastName  | string  | required | The last name of the guest contact.           |
| phone     | string  | required | The phone number of the guest contact.        |
| email     | string  | required | The email address of the guest contact.       |

### Update

When id is provided, it will fetch guest contact by id and update contact details. when id parameter is missing, it will update guest contact based on firstName, lastName and email.

Note: You can not update guest contact which is anonymised.

### Example Request

```javascript
{
    "id": 12,
    "firstName": "First Name",
    "lastName": "Last Name",
    "phone": "123456",
    "email" : "test@email.com",
}
```

### Returns

| Property | Description                                         |
| -------- | --------------------------------------------------- |
| success  | Whether or not the guest contact was updated        |
| id       | The unique id of the guest contact that was updated |

### Throws

| Code                 | Description                          |
| -------------------- | ------------------------------------ |
| Specific Code: 24421 | Could not find contact               |
| Specific Code: 24422 | contact id or identity must be there |
| Specific Code: 24423 | An error has occurred                |
| Specific Code: 24424 | The request contains invalid data    |
| Specific Code: 24425 | The request contains invalid data    |
