Introduction

NewBook Online is a powerful and comprehensive online bookings platform, integrated directly into the NewBook product.

It has several layout options, and several features can be enabled or disabled, but the scope of this document is only to show how the URL structure can prefill certain aspects or enable specific functionality.

This list is not guaranteed to be all possible parameters, and is not guaranteed to remain the same permanently, though we will aim for backwards compatibility if the need arises to change parameters.

As with all our documentation, a basic understanding of what NewBook is and how our clients operate will help understand these requests and responses.

NewBook Online Bookings: hosted verses visual copy

Each Instance has its own Online Bookings URL as defined in its Settings.

This should be the URL of a page of a website, where that page includes the NewBook Online Bookings API file (written in PHP).

For technical reasons, if the Instance wishes to utilise its own URL for NewBook Online, they must have web hosting provided through NewBook's sister company – Xtreme.

Alternatively, if the Instance does not have web hosting through Xtreme, we arrange for a visual copy of the Instance's website to be constructed and host that on our own domain e.g. https://bookingsau.newbook.cloud/[INSTANCE_NAME]/

In either case the final URL is what needs to be set into the Instance's Settings as its Online Bookings URL.

available_from

This parameter should be delivered URL Encoded

Defines the date from when the Online Bookings engine should load.

Date format should be

  • either human-understandable ("31 December 2015" or "December 31 2015") or
  • Y-m-d ("2015-12-31")

Invalid dates will simply be ignored and the engine will load from the current date.

URL Example

									
										https://newbook_online_url/?available_from=29+October+18									
								
available_to

This parameter should be delivered URL Encoded

Defines the date to when the Online Bookings engine should load.

Date format should be

  • either human-understandable ("31 December 2015" or "December 31 2015") or
  • Y-m-d ("2015-12-31")

Invalid dates will simply be ignored and the engine will load to the date of available_from +x days, with x being the value of the Setting NewBook Online: Days to show by default.

URL Example

									
										https://newbook_online_url/?available_to=01+November+18									
								
adults

Defines the number of adults the Online Bookings engine should load.

Positive integers only.

Each Category defines its own maximum adults (and maximum of adults+children+infants); exceed that limit and the Category becomes unavilable to book.

URL Example

									
										https://newbook_online_url/?adults=2
									
								
children

Defines the number of children the Online Bookings engine should load.

Positive integers only.

Each Category defines its own maximum children (and maximum of adults+children+infants); exceed that limit and the Category becomes unavilable to book.

URL Example

									
										https://newbook_online_url/?children=3
									
								
infants

Defines the number of infants the Online Bookings engine should load.

Positive integers only.

Each Category defines its own maximum infants (and maximum of adults+children+infants); exceed that limit and the Category becomes unavilable to book.

URL Example

									
										https://newbook_online_url/?infants=1
									
								
animals

Defines the number of animals the Online Bookings engine should load.

Positive integers only.

Each Category defines its own maximum animals; exceed that limit and the Category becomes unavilable to book.

URL Example

									
										https://newbook_online_url/?animals=2
									
								
promo_code

Tariffs in NewBook can optionally be hidden behind a Promo Code, and unless that Promo Code is provided to the Online Bookings engine, those tariffs are not displayed.

When a tariff is set up with a Promo Code the engine will show a text field to enter one.

Providing promo_code in the URL will prefill that field, and so, show the relevant tariffs by default.

URL Example

									
										https://newbook_online_url/?promo_code=special_code
									
								
force_category_id

Use force_category_id to have the Online Bookings engine show only the specified Category.

The parameter can be an array, which will then show all the specified Categories.

You can specify this as an array in the URL or as a JSON string in the URL.

All the regular rules/restrictions of the engine still apply e.g. the Categories must still be available over the specified date range, for the specified number of people, etc.

URL Example

									
										https://newbook_online_url/?force_category_id[]=1&force_category_id[]=2&force_category_id[]=3
									
								

or

									
										https://newbook_online_url/?force_category_id=[1,2,3]
									
								
force_category_type_id

Use force_category_type_id to have the Online Bookings engine show only Categories matching the specified Category Type.

The parameter can be an array, which will then show the all the Categories matching the specified Category Types.

You can specify this as an array in the URL or as a JSON string in the URL.

All the regular rules/restrictions of the engine still apply e.g. the Categories must still be available over the specified date range, for the specified number of people, etc.

URL Example

									
										https://newbook_online_url/?force_category_type_id[]=1&force_category_type_id[]=2&force_category_type_id[]=3
									
								

or

									
										https://newbook_online_url/?force_category_type_id=[1,2,3]
									
								
force_site_id

Use force_site_id to have the Online Bookings engine show only the Category of the specified Site.

Under ordinary circumstances the engine will not allow a guest to nominate a particular Site as this can prevent maximisation of availability.

This parameter forces the engine determine availability for the given Site only.

If the given Site is not available, then the whole Category appears as unavailable to book.

The parameter can be an array, which will then show the all the Categories matching the specified Sites.

You can specify this as an array in the URL or as a JSON string in the URL.

All the regular rules/restrictions of the engine still apply e.g. the Categories must still be available over the specified date range, for the specified number of people, etc.

URL Example

									
										https://newbook_online_url/?force_site_id[]=1&force_site_id[]=2&force_site_id[]=3
									
								

or

									
										https://newbook_online_url/?force_site_id=[1,2,3]
									
								
force_tariff_type_id

Use force_tariff_type_id to have the Online Bookings engine show only the tariffs of the specified Tariff Type.

This parameter forces the engine determine availability for the given Tariff Type only.

If the given Tariff Type is not currently in use, or stop sold, or not available for NewBook Online, then the whole Category appears as unavailable to book.

The parameter can be an array, which will then show the all the Categories using the specified Tariff Types.

You can specify this as an array in the URL or as a JSON string in the URL.

All the regular rules/restrictions of the engine still apply e.g. the Categories must still be available over the specified date range, for the specified number of people, etc.

URL Example

									
										https://newbook_online_url/?force_tariff_type_id[]=1&force_tariff_type_id[]=2&force_tariff_type_id[]=3
									
								

or

									
										https://newbook_online_url/?force_tariff_type_id=[1,2,3]
									
								
clear_cart

Used to clear the current cart data when linking from external sites.

If there is any existing cart data this parameter will provide the guest with a prompt to clear their cart data.

This is primarily intended for use with other parameters such as force_category_id but can also be used standalone.

URL Example

									
										https://newbook_online_url/?clear_cart
									
								
NEWBOOK_HTTP_REFERER

This parameter should be delivered URL Encoded

Use NEWBOOK_HTTP_REFERER to supply an original referrer to the Online Bookings engine.

The parameter changes Google Analytics tracking which is performed on the last step of saving a booking.

When this is not supplied, the Online Booking engine will default to the originating website (usually your website) being the referrer.

URL Example

									
										https://newbook_online_url/?NEWBOOK_HTTP_REFERER=