API Playground - add_pricing_manager_rule

add_pricing_manager_rule


Adds a new rule to Pricing Manager. (click for full documentation)

rule_type

One of the following:

--- 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
37=unit
27=voucher
19=resource sharing
47=zip/postal code

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

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

--- Duration and reservation time ---
3=duration
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

Extra rule data, e.g. when rule_type=6, it's the property name

rule_value

Extra rule data (usually the first value in the range such as starting date or min.quantity)

rule_value_2

Extra rule data (last value in the range such as ending date or max. quantity)

adv_condition_rules

Comma-separated rules used for the advanced condition

adv_condition_type

Type of the advanced condition: null: no extra 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

One of the following: null: no extra condition, 1: only when this rule increases the price, 2: only when this rule decreases the price

label

Extra comments

site_id

Planyo site ID. Needed only for metasite API keys.

language

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

* - champ obligatoire