Accommodation content
This method returns the static catalog of accommodations: the descriptive data that does not depend on dates or availability — name, description, location, contact details, rooms and images.
Access method
Section titled “Access method”POST /content/Accommodation
Request data structure
Section titled “Request data structure”Ids: (arrayofstring)Optional. Identifiers of the accommodations to retrieve. If omitted, every accommodation available to the partner is returned, paginated.Page: (integer)Optional. The page requested, starting at 1.PageSize: (integer)Optional. Number of accommodations per page.LanguageCode: (string)Optional. Language for the texts (Name,Description, room names and image descriptions).
Request example
Section titled “Request example”{ "Page": 1, "PageSize": 20, "LanguageCode": "en"}To retrieve specific accommodations:
{ "Ids": ["ACCOMMODATION_ID_1", "ACCOMMODATION_ID_2"], "LanguageCode": "en"}Response data structure
Section titled “Response data structure”-
Accommodations: (array). The accommodations.Id: (string). Accommodation identifier.Name: (string). Name.Description: (string). Description.Latitude/Longitude: (double). Coordinates.Category: (byte). Accommodation category:0: unassigned1to5: number of stars
Type: (byte). Accommodation type:0: unassigned1: hotel2: hostel3: camping4: apartment
Address,City,PostalCode,Country,CountryCode: (string). Postal address.ContactEmail,ContactPhone,BookingPhone: (string). Contact details.MinNumberOfNights/MaxNumberOfNights: (short). Minimum and maximum number of nights allowed, where the accommodation defines them.Rooms: (array). Rooms in the accommodation.Id: (string). Room identifier.Name: (string). Name.MinNumberOfAdults/MaxNumberOfAdults: (short). Allowed adult occupancy.MaxNumberOfChildren: (short). Maximum number of children.
Images: (array). Images of the accommodation.Order: (integer). The order in which they should be shown.Description: (string). Image description.Url: (string). Absolute URL of the image.
-
Page: (integer). The page returned. -
PageSize: (integer). The page size applied. -
HasNextPage/HasPreviousPage: (boolean). Whether there are more pages ahead or behind.
Response example
Section titled “Response example”{ "Accommodations": [ { "Id": "ACCOMMODATION_ID", "Name": "Accommodation name", "Description": "Accommodation description.", "Latitude": 40.428952, "Longitude": -3.705643, "Category": 3, "Type": 1, "Address": "1 Example Street", "City": "Madrid", "PostalCode": "28001", "Country": "Spain", "CountryCode": "ES", "ContactEmail": "contact@example.com", "ContactPhone": "+34 900 000 000", "Rooms": [ { "Id": "ROOM_ID", "Name": "Double room", "MinNumberOfAdults": 1, "MaxNumberOfAdults": 2, "MaxNumberOfChildren": 1 } ], "Images": [ { "Order": 1, "Description": "Facade", "Url": "https://example.com/image.jpg" } ] } ], "Page": 1, "PageSize": 20, "HasNextPage": true, "HasPreviousPage": false}