get_resource_pricing (version 1)
Returns complete pricing information for all resources of a site. Pricing is returned in two separate arrays: one with the default prices and one with the additional pricing rules. Keys of both arrays are resource IDs.
site_id int required
Planyo site ID
resource_id int optional
Optionally you can limit the response to a single resource if you specify its ID here.
version float optional
you can optionally specify the version of the API that you're using. Use the value of latest or simply skip this parameter to use the latest API version. The latest version is: 1
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
Default prices (first row in Pricing Manager). Array whose key is resource_id and values are named arrays with following keys: unit_price (price per hour/quarter/day), currency, price_type (see below)
Additional pricing rules. Array keys are also resources' ID. The values are name arrays with the following keys: rule_id (ID of the pricing rule), rule_type (1=weekday, 2=date, 3=duration, 4=quantity, 5=number of persons, 6=custom property, 7=hour), rule_subtype (used only when rule_type=6 in which case it's the property name), rule_value (usually the first value in the range such as starting date or min.quantity), rule_value_2 (last value in the range such as ending date or max. quantity), price, price_type (0=per default time unit, this depending on the resource, can be quarter, hour, or day, 1=per person, 2=per time unit and person, 3=per unit, 4=percentage, 6=per hour, 7=per day, 8=per week, 9=per week and person, 14=per reservation, 15=per adult, 16=per time unit and adult, 17=per child, 18=per time unit and child; special values: 11=additional info, 10=pre-payment amount, 5=unavailability message, 13=apply free hours)
Click here to test this function in the API playground.