Child Rates Booking Retrieval for Japanese Properties
Contents
The customized Japan Child Rates feature will be deployed only on properties located within Japan. The Japan Child Rates has to be set manually on the YCS Extranet, and can be retrieved via the GetBookingDetails endpoint. The booking retrieval response for Japanese properties will be identical with the standard response, with the additional "occupancy" element, which provides a headcount for adults and children within each age bucket.
1. GetBookingDetails EndPoint
agoda offers two types of endpoints:
Single endpoint : One Endpoint for all agoda calls,
Multiple endpoint : One Endpoint Per Call (each endpoint is configured unique to that call type).
NOTE: please note that if you wish to use the single endpoint for your request, the Type attribute will be mandatory in all the requests you will send to Agoda (this is to allow us to identify the call type).
GetBookingDetails - Multiple endpoint
Sandbox: https://sandbox-distribution-xml.agoda.com/api/booking/detail/search?apiKey=xxx
Live: https://supply.agoda.com/api/booking/detail/search?apiKey=xxx
GetBookingDetails - Single endpoint (Please note: 'type=4' attribute is mandatory when using Single endpoint)
Sandbox: https://sandbox-distribution-xml.agoda.com/api?apiKey=xxx
Live: https://supply.agoda.com/api?apiKey=xxx
2. GetBookingDetails RQ Example
<?xml version="1.0" encoding="UTF-8"?>
<request timestamp="1436931804">
<criteria language="JA">
<property id ="20389XXXX">
<booking id="6407XXXX"/>
</property>
</criteria>
</request>
<!--
Max property id is restricted to 1 (configurable)
Max booking ids restricted to 50 (configurable)
-->
For more information, please see the documentation for details on GetBookingDetailsRQ elements and attributes.
3. GetBookingDetails Response Example (Japanese Properties)
<result timestamp="1653637167151">
<bookings count="1" iataid="96637800">
<booking property_id="203895644" property_name="J-ASO hotel" booking_id="64071569" booking_date="2022-05-27T14:37:00+07:00" last_action="2022-05-27T14:36:42+07:00" arrival="2022-06-13" departure="2022-06-14" status="ConfirmBooking" acknowledge="0" room_id="1207710824" room_type="スタジオ" channel_id="1" channel_name="Retail" rateplan_id="8155680" rateplan_name="Japan ASO no imageee" promotion_id="75052985" promotion_name="Limited Time Offer. Price includes 25% discount!" room_count="1" adults="2" children="0" extrabeds="0" cxl_code="126D100P_100P">
....
<prices currency="JPY" net_inclusive_amt="9948.0" refsell_amt="11250.0">
<price date="2022-06-13" net_inclusive_amt="9948.0" refsell_amt="11250.0" type="Room"/>
<price date="2022-06-14" net_inclusive_amt="9948.0" refsell_amt="11250.0" type="Room"/>
</prices>
<occupancy>
<adult count="1"/>
<child type="A: 食事及び寝具" count="1"/>
<child type="B: 子供用食事及び寝具" count="1"/>
<child type="C: 寝具のみ" count="1"/>
<child type="D: 食事寝具共になし" count="1"/>
</occupancy>
</booking>
</bookings>
For more information, please see the documentation for details on GetBookingDetailsRS elements and attributes.
4. GetBookingDetails Schema
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="result">
<xs:complexType>
<xs:sequence>
<xs:element name="errors" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="error" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:short" name="code"/>
<xs:attribute type="xs:string" name="description"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="bookings" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="booking" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="customer">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="first_name"/>
<xs:attribute type="xs:string" name="last_name"/>
<xs:attribute type="xs:string" name="nationality"/>
<xs:attribute type="xs:string" name="email"/>
<xs:attribute type="xs:string" name="phone"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="benefits" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="benefit" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:unsignedInt" name="benefit_id"/>
<xs:attribute type="xs:string" name="benefit_name"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="requests" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="request" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="request_name"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="payment" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="card_type"/>
<xs:attribute type="xs:unsignedLong" name="card_number"/>
<xs:attribute type="xs:string" name="card_name"/>
<xs:attribute type="xs:string" name="card_exp"/>
<xs:attribute type="xs:unsignedShort" name="card_cvv"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="prices">
<xs:complexType>
<xs:sequence>
<xs:element name="price" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="date"/>
<xs:attribute type="xs:decimal" name="net_inclusive_amt"/>
<xs:attribute type="xs:decimal" name="net_exclusive_amt"/>
<xs:attribute type="xs:decimal" name="sell_inclusive_amt"/>
<xs:attribute type="xs:decimal" name="sell_exclusive_amt"/>
<xs:attribute type="xs:decimal" name="tax_amt"/>
<xs:attribute type="xs:decimal" name="fees_amt"/>
<xs:attribute type="xs:decimal" name="refsell_amt"/>
<xs:attribute type="xs:string" name="type"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="currency"/>
<xs:attribute type="xs:decimal" name="net_inclusive_amt"/>
<xs:attribute type="xs:decimal" name="net_exclusive_amt"/>
<xs:attribute type="xs:decimal" name="sell_inclusive_amt"/>
<xs:attribute type="xs:decimal" name="sell_exclusive_amt"/>
<xs:attribute type="xs:decimal" name="tax_amt"/>
<xs:attribute type="xs:decimal" name="fees_amt"/>
<xs:attribute type="xs:decimal" name="refsell_amt"/>
</xs:complexType>
</xs:element>
<xs:element name="paymentmodel" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:int" />
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="occupancy" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="adult" maxOccurs="1" minOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:int" name="count"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="child" maxOccurs="4" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="type"/>
<xs:attribute type="xs:int" name="count"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:unsignedLong" name="property_id"/>
<xs:attribute type="xs:string" name="property_name"/>
<xs:attribute type="xs:unsignedLong" name="booking_id"/>
<xs:attribute type="dateTimeWithTimezone" name="booking_date"/>
<xs:attribute type="dateTimeWithTimezone" name="last_action"/>
<xs:attribute type="xs:date" name="arrival"/>
<xs:attribute type="xs:date" name="departure"/>
<xs:attribute type="xs:string" name="status"/>
<xs:attribute type="xs:byte" name="acknowledge"/>
<xs:attribute type="xs:unsignedLong" name="room_id"/>
<xs:attribute type="xs:string" name="room_type"/>
<xs:attribute type="xs:int" name="channel_id"/>
<xs:attribute type="xs:string" name="channel_name"/>
<xs:attribute type="xs:unsignedLong" name="rateplan_id"/>
<xs:attribute type="xs:string" name="rateplan_name"/>
<xs:attribute type="xs:int" name="promotion_id"/>
<xs:attribute type="xs:string" name="promotion_name"/>
<xs:attribute type="xs:int" name="room_count"/>
<xs:attribute type="xs:byte" name="adults"/>
<xs:attribute type="xs:byte" name="children"/>
<xs:attribute type="xs:byte" name="extrabeds"/>
<xs:attribute type="xs:string" name="child_age"/>
<xs:attribute type="xs:string" name="cxl_code"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:unsignedInt" name="count"/>
<xs:attribute type="xs:unsignedLong" name="iataid"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:long" name="timestamp"/>
</xs:complexType>
</xs:element>
</xs:schema>