Room Management API

Contents

1. Overview

Room Management API is part of the Content API, however it's possible to use this part only for creating and managing Room Types.

This API supports textual content only in English language. The content text in English language will be translated to multiple languages on our side. The contents for other languages other than English will be ignored. The endpoints between Hotels and Vacation Rental properties are shared.

1.1. Version Information

Version : 6.4.8

1.2. URL Scheme

Host : content-push-sandbox.agoda.com

BasePath : /

Schemes : HTTPS, HTTP

2. Security

2.1. API Key

Type : apiKey

Name : Authorization

In : HEADER

3. Managing Rooms

POST /cm/rooms

3.1. Description

Build new or modify rooms for properties which are authorized under your API credentials

3.2. Body Parameters

List of rooms in OTA2017B format which need to be created

Name : body

Flags : required

Type : OTA_HotelInvNotifRQ

3.3. Responses

3.4. Consumes

application/xml

3.5. Produces

application/xml

3.6. Tags

Rooms

3.7. Security

3.8. Example HTTP request

Request Path

/cm/rooms

Request Body

<?xml version="1.0" encoding="UTF-8"?>

<OTA_HotelInvNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opentravel.org/2017B/OTA_HotelInvNotifRQ.xsd">

<SellableProducts HotelCode="9612080">

<SellableProduct InvCode="101" InvNotifType="New">

<GuestRoom>

<Occupancy MaxOccupancy="2"/>

<Room NumberOfBathroom="1" NumberOfBedroom="1" RoomID="Room898" SizeMeasurement="30"/>

<Amenities>

<Amenity AmenityCode="25" Value="1"/>

</Amenities>

<Description Language="en-US">

<Text Language="en-US">Beach Front Rooms are 30 sqm with sea views. Saikaew Beach Resort provides all rooms, designed to offer you easy living by the sea among natural beauty, therefore, large windows in each room allow you to admire tropical garden or the beach right from your bed.</Text>

<Image>https://images.sample.com/room/room-image-1.jpeg</Image>

</Description>

<TPA_Extensions>

<SubRooms>

<SubRoom RoomType="BedRoom">

<Amenities>

<Amenity AmenityCode="25" Value="1"/>

</Amenities>

</SubRoom>

</SubRooms>

</TPA_Extensions>

</GuestRoom>

<Description>

<Text>Beachfront</Text>

</Description>

</SellableProduct>

</SellableProducts>

</OTA_HotelInvNotifRQ>

3.9. Example HTTP response

Response 200

<?xml version="1.0" encoding="UTF-8"?>

<OTA_HotelInvNotifRS CorrelationID="8b417d6a-f3df-4d65-870c-240378b8ad3e">

<Success/>

<InventoryCrossRefs>

<InventoryCrossRef RequestInvCode="Room898" ResponseInvCode="101"/>

</InventoryCrossRefs>

</OTA_HotelInvNotifRS>

Response 400

<OTA_HotelInvNotifRS CorrelationID="325d8000-48cf-11ea-9337-8950898f7d75">

<Errors>

<Error Code="321" ShortText="Required field missing" Status="NotProcessed"/>

</Errors>

</OTA_HotelInvNotifRS>

Response 401

<OTA_HotelInvNotifRS CorrelationID="325d8000-48cf-11ea-9337-8950898f7d75">

<Errors>

<Error Code="497" ShortText="Authorization error" Status="NotProcessed"/>

</Errors>

</OTA_HotelInvNotifRS>