FAQ Q222: Is there a possibility to have planyo notify my server programatically when an event occurs?

Yes, you can specify a callback URL so your server will be notified e.g. when a new reservation is entered. You can set up callback URLs on the Notifications Callbacks page.

Here you can assign each of the events a different callback url. If you don't want to be notified of a certain event simply leave the related field empty. The callback url can also contain query parameters, e.g. http://www.foo.com?param1=value1

When a callback is called, a set of useful data related to given reservation is additionally sent as POST parameters. See the following table for detailed description of each parameter. If you'd rather have the data sent in the json format, add &ppp_payload=json to the query parameters of the url, e.g. http://www.foo.com?param1=value1&ppp_payload=json

Parameter nameDescription
notification_typeType of the notification that triggered the callback. This can be one of the following:
new_verified_reservation - new reservation with verified email address,
reservation_confirmed - reservation confirmed by admin,
reservation_admin_canceled - reservation cancelled by admin,
reservation_user_canceled - reservation cancelled by client,
reservation_admin_modified - reservation modified by admin,
reservation_auto_canceled - reservation automatically cancelled,
reservation_payment_received - online payment received,
reservation_user_modified - reservation modified by client,
vacation_modified - vacation was added, removed or modified,
reservation_products_user_modified - additional products of reservation modified by client,
reservation_price_updated - reservation price changed,
checked_in - reservation status changed to checked-in,
checked_out - reservation status changed to checked-out,
noshow - reservation status changed to no-show
hourly - hourly notification,
added_to_waitlist - reservation request added to waiting list
user_updated - new user has been added or user's settings were updated,
coupon_payment_received - online payment for coupon received,
confirmed_cleared - reservation 'confirmed' status was cleared,
new_price_quotation - new price quotation,
before_or_after_event_1...before_or_after_event_6 - before or after event #1..#6.
custom_button_1...custom_button_5 - custom button clicked by an admin on the reservation details page
resource_settings_changed - some settings of a resource changed
reservation_payment_removed - reservation payment removed by admin
coupon_payment_removed - coupon payment removed by admin
resource_removed - resource removed
reservation_removed - reservation removed
reservationID of the reservation.
resourceID of the resource to be rented.
resource_namename of the resource to be rented.
calendarID of the planyo site.
startStart time (sent as timestamp, that is the number of seconds since January 1 1970 00:00:00).
endEnd time (sent as timestamp).
userID of the user reserving the resource.
is_new_user(used only with the user_updated notification: equals to 1 if this is a new user, 0 in case of modifications of user info
countNumber of resources being reserved.
creation_dateCreation time of the reservation.
statusStatus of the reservation. See this page for the description of the status value.
currencyCurrency of the reservation.
price_quotedRate quoted for the reservation.
discountDiscount applied through a voucher.
price_no_discountOriginal price (without taking under consideration the voucher used, if any).
amount_paidAmount paid already.
amount_outstandingAmount left to be paid.
cart_idID of a cart, if using shopping cart.
payment_amountUsed only with reservation_payment_received notification; amount of the payment.
user_id, email, first_name, last_name, country, city, address, zip, state, phoneCustomer's data.
is_event_fired_by_customerIf the event is triggered by a customer, the tag will have the value of 1. It will be 0 for other cases.
is_quietIf the event is triggered in quiet mode (e.g. quiet cancellation of a reservation), the parameter will be passed with the value of 1. For other cases, the parameter is not passed.
affected_resources, package_contentsIf the notification concerns an event that can change availability (like reservation made or vacation added), the affected_resources and package_contents fields will contain comma-separated resource ids whose availability also can be affects. This is the case only when the notification resource is a package (contains other resources) or is a part of a package. 'affected_resources' will contain ids of all parent package resources and package_contents ids of all child resources that are involved e.g. in a reservation.
For example, let's say that resources A (id 1) and B (id 2) are included in packages P1 (id 3) and P2 (id 4). When resource A is reserved, affected_resources sent with e.g. the 'reservation_confirmed' notification will contain '3,4' - that is packages whose availability can also be modified after the reservation. On the other hand, if P1 is reserved and A is included in the reservation (B is not), 'package_contents' will contain '1'.
form_itemsNames of the reservation form items also passed as separate parameters (see the note below)
user_propertiesNames of the user property items passed as separate parameters to the script
unit_assignmentUnit assigned to the reservation (if any).

The script also receives all additional reservation form items. For example, if you added to the reservation form a check box 'Airport transfer' it would be passed as the parameter 'Airport_transfer'. Note that space and other non-alphanumerical characters are replaced with underscore. Checkboxes, if selected, will have the value: on (no value otherwise).

Parameters used with coupon_payment_received notification:
Parameter nameDescription
typeOne of the values: prepaid, entries, hours or days. To learn more about coupon types, see Q244.
coupon_is_site_wide'yes' for a coupon that works with all resources of the site, 'no' when a coupon is assigned to work only with a given resource; in the second case, resource parameter will contain the resource id.
coupon_purchased_amountNumber of purchased units (entries, days, hours, credits).
coupon_balanceThe total number of units (entries, days, hours, credits) after the purchase. When an existing coupon is refilled by the purchase, this value reflects that total units.
coupon_priceCoupon purchase price.
coupon_purchase_currencyCoupon purchase currency.
coupon_emailEmail address for which coupon was purchased.
is_coupon_access_emailIf 'yes', access to coupon is limited to the email address; 'no' otherwise.
is_coupon_access_code'yes' when code is needed to use coupon; 'no' otherwise.
coupon_codeCode assigned to coupon.
is_coupon_personal'yes' when coupon can be used only by one person; 'no' otherwise.
payment_timeTime when payment was made.
holder_fields, buyer_fieldsComma-separated parameter names corresponding to the Additional holder info and Additional buyer info fields as defined on the Coupon purchase template page. The values will be passed as the parameters with the name format holder_field_xxx and buyer_field_yyy respectively. For example, for buyer_fields=age,color, the values will be passed as buyer_field_age and buyer_field_color

Parameters used with before_or_after_event_1...before_or_after_event_6 notification:
Parameter nameDescription
relative_tothe event can be relative to 'start' - reservation start, 'end' - reservation end or 'reservation' - reservation creation time
time_differencetime difference in minutes

Parameters used with resource_settings_changed notification:
Parameter nameDescription
resource_idID of the resource whose settings were modified
type(optional) when applicable, settings group that triggered the notification
subtype(optional) when applicable, more info about the settings changed

Parameters used with reservation_payment_removed notification:
Parameter nameDescription
removed_payment_amountamount of the payment being removed
removed_payment_currencythe currency
removed_payment_timethe payment date and time
removed_payment_modethe payment mode

Parameters used with vacation_modified notification:
Note: this webhook is called only for vacation modifications made in admin panel. It is not called e.g. for vacation updates made through API functions.
Parameter nameDescription
update_typeOne of 'new', 'modified' or 'removed'.
vacation_typevacation recurrence type related with the modification: 1 - one-time, 2 - repeated everyday, 3 - repeated every weekday, 4 - repeated every month, 5 - repeated every year, 99 - multiple vacations update, e.g. after import of vacations from a CSV file.
start_time, end_timeVacation start and end time period. Please note that meaning of these values differs depending on vacation type. For 'one-time' vacation, this is simply the start and end time; 'repeated everyday' - start and end time (hour and minute) of the vacation; 'repeated every weekday' - the weekday of start_time is the day when vacation is repeated on week basis. Start and end time is the time; 'repeated every month' - start and end values carry the days when the vacation starts and ends; 'repeated every year' - start and end values carry the month and day when the vacation starts and ends.
valid_from, valid_untilIf any limit is applied, the start and end date of the period to which the vacation is limited.
prev_start_time, prev_end_timeIn case of vacation update, these are the previous start and end time values.
prev_valid_from, prev_valid_untilIn case of vacation update, these are the previous limit values.
site_idYour site ID.
is_site_vacation'true' for global vacation and 'false' for resource vacation.
resource_idFor resource vacation, ID of the resource.
updated_vacation_idsIDs of the vacations.
Note: For the 'multiple vacations update' type, the time related values are passed as null.

Note that you can log all the webhook calls by switching on the option 'email notifications debug log' in active features.
Back to Frequently Asked Questions