AnchorIntroduction

NewBook Online is a powerful and comprehensive online engine for creating accommodation bookings, facility hirage, activity bookings, and many other sales, 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.

In the below examples, {newbook_online_url} is a placeholder for your actual NewBook Online URL. Please reach out to NewBook Support if you don't know what your NewBook Online URL is.

All of the below parameters can be used in combination with each other. You combine two or more parameters by separating them with the & symbol, e.g.

								
									{newbook_online_url}?available_from=30+November+20&force_category_id=1&adults=2
								
							
AnchorNewBook 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.

Please note: for browser security and code compatibility reasons, embedding an Online Booking Engine in a Frame or iFrame is not supported.

Anchorclear_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

									
										{newbook_online_url}?clear_cart
									
								
AnchorNEWBOOK_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

									
										{newbook_online_url}?NEWBOOK_HTTP_REFERER=https%3A%2F%2Fwww.google.com									
								
Anchoravailable_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 ("30 November 2020" or "November 30 2020") or
  • Y-m-d ("2020-11-30")

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

URL Example

									
										{newbook_online_url}?available_from=30+November+20									
								
Anchoravailable_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 ("03 December 2020" or "December 03 2020") or
  • Y-m-d ("2020-12-03")

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

									
										{newbook_online_url}?available_to=03+December+20									
								
Anchoradults

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+animals); exceed that limit and the Category becomes unavailable to book.

URL Example

									
										{newbook_online_url}?adults=2
									
								
Anchorchildren

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+animals); exceed that limit and the Category becomes unavailable to book.

URL Example

									
										{newbook_online_url}?children=3
									
								
Anchorinfants

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+animals); exceed that limit and the Category becomes unavailable to book.

URL Example

									
										{newbook_online_url}?infants=1
									
								
Anchoranimals

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 unavailable to book.

URL Example

									
										{newbook_online_url}?animals=2
									
								
Anchorpromo_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

									
										{newbook_online_url}?promo_code=special_code
									
								
Anchorforce_category_id

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

The parameter can be singular or 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

Singular:

									
										{newbook_online_url}?force_category_id=1
									
								

Array:

									
										{newbook_online_url}?force_category_id[]=1&force_category_id[]=2&force_category_id[]=3
									
								

JSON:

									
										{newbook_online_url}?force_category_id=[1,2,3]
									
								
Anchorforce_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 singular or 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

Singular:

									
										{newbook_online_url}?force_category_type_id=1
									
								

Array:

									
										{newbook_online_url}?force_category_type_id[]=1&force_category_type_id[]=2&force_category_type_id[]=3
									
								

JSON:

									
										{newbook_online_url}?force_category_type_id=[1,2,3]
									
								
Anchorforce_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 singular or 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

Singular:

									
										{newbook_online_url}?force_site_id=1
									
								

Array:

									
										{newbook_online_url}?force_site_id[]=1&force_site_id[]=2&force_site_id[]=3
									
								

JSON:

									
										{newbook_online_url}?force_site_id=[1,2,3]
									
								
Anchorforce_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 singular or 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

Singular:

									
										{newbook_online_url}?force_tariff_type_id=1
									
								

Array:

									
										{newbook_online_url}?force_tariff_type_id[]=1&force_tariff_type_id[]=2&force_tariff_type_id[]=3
									
								

JSON:

									
										{newbook_online_url}?force_tariff_type_id=[1,2,3]
									
								
Anchorforce_online_product_id

Defines the Online Add-On ID.

Add-Ons are set up by NewBook users as extras which a Booking can sell. These can also be purchased outside of the regular Booking process.

The parameter can be singular or an array, which will then show all the specified Add-Ons.

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

Invalid Add-On IDs will result in a the guest seeing a message that no such Add-On exists.

See Also force_online_product_category_id

URL Example

Singular:

									
										{newbook_online_url}?online_products&force_online_product_id=3
									
								

Array:

									
										{newbook_online_url}?online_products&force_online_product_id[]=3&force_online_product_id[]=5
									
								

JSON:

									
										{newbook_online_url}?online_products&force_online_product_id=[3,5]
									
								
Anchorforce_online_product_category_id

Defines the Online Add-Ons Category ID.

Add-On Categories are optionally set up by NewBook users, so that many Add-Ons can be categorised within the one name or branding.

The parameter can be singular or an array, which will then show all the specified Add-On Categories.

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

Invalid Category IDs will result in a the guest seeing a message that no such Add-On Category exists.

URL Example

Singular:

									
										{newbook_online_url}?online_products&force_online_product_category_id=1
									
								

Array:

									
										{newbook_online_url}?online_products&force_online_product_category_id[]=1&force_online_product_category_id[]=4
									
								

JSON:

									
										{newbook_online_url}?online_products&force_online_product_category_id=[1,4]
									
								
Anchoractivities_available_from

This parameter should be delivered URL Encoded

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

Date format should be

  • either human-understandable ("30 November 2020" or "November 30 2020") or
  • Y-m-d ("2020-11-30")

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

URL Example

									
										{newbook_online_url}?availability_activity&activities_available_from=30+November+20									
								
Anchoractivities_available_to

This parameter should be delivered URL Encoded

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

Date format should be

  • either human-understandable ("03 December 2020" or "December 03 2020") or
  • Y-m-d ("2020-12-03")

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

									
										{newbook_online_url}?availability_activity&activities_available_to=03+December+20									
								
Anchoractivities_adults

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

Positive integers only.

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

URL Example

									
										{newbook_online_url}?availability_activity&activities_adults=2
									
								
Anchoractivities_children

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

Positive integers only.

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

URL Example

									
										{newbook_online_url}?availability_activity&activities_children=3
									
								
Anchoractivities_infants

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

Positive integers only.

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

URL Example

									
										{newbook_online_url}?availability_activity&activities_infants=1
									
								
Anchoractivities_animals

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

Positive integers only.

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

URL Example

									
										{newbook_online_url}?availability_activity&activities_animals=2
									
								
Anchorforce_activity_id

Use force_activity_id to have the Online Activities engine show only the specified Activities.

The parameter can be singular or an array, which will then show all the specified Activities.

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 Activities must still be available over the specified date range, for the specified number of people, etc.

URL Example

Singular:

									
										{newbook_online_url}?availability_activity&force_activity_id=5
									
								

Array:

									
										{newbook_online_url}?availability_activity&force_activity_id[]=5&force_activity_id[]=6
									
								

JSON:

									
										{newbook_online_url}?availability_activity&force_activity_id=[5,6]