API - Planyo Web Services - get_simplified_daily_pricing

Sie sind hier: Planyo » Hilfe » API » get_simplified_daily_pricing

get_simplified_daily_pricing

Description:

Use this function for day-based resources if you need to get daily pricing for a range of dates (max 2 years). This function is mostly used for accommodations in order to convert the prices defined in Pricing Manager to prices understood by channel managers (price for given day and for given number of persons). Note that Pricing Manager is way more complex than the daily price format normally used by channel managers and other accommodation sites so it's likely that if you're using more advanced rules of Pricing Manager you'll see some warnings in the output plus the daily price returned may be different than the actual price calculated by Planyo.

Input:

resource_id int optional
ID of the resource. Pass null if you want info for all resources to be returned. In this case and if using a metasite API key, you'll need to pass the site id in the site_id parameter.
site_id int optional
Required only for metasite API keys and when resource_id is null. Otherwise skip this parameter.
start_date DateTime required
Start date of the period
end_date DateTime required
End date of the period
method string required
must be set to get_simplified_daily_pricing
language string optional
by specifying a 2-letter (ISO 639-1) language code (all capital letters e.g. EN, DE, FR, ES, IT) you can change the language of the text values returned
api_key string required
your API key - Click here to get your key. If your API key uses a hash key, you must also include the parameters hash_key and hash_timestamp.

Output:

prices array
Resource pricing for the desired period calculated for full occupancy (number of persons assumed to be the maximum allowed). For each returned resource, a list of arrays with the keys from (date), to (date), price (float) is returned representing grouped periods of identical daily pricing.
prices_partial_usage array
An array contaning prices for partial occupancy in the same format as the prices array. This array will only be returned if partial occupancy pricing is different than full occupancy pricing
warnings array
A list of warnings representing pricing manager rules or price types which couldn't be successfully converted to the simplified daily pricing format. For example, rules based on reservation form items or duration will be ignored and added to the list of warnings. Each warning is a list containing the following data: rule number, reason (1 = rule type, 2 = rule condition, 3 = price value, 4 = price type), text description

API playground:

Click here to test this function in the API playground.