# Change Status of Booking Room Reservation

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

Change the status of a specific room reservation on a venue booking.

**NOTE:**

Currently this only supports changing the status to "checked in" or "checked out". Use this action to confirm a room reservation, and this one to cancel.

#### Request Body

| Name      | Type    | Description                                                                                                                              |
| --------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| venueId   | integer | The unique id of the venue to which the booking belongs                                                                                  |
| bookingId | integer | The unique id of the booking to which the room reservation belongs                                                                       |
| id        | integer | The unique id of the room reservation to change status                                                                                   |
| status    | integer | The status to which the room reservation will be changed. Only a value of 4 (Checked In) or 5 (Checked Out) are supported by this action |
| roomIds   | array   | Optionally, the array of ids of the individual rooms on the reservation to change status                                                 |

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

```javascript
{
  "success": true,
  "errorType": null
}
```

{% endtab %}
{% endtabs %}

### Status Transitions

The following describes how the [status](https://developer.ivvy.com/venues/get-booking-room-reservation-list#room-reservation-status) of a booking room reservation can transition from one status to another.

![](https://1365817030-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LFpRjc8G_M9tx9vv4Il%2Fuploads%2Fgit-blob-a34ec72d07fa319be4daaa3f80e77616c25e3ad5%2Fbooking-room-reservation-status-transitions_new.png?alt=media\&token=e591d34a-1dfc-419c-b757-a2d3048ffcbe)

NOTES: To delete a booking room reservation, use the [Remove Booking Room Reservation](https://developer.ivvy.com/venues/accommodation/remove-booking-room-reservation) action. To confirm a booking room reservation, use the [Confirm Booking Room Reservation](https://developer.ivvy.com/venues/accommodation/confirm-booking-room-reservation) action. To cancel a booking room reservation, use the [Cancel Booking Room Reservation](https://developer.ivvy.com/venues/accommodation/cancel-booking-room-reservation) action.

### Response Error Types

| Error Type | Reason                                                                                                                     |
| ---------- | -------------------------------------------------------------------------------------------------------------------------- |
| 0          | Unknown error                                                                                                              |
| 1          | The new status is the same as the current status                                                                           |
| 2          | The current status cannot transition to the new status                                                                     |
| 3          | The new status is not supported. Only "checked in" and "checked out" are supported                                         |
| 4          | The canBeEdited flag of the room reservation is false, which prevents any changes                                          |
| 5          | Changing status of one or more room failed when roomIds parameter were set. See "failedRooms" in response for more details |

### Failed Rooms Error Codes

| Code | Message                                                |
| ---- | ------------------------------------------------------ |
| 1    | The new status is the same as the current status       |
| 2    | The current status cannot transition to the new status |
| 3    | The new status is not supported                        |
| 4    | The reservation of room cannot be edited               |


---

# 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://developer.ivvy.com/venues/accommodation/change-status-of-booking-room-reservation.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.
