Hotels.searchBonuses | Previo API

Hotels.searchBonuses

Searching partner commissions. 

In every country, Previo invoices commission in a one currency only, reservations made in other currencies are converted into the target currency. Therefore, this function returns all amounts (price, previoBonusAmount, partnerBonusAmount and totalBonusAmount) in CZK in api.previo.cz and in EUR in api.previo.sk. The currency in which the reservation was paid for can be found in the element <account>. 

State of approval

Approval State of approval
0 No show
1 Guest stayed
2 Guest stayed but with changed price
3 Status not known 

Parameters

Name Description
login Username
password Password
filter Filter
order Order of results
limit Limit to the number of results

Sample request

<request>
    <login>prihlasovaci_jmeno</login>
    <password>heslo</password>
    <filter>
        <hotId>1</hotId>
        <from>2010-01-01</from>
        <to>2010-01-31</to>
        <resIds>
        	<resId>000111</resId>
        </resIds>
    </filter>
    <order>
        <by>hotId</by>
    </order>
    <limit>
        <offset>0</offset>
        <limit>100</limit>
    </limit>
</request>

Output

<bonuses>  
 
<foundBonuses> [1] Number of results returned by the function if not limited
<bonus> [0..*] Commission
 
<hotId> [1] Hotel ID
<bookdate> [1] Date when reservation was made
<term> [1] Dates of stay
 
<from> [1] from (date)
<to> [1] to (date) 
<comIds> [1] Reservation ID
 
<comId> [1..*] Reservation ID
<voucher> [0..1] Voucher number
<cosId> [1] Reservation status
<note> [0..1] Reason for update. Note why the guest didn't arrive or why the price has changed
<approval> [1] State of approval
<vatPayer> [1] Hotel is VAT payer (true|false)
<account> [1] Hotel account
 
<price> [1] Price
<currency> [1]  Currency
 
<curId> [1] Currency ID
<code> [1] Currency code
<price> [1] Price for the calculation of commission
<previoBonusAmount> [1] Amount of commission for Previo 
<partnerBonusAmount> [1] Amount of commission for Partner
<totalBonusAmount> [1] Total amount of commission
<invoiceSent> [1] Commission invoice sent (true|false)?
<invoiceSentDate> [0..1] Date of commission invoice
<invoiceNumber> [0..1] Invoice number (string, such as "FV20100547")
<invoicePaid> [1] Invoiced payments received (true|false)?
<invoicePaidDate> [0..1] Date when invoiced payments were received 
<partnerInvoiceSent> [1] Has the partner sent commission invoice (true|false)?
<partnerInvoicePaid> [1] Has the partner received invoiced payments (true|false)?

Sample output

<bonuses>
    <foundBonuses>6</foundBonuses>
    <bonus>
        <hotId>1</hotId>
        <bookdate>2010-01-06T17:07:33+01:00</bookdate>
        <term>
            <from>2010-01-05T00:00:00+01:00</from>
            <to>2010-01-10T00:00:00+01:00</to>
        </term>
        <comIds>
            <comId>2618631</comId>
            <comId>2618636</comId>
        </comIds>
        <voucher>VO20070663</voucher>
        <cosId>1</cosId>
        <approval>0</approval>
        <vatPayer>true</vatPayer>
        <account>
            <price>2800</price>
            <currency>
                <curId>1</curId>
                <code>CZK</code>
            </currency>
        </account>
        <price>0</price>
        <previoBonusAmount>0</previoBonusAmount>
        <partnerBonusAmount>0</partnerBonusAmount>
        <totalBonusAmount>0</totalBonusAmount>
        <invoiceSent>true</invoiceSent>
        <invoiceSentDate>2010-02-14</invoiceSentDate>
        <invoiceNumber>FV20100547</invoiceNumber>
        <invoicePaid>false</invoicePaid>
        <partnerInvoiceSent>false</partnerInvoiceSent>
        <partnerInvoicePaid>false</partnerInvoicePaid>
    </bonus>
    <bonus>
        <hotId>1</hotId>
        <bookdate>2010-01-06T17:15:35+01:00</bookdate>
        <term>
            <from>2010-01-05T00:00:00+01:00</from>
            <to>2010-01-10T00:00:00+01:00</to>
        </term>
        <comIds>
            <comId>2618641</comId>
            <comId>2618646</comId>
        </comIds>
        <voucher>VO20070664</voucher>
        <cosId>1</cosId>
        <approval>3</approval>
        <vatPayer>true</vatPayer>
        <account>
            <price>2800</price>
            <currency>
                <curId>1</curId>
                <code>CZK</code>
            </currency>
        </account>
        <price>2800</price>
        <previoBonusAmount>100.8</previoBonusAmount>
        <partnerBonusAmount>204.65</partnerBonusAmount>
        <totalBonusAmount>305.45</totalBonusAmount>
        <invoiceSent>true</invoiceSent>
        <invoiceSentDate>2010-02-12</invoiceSentDate>
        <invoiceNumber>FV20100247</invoiceNumber>
        <invoicePaid>true</invoicePaid>
        <invoicePaidDate>2010-02-16</invoicePaidDate>
        <partnerInvoiceSent>true</partnerInvoiceSent>
        <partnerInvoicePaid>true</partnerInvoicePaid>
    </bonus>
    ...
</bonuses>