API - Planyo Web Services - get_resource_pricing

Sie sind hier: Planyo » Hilfe » API » get_resource_pricing

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 array
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), resource_name
pricing_rules array
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),

--- Reservation form ---
6=reservation form item
5=number of persons
8=additional persons present
29=additional adults present
30=additional children present
18=custom property (user)
4=quantity of resources
19=resource sharing
47=zip/postal code

--- Date ---
24=season of the start date
49=season of the end date
10=start date
15=end date
16=date including year
17=start date including year
33=end date including year
12=start weekday
13=end weekday
51=number of calendar days
46=number of days in season

--- Hour ---
11=start hour
21=end hour

--- Duration and reservation time ---
42=rental duration chosen
14=additional days
22=additional hours
9=time remaining until rental
31=time remaining until rental ends
48=reservation time (hour)
34=reservation time (date)
--- Returning customer ---
35=number of hours reserved recently
36=number of times reserved recently
38=total hours in existing rentals in given period
39=total number of existing rentals in given period

--- Shopping cart ---
41=total resource quantity in cart
43=position in shopping cart
44=additional hours in shopping cart
45=total hours in shopping cart
40=repeated reservation number

--- Other ---
50=coupon holder
32=quantity still available
23=price calculated so far
20=daily pricing
28=csv file
25=always true,

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_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)
rule_details array
Detailed information about the rules. Array keys are rule IDs. The values: rule_id, rule_number (rule number, as in Pricing Manager), rule_type (see pricing_rules above), rule_subtype, rule_value, rule_value_2, adv_condition_rules (comma-separated rules used for the advanced condition), adv_condition_type (type of the advanced condition: 0: "if any of the following rules ... were applied", 1: "if all of the following rules ... were applied", 2: "if none of the following rules ... were applied", 3: "for the times for which the following rules ... were applied"), adv_condition_extra (null: no extra condition, 1: only when this rule increases the price, 2: only when this rule decreases the price)

API playground:

Click here to test this function in the API playground.