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:

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,
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,
hourly - hourly notification,
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.
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.
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)

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.
unit_assignmentUnit assigned to the reservation (if any).

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
Back to Frequently Asked Questions