This API is meant to obtain a minimal amount of data for hotels available for your account.
You should use this API for mapping and/or to obtain your inventory of "buyable" product.
The list is paginated, so you probably have to call this API more than once using the parameter "start_from" to browse the list from where you left the previous time.

Request

The type attribute has to be set to get_inventory.

The request have no compulsory parameters, but you can (and prabably want) provide two:

  • start_from: it is an "offset" field. Allows you to get results starting from the requested index.
  • batch_size: you can adjust the number of results returned with each query.
    Actually the default is 1.000 and the maximum allowed value is 10.000. With 10.000 hotels the response would weight about 1.5MB
<?xml version="1.0" encoding="UTF-8"?>  
<envelope>
    <header>
        <actor>test</actor>
        <user>test</user>
        <password>test</password>
        <version>1.6.6</version>
        <timestamp>20221005172521</timestamp>
    </header>
    <query type="get_inventory" product="hotel">
        <start_from>10</start_from>
        <batch_size>3</batch_size>
    </query>
</envelope>
Response
<?xml version="1.0" encoding="UTF-8"?>  
<envelope>
    <header>
        <version>1.6.8</version>
        <timestamp>20221005172521</timestamp>
    </header>
    <response type="get_inventory" product="hotel">
        <hotels from="10" to="13" total="238937">
            <hotel id="78" name="ANCHORAGE PORT STEPHENS" city="2POR" lt="-32.719394000000000" lg="152.105925000000000" address="Corlette Point Road, 2315," has_photos="true"/>
            <hotel id="80" name="GRAND EURHOTEL &amp; RESIDENCE" city="7MON" lt="42.516362538100000" lg="14.156239447600000" address="Via Carlo Maresca, 32, 65015," has_photos="true"/>
            <hotel id="81" name="GRAND HOTEL MONTESILVANO" city="7MON" lt="42.516362538100000" lg="14.156239447600000" address="Piazzale Kennedy, 28, 65015," has_photos="false"/>
        </hotels>
    </response>
</envelope>

The response message contains in its response, tag the hotels tag.

The hotels tag has 3 attributes:

  • from: index of the first element (corresponds to start_from param from the request)
  • to: index of the last element (=from+batch_size)
  • total: total amount of hotels. You should perform the get_inventory call until to would be equal to total

The hotels tag contains all the hotel tags.

Each hotel tag contains the following attributes:

  • id: hotel's identifier
  • name: hotel's name
  • city: city code (please refer to cities API in order to translate city codes)
  • lt: hotel's latitude
  • lg: hotel's longitude
  • address: hotel's address
  • has_photos: if the hotel have at least one picture. If true, you can build the picture url with the following structure: https://pictures.netstorming.net/common/hotels/<HOTEL_ID>/original/0.jpg. You have to replace <HOTEL_ID> with the actual numeric hotel id.