Booking Hint

Booking Hint Request & Response Example
BookingHint Delivery Process
Elements and Attributes (Data Type)
> Booking Hint Request
> Booking Hint Response


YCS5 API Push Booking Hint

Request URL: https://supply.agoda.com/api?apiKey=ADDYOURAPIKEYHERE

The YCS5 API Push Booking Hint allows partners to receive new, modified or cancelled reservation notifications in near real time, as Agoda customers make these bookings. This version of the Agoda API aims to improve the performance of the connectivity product Agoda offers. As this is a notification-based API, where Agoda initiates the notifications, partners interested in implementing this API need to contact Agoda to get started. In order to get started with this, please contact [email protected].

BookingHint Delivery Process

Agoda sends booking hint notification with booking status to channel manager endpoint when booking is created or its status is changed and channel manager have to return success or failure response to Agoda upon delivery of a notification.

Booking hint will be pushed to channel manager every 1-2 minutes (based on Agoda server performance at the time). Channel manager will only get the latest booking status if original booking created and amended or cancelled within the 1-2 minutes schedule. There is retry process of 3 intervals 15 secs apart, to resend hint notification should channel manager endpoint experiencing technical issue. If the retry exceeded the setting, Agoda will send list of failed booking hint to channel manager designated email address and in case of failures, we recommend channel manger to trigger a getbookinglist request to retrieve reservation information.

After bookinghint notification received by channel manager, Agoda expects partner to send getbookingdetail request to retrieve full reservation information

Information included in a booking hint notification

  • request time stampproperty id
  • booking id
  • booking date
  • last action date and time
  • check-in date
  • check-out date
  • booking status
    – confirm, amend, cancel

Booking Hint Request

<request timestamp="1491189437">
            <property id="226110">
                <bookings>
                    <booking booking_id="6593078" booking_date="2017-03-03T14:50:31+07:00" last_action="2017-03-
                      03T14:50:31+07:00" arrival="2017-03-15" departure="2017-03-16" status="ConfirmBooking"/>
                    <booking booking_id="50147621" booking_date="2017-02-15T14:54:00+07:00" last_action="2017-03-
                      03T14:50:32+07:00" arrival="2017-03-12" departure="2017-03-13" status="CancelBooking"/>
                    <booking booking_id="6594803" booking_date="2017-03-01T19:13:00+07:00" last_action="2017-03-
                      03T14:50:33+07:00" arrival="2017-03-15" departure="2017-03-16" status="AmendBooking"/>
                </bookings>
            </property>
            <property id="254865">
                <bookings>
                    <booking booking_id="5263254" booking_date="2017-03-03T14:50:31+07:00" last_action="2017-03-
                      03T14:50:31+07:00" arrival="2017-03-15" departure="2017-03-16" status="ConfirmBooking"/>
                    <booking booking_id="9856324" booking_date="2017-03-01T16:54:00+07:00" last_action="2017-03-
                      03T14:50:34+07:00" arrival="2017-03-12" departure="2017-03-13" status="CancelBooking"/>
                    <booking booking_id="9854712" booking_date="2017-03-01T19:13:00+07:00" last_action="2017-03-
                      03T14:50:33+07:00" arrival="2017-03-15" departure="2017-03-16" status="AmendBooking"/>
                </bookings>
            </property>
            <property id="256341">
                <bookings>
                    <booking booking_id="6587455" booking_date="2017-03-03T14:50:34+07:00" last_action="2017-03-
                      03T14:50:34+07:00" arrival="2017-03-15" departure="2017-03-16" status="ConfirmBooking"/>
                </bookings>
            </property>
        </request>

Booking Hint Success Response

<result timestamp="1491189937">
                <success/>
            </result>

Booking Hint Fail Response

<result timestamp="1491189937">
             <errors>
                <error code="9001" description="Internal system error"/>
             </errors>
            </result>

Elements and Attributes (Data Type)

Booking Hint Request

Element / AttributeData TypeOccursRequiredExamplesDescription
Request
Timestamp
Numeric1Y1483526410357(2017-01-04 10:40:10.357)A timestamp is a sequence of characters or encoded information indentifying when a certain event occured. Time provided must correspond with the time in the originating system and in EPOCH. System requiresEPOCH timestamps in milliseconds
Property
Id
String Length 1-20[1..unbound]Y123Every request must contain a vaild property ID that partner has access to
Booking
booking_id
Numeirc Length 1-20[1..unbound]N12345678Agoda booking ID
booking_datedatetimeY2017-03-03T14:50:00+07:00Date and time of booking created, Agoda always send the time in ICT timezone (GMT+7)
last_actiondatetimeY2017-03-03T14:50:00+07:00Date and time of booking created, Agoda always send the time in ICT timezone (GMT+7)
arrivaldateY2017-03-15Check-in date
departuredateY2017-03-15Check-out date
@statusstringYConfirmBookingDenotes the status type of bookings. Statuses are:
ConfirmBooking
AmendBooking
CancelBooking

Booking Hint Response

Element / AttributeData TypeOccursRequiredExamplesDescription
Result
Timestamp
Numeric1Y1483526410357(2017-01-04 10:40:10.357)A timestamp is a sequence of characters or encoded information indentifying when a certain event occured. Time provided must correspond with the time in the originating system and in EPOCH. System requiresEPOCH timestamps in milliseconds
success1N
errors
code
Numeirc Length 4[0..1]NRefer to Error ListAgoda's error code Refer to Error List
descriptionstring[0..1]NRefer to Error ListAgoda's error message Refer to Error List