Le tariffe inviate tramite <OTA_HotelRateAmountNotifRQ> possono essere
modificate per tenere conto di adulti e bambini, oltre al numero originale di ospiti
della tariffa. Il messaggio ExtraGuestCharges consente di specificare come devono essere calcolate le tariffe per questi ospiti aggiuntivi e per quali camere, piani tariffari e date di soggiorno devono essere applicati gli addebiti.
Requisiti di capacità
I prezzi calcolati dal messaggio ExtraGuestCharges sono validi solo se tutti i requisiti di capacità sono soddisfatti. Per saperne di più, consulta Transaction (Property Data).
Richieste
Sintassi
La sintassi del messaggio ExtraGuestCharges è la seguente:
<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestCharges partner="partner_account_name"
id="message_ID"
timestamp="timestamp">
<HotelExtraGuestCharges hotel_id="HotelID" action="[overlay]">
<ExtraGuestCharge>
<RatePlans>
<RatePlan id="PackageID_1"/>
<RatePlan id="PackageID_2"/>
</RatePlans>
<RoomTypes>
<RoomType id="RoomID_1"/>
<RoomType id="RoomID_2"/>
</RoomTypes>
<StayDates>
<DateRange start="YYYY-MM-DD" end="YYYY-MM-DD"
days_of_week="MTWHFSU_or_subset"/>
</StayDates>
<AgeBrackets>
<AdultCharge amount="float"/>
<ChildAgeBrackets>
<!-- The following are different ways child charges can be specified.
Use the option that matches your system. -->
<ChildAgeBracket max_age="integer" amount="float"
exclude_from_capacity="[true|false]"/>
<ChildAgeBracket max_age="integer" percentage="float"
exclude_from_capacity="[true|false]"
counts_as_base_occupant="[never|preferred|always]"/>
<ChildAgeBracket max_age="integer" discount_amount="float"
exclude_from_capacity="[true|false]"
counts_as_base_occupant="[never|preferred|always]"/>
</ChildAgeBrackets>
</AgeBrackets>
</ExtraGuestCharge>
</HotelExtraGuestCharges>
</ExtraGuestCharges>
Elementi e attributi
Il messaggio ExtraGuestCharges contiene i seguenti elementi e
attributi:
| Elemento / @attributo | Occorrenze | Tipo | Descrizione |
|---|---|---|---|
| ExtraGuestCharges | 1 | Complex element | L'elemento principale di questo messaggio. |
| ExtraGuestCharges / @partner | 1 | string | L'account partner di questo messaggio. Il valore della stringa è
il valore Partner key presente
nella
pagina Impostazioni account in Hotel Center.
Nota: se hai un backend che fornisce feed per
più account, questo valore deve corrispondere al valore dell'attributo |
| ExtraGuestCharges / @id | 1 | string | Un identificatore univoco per questo messaggio di richiesta. Questo valore viene restituito
nel messaggio di risposta. I caratteri consentiti sono a-z,
A-Z, 0-9, _ (trattino basso) e
- (trattino). |
| ExtraGuestCharges / @timestamp | 1 | DateTime | La data e l'ora di creazione di questo messaggio. |
| ExtraGuestCharges / HotelExtraGuestCharges | 0..n | HotelExtraGuestCharges | Contenitore per gli addebiti di una singola proprietà. |
| ExtraGuestCharges / HotelExtraGuestCharges / @hotel_id | 1 | string | L'identificatore univoco della proprietà. Questo valore deve corrispondere
all'ID hotel specificato utilizzando
<id> nell'elemento <listing>
nel feed elenco hotel. L'ID hotel è indicato anche in Hotel Center. |
| ExtraGuestCharges / HotelExtraGuestCharges / @action | 0..1 | enum | Specifica come viene applicato l'aggiornamento. È supportato solo overlay e l'impostazione predefinita è overlay. Tutti gli addebiti precedenti per questa
proprietà vengono eliminati prima dell'applicazione dell'aggiornamento. |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge | 0..99 | ExtraGuestCharge | Un singolo insieme di addebiti per una proprietà. Queste possono contenere limitazioni su come può essere applicato un addebito e su come vengono calcolati gli addebiti in base all'età o alla categoria di ospiti. Ogni |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets | 1 | AgeBrackets | Un contenitore di fasce d'età per il calcolo degli addebiti in base all'età o alla categoria di ospite. |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / AdultCharge | 0..1 | AdultCharge | Contenitore dell'addebito per un adulto aggiuntivo. |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / AdultCharge / @amount | 0..1 | float | Un valore decimale positivo che specifica l'importo fisso da addebitare per un adulto aggiuntivo. Questo addebito utilizza la stessa valuta di quella specificata per le tariffe per notte. |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets | 0..1 | ChildAgeBrackets | Contenitore per gli addebiti aggiuntivi per i bambini. Queste fasce d'età possono coprire solo la fascia d'età compresa tra 0 e 17 anni inclusi. |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket | 1..99 | ChildAgeBracket | Un addebito che si applica ai bambini in una fascia d'età specifica. Questi
devono essere ordinati dal valore max_age più basso a quello
max_age più alto. L'importo da addebitare può essere specificato utilizzando
amount, percentage o
discount_amount. Per ogni <ChildAgeBracket> deve essere specificato
esattamente uno di questi attributi.
|
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @max_age | 1 | integer | L'età massima per cui possono essere applicate le tariffe specificate in
<ChildAgeBracket>. L'età minima è zero
se non sono specificati altri <ChildAgeBracket>
prima di questo. In caso contrario, è uno in più rispetto all'età massima della fascia precedente. |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @exclude_from_capacity | 1 | boolean | Un valore booleano che indica se un bambino in questa fascia d'età deve essere conteggiato ai fini della capacità totale e della capacità per bambini di una camera. Queste capacità possono essere impostate con Transaction(Property Data). Ad esempio, i neonati di età inferiore a una determinata soglia potrebbero non essere conteggiati ai fini della capacità per bambini. |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @amount | 0..1 | float | Un valore decimale non negativo che specifica l'importo fisso da addebitare per un figlio aggiuntivo in questa fascia. Questo addebito utilizza la stessa valuta specificata per le tariffe per notte. |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @percentage | 0..1 | float | Un valore decimale compreso tra 1 e 99 che specifica la percentuale di un prezzo per adulti da addebitare per un bambino aggiuntivo in questa fascia. Questo addebito utilizza la stessa valuta specificata per le tariffe per notte. Per i dettagli su come viene calcolato il prezzo per adulti, consulta la discussione in |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @discount_amount | 0..1 | float | Un valore decimale positivo che specifica un importo di sconto fisso sul prezzo per adulti per un bambino aggiuntivo in questa fascia. Questo addebito utilizza la stessa valuta specificata per le tariffe per notte. In generale, l'addebito per un bambino in questa fascia viene calcolato
deducendo l'importo fisso dal "prezzo unitario". Il prezzo unitario è
descritto in modo più dettagliato nella sezione dell'attributo |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @counts_as_base_occupant | 0..1 | string | Se viene specificato l'attributo L'obiettivo è ottenere un "prezzo unitario" da cui è possibile calcolare l'addebito effettivo.
Il valore di questo attributo deve essere uno tra
|
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RoomTypes | 0..1 | RoomTypes | Contenitore di un elenco dei tipi di camera a cui si applicano gli addebiti.
Gli addebiti vengono applicati a ogni <RoomType>
specificato. Se <RoomTypes> non è specificato, gli addebiti si applicano a tutte le camere della proprietà specificata. |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RoomTypes / RoomType | 1..n | RoomType | Specifica un tipo di camera. Il tipo di camera viene definito in un
elemento <RoomData> all'interno di un
messaggio Transaction
(Property Data) e vi viene fatto riferimento tramite il relativo valore
<RoomID>. (Al valore <RoomID>
viene fatto riferimento anche tramite l'attributo InvTypeCode nei
messaggi OTA_HotelRateAmountNotifRQ). |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RoomTypes / RoomType / @id | 1 | string | L'identificatore univoco dell'inventario (tipo di camera). Questo valore è mappato
a <RoomID> in un messaggio Transaction (Property Data).
Il numero massimo di caratteri consentiti è 50. |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RatePlans | 0..1 | RatePlans | Contenitore di un elenco dei piani tariffari a cui si applicano gli addebiti.
Se <RatePlans> non è specificato, gli addebiti
si applicano a tutti i piani tariffari. |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RatePlans / RatePlan | 1..n | RatePlan | Specifica un piano tariffario. Il piano tariffario viene definito da una combinazione di pacchetti, tariffe e disponibilità, come definito nei messaggi Transaction (Property Data), OTA_HotelRateAmountNotifRQ e OTA_HotelAvailNotifRQ e come identificato da PackageID. |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RatePlans / RatePlan / @id | 1 | string | L'identificatore univoco del piano tariffario. Questo valore è mappato
al valore PackageID in <PackageData>
all'interno di un messaggio Transaction (Property Data) e
nell'attributo RatePlanCode in
<StatusApplicationControl> nei messaggi
<OTA_HotelRateAmountNotifRQ> e
<OTA_HotelAvailNotifRQ>.
Il numero massimo di caratteri consentiti è 50. |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / StayDates | 0..1 | StayDates | Un contenitore per uno o più intervalli di date che determinano come vengono applicati gli addebiti. |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / StayDates / DateRange | 1..99 | DateRange | Un intervallo di date che specifica le date in cui deve essere applicata la promozione. |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / StayDates / DateRange / @start | 0..1 | Date | La data di inizio (inclusa) dell'intervallo di date (in base al fuso orario della proprietà). Questa data deve essere precedente o uguale alla
data di end. Se start non è specificato, l'intervallo di
date risulta a tutti gli effetti illimitato in termini di data di inizio. |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / StayDates / DateRange / @end | 0..1 | Date | La data di fine (inclusa) dell'intervallo di date (in base al fuso orario della proprietà). Questa data deve essere uguale o successiva alla
data di start. Se end non è specificato, l'intervallo di
date risulta a tutti gli effetti illimitato in termini di data di fine. |
| ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / StayDates / DateRange / @days_of_week | 0..1 | string | I giorni della settimana consentiti nell'intervallo di date. Se il valore non viene specificato, saranno consentiti tutti i giorni nell'intervallo di date. Ogni carattere nella stringa specifica un giorno. Ad esempio, "MTWHF" specifica che nell'intervallo di date sono consentiti i giorni feriali. I caratteri validi sono:
Sono valide tutte le combinazioni di caratteri. |
Esempi
Tariffe per adulti
Gli addebiti per gli adulti aggiuntivi possono essere espressi solo come importi fissi. L'esempio seguente mostra un messaggio ExtraGuestCharges che specifica gli addebiti per adulti:
<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestCharges timestamp="2001-02-03T04:05:06+00:00" id="1">
<HotelExtraGuestCharges hotel_id="ABC" action="overlay">
<ExtraGuestCharge>
<StayDates />
<AgeBrackets>
<AdultCharge amount="50" />
</AgeBrackets>
</ExtraGuestCharge>
</HotelExtraGuestCharges>
</ExtraGuestCharges>
Ecco le tariffe corrispondenti:
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRateAmountNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05"
EchoToken="12345678"
TimeStamp="2020-05-19T20:50:37-05:00"
Version="3.0">
<RateAmountMessages HotelCode="ABC">
<RateAmountMessage>
<StatusApplicationControl Start="2020-05-18"
End="2020-05-23"
InvTypeCode="RoomID_1"
RatePlanCode="PackageID_1"/>
<Rates>
<Rate>
<BaseByGuestAmts>
<BaseByGuestAmt AmountAfterTax="100.00"
CurrencyCode="USD"
NumberOfGuests="1"/>
<BaseByGuestAmt AmountAfterTax="110.00"
CurrencyCode="USD"
NumberOfGuests="2"/>
<BaseByGuestAmt AmountAfterTax="120.00"
CurrencyCode="USD"
NumberOfGuests="3"/>
</BaseByGuestAmts>
</Rate>
</Rates>
</RateAmountMessage>
</RateAmountMessages>
</OTA_HotelRateAmountNotifRQ>
Quando un utente cerca quattro adulti su Google, la tariffa totale sarà 170 = 120 + 50.
120 deriva dalla tariffa <BaseByGuestAmt> con NumberOfGuests="3" e 50
deriva da AdultCharge amount="50".
Addebiti per i figli
Gli addebiti per i bambini sono espressi in fasce d'età fino a 17 anni e possono essere espressi in importi fissi, percentuali o sconti.
L'esempio seguente mostra un messaggio ExtraGuestCharges che specifica
gli addebiti per i bambini:
<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestCharges timestamp="2001-02-03T04:05:06+00:00" id="1">
<HotelExtraGuestCharges hotel_id="ABC" action="overlay">
<ExtraGuestCharge>
<AgeBrackets>
<ChildAgeBrackets>
<ChildAgeBracket max_age="3" percentage="10"
counts_as_base_occupant="never" />
<ChildAgeBracket max_age="10" percentage="30"
counts_as_base_occupant="preferred"/>
<ChildAgeBracket max_age="17" discount_amount="10"
counts_as_base_occupant="always" />
</ChildAgeBrackets>
</AgeBrackets>
</ExtraGuestCharge>
</HotelExtraGuestCharges>
</ExtraGuestCharges>
Ecco le tariffe corrispondenti:
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRateAmountNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05"
EchoToken="12345678"
TimeStamp="2020-05-19T20:50:37-05:00"
Version="3.0">
<RateAmountMessages HotelCode="ABC">
<RateAmountMessage>
<StatusApplicationControl Start="2020-05-18"
End="2020-05-23"
InvTypeCode="RoomID_1"
RatePlanCode="PackageID_1"/>
<Rates>
<Rate>
<BaseByGuestAmts>
<BaseByGuestAmt AmountAfterTax="100.00"
CurrencyCode="USD"
NumberOfGuests="1"/>
<BaseByGuestAmt AmountAfterTax="110.00"
CurrencyCode="USD"
NumberOfGuests="2"/>
</BaseByGuestAmts>
</Rate>
</Rates>
</RateAmountMessage>
</RateAmountMessages>
</OTA_HotelRateAmountNotifRQ>
```
1. Suppose you want the total price for 2 adults and 1 child of 2 years
of age.
Children aged 0-3 are never included in the rate's occupancy,
so here you should take the double occupancy rate and divide by 2 to
get the unit price. Then, multiply by the percentage rate and sum
with the rate to get the total price.
`unit price ` = 110 / 2 = 55
`total price` = 110 + 55 * 0.1 = 115.5
1. Suppose you want the total price for 1 adult and 2 children, both of 5
years of age.
Children aged 4-10 are preferably included in the rate's
occupancy. you should start by looking for a 3 adult rate since both
children are preferably included in the rate's occupancy. Since
that doesn't exist you should fall back to the 2 adult rate and then,
take this rate and divide by two to get the unit price. Finally,
multiply by the percentage rate and sum with the scaled rate to
get the total price.
`unit price` = 110 / 2 = 55
`total price` = 55 + 55 * 0.3 + 55 * 0.3 = 88
1. Suppose you want the total price for 1 adult and 1 child of 17
years of age.
Children aged 11-17 are always included in the rate's occupancy, so,
in this case, take the double occupancy rate and divide by 2 to get
the unit price. Then, deduct it by the discount amount and sum with
the scaled rate to get the total price.
`unit price` = 110 / 2 = 55
`total price` = 55 + (55 - 10) = 100
Limitazioni di addebito
Tutti i tipi di limitazioni sono facoltativi e possono essere utilizzati in qualsiasi combinazione.
L'esempio seguente mostra un messaggio ExtraGuestCharges che specifica le limitazioni:
<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestCharges timestamp="2001-02-03T04:05:06+00:00" id="1">
<HotelExtraGuestCharges hotel_id="ABC" action="overlay">
<ExtraGuestCharge>
<RoomTypes>
<RoomType id="queen" />
<RoomType id="king" />
</RoomTypes>
<RatePlans>
<RatePlan id="free-wifi" />
<RatePlan id="hot-breakfast" />
</RatePlans>
<StayDates>
<DateRange start="2020-09-01" end="2020-09-14"/>
</StayDates>
<AgeBrackets>
<AdultCharge amount="50" />
</AgeBrackets>
</ExtraGuestCharge>
</HotelExtraGuestCharges>
</ExtraGuestCharges>
Il messaggio precedente specifica che agli adulti deve essere addebitato il costo di qualsiasi prodotto che abbia il tipo di camera "queen" o "king" con il piano tariffario "free-wifi" o "hot-breakfast" per le date dal 1° settembre 2020 al 14 settembre 2020.
Addebiti sovrapposti
Questa sezione mostra un esempio di messaggio non valido che specifica addebiti diversi per le stesse combinazioni di date e prodotti.
<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestCharges timestamp="2001-02-03T04:05:06+00:00" id="1">
<HotelExtraGuestCharges hotel_id="ABC" action="overlay">
<ExtraGuestCharge>
<RoomTypes>
<RoomType id="queen" />
</RoomTypes>
<RatePlans>
<RatePlan id="free-wifi" />
</RatePlans>
<StayDates>
<DateRange start="2020-09-01" end="2020-09-14"/>
</StayDates>
<AgeBrackets>
<AdultCharge amount="50" />
</AgeBrackets>
</ExtraGuestCharge>
<ExtraGuestCharge>
<RoomTypes>
<RoomType id="queen" />
<RoomType id="king" />
</RoomTypes>
<RatePlans>
<RatePlan id="free-wifi" />
<RatePlan id="hot-breakfast" />
</RatePlans>
<StayDates>
<DateRange start="2020-09-01" end="2020-09-05"/>
</StayDates>
<AgeBrackets>
<AdultCharge amount="20" />
</AgeBrackets>
</ExtraGuestCharge>
</HotelExtraGuestCharges>
</ExtraGuestCharges>
Il messaggio precedente non è valido perché il primo <ExtraGuestCharge>
specifica che per il periodo dal 1° al 14 settembre le parole "queen" e "free-wifi" devono addebitare
50 per gli adulti aggiuntivi. Il secondo <ExtraGuestCharge>
specifica che per qualsiasi combinazione di "queen" o "king" con "free-wifi" o
"hot-breakfast" dal 1° al 5 settembre, gli adulti aggiuntivi devono pagare 20.
Sono presenti addebiti sovrapposti per "queen" e "free-wifi" dal 1° al 5 settembre e un conflitto tra l'addebito di 20 o 50 per un adulto aggiuntivo.
Risposte
Sintassi
La sintassi del messaggio ExtraGuestChargesResponse è la seguente:
<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestChargesResponse timestamp="timestamp"
id="message_ID"
partner="partner_key">
<!-- Either Success or Issues will be populated. -->
<Success/>
<Issues>
<Issue code="issue_code" status="issue_type">issue_description</Issue>
</Issues>
</ExtraGuestChargesResponse>
Elementi e attributi
Il messaggio ExtraGuestChargesResponse contiene i seguenti elementi
e attributi:
| Elemento / @attributo | Occorrenze | Tipo | Descrizione |
|---|---|---|---|
| ExtraGuestChargesResponse | 1 | Complex element | L'elemento principale che indica se l'esito è positivo o negativo per un messaggio
di richiesta ExtraGuestCharges ricevuto. |
| ExtraGuestChargesResponse / @timestamp | 1 | DateTime | La data e l'ora di creazione di questo messaggio. |
| ExtraGuestChargesResponse / @id | 1 | string | L'identificatore univoco del messaggio ExtraGuestCharges associato. |
| ExtraGuestChargesResponse / @partner | 1 | string | L'account partner di questo messaggio. |
| ExtraGuestChargesResponse / Success | 0..1 | Success | Indica che il messaggio ExtraGuestCharges è stato elaborato correttamente
senza avvisi, errori o problemi.
In ogni messaggio è
presente |
| ExtraGuestChargesResponse / Issues | 0..1 | Issues | Un contenitore per uno o più problemi riscontrati durante l'elaborazione del
messaggio ExtraGuestCharges.
In ogni messaggio è
presente |
| ExtraGuestChargesResponse / Issues / Issue | 1..n | Issue | La descrizione di un avviso, un errore o un problema riscontrato durante
l'elaborazione del messaggio ExtraGuestCharges. Per informazioni dettagliate su questi problemi, consulta la sezione
Messaggi di errore relativi allo stato dei feed. |
| ExtraGuestChargesResponse / Issues / Issue / @code | 1 | integer | L'identificatore del problema. |
| ExtraGuestChargesResponse / Issues / Issue / @status | 1 | enum | Il tipo di problema riscontrato. I valori validi sono |
Esempi
Operazione riuscita
Di seguito è riportata una risposta a un messaggio
ExtraGuestCharges elaborato correttamente.
<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestChargesResponse timestamp="2020-05-18T16:20:00-04:00"
id="12345678"
partner="partner_key">
<Success/>
</ExtraGuestChargesResponse>
Problemi
Di seguito è riportata una risposta a un messaggio ExtraGuestCharges non elaborato
a causa di errori.
<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestChargesResponse timestamp="2020-05-18T16:20:00-04:00"
id="12345678"
partner="partner_key">
<Issues>
<Issue code="1001" status="error">Example</Issue>
</Issues>
</ExtraGuestChargesResponse>