Last updated

Accommodations availability – Migrating to v3.2

This guide helps you adapt your integration from v3.1 to v3.2 of the Demand API for the /accommodations/availability endpoint.


Introduction

This guide summarises the changes from /accommodations/availability v3.1 → v3.2 and provides practical guidance to maintain correct functionality, including:

  • Request and response field changes.
  • Multi-currency pricing support.
  • Product-level inventory and policy updates.
  • Recommendations and pricing updates.
  • Best practices for iteration and UI handling.

Breaking changes v3.2 Breaking changes

Field
v3.1v3.2Migration note
dataSingle object per requestArray of objects, one per accommodation. Multiple accommodation ids accepted.Update your parsing logic to handle an array instead of a single object.
currencySingle string fieldObject with accommodation and booker currenciesReplace currency string references with currency.accommodation and currency.booker.
products[].priceNumeric fields (base, book, chargeable_online, extra_charges)Objects per currency (accommodation_currency, booker_currency)Update calculations and display logic to handle multi-currency objects.
products[].deal.public_priceNumericObject per currencySame as above, update to handle multi-currency.
products[].number_available_at_this_priceField name in v3.1Renamed to products[].number_availableUpdate field name in your parsing logic.
products[].policies.cancellation.priceNumericObject per currencyUpdate to handle multi-currency values.
recommendation.priceNumeric fieldsObjects per currencyAdjust logic for multi-currency handling.
products[].third_party_inventoryBooleanObject inventoryUpdate logic to use inventory.third_party and, optionally, inventory.type.

Important changes in v3.2

/bulk availability deprecated

In v3.1, data was a single object. In v3.2, data is an array of accommodation objects

Reason for change:

v3.1 has two separate endpoints:

  • /accommodations/availability – returned availability for a single property.
  • /accommodations/bulk-availability – returned availability for multiple properties in a single request.

v3.2 merges both endpoints, so /accommodations/availability now supports returning availability for one or multiple properties. As a result, the data field is an array regardless of the number of properties requested.

Migration note:
  • Update your code to iterate over data[] even if you are requesting availability for a single property.
  • Any logic that previously assumed a single object in data must now handle an array of objects.

Multi-currency support

Prices and charges are now objects with accommodation_currency and booker_currency.

Affects fields like:

  • products[].price
  • products[].deal.public_price
  • products[].policies.cancellation.price
  • recommendation.price
Migration note:

Replace numeric assignments with per-currency objects.

Migration example:


"base": 120.0

Update calculations, storage, and display logic to accommodate per-currency objects.

Field renames

v3.1v3.2Notes
products[].number_available_at_this_priceproducts[].number_availableUpdate parsing logic and UI templates.

Recommendations

  • recommendation.price now follows the same multi-currency structure as products.
  • recommendation.products[].price also changed to multi-currency objects.
Migration note:

Adjust pricing calculations and display for multi-currency fields.


Field mapping v3.1 → v3.2

v3.1 fieldv3.2 fieldNotes / Migration action
datadata[]v3.2 returns an array of accommodation objects. Update loops.
data.currency (string)data[].currency.accommodation / data[].currency.bookerReplace string with multi-currency object
data.products[].deal.public_price (number)data[].products[].deal.public_price.accommodation_currency / booker_currencyConvert numeric to object per currency
data.products[].number_available_at_this_pricedata[].products[].number_availableField renamed
data.products[].policies.cancellation.free_cancellation_untilDeprecatedv3.2 uses cancellation[].from and cancellation[].price per currency
data.products[].policies.cancellation.schedule[].price (number)data[].products[].policies.cancellation[].price.accommodation_currency / booker_currencyConvert numeric to object per currency
data.products[].policies.cancellation.typeDeprecatedUse cancellation[] array for fees; type no longer provided
data.products[].price.basedata[].products[].price.base.accommodation_currency / booker_currencyConvert numeric to multi-currency object
data.products[].price.chargeable_onlinedata[].products[].price.chargeable_online.accommodation_currency / booker_currencyConvert numeric to multi-currency object
data.products[].price.bookdata[].products[].price.display.accommodation_currency / booker_currencybook is now display in v3.2
data.products[].price.extra_charges.conditional[]data[].products[].price.charges[]Charges are now all in charges[] array with included_in for display / chargeable_online

Migration steps

1. Update parsing of data

  • Iterate over data[] instead of treating data as a single object.

2. Update your models

  • Reflect v3.2 field changes:
    • Multi-currency support (currency.accommodation and currency.booker)
    • New price.display, price.total, and price.charges structures
    • Product-level inventory and pricing changes (inventory.type, inventory.third_party).
  • Update enums:
    • cancellation.type removed in favour of cancellation[] array
    • number_available_at_this_pricenumber_available

3. Update recommendation handling:

  • Parse and display recommendation prices using multi-currency objects.

4. UI & Business logic

  • Update front-end display to use price.display instead of price.book.
  • Adjust booking flows for multiple payment timings (products[].policies.payment.timings).
  • Update handling of charges, including chargeable_online and included_in flags.

6. Test end-to-end

  • Validate API responses for multi-currency pricing, inventory type, cancellation, and payment policies.
  • Use Sandbox environment and test properties.
  • Verify correct handling of third-party inventory flags and charge breakdowns.

7. Rollout

  • Migrate gradually in a staging environment.
  • Monitor logs using request_id.
  • Fully migrate once all tests pass and all business logic is confirmed.

What´s next