หน้านี้จะแสดงข้อมูลอ้างอิงสำหรับข้อความ Transaction แบบ XML
<Transaction>
องค์ประกอบรูทของข้อความธุรกรรม
คือ <Transaction>
เป็นคอนเทนเนอร์สำหรับข้อมูลที่อธิบายเกี่ยวกับห้องพักและแพ็กเกจ รวมถึงราคาและความพร้อมให้บริการของห้องพักและแพ็กเกจ
องค์ประกอบ <Transaction>
จะปรากฏในตำแหน่งต่อไปนี้ในลำดับชั้น XML ของข้อความธุรกรรม
+<Transaction>
+<PropertyDataSet>
// Room and package metadata + <Property> +<RoomData>
+<PackageData>
+<Result>
// Pricing and availability +<Rates>
+<RoomBundle>
+ ...
ข้อความที่ใช้ <Transaction>
เป็นองค์ประกอบรูทต้องมีองค์ประกอบย่อยอย่างน้อย 1 องค์ประกอบ ข้อความธุรกรรมจะมีองค์ประกอบย่อยกี่รายการก็ได้ ตราบเท่าที่ข้อความทั้งหมดมีขนาดไม่เกิน 100 MB
ไวยากรณ์
องค์ประกอบ <Transaction>
ใช้ไวยากรณ์ต่อไปนี้
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="timestamp" id="transaction_ID">
<!-- Defines data about a room or package (Room Bundle) -->
<PropertyDataSet>
...
</PropertyDataSet>
<!-- Updates/sets prices and availability for rooms and Room Bundles -->
<!-- (Also removes itineraries from inventory) -->
<Result>
...
</Result>
</Transaction>
Attributes
องค์ประกอบ <Transaction>
มีแอตทริบิวต์ต่อไปนี้
แอตทริบิวต์ | จำเป็นหรือไม่ | ประเภท | คำอธิบาย |
---|---|---|---|
id | Required | สตริง | ตัวระบุที่ไม่ซ้ำกันสำหรับข้อความธุรกรรมแต่ละรายการ |
partner | Optional | string | บัญชีพาร์ทเนอร์ที่เป็นเจ้าของข้อความ Transaction โดยปกติแล้ว คุณจะใช้บัญชีนี้หากแบ็กเอนด์แสดงฟีดราคาสำหรับบัญชีพาร์ทเนอร์หลายบัญชี ค่าของสตริงนี้คือค่า "Partner key" ซึ่งแสดงอยู่ที่ หน้าการตั้งค่าบัญชีใน Hotel Center |
timestamp | Required | DateTime | ช่วงเวลาที่มีการส่งข้อความธุรกรรม ระบบจะประมวลผลข้อความที่ส่งพร้อมการประทับเวลาภายใน 24 ชั่วโมงก่อนหน้าและจะทิ้งข้อความที่ยังไม่ได้รับการประมวลผล ระบบจะประมวลผลข้อความตามลำดับของ |
องค์ประกอบลูก
องค์ประกอบ <Transaction>
มีองค์ประกอบย่อยต่อไปนี้
องค์ประกอบย่อย | จำเป็นหรือไม่ | ประเภท | คำอธิบาย |
---|---|---|---|
<PropertyDataSet> | Optional* | <PropertyDataSet> |
อธิบายถึงห้องพักและแพ็กเกจห้องพักที่เจาะจง โดยทั่วไปแล้ว คุณจะใช้องค์ประกอบนี้ในข้อความ Transaction แยกต่างหากเพื่อกำหนดค่าที่ใช้ร่วมกันสำหรับแพ็กเกจห้องพักและลดขนาดข้อความ Transaction |
<Result> | Optional* | <Result> |
ข้อมูลราคาสำหรับห้องพักในแผนการเดินทางหรือองค์ประกอบ |
* ต้องระบุ <PropertyDataSet> หรือ <Result> อย่างน้อย 1 รายการ |
ตัวอย่าง
ข้อมูลห้องพัก
ตัวอย่างต่อไปนี้จะกำหนดข้อมูลห้องพักในข้อความธุรกรรม
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
<PropertyDataSet>
<Property>1234</Property>
<RoomData>
<RoomID>5440OF</RoomID>
<Name>
<Text text="Single King Bed Room" language="en"/>
<Text text="Simple Lit de Roi" language="fr"/>
</Name>
<Description>
<Text text="One king bed with pillowtop mattresses, 300-thread-count linens,
and down comforters (bedspreads). City view. 300 square feet. Desk with
rolling chair. Multi-line phone with voice mail. Cable/satellite TV with
complimentary HBO and pay movies." language="en"/>
<Text text="Un très grand lit avec matelas à plateau-coussin, ..." language="fr"/>
</Description>
<PhotoURL>
<Caption>
<Text text="Bathroom View" language="en"/>
<Text text="La salle de baines" language="fr"/>
</Caption>
<URL>http://www.foo.com/static/bar/image1234.jpg</URL>
</PhotoURL>
<Capacity>4</Capacity>
</RoomData>
</PropertyDataSet>
</Transaction>
ข้อมูลราคา
ตัวอย่างต่อไปนี้จะกำหนดข้อมูลราคาในข้อความ Transaction
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
<Result>
<Property>060773</Property>
<RoomID>RoomType101</RoomID>
<PackageID>Package101</PackageID>
<Checkin>2018-06-10</Checkin>
<Nights>2</Nights>
<Baserate currency="USD">278.33</Baserate>
<Tax currency="USD">25.12</Tax>
<OtherFees currency="USD">2.00</OtherFees>
<AllowablePointsOfSale>
<PointOfSale id="site1"/>
</AllowablePointsOfSale>
</Result>
<Result>
<Property>052213</Property>
<RoomID>RoomType101</RoomID>
<PackageID>Package101</PackageID>
<Checkin>2018-06-10</Checkin>
<Nights>2</Nights>
<Baserate currency="USD">299.98</Baserate>
<Tax currency="USD">26.42</Tax>
<OtherFees currency="USD">2.00</OtherFees>
<AllowablePointsOfSale>
<PointOfSale id="otto"/>
<PointOfSale id="simon"/>
</AllowablePointsOfSale>
<MilesIncluded>
<NumberOfMiles>1200</NumberOfMiles>
<Provider>
<Text language="en" text="United Airlines"/>
</Provider>
<LoyaltyCampaignID>my_campaign</LoyaltyCampaignID>
</MilesIncluded>
</Result>
</Transaction>
ราคาต่อคืน
ตัวอย่างต่อไปนี้จะกำหนดข้อมูลราคาตั้งแต่ 1 ถึง 7 คืน โดยเริ่มจากวันที่ 7 มิถุนายน 2023
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-08-24T16:20:00-04:00" id="42">
<Result>
<Property>1234</Property>
<Checkin>2018-06-07</Checkin>
<Nights>1</Nights>
<Baserate currency="USD">209.99</Baserate>
<Tax currency="USD">25.12</Tax>
<OtherFees currency="USD">2.00</OtherFees>
</Result>
<Result>
<Property>1234</Property>
<Checkin>2018-06-07</Checkin>
<Nights>2</Nights>
<Baserate currency="USD">419.98</Baserate>
<Tax currency="USD">25.12</Tax>
<OtherFees currency="USD">2.00</OtherFees>
</Result>
<Result>
<Property>1234</Property>
<Checkin>2018-06-07</Checkin>
<Nights>3</Nights>
<Baserate currency="USD">614.97</Baserate>
<Tax currency="USD">21.12</Tax>
<OtherFees currency="USD">2.00</OtherFees>
</Result>
<Result>
<Property>1234</Property>
<Checkin>2018-06-07</Checkin>
<Nights>4</Nights>
<Baserate currency="USD">819.96</Baserate>
<Tax currency="USD">21.12</Tax>
<OtherFees currency="USD">2.00</OtherFees>
</Result>
<Result>
<Property>1234</Property>
<Checkin>2018-06-07</Checkin>
<Nights>5</Nights>
<Baserate currency="USD">999.95</Baserate>
<Tax currency="USD">21.12</Tax>
<OtherFees currency="USD">2.00</OtherFees>
</Result>
<Result>
<Property>1234</Property>
<Checkin>2018-06-07</Checkin>
<Nights>6</Nights>
<Baserate currency="USD">1193.94</Baserate>
<Tax currency="USD">21.12</Tax>
<OtherFees currency="USD">2.00</OtherFees>
</Result>
<Result>
<Property>1234</Property>
<Checkin>2018-06-07</Checkin>
<Nights>7</Nights>
<Baserate currency="USD">1259.93</Baserate>
<Tax currency="USD">21.12</Tax>
<OtherFees currency="USD">2.00</OtherFees>
</Result>
</Transaction>
ราคาฐานและราคาสำหรับลูกค้าที่เข้าเกณฑ์
ตัวอย่างต่อไปนี้แสดงข้อความ Transaction ที่มีราคาฐานและราคาสำหรับลูกค้าที่เข้าเกณฑ์
<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
<Result>
<Property>1234</Property>
<Checkin>2023-04-10</Checkin>
<Nights>1</Nights>
<Baserate currency="USD">200.00</Baserate>
<Tax currency="USD">20.00</Tax>
<OtherFees currency="USD">1.00</OtherFees>
<Rates>
<!-- The rate_rule_id is required when using conditional rates -->
<Rate rate_rule_id="mobile">
<!-- Override base rate and taxes for conditional rates -->
<Baserate currency="USD">180.00</Baserate>
<Tax currency="USD">18.00</Tax>
</Rate>
</Rates>
</Result>
</Transaction>
นำพื้นที่โฆษณาออก
ตัวอย่างต่อไปนี้จะนำห้องว่างหลายรายการ (การเข้าพัก 1 คืนสำหรับวันที่ที่แตกต่างกัน) ของโรงแรมออกจากห้องว่าง
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-05-23T16:20:00-04:00" id="42">
<Result>
<Property>1123581321</Property>
<Checkin>2023-05-23</Checkin>
<Nights>1</Nights>
<Unavailable>
<NoVacancy/>
</Unavailable>
<Tax currency="USD">0</Tax>
<OtherFees currency="USD">0</OtherFees>
</Result>
<Result>
<Property>1123581321</Property>
<Checkin>2023-05-24</Checkin>
<Nights>1</Nights>
<Unavailable>
<NoVacancy/>
</Unavailable>
<Tax currency="USD">0</Tax>
<OtherFees currency="USD">0</OtherFees>
</Result>
<!---Sending <Baserate> is optional with <Unavailable> -->
<Result>
<Property>1123581321</Property>
<Checkin>2023-05-25</Checkin>
<Nights>1</Nights>
<Baserate currency="USD">-1</Baserate>
<Unavailable>
<NoVacancy/>
</Unavailable>
<Tax currency="USD">0</Tax>
<OtherFees currency="USD">0</OtherFees>
</Result>
</Transaction>
<PropertyDataSet>
คอนเทนเนอร์สำหรับข้อมูลห้องพักและแพ็กเกจ (หรือแพ็กเกจห้องพัก) ในข้อความ <Transaction>
ค่าที่ตั้งไว้สำหรับโรงแรมจะลบล้างค่าที่ตั้งไว้สำหรับพาร์ทเนอร์
Google จะเก็บข้อมูลนี้เพื่อให้คุณไม่ต้องกำหนดค่าทุกครั้งที่ส่งการอัปเดตราคา
องค์ประกอบ <PropertyDataSet>
จะปรากฏในตำแหน่งต่อไปนี้ในลำดับชั้น XML ของข้อความธุรกรรม
+<Transaction>
+<PropertyDataSet>
// Room and package metadata + <Property> +<RoomData>
+<PackageData>
+<Result>
// Pricing and availability +<Rates>
+<RoomBundle>
+ ...
ดูข้อมูลเพิ่มเติมได้ที่ข้อมูลเมตาของแพ็กเกจห้องพัก
ไวยากรณ์
องค์ประกอบ <PropertyDataSet>
ใช้ไวยากรณ์ต่อไปนี้
<?xml version="1.0" encoding="UTF-8"?> <Transaction ... > <PropertyDataSet> <!-- (Required) ID that matches the Hotel List Feed --> <Property>hotel_ID</Property> <!-- (Optional) Defines metadata about a room --> <RoomData> ... </RoomData> <!-- (Optional) Defines package metadata to be paired with rooms (Room Bundles) --> <PackageData> ... </PackageData> </PropertyDataSet> ... </Transaction>
Attributes
องค์ประกอบ <PropertyDataSet>
ไม่มีแอตทริบิวต์
องค์ประกอบลูก
องค์ประกอบ <PropertyDataSet>
มีองค์ประกอบย่อยต่อไปนี้
องค์ประกอบย่อย | จำเป็นหรือไม่ | ประเภท | คำอธิบาย |
---|---|---|---|
<PackageData> | Optional* | <PackageData> |
อธิบายแพ็กเกจห้องพัก ข้อมูลนี้เชื่อมโยงกับพาร์ทเนอร์และโรงแรม แต่ไม่เชื่อมโยงกับแผนการเดินทาง องค์ประกอบนี้คล้ายกับ <RoomData> แต่จะอธิบายเกี่ยวกับสิ่งอำนวยความสะดวกและข้อกำหนดที่ไม่ได้เป็นส่วนหนึ่งของคำอธิบายห้องพักจริง
คุณจะอ้างอิงรหัสแพ็กเกจในการอัปเดตราคา ดูข้อมูลเพิ่มเติมได้ที่ข้อมูลเมตาของแพ็กเกจห้องพัก |
<Property> | Required | string | รหัสของโรงแรมที่ใช้ข้อมูลที่เชื่อมโยงนี้ ค่าขององค์ประกอบนี้ต้องเป็นสตริงที่ตรงกับ <id> ของข้อมูลในฟีดข้อมูลโรงแรม
|
<RoomData> | Optional* | <RoomData> |
อธิบายห้องพัก ข้อมูลนี้เชื่อมโยงกับพาร์ทเนอร์และโรงแรม แต่ไม่เชื่อมโยงกับแผนการเดินทาง
คุณจะอ้างอิงรหัสห้องพักในการอัปเดตราคา |
* ต้องระบุ <PackageData> หรือ <RoomData> อย่างน้อย 1 รายการ |
ตัวอย่าง
ข้อมูลห้องพักและแพ็กเกจ
ตัวอย่างต่อไปนี้แสดงทั้งข้อมูลห้องพักและแพ็กเกจใน <PropertyDataSet>
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
<PropertyDataSet>
<Property>180054</Property>
<RoomData>
<RoomID>060773</RoomID>
<Name>
<Text text="Single Bed Room" language="en"/>
<Text text="Chambre single" language="fr"/>
</Name>
<Description>
<Text text="Non-smoking" language="en"/>
<Text text="Pas de fumiers" language="fr"/>
</Description>
<PhotoURL>
<Caption>
<Text text="Living area" language="en"/>
<Text text="Le chambre" language="fr"/>
</Caption>
<URL>http://www.foo.com/static/bar/image1234.jpg</URL>
</PhotoURL>
</RoomData>
<PackageData>
<PackageID>P54321</PackageID>
<Name>
<Text text="Breakfast Included" language="en"/>
<Text text="Avec le petit déjeuner" language="fr"/>
</Name>
<Description>
<Text text="Includes a delightful array of jams and jellies." language="en"/>
<Text text="Comprend une délicieuse gamme de confitures et gelées." language="fr"/>
</Description>
<BreakfastIncluded>1</BreakfastIncluded>
</PackageData>
</PropertyDataSet>
</Transaction>
เมื่อส่งราคาและความพร้อมให้บริการของห้องพักและแพ็กเกจห้องพักนี้แล้ว คุณจะอ้างอิงรหัสห้องพักและรหัสแพ็กเกจในข้อความราคา ผลที่ได้คือคุณจะสามารถลดขนาดข้อความลงอย่างมากและยังลดจำนวนข้อผิดพลาดที่อาจเกิดขึ้นเนื่องจากข้อมูลที่ซ้ำกันได้อีกด้วย ดูข้อมูลเพิ่มเติมได้ที่ข้อมูลเมตาของแพ็กเกจห้องพัก
<RoomData>
กำหนดข้อมูลเมตาเกี่ยวกับห้องพักและแพ็กเกจห้องพักที่ไม่เกี่ยวกับแผนการเดินทาง (เนื่องจากแพ็กเกจห้องพักคือห้องพักพร้อมสิ่งอำนวยความสะดวกเพิ่มเติม) ใช้ <RoomData>
เพื่อลดการใช้ข้อความอธิบายซ้ำกันในฟีดราคา
องค์ประกอบ <RoomData>
จะปรากฏในตำแหน่งต่อไปนี้ในลำดับชั้น XML ของข้อความธุรกรรม
+<Transaction>
+<PropertyDataSet>
// Room and package metadata + <Property> +<RoomData>
+<PackageData>
+<Result>
// Pricing and availability +<Rates>
+<RoomBundle>
+ ...
องค์ประกอบ <RoomData>
มีข้อมูลที่เชื่อมโยงกับพาร์ทเนอร์และโรงแรม แต่ไม่เชื่อมโยงกับแผนการเดินทาง โดยมีไว้สำหรับข้อมูลทั้งหมดที่ไม่ใช่แผนการเดินทาง
องค์ประกอบ <RoomData>
คล้ายกับ <PackageData>
แต่จะอธิบายเกี่ยวกับห้องพักจริง ไม่ใช่สิ่งอำนวยความสะดวกและข้อกำหนดของแพ็กเกจ คุณจะใช้ <RoomData>
และ <PackageData>
ร่วมกันเพื่อระบุรายละเอียดเกี่ยวกับแพ็กเกจห้องพัก สำหรับห้องเดี่ยวที่ไม่ได้เป็นส่วนหนึ่งของแพ็กเกจ ให้ใช้เพียง <RoomData>
คุณจะกำหนดทั้งองค์ประกอบ <RoomData>
และ <PackageData>
สำหรับห้องพักหรือแพ็กเกจห้องพักเดียวกันได้ เมื่อ Google แสดงห้องพักหรือแพ็กเกจดังกล่าวในผลการค้นหา ระบบจะรวมคำอธิบายจากทั้ง 2 รายการและคั่นด้วยเครื่องหมายขีดกลางสั้น
ดูข้อมูลเพิ่มเติมได้ที่ข้อมูลเมตาของแพ็กเกจห้องพัก
ไวยากรณ์
องค์ประกอบ <RoomData>
ใช้ไวยากรณ์ต่อไปนี้
<?xml version="1.0" encoding="UTF-8"?> <Transaction ... > <PropertyDataSet> ... <RoomData> <RoomID>room_ID</RoomID> <Name> <Text text="room_name" language="language_code"/> ... </Name> <Description> <Text text="room_description" language="language_code"/> ... </Description> <Capacity>max_number_of_occupants</Capacity> <Occupancy>max_number_of_intended_occupants</Occupancy> <OccupancyDetails> <!-- optional info about the types of guests, whether adults, children, or seniors --></OccupancyDetails> <OccupancySettings> <MinOccupancy>min_number_of_occupants</MinOccupancy> <MinAge>min_age_of_occupants</MinAge> </OccupancySettings> <PhotoURL> <Caption> <Text text="photo_description" language="language_code"/> ... </Caption> <URL>photo_location</URL> </PhotoURL> <RoomFeatures> ... </RoomFeatures> </RoomData> ... </PropertyDataSet> </Transaction>
Attributes
องค์ประกอบ <RoomData>
ไม่มีแอตทริบิวต์
องค์ประกอบลูก
องค์ประกอบ <RoomData>
มีองค์ประกอบย่อยต่อไปนี้
องค์ประกอบย่อย | จำเป็นหรือไม่ | ประเภท | คำอธิบาย |
---|---|---|---|
<Capacity> | Optional | integer | จำนวนแขกสูงสุดที่ห้องพักรองรับได้ สำหรับห้องพัก ค่าความจุจะมากกว่าหรือเท่ากับอัตราการเข้าพัก
เมื่อระบุ ค่านี้ต้องเท่ากับหรือมากกว่าค่าขององค์ประกอบ ค่าของ |
<Description> | Optional | Object | คำอธิบายห้องพักโดยละเอียด องค์ประกอบนี้ควรมีข้อมูลที่ไม่ได้อธิบายโดยองค์ประกอบอื่นๆ หรือองค์ประกอบ <Name> คุณไม่ควรใช้อักษรตัวพิมพ์ใหญ่ทั้งหมดเมื่อระบุคำอธิบายของห้องพัก
องค์ประกอบ
ใช้องค์ประกอบ ตัวอย่างต่อไปนี้แสดงคำอธิบายห้องพักในภาษาฝรั่งเศสและภาษาอังกฤษ <Description> <Text text="Two queen-sized beds" language="en"/> <Text text="Deux lits de la reine" language="fr"/> </Description> |
<Name> | Required | string | ชื่อหมวดหมู่ของห้องพัก ค่านี้ควรตรงกับข้อมูลที่ปรากฏบนหน้า Landing Page ของโรงแรม (ก่อนหน้านี้เรียกว่าจุดขาย) อย่าตั้งค่าขององค์ประกอบนี้เป็นตัวพิมพ์ใหญ่ทั้งหมด
องค์ประกอบนี้มีองค์ประกอบย่อย
ใช้องค์ประกอบ ตัวอย่างต่อไปนี้แสดงชื่อห้องพักในภาษาฝรั่งเศสและภาษาอังกฤษ <Name> <Text text="Standard Double Room" language="en"/> <Text text="Le chambre double" language="fr"/> </Name> |
<Occupancy> | Optional | integer | จำนวนแขกสูงสุดที่กำหนดไว้สำหรับห้องพัก
ตัวอย่างเช่น ห้องสวีทขนาดใหญ่อาจรองรับแขกได้จริง 6 คน (ความจุ = 6) แต่ห้องพักกำหนดจำนวนแขกไว้สูงสุด 4 คนเท่านั้น
ค่านี้ต้องน้อยกว่าหรือเท่ากับองค์ประกอบ ค่าของ
|
<OccupancySettings> | Optional | Object | การตั้งค่าที่จำกัดหรือแก้ไขข้อกำหนดการเข้าพักของห้องได้
องค์ประกอบ
<OccupancySettings> <MinOccupancy>2</MinOccupancy> <MinAge>16</MinAge> </OccupancySettings> ไม่จำเป็นต้องรวมองค์ประกอบย่อยทั้งหมด |
<PhotoURL> | Optional | Object | URL และคำบรรยายภาพแบบไม่บังคับสำหรับรูปภาพห้องพักหรือแพ็กเกจห้องพัก คุณระบุ <PhotoURL> ได้มากกว่า 1 รายการสำหรับห้องพักหรือแพ็กเกจห้องพักหนึ่งๆ URL ของรูปภาพแต่ละรายการต้องอยู่ในแท็ก <PhotoURL> ของตัวเอง
องค์ประกอบนี้มีองค์ประกอบย่อยต่อไปนี้
ตัวอย่าง <PhotoURL> <URL>https://www.example.com/static/bar/image1234.jpg</URL> <Caption> <Text text="A bright and breezy way to enjoy your mornin' cuppa tea." language="en"/> <Text text="Une façon lumineuse et aérée pour profiter de votre journée tasse de thé." language="fr"/> </Caption> </PhotoURL> <PhotoURL> <URL>https://www.foo.com/static/bar/image5678.jpg</URL> <Caption> <Text text="Or, perhaps you prefer coffee." language="en"/> <Text text="Ou peut-être préférez-vous le café." language="fr"/> </Caption> </PhotoURL> |
<RoomFeatures> | Optional | <RoomFeatures> |
มีข้อมูลเกี่ยวกับสิ่งอำนวยความสะดวกในห้อง |
<RoomID> | Required | string | รหัสที่ไม่ซ้ำกันสำหรับห้องพัก ใช้รหัสนี้เพื่อจับคู่ข้อมูลห้องพักกับบล็อก <Result> ในการอัปเดตราคา ดูข้อมูลเพิ่มเติมได้ที่ข้อมูลเมตาของแพ็กเกจห้องพัก (คุณยังใช้รหัสนี้เพื่ออ้างอิงคำจำกัดความของห้องพักทั่วไปในข้อความ Transaction รายการเดียวเมื่อกำหนดข้อมูลห้องพักในบรรทัดได้ด้วย) |
ตัวอย่าง
ข้อมูลห้องพัก
ตัวอย่างต่อไปนี้จะกำหนดข้อมูลห้องพัก
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
<PropertyDataSet>
<Property>1234</Property>
<RoomData>
<RoomID>5440OF</RoomID>
<Name>
<Text text="Single King Bed Room" language="en"/>
<Text text="Simple Lit de Roi" language="fr"/>
</Name>
<Description>
<Text text="One king bed with pillowtop mattresses, 300-thread-count linens,
and down comforters (bedspreads). City view. 300 square feet. Desk with
rolling chair. Multi-line phone with voice mail. Cable/satellite TV with
complimentary HBO and pay movies." language="en"/>
<Text text="Un très grand lit avec matelas à plateau-coussin, ..." language="fr"/>
</Description>
<PhotoURL>
<Caption>
<Text text="Bathroom View" language="en"/>
<Text text="La salle de baines" language="fr"/>
</Caption>
<URL>http://www.foo.com/static/bar/image1234.jpg</URL>
</PhotoURL>
<Capacity>4</Capacity>
</RoomData>
</PropertyDataSet>
</Transaction>
ข้อมูลเมตาของห้องพักและแพ็กเกจ
ตัวอย่างต่อไปนี้ระบุข้อมูลเมตาของห้องพักและแพ็กเกจห้องพัก
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
<PropertyDataSet>
<Property>180054</Property>
<RoomData>
<RoomID>060773</RoomID>
<Name>
<Text text="Single Bed Room" language="en"/>
<Text text="Chambre single" language="fr"/>
</Name>
<Description>
<Text text="Non-smoking" language="en"/>
<Text text="Pas de fumiers" language="fr"/>
</Description>
<PhotoURL>
<Caption>
<Text text="Living area" language="en"/>
<Text text="Le chambre" language="fr"/>
</Caption>
<URL>http://www.foo.com/static/bar/image1234.jpg</URL>
</PhotoURL>
</RoomData>
<PackageData>
<PackageID>P54321</PackageID>
<Name>
<Text text="Breakfast Included" language="en"/>
<Text text="Avec le petit déjeuner" language="fr"/>
</Name>
<Description>
<Text text="Includes a delightful array of jams and jellies." language="en"/>
<Text text="Comprend une délicieuse gamme de confitures et gelées." language="fr"/>
</Description>
<BreakfastIncluded>1</BreakfastIncluded>
</PackageData>
</PropertyDataSet>
</Transaction>
แพ็กเกจห้องพักหลายห้อง
ตัวอย่างต่อไปนี้กำหนดข้อมูลเมตาของห้องพักและแพ็กเกจห้องพักสำหรับแพ็กเกจห้องพักหลายรายการ
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
<!-- A transaction message with room types result. -->
<PropertyDataSet>
<Property>12345</Property>
<RoomData>
<RoomID>single</RoomID>
<Name>
<Text text="Single room" language="en"/>
<Text text="Chambre simple" language="fr"/>
</Name>
<Description>
<Text text="A single room" language="en"/>
<Text text="Le chambre simple" language="fr"/>
</Description>
<PhotoURL>
<Caption>
<Text text="Living area" language="en"/>
<Text text="Le chambre" language="fr"/>
</Caption>
<URL>http://www.foo.com/static/bar/image1234.jpg</URL>
</PhotoURL>
<PhotoURL>
<URL>http://www.foo.com/static/bar/image1235.jpg</URL>
</PhotoURL>
<Capacity>2</Capacity>
</RoomData>
<RoomData>
<RoomID>double</RoomID>
<Name>
<Text text="Double room" language="en"/>
<Text text="Chambre double" language="fr"/>
</Name>
<Occupancy>1</Occupancy>
</RoomData>
<PackageData>
<PackageID>refundbreakfast</PackageID>
<Name>
<Text text="Refundable Room with Breakfast" language="en"/>
<Text text="Chambre remboursable avec le petit déjeuner" language="fr"/>
</Name>
<Description>
<Text text="Continental Breakfast" language="en"/>
<Text text="Petit déjeuner continental" language="fr"/>
</Description>
<ChargeCurrency>hotel</ChargeCurrency>
<Refundable available="1" refundable_until_days="3"/>
<BreakfastIncluded>1</BreakfastIncluded>
</PackageData>
<PackageData>
<PackageID>prepaid</PackageID>
<Name>
<Text text="Nonrefundable" language="en"/>
<Text text="Non remboursable" language="fr"/>
</Name>
<Description>
<Text text="Blah blah blad" language="en"/>
<Text text="Le blah blah blad" language="fr"/>
</Description>
<Occupancy>2</Occupancy>
<ChargeCurrency>web</ChargeCurrency>
<Refundable available="0"/>
</PackageData>
</PropertyDataSet>
</Transaction>
<RoomFeatures>
กำหนดฟีเจอร์ที่พบในห้อง
องค์ประกอบ <RoomFeatures>
จะปรากฏในตำแหน่งต่อไปนี้ในลำดับชั้น XML ของข้อความธุรกรรม
+<Transaction>
+<PropertyDataSet>
// Room and package metadata + <Property> +<RoomData>
+<RoomFeatures>
ไวยากรณ์
องค์ประกอบ <RoomFeatures>
ใช้ไวยากรณ์ต่อไปนี้
<?xml version="1.0" encoding="UTF-8"?> <Transaction ... > <PropertyDataSet ... > ... <RoomData> <RoomFeatures> <JapaneseHotelRoomStyle>[western|japanese|japanese_western]</JapaneseHotelRoomStyle> <Beds> <Bed size="[single|semi_double|double|queen|king]"> <Width unit="cm" number="width"/> <Length unit="cm" number="length"/> </Bed> <!-- Include with any additional beds. --> </Beds> <Suite/> <Capsule/> <Roomsharing>[shared|private]</Roomsharing> <Outdoor/> <MobilityAccessible/> <Smoking>[smoking|non_smoking]</Smoking> <BathAndToilet relation="[together|separate]"> <Bath bathtub="[false|true]" shower="[false|true]"/> <Toilet electronic_bidet="[false|true]" mobility_accessible="[false|true]"/> </BathAndToilet> <OpenAirBath/> <AirConditioning/> <Balcony/> <Views> <!-- (Optional) Defines the type of views from the room. --> <!-- Example: <OceanView/> --> </Views> </RoomFeatures> ... </RoomData> ... </PropertyDataSet> </Transactions>
Attributes
องค์ประกอบ <RoomFeatures>
ไม่มีแอตทริบิวต์
องค์ประกอบลูก
องค์ประกอบ <RoomFeatures>
มีองค์ประกอบย่อยต่อไปนี้
องค์ประกอบย่อย | จำเป็นหรือไม่ | ประเภท | คำอธิบาย |
---|---|---|---|
<JapaneseHotelRoomStyle> | Optional | enum | ระบุสไตล์ของห้องพักโรงแรมญี่ปุ่น ค่าที่ใช้ได้มีดังนี้
|
<Beds> | Optional | Object | มี <Bed> มากเท่าที่ห้องมี โปรดทราบ
ว่าไม่ควรนับฟูกญี่ปุ่นที่นี่
<Bed> แต่ละรายการมีองค์ประกอบย่อยต่อไปนี้
<Beds> <Bed size="double"> <Width unit="cm" number="140"/> <Length unit="cm" number="195"/> </Bed> <Bed/> <!-- Size unknown --> </Beds> |
<Suite> | Optional | empty | ระบุองค์ประกอบนี้เมื่อห้องพักเป็นห้องชุด |
<Capsule> | Optional | empty | ระบุองค์ประกอบนี้เมื่อห้องพักเป็นห้องแคปซูล |
<Roomsharing> | Optional | enum | ไม่ว่าจะแชร์ห้องนี้กับผู้เข้าพักคนอื่นๆ เช่น เจ้าของหรือแขกคนอื่นๆ หรือไม่
ก็ตาม ค่าที่ใช้ได้คือ shared และ private |
<Outdoor> | Optional | empty | ระบุองค์ประกอบนี้เมื่อห้องพักเป็นที่พักกลางแจ้งที่ไม่มี ผนัง ท่อประปา และการควบคุมอุณหภูมิแบบคงที่ เช่น ห้องพักในโรงแรม ไม่ใช่ที่พักกลางแจ้ง แต่จุดตั้งแคมป์ที่แขกพักในเต็นท์และ จุดจอดรถบ้านที่แขกนำรถบ้านของตนเองมาจอดเป็นที่พักกลางแจ้ง |
<MobilityAccessible> | Optional | empty | ระบุองค์ประกอบนี้เมื่อห้องนี้รองรับผู้ที่มีข้อจำกัดด้านการเคลื่อนไหว |
<Smoking> | Optional | enum | ห้องนี้เป็นห้องปลอดบุหรี่หรือห้องสูบบุหรี่ ค่าที่ใช้ได้คือ non_smoking และ smoking |
<BathAndToilet> | Optional | Object | มีข้อมูลเกี่ยวกับห้องอาบน้ำและห้องสุขาในห้องพัก
แอตทริบิวต์มีดังนี้
องค์ประกอบนี้อาจมีองค์ประกอบย่อยต่อไปนี้
ตัวอย่าง <BathAndToilet relation="separate"> <Bath bathtub="1" shower="1"/> <Toilet electronic_bidet="1" mobility_accessible="1"/> </BathAndToilet> |
<OpenAirBath> | Optional | empty | ระบุองค์ประกอบนี้เมื่อห้องพักมีอ่างอาบน้ำกลางแจ้งส่วนตัว |
<AirConditioning> | Optional | empty | ระบุองค์ประกอบนี้เมื่อห้องมีเครื่องปรับอากาศ |
<Balcony> | Optional | empty | ระบุองค์ประกอบนี้เมื่อห้องมีระเบียงหรือลาน |
<Views> | Optional | Object | ตัวเลือกที่ใช้ได้มีดังนี้
|
ตัวอย่าง
JapaneseHotelRoomStyle
ไม่มีค่าเริ่มต้น การละเว้น
ค่าไม่ได้ทำให้เกิดข้อผิดพลาด XML แต่ข้อมูลของคุณจะไม่แสดงใน
ผลการค้นหาเมื่อผู้ใช้กรองตามสไตล์ห้องหรือเตียง
เตียงเดี่ยว 2 หลัง
ตัวอย่างต่อไปนี้แสดงวิธีใช้ <RoomFeatures>
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
<PropertyDataSet>
<Property>1234</Property>
<RoomData>
<RoomID>RoomID_1</RoomID>
<RoomFeatures>
<JapaneseHotelRoomStyle>western</JapaneseHotelRoomStyle>
<Beds> <!-- Two single beds -->
<Bed size="single">
<Width unit="cm" number="97"/>
<Length unit="cm" number="195"/>
</Bed>
<Bed size="single">
<Width unit="cm" number="97"/>
<Length unit="cm" number="195"/>
</Bed>
</Beds>
<Suite/>
<Capsule/>
<Roomsharing>private</Roomsharing>
<Outdoor/>
<MobilityAccessible/>
<Smoking>non_smoking</Smoking>
<BathAndToilet relation="separate">
<Bath bathtub="1" shower="1"/>
<Toilet electronic_bidet="1" mobility_accessible="1"/>
</BathAndToilet>
<OpenAirBath/>
<AirConditioning/>
<Balcony/>
<Views>
<LakeView/>
<MarinaView/>
<BeachView/>
<ForestView/>
<MountainView/>
<NatureView/>
</Views>
</RoomFeatures>
</RoomData>
</PropertyDataSet>
</Transaction>
เตียงคู่ 2 หลัง
ตัวอย่างต่อไปนี้เป็นห้องพักสไตล์ญี่ปุ่น western
ที่มีเตียง double
2 เตียง
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
<PropertyDataSet>
<Property>1234</Property>
<RoomData>
<RoomID>RoomID_1</RoomID>
<RoomFeatures>
<JapaneseHotelRoomStyle>western</JapaneseHotelRoomStyle>
<Beds> <!-- Two double beds-->
<Bed size="double"></Bed>
<Bed size="double"></Bed>
</Beds>
</RoomFeatures>
</RoomData>
</PropertyDataSet>
</Transaction>
สไตล์ญี่ปุ่นแบบไม่มีเตียง
ต่อไปนี้เป็นตัวอย่างห้องพักสไตล์ญี่ปุ่นที่ไม่มีเตียง ไม่จำเป็นต้องระบุข้อมูลเตียงสำหรับห้องสไตล์ japanese
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
<PropertyDataSet>
<Property>1234</Property>
<RoomData>
<RoomID>RoomID_1</RoomID>
<RoomFeatures>
<JapaneseHotelRoomStyle>japanese</JapaneseHotelRoomStyle>
</RoomFeatures>
</RoomData>
</PropertyDataSet>
</Transaction>
ญี่ปุ่นตะวันตกพร้อมเตียง
ตัวอย่างต่อไปนี้เป็นตัวอย่างห้องพักสไตล์ japanese_western
ที่มีเตียงขนาด king
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
<PropertyDataSet>
<Property>1234</Property>
<RoomData>
<RoomID>RoomID_1</RoomID>
<RoomFeatures>
<JapaneseHotelRoomStyle>japanese_western</JapaneseHotelRoomStyle>
<Beds>
<Bed size="king"></Bed>
</Beds>
</RoomFeatures>
</RoomData>
</PropertyDataSet>
</Transaction>
หากพาร์ทเนอร์ไม่มีข้อมูลจำนวนเตียงใน japanese_western
rooms ให้ทำตามตัวอย่างต่อไปนี้
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
<PropertyDataSet>
<Property>1234</Property>
<RoomData>
<RoomID>RoomID_1</RoomID>
<RoomFeatures>
<JapaneseHotelRoomStyle>japanese_western</JapaneseHotelRoomStyle>
</RoomFeatures>
</RoomData>
</PropertyDataSet>
</Transaction>
<PackageData>
กำหนดข้อมูลเมตาเกี่ยวกับแพ็กเกจห้องพักที่ไม่เกี่ยวกับแผนการเดินทางสำหรับที่พัก องค์ประกอบนี้มีข้อมูลที่เชื่อมโยงกับพาร์ทเนอร์และโรงแรม แต่ไม่เชื่อมโยงกับแผนการเดินทาง จุดประสงค์คือการกำหนดข้อมูลทั้งหมดที่ไม่ใช่แผนการเดินทางเพียงครั้งเดียวและอ้างอิงจากข้อมูลแผนการเดินทาง
องค์ประกอบ <PackageData>
จะปรากฏในตำแหน่งต่อไปนี้ในลำดับชั้น XML ของข้อความธุรกรรม
+<Transaction>
+<PropertyDataSet>
// Room and package metadata + <Property> +<RoomData>
+<PackageData>
+<Result>
// Pricing and availability +<Rates>
+<RoomBundle>
+ ...
องค์ประกอบ <PackageData>
คล้ายกับ <RoomData>
แต่จะอธิบายเกี่ยวกับราคาห้องพักและข้อกำหนดที่ไม่ได้เป็นส่วนหนึ่งของคำอธิบายห้องพักจริง คุณใช้ <RoomData>
และ <PackageData>
ร่วมกันเพื่อระบุรายละเอียดเกี่ยวกับแพ็กเกจห้องพักและราคาห้องพักหลายๆ แบบได้ แต่สำหรับห้องพักที่ไม่ได้เป็นส่วนหนึ่งของแพ็กเกจ ให้ใช้ <RoomData>
เท่านั้น
คุณจะกำหนดทั้งองค์ประกอบ <RoomData>
และ <PackageData>
สำหรับห้องพักหรือแพ็กเกจห้องพักเดียวกันได้ เมื่อ Google แสดงห้องพักหรือแพ็กเกจดังกล่าวในผลการค้นหา ระบบจะรวมคำอธิบายจากทั้ง 2 รายการและคั่นด้วยเครื่องหมายขีดกลางสั้น
หากอัปเดตองค์ประกอบ <PackageData>
รายการเดียวสำหรับที่พัก คุณต้องอัปเดตองค์ประกอบ <PackageData>
และ <RoomData>
ทั้งหมดสำหรับที่พักนั้นด้วย
<PropertyDataSet>
แต่ละรายการจะพิจารณาข้อมูลทั้งหมดเกี่ยวกับที่พักและเขียนทับข้อมูลที่มีอยู่
ดูข้อมูลเพิ่มเติมได้ที่ข้อมูลเมตาของแพ็กเกจห้องพัก
ไวยากรณ์
องค์ประกอบ <PackageData>
ใช้ไวยากรณ์ต่อไปนี้
<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
<PropertyDataSet ... >
<PackageData>
<PackageID>package_ID</PackageID>
<Name>
<Text text="package_name" language="language_code"/>
...
</Name>
<Description>
<Text text="package_description" language="language_code"/>
...
</Description>
<Refundable available="[false|true]" refundable_until_days="number_of_days"
refundable_until_time="time"/>
<ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency>
<Occupancy>max_number_of_intended_occupants</Occupancy>
<OccupancyDetails><!-- optional info about the types of guests,
whether adults or children --></OccupancyDetails>
<!-- For these next 3 elements, boolean_value can be 0/1 or true/false -->
<BreakfastIncluded>boolean_value</BreakfastIncluded>
<InternetIncluded>boolean_value</InternetIncluded>
<ParkingIncluded>boolean_value</ParkingIncluded>
<PhotoURL>
<Caption>
<Text text="photo_description" language="language_code"/>
...
</Caption>
<URL>photo_location</URL>
</PhotoURL>
...
<Meals>
<Breakfast
included="[true|false]" buffet="[true|false]"
in_room="[true|false]" in_private_space="[true|false]"/>
<Dinner
included="[true|false]" buffet="[true|false]"
in_room="[true|false]" in_private_space="[true|false]"/>
</Meals>
<CheckinTime>checkin_time</CheckinTime>
<CheckoutTime>checkout_time</CheckoutTime>
<MembershipBenefitsIncluded>
<ProgramName>
<Text language="en" text="Special Rewards">
</ProgramName>
<ProgramLevel>
<Text language="en" text="Platinum">
</ProgramLevel>
</MembershipBenefitsIncluded>
<OnPropertyCredit>
<Amount currency="USD">123.45</Amount>
</OnPropertyCredit>
</PackageData>
<!-- a PackageID with a MilesIncluded
rate feature -->
<PackageData>
<PackageID>room_with_miles</PackageID>
<Name>
<Text text="Room with Bundled Miles" language="en">
</Name>
<ChargeCurrency>hotel </ChargeCurrency>
<MilesIncluded>
<NumberOfMiles>integer</NumberOfMiles>
<Provider>
<Text language="en" text="provider-name">
</Provider>
<!-- Add Loyalty point information -->
<LoyaltyCampaignID>campaign_ID</LoyaltyCampaignID>
</MilesIncluded>
</PackageData>
...
...
</PropertyDataSet>
...
</Transaction>
Attributes
องค์ประกอบ <PackageData>
ไม่มีแอตทริบิวต์
องค์ประกอบลูก
องค์ประกอบ <PackageData>
มีองค์ประกอบย่อยต่อไปนี้
องค์ประกอบย่อย | จำเป็นหรือไม่ | ประเภท | คำอธิบาย |
---|---|---|---|
<BreakfastIncluded> | Optional | boolean | ระบุว่าแพ็กเกจนี้รวมอาหารเช้าในราคาหรือไม่
ค่าที่ใช้ได้คือ 0 (หรือ false ) และ 1 (หรือ true )
เราขอแนะนำให้คุณใช้
|
<ChargeCurrency> | Optional | enum | รูปแบบและช่วงเวลาที่ผู้ใช้ชำระเงินสำหรับการจอง องค์ประกอบนี้จะใช้ไวยากรณ์เดียวกันกับ <ChargeCurrency> ใน <Result>
ค่าเริ่มต้นคือ |
<CheckinTime> | Optional | Time | เวลาเช็คอินที่เร็วที่สุด เวลาต้องน้อยกว่า 24:00 น. ตามเวลาท้องถิ่นของโรงแรม |
<CheckoutTime> | Optional | Time | เวลาเช็คเอาต์ที่เป็นไปได้ล่าสุดตามเวลาท้องถิ่นของโรงแรม |
<Description> | Optional | Object | คำอธิบายแพ็กเกจโดยละเอียด องค์ประกอบนี้ควรมีข้อมูลที่ไม่ได้อธิบายไว้ในองค์ประกอบอื่นๆ หรือองค์ประกอบ <Name> คุณไม่ควรใช้อักษรตัวพิมพ์ใหญ่ทั้งหมดเมื่อระบุคำอธิบายของห้องพัก
องค์ประกอบ <Description> <Text text="Two breakfast buffet certificates for each night of stay." language="en"/> <Text text="Deux certificats petit-déjeuner buffet pour chaque nuit de séjour." language="fr"/> </Description> |
<InternetIncluded> | Optional | boolean | แพ็กเกจมีการเข้าถึงอินเทอร์เน็ตโดยไม่มีค่าใช้จ่าย ขณะที่แพ็กเกจอื่นๆ ไม่รวมสิ่งอำนวยความสะดวกนี้ อย่าตั้งค่าองค์ประกอบนี้สำหรับแพ็กเกจห้องพักในโรงแรมที่ให้บริการอินเทอร์เน็ตฟรีสำหรับห้องพักทุกห้อง องค์ประกอบนี้ใช้ไม่ได้กับอินเทอร์เน็ตแบบใช้สายในห้องพักหรืออินเทอร์เน็ตแบบไร้สายที่ไม่ได้ให้บริการในห้องพักของแขก ค่าที่ใช้ได้คือ
0 (หรือ false ) และ 1
(หรือ true )
|
<Meals> | Optional | Object | มีข้อมูลเกี่ยวกับมื้ออาหารในแพ็กเกจนี้
องค์ประกอบ
ระบบจะใช้แอตทริบิวต์ที่ไม่บังคับเมื่อ หากต้องการให้ตัวกรองมื้ออาหาร ( |
<Name> | Required | string | ชื่อแพ็กเกจ ค่านี้ควรตรงกับข้อมูลที่ปรากฏบนหน้า Landing Page ของโรงแรม อย่าตั้งค่าขององค์ประกอบนี้เป็นตัวพิมพ์ใหญ่ทั้งหมด
องค์ประกอบนี้จะมีองค์ประกอบย่อย <Name> <Text text="Bed and Breakfast" language="en"/> <Text text="Lit et petit déjeuné" language="fr"/> </Name> |
<Occupancy> | Optional | integer | จำนวนแขกสูงสุดที่แพ็กเกจห้องพักกำหนดไว้
ตัวอย่างเช่น ห้องสวีทขนาดใหญ่อาจรองรับแขกได้จริง 6 คน แต่แพ็กเกจห้องพักกำหนดจำนวนแขกไว้สูงสุด 4 คนเท่านั้น
ค่านี้ต้องน้อยกว่าหรือเท่ากับองค์ประกอบ ค่าของ หากคุณระบุองค์ประกอบนี้ทั้งใน หมายเหตุ <Occupancy> อาจแสดงร่วมกับ <OccupancyDetails> ซึ่งระบุประเภทของแขก (ผู้ใหญ่หรือเด็ก) โปรดดู <OccupancyDetails> สำหรับไวยากรณ์และคำอธิบายองค์ประกอบย่อย
|
<PackageID> | Required | string | รหัสที่ไม่ซ้ำกันสำหรับแพ็กเกจ ใช้รหัสนี้เพื่อจับคู่ข้อมูลแพ็กเกจห้องพักกับบล็อก (คุณยังใช้รหัสนี้เพื่ออ้างอิงคำจำกัดความของแพ็กเกจห้องพักทั่วไปที่ใช้ในข้อความ Transaction รายการเดียวเมื่อกำหนดข้อมูลแพ็กเกจห้องพักในบรรทัดได้ด้วย) |
<ParkingIncluded> | Optional | boolean | ระบุว่าแพ็กเกจห้องพักมีที่จอดรถฟรีหรือไม่ ซึ่งหากไม่เป็นเช่นนั้นก็จะหมายความว่าโรงแรมนี้มีการเรียกเก็บค่าที่จอดรถ อย่าระบุค่าขององค์ประกอบนี้สำหรับโรงแรมที่มีบริการที่จอดรถฟรี
ค่าที่ใช้ได้คือ |
<PhotoURL> | Optional | Object | (เหมือนกับ <PhotoURL> ใน <RoomData>
แต่สำหรับแพ็กเกจ (เช่น รูปภาพอาหาร))
|
<Refundable> | Optional | Object | แสดงข้อมูลราคาห้องพักที่ขอเงินคืนได้เต็มจำนวนหรือไม่มีค่าธรรมเนียมการยกเลิก หากไม่ได้ระบุไว้ ระบบจะไม่แสดงข้อมูลเกี่ยวกับการคืนเงิน
นโยบายการคืนเงินที่ระดับ <PackageData> จะลบล้างนโยบายการคืนเงินที่ระดับ <Result> นโยบายการคืนเงินที่ระดับ <Rates> จะลบล้างนโยบายการคืนเงินที่ระดับ <PackageData> นอกจากนี้ คุณยังไฮไลต์ราคาห้องพักที่ขอเงินคืนได้เพื่อแสดงต่อผู้ใช้ผ่านตัวเลือกอื่นๆ โดยไม่ต้องแก้ไขสคีมาข้อความธุรกรรมโดยตรง ดูข้อมูลเพิ่มเติมเกี่ยวกับตัวเลือกเหล่านี้
นโยบายเกี่ยวกับราคาที่คืนเงินได้
ตัวอย่างต่อไปนี้แสดงองค์ประกอบ <Refundable available="1" refundable_until_days="7" refundable_until_time="18:00:00"/> หมายเหตุ: เราขอแนะนำให้ตั้งค่าแอตทริบิวต์ทั้งหมด ระบบจะสร้างข้อความเตือนสถานะฟีดเมื่อไม่ได้ตั้งค่าแอตทริบิวต์อย่างน้อย 1 รายการ หากคุณไม่ได้ตั้งค่าแอตทริบิวต์ใดๆ ระบบจะไม่แสดงราคาห้องพักเป็นขอเงินคืนได้ แอตทริบิวต์ดังกล่าวมีดังนี้
โปรดคำนึงถึงสิ่งต่อไปนี้เมื่อตั้งค่าแอตทริบิวต์
|
<MembershipBenefits |
Optional | boolean | ราคาห้องพักจะรวมสิทธิประโยชน์ของสถานะพิเศษสำหรับระยะเวลาการเข้าพัก โดยประกอบไปด้วยพารามิเตอร์ต่อไปนี้
|
<CarRentalIncluded> | Optional | boolean | ราคาห้องพักรวมถึงบริการเช่ารถฟรีตลอดระยะเวลาที่เข้าพัก |
<MilesIncluded> | Optional | boolean | ราคาห้องพักรวมการสะสมไมล์ โดยประกอบไปด้วยพารามิเตอร์เหล่านี้
หมายเหตุ: |
<OnPropertyCredit> | Optional | boolean | ราคาห้องพักรวมเครดิตสำหรับใช้ในที่พัก (F&B, รีสอร์ต, สปา ฯลฯ) โดยประกอบไปด้วยพารามิเตอร์นี้
|
<AirportTransportationIncluded> | Optional | Object | ราคาห้องพักรวมถึงบริการรับส่งฟรีไปยัง/จากสนามบินที่อยู่ใกล้เคียง แอตทริบิวต์ direction ที่ไม่บังคับจะระบุทิศทางของ
การขนส่ง ค่าที่ใช้ได้มีดังนี้
from : มีบริการรับส่งจากสนามบินไปยังที่พัก ค่านี้เป็นค่าเริ่มต้นหากไม่ได้ระบุทิศทาง
to : ที่พักมีบริการรับส่งสนามบิน
round_trip : มีบริการรับส่งทั้งไปและกลับจาก
สนามบิน
|
ตัวอย่าง
แพ็กเกจห้องพักเดี่ยว
ตัวอย่างต่อไปนี้ระบุแพ็กเกจห้องพักเดี่ยวที่มีอัตราการเข้าพัก 2 คน (ผู้ใหญ่ 1 คนและเด็ก 1 คน) และรวมอาหารเช้า
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
<PropertyDataSet>
<Property>1234</Property>
<PackageData>
<Occupancy>2</Occupancy>
<OccupancyDetails>
<NumAdults>1</NumAdults>
<Children>
<Child age="17"/>
</Children>
</OccupancyDetails>
<PackageID>P54321</PackageID>
<Name>
<Text text="Breakfast Included" language="en"/>
<Text text="Avec le petit déjeuner" language="fr"/>
</Name>
<Description>
<Text text="Two certificates for continental
breakfast will be provided." language="en"/>
<Text text="Deux certificats pour le petit déjeuner
continental seront fournis." language="fr"/>
</Description>
<BreakfastIncluded>1</BreakfastIncluded>
</PackageData>
</PropertyDataSet>
</Transaction>
ข้อมูลเมตาของห้องพักและแพ็กเกจ
ตัวอย่างต่อไปนี้ระบุข้อมูลเมตาของห้องพักและแพ็กเกจห้องพัก
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
<PropertyDataSet>
<Property>180054</Property>
<RoomData>
<RoomID>060773</RoomID>
<Name>
<Text text="Single Bed Room" language="en"/>
<Text text="Chambre single" language="fr"/>
</Name>
<Description>
<Text text="Non-smoking" language="en"/>
<Text text="Pas de fumiers" language="fr"/>
</Description>
<PhotoURL>
<Caption>
<Text text="Living area" language="en"/>
<Text text="Le chambre" language="fr"/>
</Caption>
<URL>http://www.foo.com/static/bar/image1234.jpg</URL>
</PhotoURL>
</RoomData>
<PackageData>
<PackageID>P54321</PackageID>
<Name>
<Text text="Breakfast Included" language="en"/>
<Text text="Avec le petit déjeuner" language="fr"/>
</Name>
<Description>
<Text text="Includes a delightful array of jams and jellies." language="en"/>
<Text text="Comprend une délicieuse gamme de confitures et gelées." language="fr"/>
</Description>
<BreakfastIncluded>1</BreakfastIncluded>
</PackageData>
</PropertyDataSet>
</Transaction>
แพ็กเกจห้องพักหลายห้อง
ตัวอย่างต่อไปนี้กำหนดข้อมูลเมตาของห้องพักและแพ็กเกจห้องพักสำหรับแพ็กเกจห้องพักหลายรายการ
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
<!-- A transaction message with room types result. -->
<PropertyDataSet>
<Property>12345</Property>
<RoomData>
<RoomID>single</RoomID>
<Name>
<Text text="Single room" language="en"/>
<Text text="Chambre simple" language="fr"/>
</Name>
<Description>
<Text text="A single room" language="en"/>
<Text text="Le chambre simple" language="fr"/>
</Description>
<PhotoURL>
<Caption>
<Text text="Living area" language="en"/>
<Text text="Le chambre" language="fr"/>
</Caption>
<URL>http://www.foo.com/static/bar/image1234.jpg</URL>
</PhotoURL>
<PhotoURL>
<URL>http://www.foo.com/static/bar/image1235.jpg</URL>
</PhotoURL>
<Capacity>2</Capacity>
</RoomData>
<RoomData>
<RoomID>double</RoomID>
<Name>
<Text text="Double room" language="en"/>
<Text text="Chambre double" language="fr"/>
</Name>
<Occupancy>1</Occupancy>
</RoomData>
<PackageData>
<PackageID>refundbreakfast</PackageID>
<Name>
<Text text="Refundable Room with Breakfast" language="en"/>
<Text text="Chambre remboursable avec le petit déjeuner" language="fr"/>
</Name>
<Description>
<Text text="Continental Breakfast" language="en"/>
<Text text="Petit déjeuner continental" language="fr"/>
</Description>
<ChargeCurrency>hotel</ChargeCurrency>
<Refundable available="1" refundable_until_days="3"/>
<BreakfastIncluded>1</BreakfastIncluded>
</PackageData>
<PackageData>
<PackageID>prepaid</PackageID>
<Name>
<Text text="Nonrefundable" language="en"/>
<Text text="Non remboursable" language="fr"/>
</Name>
<Description>
<Text text="Blah blah blad" language="en"/>
<Text text="Le blah blah blad" language="fr"/>
</Description>
<Occupancy>2</Occupancy>
<ChargeCurrency>web</ChargeCurrency>
<Refundable available="0"/>
</PackageData>
</PropertyDataSet>
</Transaction>
แพ็กเกจห้องพักพร้อมราคา
ตัวอย่างต่อไปนี้กำหนดข้อมูลเมตาของห้องพักและแพ็กเกจสำหรับแพ็กเกจห้องพักที่มีการแสดงราคา
<Transaction timestamp="2010-04-24T20:44:56-04:00" id="TXNID">
<PropertyDataSet>
<Property>12345</Property>
<RoomData>
...
</RoomData>
<!-- definitions of PackageData types including rate features -->
<PackageData>
<PackageID>room_with_addl_benefits</PackageID>
<Name>
<Text text="Acme Hotels 2017 Promotion Package" language="en"/>
</Name>
<ChargeCurrency>hotel</ChargeCurrency>
<BreakfastIncluded>1</BreakfastIncluded>
<MembershipBenefitsIncluded>
<ProgramName>
<Text language="en" text="Marriott Rewards"/>
</ProgramName>
<ProgramLevel>
<Text language="en" text="Platinum"/>
</ProgramLevel>
</MembershipBenefitsIncluded>
<OnPropertyCredit>
<Amount currency="USD">123.45</Amount>
</OnPropertyCredit>
</PackageData>
<PackageData>
<PackageID>room_with_miles</PackageID>
<Name>
<Text text="Room with Bundled Miles" language="en"/>
</Name>
<ChargeCurrency>hotel</ChargeCurrency>
<MilesIncluded>
<NumberOfMiles>1000</NumberOfMiles>
<LoyaltyCampaignID>my_campaign</LoyaltyCampaignID>
</MilesIncluded>
<AirportTransportationIncluded direction="from"/>
</PackageData>
</PropertyDataSet>
<!-- The actual list of prices -->
<Result>
…
</Result>
</Transaction>
อาหารและรูปภาพ
ตัวอย่างต่อไปนี้กำหนดข้อมูลเมตาของห้องพักและแพ็กเกจห้องพักสำหรับอาหาร รูปภาพ และเวลาเช็คอินและเช็คเอาต์
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
<PropertyDataSet>
<Property>1234</Property>
<PackageData>
<PackageID>PackageID_1</PackageID>
<Name>
<Text text="Meals Included" language="en"/>
</Name>
<PhotoURL>
<Caption>
<Text text="Breakfast" language="en"/>
<Text text="朝食" language="ja"/>
</Caption>
<URL>http://example.com/static/bar/image1234.jpg</URL>
</PhotoURL>
<Meals>
<!-- Guests can choose to have breakfast in their room or in another
space to avoid contact with other guests. -->
<Breakfast included="1" in_room="1" in_private_space="1"/>
<Dinner included="1" buffet="1"/>
</Meals>
<CheckinTime>15:00</CheckinTime>
<CheckoutTime>11:00</CheckoutTime>
</PackageData>
</PropertyDataSet>
</Transaction>
อาหารเช้า
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
<PropertyDataSet>
<Property>1234</Property>
<PackageData>
<PackageID>PackageID_1</PackageID>
<Name>
<Text text="Breakfast Included" language="en"/>
</Name>
<PhotoURL>
<Caption>
<Text text="Breakfast" language="en"/>
<Text text="朝食" language="ja"/>
</Caption>
<URL>http://example.com/static/bar/image1234.jpg</URL>
</PhotoURL>
<Meals>
<Breakfast included="true"/>
<!-- Dinner not included needs to be explicitly specified -->
<Dinner included="false"/>
</Meals>
<CheckinTime>15:00</CheckinTime>
<CheckoutTime>11:00</CheckoutTime>
</PackageData>
</PropertyDataSet>
</Transaction>
<Result>
คอนเทนเนอร์สำหรับการอัปเดตราคาและความพร้อมให้บริการในข้อความ <Transaction>
องค์ประกอบ <Result>
จะปรากฏในตำแหน่งต่อไปนี้ในลำดับชั้น XML ของข้อความธุรกรรม
+<Transaction>
+<PropertyDataSet>
// Room and package metadata + <Property> +<RoomData>
+<PackageData>
+<Result>
// Pricing and availability +<Rates>
+<RoomBundle>
+ ...
ใช้ <Result>
เพื่อตั้งค่าหรืออัปเดตราคาห้องพัก และกำหนดห้องว่างที่พร้อมให้บริการ โดยทั่วไปแล้ว รายการที่จัดอยู่ในองค์ประกอบนี้จะอ้างอิงข้อมูลเมตาเกี่ยวกับห้องพักหรือแพ็กเกจห้องพักที่ไม่เกี่ยวกับแผนการเดินทาง (เช่น คำอธิบายหรือชุดสิ่งอำนวยความสะดวก) ซึ่งกำหนดไว้ใน <PackageData>
และ <RoomData>
โดยทั่วไปแล้ว คุณจะต้องส่งข้อความ Transaction ที่มีการอัปเดตราคาบ่อยครั้ง วิธีการและความถี่จะขึ้นอยู่กับวิธีการส่งข้อมูลราคาของคุณ
คุณใช้ <Result>
ในข้อความ Transaction เพื่อนำแผนการเดินทางออกได้ตามที่อธิบายไว้ในการนำห้องว่างออก
ดูข้อมูลเพิ่มเติมเกี่ยวกับการใช้ข้อความ Transaction เพื่ออัปเดตราคาและความพร้อมให้บริการได้ที่การเพิ่มและการอัปเดตห้องว่าง
ข้อความธุรกรรมรายการเดียวจะมีองค์ประกอบ <Result>
กี่รายการก็ได้ ตราบเท่าที่ข้อความทั้งหมดมีขนาดไม่เกิน 100 MB
ไวยากรณ์
องค์ประกอบ <Result>
ใช้ไวยากรณ์ต่อไปนี้
<?xml version="1.0" encoding="UTF-8"?> <Transaction ... > <Result> <!-- Required --> <Property>hotel_ID</Property> <!-- Required --> <Checkin>YYYY-MM-DD</Checkin> <!-- Required --> <Nights>number_of_nights</Nights> <Baserate currency="currency_code">price</Baserate> <!-- Only required when <Baserate> contains a real price --> <Tax currency="currency_code">tax_amount</Tax> <!-- Only required when <Baserate> contains a real price --> <OtherFees currency="currency_code">fee_amount</OtherFees> <Refundable available="[false|true]" refundable_until_days="number_of_days" refundable_until_time="time"/> <RoomID>room_ID</RoomID> <PackageID>package_ID</PackageID> <ExpirationTime>expiration_time</ExpirationTime> <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency> <Occupancy>max_number_of_intended_occupants</Occupancy> <!-- For Baserate, occupancy value must be greater than or equal to 2. If a value is not provided for occupancy, it defaults to 2. --> <!-- Child occupancy rates should only be sent through Live pricing with context and not through Pull or Changed pricing --> <OccupancyDetails>occupancy_info</OccupancyDetails> <Rates>...</Rates> <RoomBundle>...</RoomBundle> <AllowablePointsOfSale> <PointOfSale id="landing_page_identifier"/> ... </AllowablePointsOfSale> <MilesIncluded> <NumberOfMiles>integer</NumberOfMiles> <Provider> <Text language="en" text="provider-name"> </Provider> <!-- Add Loyalty point information --> <LoyaltyCampaignID>campaign_ID</LoyaltyCampaignID> </MilesIncluded> </Result> ... </Transaction>
Attributes
องค์ประกอบ <Result>
มีแอตทริบิวต์ต่อไปนี้
แอตทริบิวต์ | จำเป็นหรือไม่ | ประเภท | คำอธิบาย |
---|---|---|---|
mergeable | Optional | boolean | โดยค่าเริ่มต้น ราคาใหม่สำหรับการจับคู่โรงแรมกับแผนการเดินทางที่เจาะจงจะเขียนทับราคาก่อนหน้า (ยังไม่หมดอายุ) ที่แสดงในแคชของ Google แอตทริบิวต์ mergeable จะช่วยให้คุณจัดเก็บราคาเพิ่มเติมลงในแคชของ Google ได้โดยไม่ต้องลบข้อมูลราคาก่อนหน้า คำขอข้อมูลราคาแบบเรียลไทม์ที่มีการตอบกลับตามบริบทจะมีค่าแอตทริบิวต์นี้เป็น true เสมอ (ไม่ว่าการตอบกลับข้อความธุรกรรมจะเป็นอย่างไรก็ตาม) |
องค์ประกอบลูก
องค์ประกอบ <Result>
มีองค์ประกอบย่อยต่อไปนี้
องค์ประกอบย่อย | จำเป็นหรือไม่ | ประเภท | คำอธิบาย |
---|---|---|---|
<AllowablePointsOfSale> | Optional | Object | หน้า Landing Page อย่างน้อย 1 หน้าที่มีสิทธิ์สำหรับโรงแรม หน้า Landing Page คือเว็บไซต์ที่จัดการขั้นตอนการจองสำหรับผู้ใช้ปลายทาง หากต้องการรวมเฉพาะหน้า Landing Page บางหน้า (และละเว้นหน้าอื่นๆ) ไว้อย่างชัดเจน ให้เพิ่มองค์ประกอบ <AllowablePointsOfSale> อย่างน้อย 1 รายการที่ตรงกับแอตทริบิวต์ id ขององค์ประกอบ <PointOfSale> ในไฟล์หน้า Landing Page
หากไม่รวมองค์ประกอบนี้ ระบบจะถือว่าหน้า Landing Page ทั้งหมดที่กำหนดไว้ในไฟล์หน้า Landing Page มีสิทธิ์ใช้สำหรับการจองห้อง ดูข้อมูลเพิ่มเติมได้ที่ไวยากรณ์ของไฟล์หน้า Landing Page |
<Baserate> | Optional | float | ราคาห้องพักสำหรับการเข้าพัก ค่าขององค์ประกอบนี้ควรแสดงถึงข้อมูลต่อไปนี้
เมื่อห้องไม่พร้อมให้บริการสำหรับแผนการเดินทาง
หากต้องการนำแพ็กเกจห้องพักออก ให้ทำตามวิธีการในการนำแพ็กเกจห้องพักออก
<Baserate currency="USD">1200.40</Baserate> องค์ประกอบ
|
<ChargeCurrency> | Optional | enum | รูปแบบและช่วงเวลาที่ผู้ใช้ชำระเงินสำหรับการจอง องค์ประกอบนี้ใช้ได้ในข้อความ Transaction ในองค์ประกอบ <Result> สำหรับราคาโรงแรมหรือบล็อก <PackageData> สำหรับแพ็กเกจห้องพัก
ค่าที่ใช้ได้มีดังนี้
ค่าเริ่มต้นคือ |
<Checkin> | Required | Date | วันที่เช็คอินของแผนการเดินทางโดยใช้รูปแบบวันที่ ชุดค่าผสมขององค์ประกอบ <Nights> และองค์ประกอบ <Checkin> จะรวมกันเป็นแผนการเดินทาง |
Optional | string | เลิกใช้งานแล้ว: ระบุช่องที่กำหนดเองสำหรับใช้ในการส่งข้อมูลเพิ่มเติมที่เชื่อมโยงกับโรงแรม คุณส่งค่าที่กำหนดเองได้สูงสุด 5 ค่าด้วยชื่อองค์ประกอบต่อไปนี้
องค์ประกอบ สำคัญ: โปรดติดต่อผู้จัดการลูกค้าด้านเทคนิค (TAM) หากต้องการใช้ตัวแปร |
|
<ExpirationTime> | Optional | DateTime | วันที่และเวลาที่ถือว่าราคาหมดอายุ (ขั้นต่ำ 3 ชั่วโมง)
คุณไม่ควรระบุการประทับเวลาการหมดอายุหากค่านี้ไม่สำคัญต่อโครงสร้างราคาของคุณ Google จะไม่แสดงราคาที่หมดอายุ และแผนการเดินทางใดก็ตาม ที่มีราคาหมดอายุจะมีสิทธิ์สำหรับ การค้นหาราคาแบบเรียลไทม์ |
<MilesIncluded> | Optional | boolean | ราคาห้องพักรวมการสะสมไมล์ โดยประกอบไปด้วยพารามิเตอร์เหล่านี้
หมายเหตุ: |
<Nights> | Required | integer | จำนวนคืนสำหรับแผนการเดินทาง ค่าขององค์ประกอบ <Nights> ต้องเป็นจำนวนเต็มบวก
ชุดค่าผสมของ <Nights> และ <Checkin> จะรวมกันเป็นแผนการเดินทาง |
<OtherFees> | Optional | float | ค่าธรรมเนียมอื่นๆ นอกเหนือจากราคาฐานและภาษีที่มีผลต่อราคาสุดท้ายของห้องพัก องค์ประกอบ <OtherFees> มีแอตทริบิวต์ currency ที่ต้องระบุเพียงรายการเดียว ซึ่งจะกำหนดรหัสสกุลเงิน 3 ตัวอักษรสำหรับค่าธรรมเนียม ตัวอย่างเช่น USD
ต้องระบุองค์ประกอบ |
<Occupancy> | Optional | integer | ระบุจำนวนผู้เข้าพักสูงสุดที่อนุญาตสำหรับราคานี้
เมื่อ <Occupancy> ปรากฏใต้ <Result> โดยตรง ค่าจะต้องเป็น 2 หรือมากกว่า <Occupancy> อาจแสดงร่วมกับ <OccupancyDetails> ซึ่งระบุประเภทของแขก (ผู้ใหญ่หรือเด็ก) หากไม่ได้ระบุประเภทแขก
ระบบจะถือว่าเป็นผู้ใหญ่ ดูข้อมูลเกี่ยวกับ <OccupancyDetails> สำหรับไวยากรณ์และคำอธิบายขององค์ประกอบย่อย หากไม่ได้ระบุองค์ประกอบ <Occupancy> อัตราการเข้าพักจะมีค่าเริ่มต้นเป็น 2
ประเด็นสำคัญ: อัตราการเข้าพักสำหรับเด็ก ควรส่งผ่านราคาแบบเรียลไทม์ที่มีบริบทเท่านั้น และไม่ควรส่งผ่านการดึงข้อมูล หรือราคาที่มีการเปลี่ยนแปลง หมายเหตุ: โปรดติดต่อทีมสนับสนุนเพื่อเปิดใช้ฟีเจอร์สำหรับส่งราคาสำหรับห้องพักที่ไม่ใช่แบบคู่ |
<PackageID> | Optional | string | รหัสที่ไม่ซ้ำกันของแพ็กเกจสำหรับแมปกับข้อมูลแพ็กเกจที่กำหนดไว้ล่วงหน้า
นอกจากนี้ยังใช้สร้างตัวแปรของหน้า Landing Page สำหรับ PACKAGE-ID ได้ด้วย
ดูข้อมูลเพิ่มเติมได้ที่ข้อมูลเมตาของแพ็กเกจห้องพัก
คุณต้องใส่ |
<Property> | Required | string | รหัสของโรงแรมที่ได้รับผลกระทบจากข้อมูลที่เกี่ยวข้อง (ราคา แผนการเดินทาง แพ็กเกจห้องพัก หรือข้อมูลเมตา) ค่าขององค์ประกอบนี้ต้องเป็นสตริง ค่าขององค์ประกอบนี้ต้องตรงกับข้อมูล <id> ที่คุณกำหนดไว้ในฟีดข้อมูลโรงแรม
|
<Rates> | Optional | <Rates> |
คอนเทนเนอร์สำหรับบล็อก <Rate> อย่างน้อย 1 รายการ <Rate> แต่ละรายการใน <Rates> จะกำหนดราคาที่แตกต่างกันสำหรับชุดค่าผสมห้องพัก/แผนการเดินทาง
ใช้องค์ประกอบ หมายเหตุ: ใน |
<Refundable> | Optional | Object | แสดงข้อมูลราคาห้องพักที่ขอเงินคืนได้เต็มจำนวนหรือไม่มีค่าธรรมเนียมการยกเลิก หากไม่ได้ระบุไว้ ระบบจะไม่แสดงข้อมูลเกี่ยวกับการคืนเงิน
นโยบายการคืนเงินที่ระดับ <PackageData> จะลบล้างนโยบายการคืนเงินที่ระดับ <Result> นโยบายการคืนเงินที่ระดับ <Rates> จะลบล้างนโยบายการคืนเงินที่ระดับ <PackageData> นอกจากนี้ คุณยังไฮไลต์ราคาห้องพักที่ขอเงินคืนได้เพื่อแสดงต่อผู้ใช้ผ่านตัวเลือกอื่นๆ โดยไม่ต้องแก้ไขสคีมาข้อความธุรกรรมโดยตรง ดูข้อมูลเพิ่มเติมเกี่ยวกับ
นโยบายราคาที่คืนเงินได้
ตัวอย่างต่อไปนี้แสดงองค์ประกอบ <Refundable available="1" refundable_until_days="7" refundable_until_time="18:00:00"/> หมายเหตุ: เราขอแนะนำให้ตั้งค่าแอตทริบิวต์ทั้งหมด ระบบจะสร้างข้อความเตือนสถานะฟีดเมื่อไม่ได้ตั้งค่าแอตทริบิวต์อย่างน้อย 1 รายการ หากคุณไม่ได้ตั้งค่าแอตทริบิวต์ใดๆ ระบบจะไม่แสดงราคาห้องพักเป็นขอเงินคืนได้ แอตทริบิวต์ดังกล่าวมีดังนี้
โปรดคำนึงถึงสิ่งต่อไปนี้เมื่อตั้งค่าแอตทริบิวต์
|
<RoomBundle> | Optional | <RoomBundle> |
คอนเทนเนอร์สำหรับข้อมูลเกี่ยวกับรายละเอียดทางกายภาพของห้องพักที่มีการกำหนดราคาไว้ การจัดแพ็กเกจสิ่งอำนวยความสะดวก และรายละเอียดนโยบายการซื้อสำหรับโรงแรมและแผนการเดินทางที่ระบุ
โดยทั่วไปแล้วองค์ประกอบนี้มีไว้เพื่อกำหนดราคาสำหรับห้องพักพื้นฐานและห้องพักประเภทต่างๆ ภายในที่พักเดียวกัน แม้ว่าคุณจะกำหนดคำอธิบายแพ็กเกจห้องพักในบรรทัดได้ แต่คุณควรใช้ข้อความ Transaction แยกต่างหากเพื่อกำหนดข้อมูลดังกล่าว Google จะจัดเก็บข้อมูลเมตาเพื่อให้คุณอ้างอิงข้อมูลนั้นได้ แทนที่จะต้องระบุซ้ำในการอัปเดตราคาในอนาคตทั้งหมด |
<RoomID> | Optional | string | รหัสที่ไม่ซ้ำกันของห้องพักสำหรับแมปกับข้อมูลห้องพักที่กำหนดไว้ล่วงหน้า นอกจากนี้ยังใช้สร้างตัวแปรของหน้า Landing Page สำหรับ PARTNER-ROOM-ID ได้ด้วย
ดูข้อมูลเพิ่มเติมได้ที่ข้อมูลเมตาของแพ็กเกจห้องพัก
คุณต้องใส่ |
<Tax> | Optional | float | ภาษีที่คำนวณสำหรับราคาสุดท้ายของห้องพัก
องค์ประกอบ <Tax> มีแอตทริบิวต์ currency ที่ต้องระบุเพียงรายการเดียว ซึ่งจะกำหนดรหัสสกุลเงิน 3 ตัวอักษรสำหรับภาษี ตัวอย่างเช่น USD ต้องระบุองค์ประกอบ
<Tax> หาก <Baserate> มากกว่า 0
หากตั้งค่าแอตทริบิวต์ "all_inclusive" ขององค์ประกอบ |
<Unavailable> | Optional | Object | ระบุว่าแผนการเดินทางไม่พร้อมให้จอง ใช้เป็น
คอนเทนเนอร์สำหรับเหตุผลโดยละเอียดเพิ่มเติมว่าเหตุใดแผนการเดินทางจึงไม่พร้อมใช้งาน เหตุผลที่ระบุว่าไม่พร้อมให้บริการต่อไปนี้อย่างน้อย 1 รายการอาจซ้อนอยู่ภายใต้แท็ก <Unavailable>
|
ตัวอย่าง
ตัวอย่างที่พักหลายรายการ
ตัวอย่างต่อไปนี้กำหนดแผนการเดินทาง 1 รายการและราคาของแผนดังกล่าวสำหรับที่พัก 2 รายการ
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
<Result>
<Property>060773</Property>
<RoomID>RoomType101</RoomID>
<PackageID>Package101</PackageID>
<Checkin>2018-06-10</Checkin>
<Nights>2</Nights>
<Baserate currency="USD">278.33</Baserate>
<Tax currency="USD">25.12</Tax>
<OtherFees currency="USD">2.00</OtherFees>
<AllowablePointsOfSale>
<PointOfSale id="site1"/>
</AllowablePointsOfSale>
</Result>
<Result>
<Property>052213</Property>
<RoomID>RoomType101</RoomID>
<PackageID>Package101</PackageID>
<Checkin>2018-06-10</Checkin>
<Nights>2</Nights>
<Baserate currency="USD">299.98</Baserate>
<Tax currency="USD">26.42</Tax>
<OtherFees currency="USD">2.00</OtherFees>
<AllowablePointsOfSale>
<PointOfSale id="otto"/>
<PointOfSale id="simon"/>
</AllowablePointsOfSale>
<MilesIncluded>
<NumberOfMiles>1200</NumberOfMiles>
<Provider>
<Text language="en" text="United Airlines"/>
</Provider>
<LoyaltyCampaignID>my_campaign</LoyaltyCampaignID>
</MilesIncluded>
</Result>
</Transaction>
ข้อมูลที่ไม่ปรากฏในตัวอย่างนี้คือรายละเอียดเกี่ยวกับห้องพัก เช่น คำอธิบาย รูปภาพและคำอธิบายภาพ ชื่อห้องพัก และความจุของห้องพัก
คุณกำหนดข้อมูลเหล่านั้นได้ในข้อความ Transaction แยกต่างหากที่ Google จัดเก็บไว้ จากนั้นคุณจะอ้างอิงข้อมูลดังกล่าวในการอัปเดตราคาและห้องว่างครั้งต่อๆ ไปได้ ดูข้อมูลเพิ่มเติมได้ที่ข้อมูลเมตาของแพ็กเกจห้องพัก
ตัวอย่างแบบหลายราคา
ตัวอย่างต่อไปนี้ระบุแผนการเดินทางและที่พักรายการเดียวที่มีราคาการเข้าพักหลายราคา คุณใช้องค์ประกอบ <Rates>
เพื่อกำหนดราคาห้องพักหลายราคาสำหรับที่พักที่เจาะจงได้ ตัวอย่างต่อไปนี้ยังมีประโยชน์สำหรับที่พักให้เช่า (VR) ด้วย
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2020-07-23T16:20:00-04:00" id="42">
<Result>
<Property>1234</Property>
<Checkin>2021-01-13</Checkin>
<Nights>9</Nights>
<Baserate currency="USD">3196.1</Baserate>
<Tax currency="USD">559.49</Tax>
<OtherFees currency="USD">543.34</OtherFees>
<Occupancy>2</Occupancy>
<Rates>
<Rate>
<Baserate currency="USD">3196.1</Baserate>
<Tax currency="USD">559.49</Tax>
<OtherFees currency="USD">543.34</OtherFees>
<Occupancy>1</Occupancy>
</Rate>
<Rate>
<Baserate currency="USD">3196.1</Baserate>
<Tax currency="USD">559.49</Tax>
<OtherFees currency="USD">543.34</OtherFees>
<Occupancy>3</Occupancy>
</Rate>
<Rate>
<Baserate currency="USD">3196.1</Baserate>
<Tax currency="USD">559.49</Tax>
<OtherFees currency="USD">543.34</OtherFees>
<Occupancy>4</Occupancy>
</Rate>
<Rate>
<Baserate currency="USD">3196.1</Baserate>
<Tax currency="USD">559.49</Tax>
<OtherFees currency="USD">543.34</OtherFees>
<Occupancy>5</Occupancy>
</Rate>
<Rate>
<Baserate currency="USD">3196.1</Baserate>
<Tax currency="USD">559.49</Tax>
<OtherFees currency="USD">543.34</OtherFees>
<Occupancy>6</Occupancy>
</Rate>
</Rates>
</Result>
</Transaction>
ตัวอย่างที่ไม่พร้อมใช้งาน
ตัวอย่างต่อไปนี้กำหนดแผนการเดินทาง 1 รายการที่ไม่สามารถดึงข้อมูลความพร้อมให้บริการจากช่องทางดาวน์สตรีมได้ แผนการเดินทางที่ 2 ซึ่งมีระยะเวลาต่ำกว่าคืนขั้นต่ำในการเข้าพักและมีการจองสำหรับวันที่ที่ระบุแล้ว และแผนการเดินทางที่ 3 ซึ่งที่พักปิดทำการในวันที่เข้าพัก แต่เปิดทำการอีกครั้งในระหว่างการเข้าพัก
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
<Result>
<Property>060773</Property>
<Checkin>2018-06-10</Checkin>
<Nights>2</Nights>
<Unavailable>
<NotFetched/>
</Unavailable>
</Result>
<Result>
<Property>073313</Property>
<Checkin>2018-06-10</Checkin>
<Nights>2</Nights>
<Unavailable>
<NoVacancy/>
<MinNightStay value=3/>
</Unavailable>
</Result>
<Result>
<Property>052213</Property>
<Checkin>2018-06-10</Checkin>
<Nights>10</Nights>
<Unavailable>
<PropertyClosed first_open="2018-06-15" first_closed="2018-06-10"/>
</Unavailable>
</Result>
</Transaction>
<Rates>
คอนเทนเนอร์สำหรับบล็อก <Rate>
อย่างน้อย 1 รายการ <Rate>
แต่ละรายการใน <Rates>
จะกำหนดราคาที่แตกต่างกันสำหรับชุดค่าผสมห้องพักหรือแผนการเดินทาง
ใช้องค์ประกอบ <Rates>
เมื่อชุดค่าผสมห้องพักหรือแผนการเดินทางเดียวกันมีหลายราคาเท่านั้น ตัวอย่างเช่น คุณกำหนดราคาสำหรับลูกค้าที่เข้าเกณฑ์ อัตราส่วนลดเฉพาะบุคคล หรือราคาสำหรับลูกค้าที่เข้าเกณฑ์ในแพ็กเกจห้องพักให้เป็นราคาที่แตกต่างกันหลายราคา
องค์ประกอบ <Rates>
จะปรากฏในตำแหน่งต่อไปนี้ในลำดับชั้น XML ของข้อความธุรกรรม
+<Transaction>
+<PropertyDataSet>
// Room and package metadata + <Property> +<RoomData>
+<PackageData>
+<Result>
// Pricing and availability +<Rates>
+<RoomBundle>
(Can also contain<Rates>
) + ...
ค่าที่ตั้งไว้ใน <Rate>
จะลบล้างค่าที่เกี่ยวข้องกับราคาในองค์ประกอบ <Result>
หรือ <RoomBundle>
ระดับบนสุด หากไม่ได้ตั้งค่าไว้ใน <Rate>
ระบบจะรับค่าจากองค์ประกอบระดับบนสุด เฉพาะ
<AllowablePointsofSale> เท่านั้นที่จะรับค่าไปยังองค์ประกอบ <RoomBundle>
ไวยากรณ์
องค์ประกอบ <Rates>
ใช้ไวยากรณ์ต่อไปนี้
<?xml version="1.0" encoding="UTF-8"?> <Transaction ... > <Result> <Rates> <Rate rate_rule_id="rate_rule_id"> <Baserate currency="currency_code">price</Baserate> <Tax currency="currency_code">tax_amount</Tax> <OtherFees currency="currency_code">fee_amount</OtherFees> <ExpirationTime>expiration_time</ExpirationTime> <Refundable available="[false|true]" refundable_until_days="number_of_days" refundable_until_time="time"/> <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency> <AllowablePointsOfSale> <PointOfSale id="landing_page_identifier"/> </AllowablePointsOfSale> <Occupancy>max_number_of_intended_occupants</Occupancy> <OccupancyDetails> <!-- optional info about the types of guests, whether adults or children --></OccupancyDetails> ... <MilesIncluded> <NumberOfMiles>integer</NumberOfMiles> <Provider> <Text language="en" text="provider-name"> </Provider> <LoyaltyCampaignID>campaign_ID</LoyaltyCampaignID> </MilesIncluded> ... </Rate> ... </Rates> </Result> ... </Transaction>
Attributes
องค์ประกอบ <Rates>
มีแอตทริบิวต์ต่อไปนี้
แอตทริบิวต์ | จำเป็นหรือไม่ | คำอธิบาย |
---|---|---|
rate_rule_id | Optional | สำหรับ ราคาสำหรับลูกค้าที่เข้าเกณฑ์ รหัสนี้จะจับคู่ราคากับคำจำกัดความใน ไฟล์คำจำกัดความกฎเกี่ยวกับอัตรา จำนวนอักขระสูงสุดสำหรับช่องนี้คือ 40 ตัว |
องค์ประกอบลูก
องค์ประกอบ <Rates>
มีองค์ประกอบย่อยต่อไปนี้
องค์ประกอบย่อย | จำเป็นหรือไม่ | ประเภท | คำอธิบาย |
---|---|---|---|
<AllowablePointsOfSale> | Optional | Object | หน้า Landing Page อย่างน้อย 1 หน้าที่มีสิทธิ์สำหรับโรงแรม องค์ประกอบนี้จะใช้ไวยากรณ์เดียวกันกับ <AllowablePointsOfSale> ใน <Result> |
<Baserate> | Required | float | ราคาห้องพักสำหรับการเข้าพัก องค์ประกอบนี้จะใช้ไวยากรณ์เดียวกันกับ <Baserate> ใน <Result>
หมายเหตุ: คุณไม่สามารถกำหนดองค์ประกอบย่อย |
<ChargeCurrency> | Optional | enum | รูปแบบและช่วงเวลาที่ผู้ใช้ชำระเงินสำหรับการจอง องค์ประกอบนี้จะใช้ไวยากรณ์เดียวกันกับ <ChargeCurrency> ใน <Result> |
Optional | string | เลิกใช้งานแล้ว: ช่องที่กำหนดเองที่คุณใช้ส่งข้อมูลเพิ่มเติมที่เชื่อมโยงกับโรงแรมไปยังหน้า Landing Page ได้ องค์ประกอบนี้จะใช้ไวยากรณ์เดียวกันกับ <Custom[1‑5]> ใน <Result> ช่องที่กำหนดเองแต่ละช่องจะมีอักขระได้ไม่เกิน 200 ตัว ดูข้อมูลเพิ่มเติมได้ที่
ไฟล์หน้า Landing Page หากระบุองค์ประกอบ <Custom> ในองค์ประกอบ <Result> องค์ประกอบดังกล่าวจะไม่ได้รับการสืบทอดในองค์ประกอบ <RoomBundle> และควรมีการกำหนดแยกกันสำหรับ <RoomBundle> แต่ละรายการ หรือจะรวมไว้ใน <PackageData> ก็ได้หากจำเป็น
สำคัญ: โปรดติดต่อผู้จัดการลูกค้าด้านเทคนิค (TAM) หากต้องการใช้ตัวแปร |
|
<ExpirationTime> | Optional | DateTime | วันที่และเวลาที่ถือว่าราคาหมดอายุ องค์ประกอบนี้จะใช้ไวยากรณ์เดียวกันกับ <ExpirationTime> ใน <Result> |
<MilesIncluded> | Optional | boolean | ราคาห้องพักรวมการสะสมไมล์ โดยประกอบไปด้วยพารามิเตอร์เหล่านี้
หมายเหตุ: |
<Occupancy> | Optional | integer | ระบุจำนวนผู้เข้าพักสูงสุดที่อนุญาตสำหรับราคานี้ หากไม่ได้ระบุ ระบบจะถือว่าเหมือนกับราคาหลัก
|
<OtherFees> | Required | float | ค่าธรรมเนียมอื่นๆ นอกเหนือจากราคาฐานและภาษีที่มีผลต่อราคาสุดท้ายของห้องพัก องค์ประกอบนี้จะใช้ไวยากรณ์เดียวกันกับ <OtherFees> ใน <Result>
หากตั้งค่าแอตทริบิวต์ "all_inclusive" ขององค์ประกอบ |
<Refundable> | Optional | Object | แสดงข้อมูลราคาห้องพักที่ขอเงินคืนได้เต็มจำนวนหรือไม่มีค่าธรรมเนียมการยกเลิก หากไม่ได้ระบุไว้ ระบบจะไม่แสดงข้อมูลเกี่ยวกับการคืนเงิน
นโยบายการคืนเงินที่ระดับ <PackageData> จะลบล้างนโยบายการคืนเงินที่ระดับ <Result> นโยบายการคืนเงินที่ระดับ <Rates> จะลบล้างนโยบายการคืนเงินที่ระดับ <PackageData> นอกจากนี้ คุณยังไฮไลต์ราคาห้องพักที่ขอเงินคืนได้เพื่อแสดงต่อผู้ใช้ผ่านตัวเลือกอื่นๆ โดยไม่ต้องแก้ไขสคีมาข้อความธุรกรรมโดยตรง ดูข้อมูลเพิ่มเติมเกี่ยวกับตัวเลือกเหล่านี้
นโยบายเกี่ยวกับราคาที่คืนเงินได้
ตัวอย่างต่อไปนี้แสดงองค์ประกอบ <Refundable available="1" refundable_until_days="7" refundable_until_time="18:00:00"/> หมายเหตุ: เราขอแนะนำให้ตั้งค่าแอตทริบิวต์ทั้งหมด ระบบจะสร้างข้อความเตือนสถานะฟีดเมื่อไม่ได้ตั้งค่าแอตทริบิวต์อย่างน้อย 1 รายการ หากคุณไม่ได้ตั้งค่าแอตทริบิวต์ใดๆ ระบบจะไม่แสดงราคาห้องพักเป็นขอเงินคืนได้ แอตทริบิวต์ดังกล่าวมีดังนี้
โปรดคำนึงถึงสิ่งต่อไปนี้เมื่อตั้งค่าแอตทริบิวต์
|
<Tax> | Required | float | ภาษีที่คำนวณสำหรับราคาสุดท้ายของห้องพัก องค์ประกอบนี้จะใช้ไวยากรณ์เดียวกันกับ <Tax> ใน <Result> |
ตัวอย่าง
ราคาฐานและราคาสำหรับลูกค้าที่เข้าเกณฑ์
ตัวอย่างต่อไปนี้แสดงข้อความ Transaction ที่มีราคาฐานและราคาสำหรับลูกค้าที่เข้าเกณฑ์
<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
<Result>
<Property>1234</Property>
<Checkin>2023-04-10</Checkin>
<Nights>1</Nights>
<Baserate currency="USD">200.00</Baserate>
<Tax currency="USD">20.00</Tax>
<OtherFees currency="USD">1.00</OtherFees>
<Rates>
<!-- The rate_rule_id is required when using conditional rates -->
<Rate rate_rule_id="mobile">
<!-- Override base rate and taxes for conditional rates -->
<Baserate currency="USD">180.00</Baserate>
<Tax currency="USD">18.00</Tax>
</Rate>
</Rates>
</Result>
</Transaction>
ราคาสำหรับลูกค้าที่เข้าเกณฑ์หลายราคา
ตัวอย่างต่อไปนี้กำหนดราคาฐานและราคาสำหรับลูกค้าที่เข้าเกณฑ์หลายรายการภายใน <RoomBundle>
<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
<Result>
<Property>1234</Property>
<Checkin>2023-04-10</Checkin>
<Nights>2</Nights>
<!-- When Google receives new room bundle information for an itinerary, all
previous room bundle pricing is dropped from Google's cache. Thus, if you
want to delete a specific room bundle from Google's cache, you may do so
by simply not providing that specific room bundle in subsequent transaction
messages. -->
<RoomBundle>
...
<!-- RoomID is required, PackageID is recommended. -->
<RoomID>5</RoomID>
<PackageID>ABC</PackageID>
<!-- Baserate is required. -->
<Baserate currency="USD">275.00</Baserate>
<Tax currency="USD">27.50</Tax>
<OtherFees currency="USD">2.00</OtherFees>
<!-- RatePlanID is optional and represents the unique identifier for a
room and package data combination. We strongly recommend using RatePlanID
as a variable to build your dynamic landing page (formerly Point of Sale)
URL. For details, see Using Variables and Conditions. -->
<RatePlanID>5-ABC</RatePlanID>
<!-- Occupancy is mandatory for RoomBundle elements. -->
<!-- Elements below will get inherited to nested rate elements. -->
<Occupancy>2</Occupancy>
<OccupancyDetails>
<NumAdults>2</NumAdults>
</OccupancyDetails>
<InternetIncluded>1</InternetIncluded>
<!-- Rate rule "mobile" overrides chargeCurrency, "us_or_gb" doesn't. -->
<ChargeCurrency>web</ChargeCurrency>
<Rates>
<Rate rate_rule_id="mobile">
<Baserate currency="USD">258.33</Baserate>
<Tax currency="USD">25.83</Tax>
<OtherFees currency="USD">1.00</OtherFees>
<!-- The value below overrides ChargeCurrency from roombundle. -->
<ChargeCurrency>hotel</ChargeCurrency>
</Rate>
<Rate rate_rule_id="us_or_gb">
<Baserate currency="USD">268.33</Baserate>
<Tax currency="USD">26.83</Tax>
<OtherFees currency="USD">1.00</OtherFees>
</Rate>
</Rates>
</RoomBundle>
</Result>
</Transaction>
<RoomBundle>
กำหนดราคาและความพร้อมให้บริการสำหรับแพ็กเกจห้องพักเป็นรายการย่อยของ <Result>
ในข้อความ <Transaction>
กำหนดองค์ประกอบแยกต่างหากสำหรับชุดค่าผสมของแพ็กเกจหรือแผนการเดินทางแต่ละรายการ หากต้องการกำหนดแพ็กเกจและข้อกำหนดของแพ็กเกจห้องพัก ให้ใช้ <RoomData>
องค์ประกอบ <RoomBundle>
จะปรากฏในตำแหน่งต่อไปนี้ในลำดับชั้น XML ของข้อความธุรกรรม
+<Transaction>
+<PropertyDataSet>
// Room and package metadata + <Property> +<RoomData>
+<PackageData>
+<Result>
// Pricing and availability +<Rates>
+<RoomBundle>
+ ...
ดูข้อมูลเพิ่มเติมได้ที่การใช้แพ็กเกจห้องพัก
ไวยากรณ์
องค์ประกอบ <RoomBundle>
ใช้ไวยากรณ์ต่อไปนี้
<?xml version="1.0" encoding="UTF-8"?> <Transaction ... > <Result> ... <RoomBundle> <!-- Required unless specified inline under<RoomData>
--> <RoomID>room_ID</RoomID> <!-- Required<PackageData>
--> <PackageID>package_ID</PackageID> <!-- Add Loyalty point information --> <MilesIncluded> <NumberOfMiles>integer</NumberOfMiles> <Provider> <Text language="en" text="provider-name"> </Provider> <LoyaltyCampaignID>campaign_ID</LoyaltyCampaignID>> </MilesIncluded> <!-- Required --> <Baserate currency="currency_code">price</Baserate> <!-- Required --> <Tax currency="currency_code">taxes</Tax> <!-- Required --> <OtherFees currency="currency_code">other_fees</OtherFees> <Refundable available="[false|true]" refundable_until_days="number_of_days" refundable_until_time="time"/> <!-- Required --> <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency> <Occupancy>max_number_of_intended_occupants</Occupancy> <OccupancyDetails> <!-- optional info about the types of guests, whether adults or children --></OccupancyDetails> <BreakfastIncluded>boolean_value</BreakfastIncluded> <InternetIncluded>boolean_value</InternetIncluded> <ParkingIncluded>boolean_value</ParkingIncluded> <RatePlanID>rate_plan_ID</RatePlanID> <Rates>...</Rates> </RoomBundle> ... </Result> </Transaction>
Attributes
องค์ประกอบ <RoomBundle>
ไม่มีแอตทริบิวต์
องค์ประกอบลูก
องค์ประกอบ <RoomBundle>
มีองค์ประกอบย่อยต่อไปนี้
องค์ประกอบย่อย | จำเป็นหรือไม่ | ประเภท | คำอธิบาย |
---|---|---|---|
<Baserate> | Required | float | กำหนดราคาของแพ็กเกจห้องพักสำหรับการเข้าพัก องค์ประกอบนี้จะใช้ไวยากรณ์เดียวกันกับ <Baserate> ใน <Result> โดยมีข้อยกเว้นดังนี้
|
<BreakfastIncluded> | Optional | boolean | ระบุว่าแพ็กเกจห้องพักในราคานี้รวมอาหารเช้าหรือไม่ |
<ChargeCurrency> | Optional | enum | รูปแบบและช่วงเวลาที่ผู้ใช้ชำระเงินสำหรับการจอง องค์ประกอบนี้จะใช้ไวยากรณ์เดียวกันกับ <ChargeCurrency> ใน <Result>
ค่าเริ่มต้นคือ |
Optional | string | เลิกใช้งานแล้ว: ช่องที่กำหนดเองสำหรับส่งข้อมูลเพิ่มเติมไปยังหน้า Landing Page ของแพ็กเกจห้องพัก องค์ประกอบนี้จะใช้ไวยากรณ์เดียวกันกับ <Custom[1-5]> ใน <Result> ช่องที่กำหนดเองแต่ละช่องจะมีอักขระได้ไม่เกิน 200 ตัว ดูข้อมูลเพิ่มเติมได้ที่ไฟล์หน้า Landing Page
ตัวแปรที่กำหนดเองจะแสดงเมื่อคุณส่งราคาในข้อความธุรกรรมเท่านั้น หากระบุองค์ประกอบ <Custom> ในองค์ประกอบ <Result> องค์ประกอบดังกล่าวจะไม่ได้รับการสืบทอดในองค์ประกอบ <RoomBundle> และควรมีการกำหนดแยกกันสำหรับ <RoomBundle> แต่ละรายการ หรือจะรวมไว้ใน <PackageData> ก็ได้หากจำเป็น
สำคัญ: โปรดติดต่อผู้จัดการลูกค้าด้านเทคนิค (TAM) หากต้องการใช้ตัวแปร |
|
<InternetIncluded> | Optional | boolean | แพ็กเกจห้องพักมีการเข้าถึงอินเทอร์เน็ตโดยไม่มีค่าใช้จ่าย ขณะที่แพ็กเกจอื่นๆ ไม่รวมสิ่งอำนวยความสะดวกนี้ อย่าตั้งค่าองค์ประกอบนี้สำหรับแพ็กเกจห้องพักในโรงแรมที่ให้บริการอินเทอร์เน็ตฟรีสำหรับห้องพักทุกห้อง องค์ประกอบนี้ใช้ไม่ได้กับอินเทอร์เน็ตแบบใช้สายในห้องพักหรืออินเทอร์เน็ตแบบไร้สายที่ไม่ได้ให้บริการในห้องพักของแขก |
<MilesIncluded> | Optional | boolean | ราคาห้องพักรวมการสะสมไมล์ โดยประกอบไปด้วยพารามิเตอร์เหล่านี้
หมายเหตุ: |
<Occupancy> | Required | integer | ระบุจำนวนผู้เข้าพักสูงสุดที่อนุญาตสำหรับราคานี้ ตัวอย่างเช่น ห้องสวีทขนาดใหญ่อาจรองรับแขกได้จริง 6 คน แต่ "แพ็กเกจฮันนีมูน" กำหนดจำนวนแขกไว้ที่ 2 คนเท่านั้น
ค่านี้ต้องน้อยกว่าหรือเท่ากับ เมื่อกำหนดอัตราการเข้าพักใน URL ของหน้า Landing Page ให้ใช้ตัวแปร ค่าของ หมายเหตุ
|
<OtherFees> | Required | float | ค่าธรรมเนียมอื่นๆ นอกเหนือจากราคาฐานและภาษีที่มีผลต่อราคาสุดท้ายของห้องพัก องค์ประกอบ <OtherFees> มีแอตทริบิวต์ currency ที่ต้องระบุเพียงรายการเดียว ซึ่งจะกำหนดรหัสสกุลเงิน 3 ตัวอักษรสำหรับค่าธรรมเนียม เช่น ใช้
USD สำหรับดอลลาร์สหรัฐ |
<PackageID> | Optional (recommended) | string | รหัสที่ไม่ซ้ำกันของข้อมูลแพ็กเกจ ใช้รหัสนี้เพื่อจับคู่ข้อมูลแพ็กเกจห้องพักกับข้อมูลที่ส่งใน <PackageData> ดูข้อมูลเพิ่มเติมได้ที่ข้อมูลเมตาของแพ็กเกจห้องพัก (คุณยังใช้รหัสนี้เพื่ออ้างอิงคำจำกัดความของแพ็กเกจห้องพักทั่วไปที่ใช้ในข้อความ Transaction รายการเดียวเมื่อกำหนดข้อมูลแพ็กเกจห้องพักในบรรทัดได้ด้วย) |
<ParkingIncluded> | Optional | boolean | ระบุว่าแพ็กเกจห้องพักมีที่จอดรถฟรีหรือไม่ ซึ่งหากไม่เป็นเช่นนั้นก็จะหมายความว่าโรงแรมนี้มีการเรียกเก็บค่าที่จอดรถ อย่าระบุค่าขององค์ประกอบนี้สำหรับโรงแรมที่มีบริการที่จอดรถฟรี
ค่าที่ใช้ได้คือ |
<RatePlanID> | Optional | string | รหัสแพ็กเกจราคาจะแสดงตัวระบุที่ไม่ซ้ำกันสำหรับชุดค่าผสมของห้องพักและแพ็กเกจ ตัวอย่างเช่น หากกำหนดค่า <RoomID> เป็น 5 และค่า <PackageID> เป็น ABC คุณใช้ค่า 5-ABC สำหรับ <RatePlanID> ได้ เราขอแนะนำให้ใช้ RatePlanID เป็นตัวแปรในการสร้าง URL ของหน้า Landing Page แบบไดนามิก (ก่อนหน้านี้เรียกว่าจุดขาย)
ดูข้อมูลเพิ่มเติมได้ที่การใช้ตัวแปรและ เงื่อนไข |
<Rates> | Optional | <Rates> |
ราคาห้องพักที่ลบล้างค่าเริ่มต้นสำหรับแพ็กเกจห้องพักนี้ องค์ประกอบนี้จะใช้ไวยากรณ์เดียวกันกับ <Rates> ใน <Result> |
<Refundable> | Optional | Object | แสดงข้อมูลราคาห้องพักที่ขอเงินคืนได้เต็มจำนวนหรือไม่มีค่าธรรมเนียมการยกเลิก หากไม่ได้ระบุไว้ ระบบจะไม่แสดงข้อมูลเกี่ยวกับการคืนเงิน
นโยบายการคืนเงินที่ระดับ <PackageData> จะลบล้างนโยบายการคืนเงินที่ระดับ <Result> นโยบายการคืนเงินที่ระดับ <Rates> จะลบล้างนโยบายการคืนเงินที่ระดับ <PackageData> นอกจากนี้ คุณยังไฮไลต์ราคาห้องพักที่ขอเงินคืนได้เพื่อแสดงต่อผู้ใช้ผ่านตัวเลือกอื่นๆ โดยไม่ต้องแก้ไขสคีมาข้อความธุรกรรมโดยตรง ดูข้อมูลเพิ่มเติมเกี่ยวกับตัวเลือกเหล่านี้
นโยบายเกี่ยวกับราคาที่คืนเงินได้
ตัวอย่างต่อไปนี้แสดงองค์ประกอบ <Refundable available="1" refundable_until_days="7" refundable_until_time="18:00:00"/> หมายเหตุ: เราขอแนะนำให้ตั้งค่าแอตทริบิวต์ทั้งหมด ระบบจะสร้างข้อความเตือนสถานะฟีดเมื่อไม่ได้ตั้งค่าแอตทริบิวต์อย่างน้อย 1 รายการ หากคุณไม่ได้ตั้งค่าแอตทริบิวต์ใดๆ ระบบจะไม่แสดงราคาห้องพักเป็นขอเงินคืนได้ แอตทริบิวต์ดังกล่าวมีดังนี้
โปรดคำนึงถึงสิ่งต่อไปนี้เมื่อตั้งค่าแอตทริบิวต์
|
<RoomID> | Required | string | รหัสที่ไม่ซ้ำกันสำหรับข้อมูลห้องพัก ใช้รหัสนี้เพื่อจับคู่ข้อมูลแพ็กเกจห้องพักกับข้อมูลที่ส่งใน <RoomData>
ดูข้อมูลเพิ่มเติมได้ที่
ข้อมูลเมตาของแพ็กเกจห้องพัก (คุณยังใช้รหัสนี้เพื่ออ้างอิงคำจำกัดความของห้องพักทั่วไปในข้อความ Transaction รายการเดียวเมื่อกำหนดข้อมูลห้องพักในบรรทัดได้ด้วย) |
<Tax> | Required | float | ภาษีที่คำนวณสำหรับราคาสุดท้ายของห้องพัก
องค์ประกอบ <Tax> มีแอตทริบิวต์ currency ที่ต้องระบุเพียงรายการเดียว ซึ่งจะกำหนดรหัสสกุลเงิน 3 ตัวอักษรสำหรับภาษี เช่น ใช้ USD สำหรับดอลลาร์สหรัฐ |
ตัวอย่าง
แพ็กเกจสำหรับอัตราการเข้าพักคนเดียว
ตัวอย่างต่อไปนี้กำหนดการตอบกลับด้วยแพ็กเกจห้องพักแบบเดี่ยว
เมื่อผู้ใช้เลือก 1
ในเครื่องมือเลือกอัตราการเข้าพัก Google จะแสดงราคาต่ำสุดที่มีสิทธิ์โดยไม่คำนึงถึงอัตราการเข้าพัก
หากไม่ได้ระบุราคาสำหรับห้องพักแบบเดี่ยว Google จะแสดงราคาต่ำสุดสำหรับห้องพักแบบคู่ โปรดทราบว่าระบบจะไม่ส่งคำขอข้อมูลราคาสำหรับห้องพักแบบเดี่ยว หากมีการแคชราคาสำหรับห้องพักแบบคู่หรือมากกว่านั้นสำหรับแผนการเดินทาง
ตัวอย่างนี้อ้างอิงข้อมูลเมตาของห้องพักและแพ็กเกจที่กำหนดไว้ล่วงหน้าที่มีองค์ประกอบ <RoomID>
และ <PackageID>
ใช้องค์ประกอบ <RoomData>
และ <PackageData>
เพื่อกำหนดข้อมูลดังกล่าว
<!-- Efficient method of defining Room Bundles-->
<!----- Occupancy of 1 example ----->
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="12345678">
<!-- Part1: Define RoomData and PackageData in PropertyDataSet -->
<!-- Note: Once defined it does not have to be repeated for future
Transaction Messages.
PropertyDataSets can also be defined and sent in their own
Transaction Message separately from pricing. Google can be
configured to pull just PropertyDataSets once per day
(or on a predefined frequency). -->
<PropertyDataSet>
<Property>180054</Property>
<!-- Can be reused by multiple Room Bundles -->
<RoomData>
<RoomID>060773</RoomID>
<Name>
<Text text="Single Queen Room - Non-Smoking" language="en"/>
<Text text="Chambre de la Roi Premium - Pas de Fumeurs" language="fr"/>
</Name>
<!-- Room can accommodate up to 4, but package data specifies occupancy
between 1 to 4 -->
<Capacity>4</Capacity>
</RoomData>
<RoomData>
<RoomID>436233</RoomID>
<Name>
<Text text="Premium King Room - Non-Smoking" language="en"/>
<Text text="Chambre de le Roi Premium - Pas de Fumeurs" language="fr"/>
</Name>
<Capacity>4</Capacity>
</RoomData>
<!-- Can be reused by multiple Room Bundles -->
<PackageData>
<PackageID>P11111</PackageID>
<Occupancy>1</Occupancy>
<ChargeCurrency>web</ChargeCurrency>
<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>
<ParkingIncluded>1</ParkingIncluded>
<InternetIncluded>1</InternetIncluded>
</PackageData>
<PackageData>
<PackageID>P54321</PackageID>
<Occupancy>2</Occupancy>
<ChargeCurrency>web</ChargeCurrency>
<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>
<ParkingIncluded>1</ParkingIncluded>
<InternetIncluded>1</InternetIncluded>
</PackageData>
<PackageData>
<PackageID>P12345</PackageID>
<Occupancy>4</Occupancy>
<ChargeCurrency>web</ChargeCurrency>
<Refundable available="1" refundable_until_days="1"
refundable_until_time="18:00:00"/>
<ParkingIncluded>1</ParkingIncluded>
<InternetIncluded>1</InternetIncluded>
</PackageData>
</PropertyDataSet>
<!-- Efficient method of defining Room Bundles -->
<!-- Part 2: Reference RoomData and PackageData through ID -->
<Result>
<!-- Single occupancy pricing will be specified in a room bundle below -->
<Property>180054</Property>
<Checkin>2017-10-07</Checkin>
<Nights>2</Nights>
<!-- Base Room Bundle -->
<RoomBundle>
<RoomID>060773</RoomID>
<PackageID>P54321</PackageID>
<Baserate currency="USD">199.99</Baserate>
<Tax currency="USD">25.12</Tax>
<OtherFees currency="USD">2.00</OtherFees>
<RatePlanID>060773-P54321</RatePlanID>
</RoomBundle>
<RoomBundle>
<RoomID>060773</RoomID>
<PackageID>P11111</PackageID>
<!-- Price for 1 ("occupancy") is the lowest price and will be
displayed -->
<Baserate currency="USD">174.99</Baserate>
<Tax currency="USD">22.08</Tax>
<OtherFees currency="USD">2.00</OtherFees>
<RatePlanID>060773-P11111</RatePlanID>
</RoomBundle>
<!-- Premium Room Bundle -->
<RoomBundle>
<RoomID>436233</RoomID>
<PackageID>P12345</PackageID>
<!-- Price for 4 ("occupancy"), any eligible room bundle with 1 or more
occupancy will be displayed-->
<Baserate currency="USD">298.88</Baserate>
<Tax currency="USD">42.12</Tax>
<OtherFees currency="USD">10.00</OtherFees>
<RatePlanID>436233-P12345</RatePlanID>
</RoomBundle>
<!-- ..Continue providing all available RoomBundle rates under matched
property for 1 or more occupancies..-->
</Result>
</Transaction>
การเข้าพัก 2 คนขึ้นไป
ตัวอย่างต่อไปนี้กำหนดการตอบกลับที่มีอัตราการเข้าพัก 2 คนขึ้นไป
ตัวอย่างนี้อ้างอิงข้อมูลเมตาของห้องพักและแพ็กเกจที่กำหนดไว้ล่วงหน้าที่มีองค์ประกอบ <RoomID>
และ <PackageID>
ใช้องค์ประกอบ <RoomData>
และ <PackageData>
เพื่อกำหนดข้อมูลดังกล่าว
<!-- Efficient method of defining Room Bundles-->
<!----- Occupancy of 3 example ----->
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="12345678">
<!-- Efficient method of defining Room Bundles-->
<!-- Part1: Define RoomData and PackageData in PropertyDataSet -->
<PropertyDataSet>
<Property>180054</Property>
<!-- Can be reused by multiple Room Bundles -->
<RoomData>
<RoomID>060773</RoomID>
<Name>
<Text text="Single Queen Room - Non-Smoking" language="en"/>
<Text text="Chambre de la Roi Premium - Pas de Fumeurs" language="fr"/>
</Name>
<!-- Room can accommodate up to 4, but package data specifies occupancy
between 1 to 4 -->
<Capacity>4</Capacity>
</RoomData>
<RoomData>
<RoomID>436233</RoomID>
<Name>
<Text text="Premium King Room - Non-Smoking" language="en"/>
<Text text="Chambre de le Roi Premium - Pas de Fumeurs" language="fr"/>
</Name>
<Capacity>4</Capacity>
</RoomData>
<!-- Can be reused by multiple Room Bundles -->
<PackageData>
<PackageID>P33333</PackageID>
<Occupancy>3</Occupancy>
<ChargeCurrency>web</ChargeCurrency>
<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>
<ParkingIncluded>1</ParkingIncluded>
<InternetIncluded>1</InternetIncluded>
</PackageData>
<PackageData>
<PackageID>P12345</PackageID>
<Occupancy>4</Occupancy>
<ChargeCurrency>web</ChargeCurrency>
<Refundable available="1" refundable_until_days="1"
refundable_until_time="18:00:00"/>
<ParkingIncluded>1</ParkingIncluded>
<InternetIncluded>1</InternetIncluded>
</PackageData>
</PropertyDataSet>
<Result>
<Property>180054</Property>
<Checkin>2017-10-07</Checkin>
<Nights>2</Nights>
<!-- Efficient method of defining Room Bundles -->
<!-- Part 2: Reference RoomData and PackageData through ID -->
<!-- Base Room Bundle -->
<RoomBundle>
<!-- Baserate above and attributes must match atleast one room bundle
below -->
<RoomID>060773</RoomID>
<PackageID>P33333</PackageID>
<Baserate currency="USD">499.99</Baserate>
<Tax currency="USD">55.12</Tax>
<OtherFees currency="USD">22.00</OtherFees>
</RoomBundle>
<!-- Premium Room Bundle -->
<RoomBundle>
<RoomID>436233</RoomID>
<PackageID>P12345</PackageID>
<!-- Lowest price for 3 ("occupancy"), shown below, will be displayed -->
<Baserate currency="USD">598.88</Baserate>
<Tax currency="USD">62.12</Tax>
<OtherFees currency="USD">30.00</OtherFees>
</RoomBundle>
<!-- ..Continue providing all available RoomBundle rates under matched
property for 2 or more occupancies..-->
</Result>
</Transaction>
แพ็กเกจห้องพักหลายห้อง
ตัวอย่างต่อไปนี้กำหนดอัตราการเข้าพักในแพ็กเกจห้องพักหลายรายการเพื่อแสดงราคาที่เป็นไปได้ของห้องพักในโฮสเทล
<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
<Result>
...
<!-- Suite Room Bundle -->
<RoomBundle>
<RoomID>suite1</RoomID>
<PackageID>standard</PackageID>
<Occupancy>2</Occupancy>
<!-- Price for room -->
<Baserate currency="USD">80.00</Baserate>
<Tax currency="USD">5.12</Tax>
<OtherFees currency="USD">2.00</OtherFees>
<RoomData>
<Name>
<Text text="Suite for 2" language="en"/>
</Name>
</RoomData>
</RoomBundle>
<!-- Small Dorm Room Bundle -->
<RoomBundle>
<RoomID>small_dorm</RoomID>
<PackageID>economy</PackageID>
<Occupancy>1</Occupancy>
<!-- Price per bed -->
<Baserate currency="USD">35.00</Baserate>
<Tax currency="USD">3.50</Tax>
<OtherFees currency="USD">2.00</OtherFees>
<RoomData>
<Name>
<Text text="1 bed in small dorm" language="en"/>
</Name>
</RoomData>
</RoomBundle>
<!-- Large Dorm Room Bundle -->
<RoomBundle>
<RoomID>large_dorm</RoomID>
<PackageID>economy</PackageID>
<Occupancy>1</Occupancy>
<!-- Price per bed -->
<Baserate currency="USD">20.00</Baserate>
<Tax currency="USD">2.50</Tax>
<OtherFees currency="USD">2.00</OtherFees>
<RoomData>
<Name>
<Text text="1 bed in large dorm" language="en"/>
</Name>
</RoomData>
</RoomBundle>
...
</Result>
</Transaction>
ราคาสำหรับลูกค้าที่เข้าเกณฑ์หลายรายการ
ตัวอย่างต่อไปนี้กำหนดราคาฐานและราคาสำหรับลูกค้าที่เข้าเกณฑ์หลายรายการภายใน <RoomBundle>
<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
<Result>
<Property>1234</Property>
<Checkin>2023-04-10</Checkin>
<Nights>2</Nights>
<!-- When Google receives new room bundle information for an itinerary, all
previous room bundle pricing is dropped from Google's cache. Thus, if you
want to delete a specific room bundle from Google's cache, you may do so
by simply not providing that specific room bundle in subsequent transaction
messages. -->
<RoomBundle>
...
<!-- RoomID is required, PackageID is recommended. -->
<RoomID>5</RoomID>
<PackageID>ABC</PackageID>
<!-- Baserate is required. -->
<Baserate currency="USD">275.00</Baserate>
<Tax currency="USD">27.50</Tax>
<OtherFees currency="USD">2.00</OtherFees>
<!-- RatePlanID is optional and represents the unique identifier for a
room and package data combination. We strongly recommend using RatePlanID
as a variable to build your dynamic landing page (formerly Point of Sale)
URL. For details, see Using Variables and Conditions. -->
<RatePlanID>5-ABC</RatePlanID>
<!-- Occupancy is mandatory for RoomBundle elements. -->
<!-- Elements below will get inherited to nested rate elements. -->
<Occupancy>2</Occupancy>
<OccupancyDetails>
<NumAdults>2</NumAdults>
</OccupancyDetails>
<InternetIncluded>1</InternetIncluded>
<!-- Rate rule "mobile" overrides chargeCurrency, "us_or_gb" doesn't. -->
<ChargeCurrency>web</ChargeCurrency>
<Rates>
<Rate rate_rule_id="mobile">
<Baserate currency="USD">258.33</Baserate>
<Tax currency="USD">25.83</Tax>
<OtherFees currency="USD">1.00</OtherFees>
<!-- The value below overrides ChargeCurrency from roombundle. -->
<ChargeCurrency>hotel</ChargeCurrency>
</Rate>
<Rate rate_rule_id="us_or_gb">
<Baserate currency="USD">268.33</Baserate>
<Tax currency="USD">26.83</Tax>
<OtherFees currency="USD">1.00</OtherFees>
</Rate>
</Rates>
</RoomBundle>
</Result>
</Transaction>
<OccupancyDetails>
<Occupancy>
ในข้อความธุรกรรมจะระบุจำนวนแขกสูงสุดสำหรับห้องพักหรือแพ็กเกจ <OccupancyDetails>
อาจมีข้อมูลเพิ่มเติม เช่น จำนวนและประเภทของแขก (ผู้ใหญ่หรือเด็ก)
เมื่อ <Occupancy>
และ <OccupancyDetails>
ปรากฏในองค์ประกอบ <Rates>
ของ <Result>
หรือ <RoomBundle>
แสดงว่าราคาดังกล่าวถูกจำกัดโดย
รายละเอียดอัตราการเข้าพัก
หากคุณใส่ <OccupancyDetails>
ใน <RoomBundle>
พร้อมกับองค์ประกอบ <Rate>
ที่ซ้อนกัน คุณจะส่ง <Occupancy>
พื้นฐานภายใน <Rate>
ไม่ได้
แต่เราขอแนะนำให้ใช้ตัวเลือกใดตัวเลือกหนึ่งต่อไปนี้แทน
- ละเว้นอัตราการเข้าพักจาก
<Rate>
: ในกรณีนี้<Rate>
จะรับค่า<OccupancyDetails>
โดยตรงจาก<RoomBundle>
หรือ
- ทำซ้ำ
<OccupancyDetails>
: ในกรณีนี้ ให้ส่ง<OccupancyDetails>
ที่เหมือนกันเพิ่มเติม ทั้งในองค์ประกอบ<RoomBundle>
และ<Rate>
ที่ซ้อนกัน
ไวยากรณ์
เมื่อ <OccupancyDetails>
ปรากฏขึ้น จะมี <Occupancy>
นำหน้าเสมอ
โปรดสังเกตไวยากรณ์ต่อไปนี้
<?xml version="1.0" encoding="UTF-8"?> <Transaction ... > <Result> ... <Occupancy>max_number_of_intended_occupants</Occupancy> <OccupancyDetails> <NumAdults>number_of_adults</NumAdults> <Children> <Child age=age_of_one_child_guest/> <Child age=age_of_one_child_guest/> </Children> </OccupancyDetails> </Result> </Transaction>
องค์ประกอบลูก
องค์ประกอบ <OccupancyDetails>
มีองค์ประกอบย่อยต่อไปนี้
องค์ประกอบย่อย | จำเป็นหรือไม่ | ประเภท | คำอธิบาย |
---|---|---|---|
<NumAdults> | Required | integer | จำนวนแขกที่เป็นผู้ใหญ่ ต่ำสุด:1 คน สูงสุด:20 คน |
<Children> | Optional | Object | คอนเทนเนอร์สำหรับองค์ประกอบ <Child> อย่างน้อย 1 รายการ |
<Child age> | Optional | integer | อายุสูงสุดของเด็ก เช่น <Child age="17"> |
ตัวอย่าง
ตัวอย่างต่อไปนี้แสดงลักษณะที่ <OccupancyDetails>
อาจปรากฏภายใน
<Results>
, <RoomBundle>
หรือองค์ประกอบย่อย <Rates>
การตอบกลับผลลัพธ์
ตัวอย่างต่อไปนี้กำหนดแผนการเดินทาง 1 รายการและราคาของแผนดังกล่าวสำหรับที่พัก 1 แห่ง เพื่อตอบสนองคำขอข้อมูลราคาแบบเรียลไทม์ซึ่งผู้ใช้ระบุจำนวนและประเภทของแขก ในตัวอย่างนี้ <OccupancyDetails>
คือผู้ใหญ่ 2 คนและเด็ก 1 คนซึ่งจะแสดงผลใน <Result>
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
<Result>
<Property>060773</Property>
<RoomID>RoomType101</RoomID>
<PackageID>Package101</PackageID>
<Checkin>2018-06-10</Checkin>
<Nights>2</Nights>
<Baserate currency="USD">278.33</Baserate>
<Tax currency="USD">25.12</Tax>
<OtherFees currency="USD">2.00</OtherFees>
<AllowablePointsOfSale>
<PointOfSale id="site1"/>
</AllowablePointsOfSale>
<Occupancy>3</Occupancy>
<OccupancyDetails>
<NumAdults>2</NumAdults>
<Children>
<Child age="17"/>
</Children>
</OccupancyDetails>
</Result>
</Transaction>
การตอบกลับเกี่ยวกับอัตรา
ตัวอย่างต่อไปนี้กำหนดแผนการเดินทาง 1 รายการและราคาของแผนดังกล่าวสำหรับผู้ใหญ่ 1 คนและเด็ก 1 คน ในตัวอย่างนี้ <OccupancyDetails>
จะแสดงผลในองค์ประกอบ <Rates>
ของ <Result>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Transaction id="Wtdj8QoQIWcAAbaTGlIAAAC4" timestamp="2018-04-18T11:27:45-04:00">
<Result>
<Property>8251</Property>
<Checkin>2018-06-20</Checkin>
<Nights>1</Nights>
<Baserate currency="USD">62.18</Baserate>
<Tax currency="USD">2.45</Tax>
<OtherFees currency="USD">0.00</OtherFees>
<Rates>
<Rate rate_rule_id="rule-951">
<Occupancy>2</Occupancy>
<OccupancyDetails>
<NumAdults>1</NumAdults>
<Children>
<Child age="17"/>
</Children>
</OccupancyDetails>
<Baserate currency="USD">42.61</Baserate>
<Tax currency="USD">5.70</Tax>
<OtherFees currency="USD">0.00</OtherFees>
<AllowablePointsOfSale>
<PointOfSale id="yourhotelpartnersite.com"/>
</AllowablePointsOfSale>
</Rate>
</Rates>
</Result>
</Transaction>
แพ็กเกจห้องพัก
ตัวอย่างต่อไปนี้กำหนดอัตราการเข้าพักของผู้ใหญ่ 2 คนและเด็ก 1 คนเป็นเวลา 2 คืนและขอเงินคืนได้ ในตัวอย่างนี้ <OccupancyDetails>
จะปรากฏ
ใน <RoomBundle>
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
<Result>
<Property>6781291</Property>
<Checkin>2017-08-05</Checkin>
<Nights>2</Nights>
...
<RoomBundle>
<RoomID>10291</RoomID>
<RatePlanID>564739</RatePlanID>
<PackageID>564739</PackageID>
<Occupancy>3</Occupancy>
<OccupancyDetails>
<NumAdults>2</NumAdults>
<Children>
<Child age="17"/>
</Children>
</OccupancyDetails>
<ChargeCurrency>web</ChargeCurrency>
<Refundable available="true" refundable_until_days="1" refundable_until_time="23:59:00" />
<Baserate currency="USD">185.34</Baserate>
<Tax currency="USD">37.06</Tax>
<OtherFees currency="USD">2.22</OtherFees>
</RoomBundle>
</Result>
</Transaction>
แพ็กเกจห้องพักหลายห้อง
ตัวอย่างต่อไปนี้กำหนด <RoomBundle>
หลายราคาที่มีการจำกัดการเข้าพักเป็นผู้ใหญ่ 2 คนและเด็ก 2 คน ในตัวอย่างนี้ <OccupancyDetails>
จะปรากฏในองค์ประกอบ <Rates>
ของ <RoomBundle>
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
<Result>
<Property>1234</Property>
<Checkin>2018-06-10</Checkin>
<Nights>2</Nights>
<Baserate currency="USD">275.00</Baserate>
<Tax currency="USD">27.50</Tax>
<OtherFees currency="USD">0</OtherFees>
<RoomBundle>
<RoomID>5</RoomID>
<PackageID>STD</PackageID>
<Baserate currency="USD">275.00</Baserate>
<Tax currency="USD">27.50</Tax>
<OtherFees currency="USD">0</OtherFees>
<InternetIncluded>1</InternetIncluded>
<ChargeCurrency>web</ChargeCurrency>
<Occupancy>4</Occupancy>
<OccupancyDetails>
<NumAdults>2</NumAdults>
<Children>
<Child age="17"/>
<Child age="17"/>
</Children>
</OccupancyDetails>
<Rates>
<Rate rate_rule_id="mobile">
<Baserate currency="USD">258.33</Baserate>
<Tax currency="USD">25.83</Tax>
<OtherFees currency="USD">1.00</OtherFees>
<ChargeCurrency>hotel</ChargeCurrency>
</Rate>
<Rate rate_rule_id="us_or_gb">
<Baserate currency="USD">268.33</Baserate>
<Tax currency="USD">26.83</Tax>
<OtherFees currency="USD">1.00</OtherFees>
</Rate>
</Rates>
</RoomBundle>
</Result>
</Transaction>