# Accommodation integration from v2 to v3

**Use the following diagrams to help you understand and construct the main migration requirements from v2 to v3 for your accommodation integration.**

## Overview

Each diagram provides a high-level picture of the basic integration types for our Demand API. For each type, the diagram shows:

* the v2 endpoints that are used,
* the equivalent endpoints that you will need to use in v3.


Each diagram shows the *primary* endpoint mappings between v2 and v3 - for example, [/hotelAvailability](https://developers.booking.com/api/technical.html?version=2.10#!/Availability/hotelAvailability) maps to [/accommodations/search](/demand/docs/open-api/demand-api/accommodations/accommodations/search).

Attention
The design of v2 and v3 endpoints is significantly different. Consequently:

* You should not assume a one-to-one mapping of either input parameters or output fields between the V2 endpoint and the equivalent v3 endpoint.
* You may need to use mapped fields in v3 differently to the equivalent v2 parameters or fields.
* You may also need to call other v3 endpoints.


For more information, see [Migrate individual v2 endpoints](/demand/docs/migration-guide/v3/migrate-individual-v2-endpoints).

## Content flow

![content flow](/assets/search-and-redirect-to-book.8e6ec0a10d31e0c71fd00f0c638d13ffade8bcaef7384eb579a7801e0a648a7b.b8ffd97f.png)

## Search, look and redirect-to-book

![Search, look and redirect-to-book](/assets/search-look-and-redirect-to-book.511c2616a532c2faa430d17eae93c3520502e1ba14830be3e860e58ee8646330.b8ffd97f.png)

## Search, look and book

![Search, look and book](/assets/search-look-and-book.30d4a96cf96852b5c69c33f5a27579191fd6a06461d07502232b45cfb7f2e224.b8ffd97f.png)

## Get static content

Caching static content can reduce endpoint traffic and improve response times.

Most v2 endpoints that return static data map one-to-one to their equivalent v3 endpoints. However, note that:

* The different v2 `*Types` endpoints all map to a single v3 endpoint, `/accommodations/constants`.
* There are three new v3 endpoints.


![static content](/assets/get-static-content.7ee9792e528a42679847745ca068e8e627389220111428847ee4ddb14c20da63.b8ffd97f.png)

### Look up static codes and ids

If you do not cache some or all of the data from the static endpoints shown [above](#get-static-content), you will need to call those endpoints whenever that data is needed by other endpoints, either:

* to obtain codes or ids needed in request parameters
* to process codes or ids returned in response fields


For example, the following diagram shows the additional calls that you may need to make to use `/accommodations/search`, if you do not already have the necessary information in your cache.

![static codes and ids](/assets/look-up-static-codes-and-ids.c0d98cf2e835ddbcc7015caec51c05dfa81b19d9c804cc1b955c46b49a92410b.b8ffd97f.png)