# RtB 2.0 API changes

RtB 2.0 introduces the RTB flow: a new `requestType`
field and a new `FAILED_TO_PROCESS` request status, gated behind API version `2.0.0`.

## API versioning

RtB 2.0 is **version 2.x** (the RTB flow). To receive the RtB 2.0
features described below (the `requestType` field and the `FAILED_TO_PROCESS` status), you must send
the following header with your API requests:

```http
X-Booking-Api-Version: 2.0.0
```

Without this header, the API defaults to version `1.0.1` (version 1.x, the INQUIRY flow), which does not
include RtB 2.0 changes. This ensures existing integrations continue to work without disruption.

For the full list of versions and what each version adds, including the
`WITHDRAWN_PENDING_APPROVAL` status added by [withdrawal](/connectivity/docs/request-to-book/withdrawal), see [Versioning](/connectivity/docs/request-to-book/technical-overview#versioning).

## New field: `requestType`

RtB 2.0 adds a new field to the Booking Request object returned by the RtB Connectivity API list and
get-by-ID endpoints.

| Property | Value |
|  --- | --- |
| Field name | `requestType` |
| Type | Enum: `INQUIRY` | `RTB` |
| Location | Top level of the Booking Request object |


The field tells you which flow to follow for each request:

* `INQUIRY`: the RtB 1.x flow (no availability block while pending).
* `RTB`: the RtB 2.0 flow, where the pending request holds provider-side inventory. See [Availability management](/connectivity/docs/request-to-book/rtb-2.0/availability-management).


Example (simplified) Booking Request object:

```json
{
  "id": 123456,
  "propertyId": 654321,
  "requestStatus": "CREATED",
  "requestType": "RTB"
}
```

See the full object in the [Booking Request Object reference](/connectivity/docs/request-to-book/retrieving-booking-requests#bookingrequest-object).

## New request status: `FAILED_TO_PROCESS`

The `FAILED_TO_PROCESS` status covers a rare failure case.

| Property | Value |
|  --- | --- |
| Status name | `FAILED_TO_PROCESS` |
| Meaning | The guest's request was approved by the partner, but Booking.com failed to create a reservation after several attempts. No reservation will be created for this request. |


Reservation creation after partner approval typically takes between a few seconds and a minute.
For RtB 2.0, `FAILED_TO_PROCESS` is important for releasing provider-side availability (see
[Availability management](/connectivity/docs/request-to-book/rtb-2.0/availability-management)).

You must:

* Extend your internal model to accept this new status.
* Handle it in your availability logic (release any holds).