AnchorIntroduction

This document provides instructions on using our REST API to work with Newbook.

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

Please note that any examples below should not be used on your development servers. These are only examples and do not work.

The Newbook REST API currently implements throttling after 100 requests per minute. Requests beyond this limit are denied.

AnchorRelease Notes

2024.03

2024.01

2023.11

2023.10

2023.09

2023.08

  • Allotments List, Create, Get and Update requests added
  • Allotment Override - request added
  • Bookings List, Get - occupant_charges parameter added to tariffs_quoted
  • Bookings List, Get, Bookings Groups List, get, Guests List, Guests Get - added client_account_booking_details parameter
  • Guests: Get and Guests: List - Added display_guest_facility_hires and display_cancelled_guest_facility_hires to the request parameters to include Guest Facility Hires
  • Bookings: Get and Bookings: List - Added display_guest_facility_hires and display_cancelled_guest_facility_hires to the request parameters to include Guest Facility Hires
  • Bookings: Get and Bookings: List - Added display_cancelled_booking_activities and display_cancelled_booking_facility_hires to the request parameters to include cancelled Activities and Facility Hire for the Booking
  • Bookings Groups: Get and Bookings Groups: List - Added display_cancelled_group_activities and display_cancelled_group_facility_hires to the request parameters to include cancelled Activities and Facility Hire for the Group

2023.07

2023.06

2023.05

2023.04

2023.03

  • Bookings: Get - client_account_item_breakdown parameter added
  • Bookings: Get - client_account_tax_reconciliation parameter added
  • Guests: List - client_account_item_breakdown and client_account_tax_reconciliation parameters added
  • Guests: Get - client_account_item_breakdown and client_account_tax_reconciliation parameters added

2023.02

  • Payments Reconciliation Create - request added
  • Refunds Reconciliation Create - request added
  • Metering Types List, Get, Create and Update requests added
  • Inventory Items Create, Update, Get and List - repeat_charge_booking_market_segment_id added
  • Bookings Create - booking_market_segment_id added to Repeat Charges
  • Bookings: Get - client_account_item_breakdown parameter added
  • Bookings: Get - client_account_tax_reconciliation parameter added

2023.01

2022.11

2022.10

2022.07

2022.06

  • Guests: Merge - request added
  • Membership Purchase - request added
  • Site Maps - added ability to limit to a single Map, and request availability validation along with the returned data
  • Bookings Create - required_features added for when you know what features you need, but not the specific Site ID

2022.05

2022.03

2022.02

2022.01

2021.02

  • Charges: Create - will now be able to accept an optional parameter of payment_amount. This paired with the payment_type will allow you to create a Payment for a specified amount different to the Charge amount.
  • Credits: Create - will now be able to accept an optional parameter of refund_amount. This paired with the refund_type will allow you to create a Refund for a specified amount different to the Credit amount.
  • Notes: Create - will now be able to accept an optional parameter of check_for_duplicates.
  • Access Codes: List - now also returns guest_id and guest_name for the associated Access Code.
  • Bookings: Pull Availability & Pricing - now returns extra tariffs when requested with any of the following: membership pricing when requested with return_membership_discount_pricing, and discount pricing when requested with return_general_discount_pricing, and tariffs locked behind promo_codes when requested with return_promo_code_pricing.

2020.10

  • Leads: Create, Guests: Create - will now automatically update the first existing record when a duplicate is found
  • Users: List - will now be able to accept an optional parameter of show_inactive. This will allow the list to return deactivated Users.

2020.06

2020.03

  • Reporting: Occupancy - will now return the number of Sites reserved by Allotments
  • All requests which returned account information e.g. Guests: Get can now be requested with account_breakdown to return the balance of each Sub Client Account (gl_category)
  • Charges: List, Credits: List - will now return their Tax amounts

2019.12

2019.07

  • Token: Store request added
  • Inventory Items: List - will now return Newbook Online Category Restrictions.
  • Companies: List - account_currency_code, auto_debit added to each object in the response
  • Incidents: List - will return a list of Incidents.
  • Leads: List - will now return the following additional fields: Source, Method, Status Reason, Inventory Items, Categories, Interests, Types, Notes, Points, Parent Lead ID, Interest Level, Expected Revenue, Title, Other Name, Created By, Assigned When.
  • Guests: List - will now return the following additional fields: Notes
  • Quotes: List - will now return the following additional fields: Notes

2019.04

2018.11

2018.08

  • Bookings: Pull Availability & Pricing - sort added to each object in the response; inventory_items added to each tariffs_available element in the response
  • Bookings: Get - will return success:"false" in the response when the requested Booking does not exist
  • Bookings: List / Get - will now return booking_market_segment_id and booking_market_segment_name in the response
  • Bookings: Retrieve Current In Site - will return success:"false" in the response when the requested Site does not exist
  • Contact Templates: Create, Update, Options - requests added
  • Requests which return Custom Field data - Custom Fields now have their type returned along with the data
  • Tasks: Create - location_name can now be used for Site and Facility Tasks

2018.05

2018.02

2017.12

2017.10

2017.08

AnchorAuthentication

To use the Newbook REST API you must authenticate via HTTP Basic Authentication using a username and password.

These details will be provided to you by the Newbook Support team.

You must also provide the region and api_key parameters with each JSON request to specify which Newbook Region and Instance you are querying.

It is a requirement to use HTTPS to communicate with the Newbook REST API, for both testing and real live use. Your JSON request must be sent via HTTP POST.

Live Endpoint

  • URL: https://api.newbook.cloud/rest/request_action

    Each REST API request has a distinct "action" which must be used in place of request_action in the above URL.

  • Region Options:
    • au - Australia
    • ap - Asia Pacific
    • eu - Europe
    • us - United States

Test Endpoint (must be specifically requested; access is not automatic)

Please contact Newbook Support if you are unsure about which Endpoint or Region to use.

Authentication Examples

Request URL

https://api.newbook.cloud/rest/api_keys

Request JSON
						
							{
								"region": "your_region_here"
							}
						
					
Response JSON
						
							{
								"success": "true",
								"data": {
									"instances_08626af5abca4e680a249debfe4bdb5a": "Random CRM",
									"instances_54459f5b0e9b4d5wjv9e02a1a904fafb": "Hotel Test"
								},
								"message": ""
							}
						
					
AnchorBuilding an example Request

In this example we will build an Authentication Test Request using the Test Endpoint.

HTTP Method: POST

HTTP Basic Auth Username: [as provided]

HTTP Basic Auth Password: [as provided]

URL: https://testapi.newbook.cloud/rest (see Authentication for alternate URLs]

POST data: [see right hand side Request JSON]

Request Notes:

request_action must be provided to tell the REST API which action to execute. For this example we will use auth_test.

region must be provided to tell the REST API the Newbook Region of the Client you're trying to connect to. See Authentication for alternate regions.

Building an example Request

Request URL

https://api.newbook.cloud/rest/auth_test

Request JSON
						
							{
								"region": "your_region_here",
								"api_key": "your_api_key_here"
							}
						
					
Response JSON
						
							{
								"success": "true",
								"data": "Newbook Test Instance",
								"message": "Successfully authenticated for Newbook Test Instance"
							}
						
					
AnchorHandling Errors

If a request has an error (missing parameters, invalid requests, server errors, etc.) a response with success set to "false" will be returned.

Handling Errors Examples

Response JSON
						
							{
								"success": "false",
								"data": [],
								"message": "Descriptive error message here"
							}
						
					
AnchorHandling Paginated Lists

The majority of our *_list requests are paginated, to minimize server load and ensure a timely response.

Requests default to showing results from 0 (data_offset), and limits results to the first 100 (data_limit).

Further, the response indicates how many results are currently being returned (data_count), and how many results there are in total (data_total).


Notes:

Using data_offset, data_limit, and data_total you will be able to paginate through the results.

You can increase data_limit to a maximum of 1000. Anything over this value will be capped at 1000.

You can request data_limit higher than data_total however data_count will still be the number of results returned.

Handling Paginated Lists

Request URL

https://api.newbook.cloud/rest/companies_list

Request JSON (with no pagination parameters / default behaviour)
						
							{
								"region": "your_region_here",
								"api_key": "your_api_key_here"
							}
						
					
Response JSON
						
							{
								"success": "true",
								"data": [
									0-100 results
								],
								"data_offset": 0,
								"data_limit": 100,
								"data_count": 100,
								"data_total": 550,
								"message": ""
							}
						
					
Request URL

https://api.newbook.cloud/rest/companies_list

Request JSON (with pagination parameters)
						
							{
								"region": "your_region_here",
								"api_key": "your_api_key_here",
								"data_offset": 100,
								"data_limit": 25
							}
						
					
Response JSON
						
							{
								"success": "true",
								"data": [
									100-125 results
								],
								"data_offset": 100,
								"data_limit": 25,
								"data_count": 25,
								"data_total": 550,
								"message": ""
							}
						
					
AnchorAPI Keys Request

Return a list of API Keys (Newbook Instances) which your username & password can connect with.

API Keys Request Example

Request URL

https://api.newbook.cloud/rest/api_keys

Request JSON
						
							{
								"region": "your_region_here"
							}
						
					
Response JSON
						
							{
								"success": "true",
								"data": {
									"instances_08626af5abca4e680a249debfe4bdb5a": "Random CRM",
									"instances_54459f5b0e9b4d5wjv9e02a1a904fafb": "Hotel Test"
								},
								"message": ""
							}
						
					
AnchorAuthentication Test Request

Verify the username, password, and API Key in your possession work as expected.

Authentication Test Request Example

Request URL

https://api.newbook.cloud/rest/auth_test

Request JSON
						
							{
								"region": "your_region_here",
								"api_key": "your_api_key_here"
							}
						
					
Response JSON
						
							{
								"success": "true",
								"data": "Newbook Test Instance",
								"message": "Successfully authenticated for Newbook Test Instance"
							}
						
					
AnchorBookings: List

Retrieve a list of Bookings within the given time period.

Request Notes:

The only required fields are period_from, period_to and list_type - the rest are optional

If guest_id is provided it will limit results to an individual Guest

list_type Shows Bookings which:
arrived1

have Arrived during the specified dates

Optional parameter mode with value projected changes the behaviour to who should have Arrived, opposed to who actually Arrived

arriving2 are expected to Arrive before the specified period_to date, including Bookings before this date which are not yet Arrived - period_from will be ignored in this case.
To limit results to those within the specified dates, please use list_type of arrived and the mode parameter of projected (see above)
cancelled have been Cancelled during the specified dates
departed1 have Departed during the specified dates
departing3 are expected to Depart during the specified dates
inhouse3 are currently In-House (dates not required)
placed2 were placed during the specified dates
staying1 are expected to stay during the specified dates
no_show have been marked as No Show and were meant to arrive during the specified dates
quoted are only Quotes (not actually staying) during the specified dates
waitlist are only Waitlisted (not actually staying) during the specified dates
all

returns all Bookings, this will be a Paginated List.

period_from can be optionally provided to limit the response to Bookings created/modified after the specified timestamp

period_to can be optionally provided to limit the response to Bookings created/modified before the specified timestamp

  • 1 ignores bookings of status Cancelled, No Show, Quote, Waitlist, and Owner Occupied
  • 2 shows only bookings of status Confirmed and Unconfirmed
  • 3 shows only bookings of status Arrived

restrict_mail_outs controls whether to return Guests which have opted to be contacted automatically i.e. by systems not expressly related to their specific booking (aka marketing opt-in). In Newbook, this is enabled on all Guests by default unless the Instance decides to disable it by default. If you send 1, i.e. only return Guests who allow contact automatically, and the Guest has already opted-out, the booking data in the return response will still be present but the Guests array will be empty.

booking_reason, booking_source, booking_method and booking_demographic are allowed to be integers or arrays of integers. They all correspond to values specific to the Instance - you need to determine the values you want before trying to query for matching bookings.

search is optional and when provided it will restrict the results to the matching Guests. It will search their name, contact details (phone, email, etc) and membership details for a match

display_guest_notes is optional and when provided as false, it will ignore any guest notes from the response. Not providing the field will behave the same as providing it as true which will display the full array of the guest notes.

client_account_tax_reconciliation can optionally be provided as true to include the amount of tax based on the reconciliation of payments / refunds. The below client_account_item_breakdown will also need to be provided as true for this to function.

client_account_booking_details can optionally be provided as true to include Booking details for Charges and Credits. The below client_account_item_breakdown will also need to be provided as true for this to function.

client_account_item_breakdown can optionally be provided as true to include all accounting items saved on the Booking Client Account in the Booking response. Please see the Bookings: Get request for an example of the response data.

display_guest_activities can optionally be provided as true to include the Guests Activity Tickets in the Guest response. display_cancelled_guest_activities can also be provided to include Cancelled Activity Tickets. Please see the Guests: Get request for an example of the Guest Activity response data.

display_guest_facility_hires can optionally be provided as true to include the Guests Facility Hires in the Guest response. display_cancelled_guest_facility_hires can also be provided to include Cancelled Facility Hires. Please see the Guests: Get request for an example of the Guest Facility Hire response data.

display_cancelled_booking_activities can optionally be provided as true to include Cancelled Activity Tickets for the Booking.

display_cancelled_booking_facility_hires can optionally be provided as true to include Cancelled Facility Hire for the Booking.

Response Notes:

The Guests array returned may contain more than one entry for multi-Guest Bookings - you can determine the main Guest as indicated by the primary_client field

The Equipment array returned has the data of all the equipment related to the booking. It returns an empty array if the booking has no equipment added

If the Bookings: List request has account_breakdown as true this will also affect the Guests array returned

The default_client_account_id field in the Booking array can be used to charge to the Booking Client Account, this may be different from the account_id where the Booking is part of a Group and the Guests are not paying individually

Inventory Item data:

The inventory_item array holds all the Inventory Item objects for the Booking.

  • stay_cost_contribution indicates whether the amount is Included in the price of each night, or if it Increases the price of each night, or if it is Excluded from the price of each night (still counts as an add on cost but is not subject to discounts).
  • When the inventory_item gl_account_id key is null this means match the Booking gl_account_id
  • When the inventory_item gl_category_id key is null this means match the Booking gl_category_id
  • The discounts_apply key on each inventory_item indicates whether this item contributes to Discount Calculation

Guest Data

title can be any string; Newbook does not restrict users to specific titles for Guests

contact_details

  • allow_transactional: Guest allows general contact related to Bookings or accounts
  • allow_marketing: Guest allows marketing contact such as newsletters

Tariffs Quoted Data

tariffs_quoted array of objects shows the quoted tariff for each night

  • original_amount the figure the Newbook platform originally computed as the price to stay for this night.
  • calculated_amount the figure the user (staff member logged and using Newbook PMS) has saved as the price to stay for this night
    This figure defaults to original_amount, but the user can have the ability to override the price if they need to
  • charge_amount the total calculated stay cost (calculated_amount) excluding additional costs that are charged separately
    This is the figure which should be treated as the base price to stay for the night
    The following components, when present, are subtracted from calculated_amount to yield charge_amount:
    • Inventory items which are included in stay cost
    • Additional Occupant Type charges
  • occupant_charges returns an array of additional occupant type charges
    This will be empty unless LOS GL Account Overrides have been enabled and configured for occupant types

Bookings: List Example

Request URL

https://api.newbook.cloud/rest/bookings_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"period_from": "2015-08-21 00:00:00",
											"period_to": "2015-08-21 23:59:59",
											"list_type": "inhouse",
											"restrict_mail_outs": 1,
											"booking_reason": [1,2,3,4],
											"booking_source": 1,
											"booking_method": 2,
											"booking_demographic": 3,
											"account_breakdown": true
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"booking_id": 11034,
												"booking_arrival": "2024-04-20 14:00:00",
												"booking_departure": "2024-04-24 10:00:00",
												"booking_eta": "15:00",
												"booking_length": "4",
												"booking_status": "Confirmed",
												"booking_checkedin": null,
												"booking_checkedout": null,
												"booking_adults": 2,
												"booking_children": 3,
												"booking_infants": 0,
												"booking_animals": 0,
												"booking_total": "649.50",
												"booking_method_id": 2,
												"booking_method_name": "Booking.com",
												"booking_source_id": 5,
												"booking_source_name": "Booking.com",
												"booking_reason_id": 1,
												"booking_reason_name": "Business",
												"booking_demographic_id": null,
												"booking_demographic_name": "None",
												"booking_market_segment_id": null,
												"booking_market_segment_name": "None",
												"booking_parent_source_id": "1",
												"booking_parent_source_name": "Short Term",
												"booking_modified": "2024-04-18 11:30:00",
												"booking_placed": "2024-04-18 11:30:00",
												"booking_booked_by": "Newbook Support",
												"booking_booked_by_id": "-2",
												"booking_arrived_by": "None",
												"booking_arrived_by_id": null,
												"booking_departed_by": "None",
												"booking_departed_by_id": null,
												"gl_account_id": "1",
												"gl_category_id": "1",
												"company_id": null,
												"company_name": null,
												"travel_agent_id": 46,
												"travel_agent_name": "Booking.com",
												"travel_agent_commission_total": "44.50",
												"booking_reference_id": "1234567890",
												"tariff_name": "BOOK NOW",
												"tariff_total": "525.00",
												"tariffs_quoted": [
												    {
												        "tariff_quoted_id": 1,
												        "stay_date": "2024-04-20",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    },
												    {
												        "tariff_quoted_id": 2,
												        "stay_date": "2024-04-21",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    },
												    {
												        "tariff_quoted_id": 3,
												        "stay_date": "2024-04-22",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    },
												    {
												        "tariff_quoted_id": 4,
												        "stay_date": "2024-04-23",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    }
												],
												"inventory_items": [{
													"description": "Champagne",
													"stay_date": "2024-04-20",
													"stay_cost_contribution": "Include",
													"gl_account_id": "4",
													"gl_category_id": "2",
													"amount": "75.00"
												},{
													"description": "Picnic Basket",
													"stay_date": "2024-04-20",
													"stay_cost_contribution": "Increase",
													"gl_account_id": "4",
													"gl_category_id": "2",
													"amount": "125.00"
												}],
												"discount_id": "1",
												"discount_name": "Member Discount",
												"discount_code": "",
												"discount_total": "80.00",
												"discounts": [{
													"discount_id": "1",
													"discount_name": "Member Discount",
													"discount_code": "",
													"discount_total": "20.00"
												}],
												"account_id": "14042",
												"default_client_account_id": "14042",
												"account_balance": "99.00",
												"auto_billing_limit": null,
												"site_id": "1",
												"site_name": "DC001",
												"site_status": "Clean",
												"category_id": "1",
												"category_name": "Standard Cabin (2BR) - A",
												"custom_fields": [{
													"id": 2,
													"type": "text",
													"label": "Custom Text",
													"value": "Custom Value"
												}],
												"guests": [{
													"guest_id": "1",
													"title": "Mr",
													"firstname": "John",
													"lastname": "Doe",
													"othername": "",
													"gender": null,
													"date_of_birth": null,
													"company_id": null,
													"company_name": null,
													"date_created": "2024-04-18 11:30:00",
													"modified_when": "2024-04-18 00:00:00",
													"last_note_when": "2024-04-18 00:00:00",
													"blacklisted_when": "2024-04-19 00:00:00",
													"vip_when": null,
													"account_id": "13783",
													"account_balance": "15.00",
													"auto_billing_limit": null,
													"primary_client": "1",
													"street": "Level 2, 9 Ouyan Street",
													"city": "Surfers Paradise",
													"state": "Queensland (QLD)",
													"postcode": "4217",
													"country": "Australia",
													"contact_details": [{
														"id": 1,
														"type": "phone",
														"content": "0756554600",
														"notes": "",
														"allow_transactional": "1",
														"allow_marketing": "1"
													},{
														"id": 2,
														"type": "email",
														"content": "john.doe@test.com",
														"notes": "",
														"allow_transactional": "1",
														"allow_marketing": "0"
													}],
													"custom_fields": [{
														"id": 1,
														"type": "text",
														"label": "My Test Field",
														"value": "Something"
													}],
													"membership_details": [{
														"type": "Testing Service",
														"type_id": "2",
														"service_id": 4,
														"level": null,
														"content": "1234567",
														"expiry_date": "2025-01-19"
													}],
													"equipment": [
														{
															"equipment_id": "26",
															"equipment_name": "My Honda",
															"equipment_make": "Honda",
															"equipment_model": "Accord",
															"equipment_type_id": "1",
															"equipment_type_name": "car",
															"equipment_length": "5.00",
															"equipment_width": "2.00",
															"equipment_height": "2.00",
															"equipment_registration": "222ABC",
															"equipment_registration_expiry": "2025-01-19",
															"active": "1"
														}
													],
													"dietary_requirements": [
														"1",
														"2"
													],
													"notes": [{
														"id": "1",
														"type_id": "1",
														"content": "This is my Guest note",
														"created_when": "2024-04-18 11:30:00",
														"created_by": "11",
														"updated_when": "2024-04-19 00:00:00",
														"updated_by": "5"
													}],
													"account_breakdown": [{
														"name": "Accommodation",
														"gl_category_id": "1",
														"balance": "7.00"
													},{
														"name": "Extras",
														"gl_category_id": "2",
														"balance": "8.00"
													}]
												}],
												"guests_memberships_id": "1",
												"equipment": [],
												"notes": [{
													"id": "1",
													"type_id": "1",
													"content": "This is my Booking note",
													"created_when": "2024-04-18 11:30:00",
													"created_by": "11",
													"updated_when": "2024-04-19 00:00:00",
													"updated_by": "5"
												}],
												"payment_plans": [],
												"access_codes": [{
													"id": "1017",
													"card_id": "354",
													"access_code": "689323",
													"type": "bookings",
													"type_id": "11034",
													"description": "Access Card: 5",
													"car_rego": "",
													"period_from": "2024-04-20 14:00:00",
													"period_to": "2024-04-24 10:00:00",
													"area_id": "18",
													"created_when": "2024-04-18 11:30:00",
													"cancelled_when": null,
													"cancelled_reason": "",
													"cancelled_by": "0",
													"access_code_status": null,
													"area_name": "All Access"
												}],
												"bookings_group_id": null,
												"bookings_group_name": null,
												"booking_cancelled": null,
												"booking_cancelled_by": null,
												"booking_cancelled_by_id": null,
												"booking_cancelled_reason_id": null,
												"booking_cancelled_reason_name": null,
												"account_breakdown": [{
													"name": "Accommodation",
													"gl_category_id": "1",
													"balance": "90.00"
												},{
													"name": "Extras",
													"gl_category_id": "2",
													"balance": "9.00"
													}]
											},{
												"booking_id": 11034,
												"booking_arrival": "2024-04-20 14:00:00",
												"booking_departure": "2024-08-19 10:00:00",
												"booking_eta": "15:00",
												"booking_length": "121",
												"booking_status": "Confirmed",
												"booking_checkedin": null,
												"booking_checkedout": null,
												"booking_adults": 2,
												"booking_children": 0,
												"booking_infants": 0,
												"booking_animals": 0,
												"booking_total": "80.00",
												"booking_method_id": null,
												"booking_method_name": "None",
												"booking_source_id": null,
												"booking_source_name": "None",
												"booking_reason_id": 4,
												"booking_reason_name": "Permanent",
												"booking_demographic_id": null,
												"booking_demographic_name": "None",
												"booking_market_segment_id": null,
												"booking_market_segment_name": "None",
												"booking_parent_source_id": "2",
												"booking_parent_source_name": "Long Term",
												"booking_placed": "2024-04-18 11:30:00",
												"booking_booked_by": "Newbook Support",
												"booking_booked_by_id": "-2",
												"booking_arrived_by": "None",
												"booking_arrived_by_id": null,
												"booking_departed_by": "None",
												"booking_departed_by_id": null,
												"gl_account_id": "1",
												"gl_category_id": "1",
												"company_id": null,
												"company_name": null,
												"travel_agent_id": null,
												"travel_agent_name": null,
												"travel_agent_commission_total": "0.00",
												"booking_reference_id": "",
												"tariff_name": "",
												"tariff_total": "1728.57"
												"inventory_items": [],
												"discount_id": null,
												"discount_name": "None",
												"discount_code": "",
												"discount_total": "0.00",
												"discounts": [],
												"account_id": "14032",
												"default_client_account_id": "14043",
												"account_balance": "0.00",
												"auto_billing_limit": null,
												"site_id": "2",
												"site_name": "DC002",
												"site_status": "Clean",
												"category_id": "1",
												"category_name": "Standard Cabin (2BR) - A",
												"custom_fields": [],
												"guests": [{
													"guest_id": "1",
													"title": "Mr",
													"firstname": "John",
													"lastname": "Doe",
													"othername": "",
													"gender": null,
													"date_of_birth": null,
													"company_id": null,
													"company_name": null,
													"date_created": "2024-04-18 11:30:00",
													"modified_when": "2024-04-18 00:00:00",
													"last_note_when": "2024-04-18 00:00:00",
													"blacklisted_when": "2024-04-19 00:00:00",
													"vip_when": null,
													"account_id": "13783",
													"account_balance": "15.00",
													"auto_billing_limit": null,
													"primary_client": "1",
													"street": "Level 2, 9 Ouyan Street",
													"city": "Surfers Paradise",
													"state": "Queensland (QLD)",
													"postcode": "4217",
													"country": "Australia",
													"contact_details": [{
														"id": 1,
														"type": "phone",
														"content": "0756554600",
														"notes": "",
														"allow_transactional": "1",
														"allow_marketing": "1"
													},{
														"id": 2,
														"type": "email",
														"content": "john.doe@test.com",
														"notes": "",
														"allow_transactional": "1",
														"allow_marketing": "0"
													}],
													"custom_fields": [{
														"id": 1,
														"type": "text",
														"label": "My Test Field",
														"value": "Something"
													}],
													"membership_details": [{
														"type": "Testing Service",
														"type_id": "2",
														"service_id": 4,
														"level": null,
														"content": "1234567",
														"expiry_date": "2025-01-19"
													}],
													"equipment": [
														{
															"equipment_id": "26",
															"equipment_name": "My Honda",
															"equipment_make": "Honda",
															"equipment_model": "Accord",
															"equipment_type_id": "1",
															"equipment_type_name": "car",
															"equipment_length": "5.00",
															"equipment_width": "2.00",
															"equipment_height": "2.00",
															"equipment_registration": "222ABC",
															"equipment_registration_expiry": "2025-01-19",
															"active": "1"
														}
													],
													"dietary_requirements": [
														"1",
														"2"
													],
													"notes": [{
														"id": "1",
														"type_id": "1",
														"content": "This is my Guest note",
														"created_when": "2024-04-18 11:30:00",
														"created_by": "11",
														"updated_when": "2024-04-19 00:00:00",
														"updated_by": "5"
													}],
													"account_breakdown": [{
														"name": "Accommodation",
														"gl_category_id": "1",
														"balance": "7.00"
													},{
														"name": "Extras",
														"gl_category_id": "2",
														"balance": "8.00"
													}]
												}],
												"guests_memberships_id": "1",
												"equipment": [
													{
														"equipment_id": "26",
														"equipment_name": "My Honda",
														"equipment_make": "Honda",
														"equipment_model": "Accord",
														"equipment_type_id": "1",
														"equipment_type_name": "car",
														"equipment_length": "5.00",
														"equipment_width": "2.00",
														"equipment_height": "2.00",
														"equipment_registration": "222ABC",
														"equipment_registration_expiry": "2024-04-20"
													}
												],
												"notes": [{
													"id": "1",
													"type_id": "1",
													"content": "This is my Booking note",
													"created_when": "2024-04-18 11:30:00",
													"created_by": "11",
													"updated_when": "2024-04-19 00:00:00",
													"updated_by": "5"
												}],
												"payment_plans": [{
													"booking_id": "11034",
													"billing_cycle": "week",
													"instalment_count": "8",
													"instalment_attempts": "1",
													"instalment_amount": "216.07",
													"admin_fee_amount": "0.00",
													"authorisation_type": "cc_authorisations",
													"next_run": "2024-04-25",
													"status": "uptodate"
												}],
												"access_codes": [{
													"id": "1018",
													"card_id": "355",
													"access_code": "753093",
													"type": "bookings",
													"type_id": "11034",
													"description": "Access Card: 6",
													"car_rego": "",
													"period_from": "2024-04-20 14:00:00",
													"period_to": "2024-08-19 10:00:00",
													"area_id": "18",
													"created_when": "2024-04-18 11:30:00",
													"cancelled_when": null,
													"cancelled_reason": "",
													"cancelled_by": "0",
													"access_code_status": null,
													"area_name": "All Access"
												}],
												"bookings_group_id": null,
												"bookings_group_name": null,
												"booking_cancelled": null,
												"booking_cancelled_by": null,
												"booking_cancelled_by_id": null,
												"booking_cancelled_reason_id": null,
												"booking_cancelled_reason_name": null,
												"account_breakdown": [{
													"name": "Accommodation",
													"gl_category_id": "1",
													"balance": "0.00"
												},{
													"name": "Extras",
													"gl_category_id": "2",
													"balance": "0.00"
												}]
											}],
											"message": ""
										}
									
								
AnchorBookings: Get

Retrieve the details of a single Booking.

Request Notes:

booking_id must be provided to retrieve the Booking.

Send account_breakdown as true to see the balance of each associated Sub Client Account (gl_category).

Provide display_guest_notes as false if you wish to ignore the guest notes. Not providing the field will behave the same as providing it as true which will display the full array of the guest notes.

Send access_code_mappings as true to also return a list of Access Code mapping details to other software integrations such as Access Control Systems.

client_account_tax_reconciliation can optionally be provided as true to include the amount of tax based on the reconciliation of payments / refunds. The below client_account_item_breakdown will also need to be provided as true for this to function.

client_account_booking_details can optionally be provided as true to include Booking details for Charges and Credits. The below client_account_item_breakdown will also need to be provided as true for this to function.

client_account_item_breakdown can optionally be provided as true to include all accounting items saved on the Booking Client Account in the Booking response.

e.g.

								
									{
										"charges": [
											{
												"id": "3062",
												"account_id": "1796594",
												"gl_category_id": "1",
												"gl_account_id": "32",
												"description": "Standard Rate (2024-04-19)",
												"amount": 100,
												"tax_free": "0",
												"generated_by": "1",
												"generated_when": "2024-04-19 11:30:00",
												"inventory_item_id": null,
												"voided_by": "0",
												"voided_when": null,
												"link_type": "tariffs_quoted",
												"link_type_id": "123",
												"link_period_from": "2024-04-19",
												"link_period_to": "2024-04-19",
												"taxes": [
													{
														"tax_id": 1,
														"tax_name": "GST",
														"tax_inclusive": true,
														"tax_amount": "9.09"
													}
												]
											}
										],
										"credits": [
											{
												"id": "4351",
												"account_id": "1796594",
												"gl_category_id": "1",
												"gl_account_id": "32",
												"description": "Discount",
												"amount": 5,
												"tax_free": "0",
												"generated_by": "1",
												"generated_when": "2024-04-19 11:30:00",
												"inventory_item_id": null,
												"voided_by": "0",
												"voided_when": null,
												"link_type": "discounts_quoted",
												"link_type_id": "1024",
												"link_period_from": "2024-04-19",
												"link_period_to": "2024-04-19",
												"taxes": [
													{
														"tax_id": 1,
														"tax_name": "GST",
														"tax_inclusive": true,
														"tax_amount": 0.45
													}
												]
											}
										],
										"payments": [
											{
												"id": "2",
												"account_id": "1796594",
												"gl_category_id": "1",
												"paid_by": "135576",
												"transaction_method": "manual",
												"transaction_id": null,
												"disbursed_booking_id": null,
												"disbursed_gl_account_id": null,
												"description": "Accommodation",
												"amount": 100,
												"tendered": 100,
												"type": "cash",
												"type_id": "4",
												"type_reference": "",
												"deposit": "0",
												"generated_by": "1",
												"generated_when": "2024-04-19",
												"voided_by": "0",
												"voided_when": null,
												"credits": [],
												"charges": [
													{
														"link_id": 1,
														"charge_id": 3062,
														"reconciled_amount": 100,
														"timestamp": "2024-04-19",
														"voided_when": null
													}
												]
											}
										],
										"refunds": [
											{
												"id": "2",
												"account_id": "1796594",
												"gl_category_id": "1",
												"refunded_to": "135576",
												"transaction_method": "manual",
												"transaction_id": null,
												"disbursed_booking_id": null,
												"disbursed_gl_account_id": null,
												"description": "Refunding Discount Overpayment",
												"amount": 5,
												"tendered": 5,
												"type": "cash",
												"type_id": "4",
												"type_reference": "",
												"generated_by": "1",
												"generated_when": "2024-04-19",
												"voided_by": "0",
												"voided_when": null,
												"credits": [
													{
														"link_id": 1,
														"credit_id": 4351,
														"reconciled_amount": 5,
														"timestamp": "2024-04-19",
														"voided_when": null
													}
												],
												"payments": []
											}
										]
									}
								
							

display_guest_activities can optionally be provided as true to include the Guests Activity Tickets in the Guest response. display_cancelled_guest_activities can also be provided to include Cancelled Activity Tickets.

e.g.

								
									{
		"activities": [
			{
				"ticket_id": 8,
				"activity_id": 2,
				"name": "Golf",
				"duration": "7",
				"duration_interval": "day",
				"facility_id": null,
				"facility_name": null,
				"facility_category_id": null,
				"facility_category_name": null,
				"configuration_name": "Golf - 18 Holes",
				"id": 8,
				"period_from": "2024-04-23 09:00:00",
				"period_to": "2024-04-23 11:00:00",
				"activity_configuration_id": 2,
				"for": "guests",
				"for_id": 1,
				"adults": 2,
				"children": 0,
				"infants": 0,
				"animals": 0,
				"configuration_included_adults": null,
				"configuration_included_children": null,
				"configuration_included_infants": null,
				"configuration_included_animals": null,
				"inventory_item_id": 11,
				"account_id": null,
				"gl_category_id": 1,
				"gl_account_id": 1,
				"description": "Golf - 18 holes of golf",
				"interval": "once",
				"interval_multiplier": "1",
				"amount": 0,
				"per_adult": 80,
				"per_child": 40,
				"per_infant": 0,
				"per_animal": 0,
				"tax_free": "0",
				"cancelled_when": null,
				"cancelled_by": null,
				"created_when": "2024-04-12 11:32:00",
				"created_by": "-2",
				"for_name": "John Doe",
				"booking_site_id": null,
				"booking_site_name": null,
				"booking_category_id": null,
				"booking_category_name": null,
				"inventory_items": [
					{
						"ticket_id": "8",
						"inventory_item_id": null,
						"gl_category_id": null,
						"gl_account_id": null,
						"description": "Cart Hire",
						"interval": "once",
						"interval_multiplier": "0",
						"amount": "45.00",
						"per_adult": "0.00",
						"per_child": "0.00",
						"per_infant": "0.00",
						"per_animal": "0.00",
						"tax_free": "0",
						"guest_visible": "1",
						"charge_id": "351"
					}
				],
				"units": 1,
				"calculated_total": 205,
				"total_paid": 0,
				"payment_status": "Unpaid",
				"access_codes": [],
				"custom_fields": [],
				"payment_plans": []
			}
		]
	}								
							

display_guest_facility_hires can optionally be provided as true to include the Guests Facility Hires in the Guest response. display_cancelled_guest_facility_hires can also be provided to include Cancelled Facility Hires.

e.g.

								
									{
		"facilities_hire": [
			{
				"id": "2",
				"facility_id": "2",
				"period_from": "2024-04-23 12:00:00",
				"period_to": "2024-04-23 13:00:00",
				"length": "1 hour",
				"amount": "55.00",
				"per_adult": "0.00",
				"per_child": "0.00",
				"per_infant": "0.00",
				"per_animal": "0.00",
				"tax_free": "0",
				"adults": "1",
				"children": "0",
				"infants": "0",
				"animals": "0",
				"hire_account_for_id": "51",
				"hire_account_for_name": "John Doe",
				"hire_account_for": "guests",
				"hire_account_balance": "0.00",
				"billing_account_for_id": "51",
				"billing_account_for_name": "John Doe",
				"billing_account_for": "guests",
				"billing_account_balance": "55.00",
				"inventory_item_id": "2",
				"gl_category_id": "1",
				"gl_account_id": "9",
				"description": "Kayak Hire",
				"override_tax_rate_ids": [],
				"units": 1
			}
		]
	}								
							

display_cancelled_booking_activities can optionally be provided as true to include Cancelled Activity Tickets for the Booking.

display_cancelled_booking_facility_hires can optionally be provided as true to include Cancelled Facility Hire for the Booking.

Example Booking Detail Attributes on charges, credits, payments, refunds when client_account_booking_details is true.

e.g.

								
									{
										"guest_visible": "1",
										"discounts_apply": "1",
										"booking_id": "1234",
										"booking_name": "John Doe",
										"booking_status": "Confirmed",
										"booking_site_id": "2",
										"booking_period_from": "2024-04-19 11:30:00",
										"booking_period_to": "2024-04-20 14:00:00",
										"booking_reference_id": "",
										"activity_booked_id": null
									}
								
							

Response Notes:

The returned data from this request is identical to Bookings: List but for the specific Booking alone.

If no such Booking ID exists, the success response parameter will be "false" and no data will be returned.

Bookings: Get Example

Request URL

https://api.newbook.cloud/rest/bookings_get

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"booking_id": 11033
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"booking_id": 11034,
												"booking_arrival": "2024-04-20 14:00:00",
												"booking_departure": "2024-04-24 10:00:00",
												"booking_eta": "15:00",
												"booking_length": "4",
												"booking_status": "Confirmed",
												"booking_checkedin": null,
												"booking_checkedout": null,
												"booking_adults": 2,
												"booking_children": 3,
												"booking_infants": 0,
												"booking_animals": 0,
												"booking_total": "649.50",
												"booking_method_id": 2,
												"booking_method_name": "Booking.com",
												"booking_source_id": 5,
												"booking_source_name": "Booking.com",
												"booking_reason_id": 1,
												"booking_reason_name": "Business",
												"booking_demographic_id": null,
												"booking_demographic_name": "None",
												"booking_market_segment_id": null,
												"booking_market_segment_name": "None",
												"booking_parent_source_id": "1",
												"booking_parent_source_name": "Short Term",
												"booking_modified": "2024-04-18 11:30:00",
												"booking_placed": "2024-04-18 11:30:00",
												"booking_booked_by": "Newbook Support",
												"booking_booked_by_id": "-2",
												"booking_arrived_by": "None",
												"booking_arrived_by_id": null,
												"booking_departed_by": "None",
												"booking_departed_by_id": null,
												"gl_account_id": "1",
												"gl_category_id": "1",
												"company_id": null,
												"company_name": null,
												"travel_agent_id": 46,
												"travel_agent_name": "Booking.com",
												"travel_agent_commission_total": "44.50",
												"booking_reference_id": "1234567890",
												"tariff_name": "BOOK NOW",
												"tariff_total": "525.00",
												"tariffs_quoted": [
												    {
												        "tariff_quoted_id": 1,
												        "stay_date": "2024-04-20",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    },
												    {
												        "tariff_quoted_id": 2,
												        "stay_date": "2024-04-21",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    },
												    {
												        "tariff_quoted_id": 3,
												        "stay_date": "2024-04-22",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    },
												    {
												        "tariff_quoted_id": 4,
												        "stay_date": "2024-04-23",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    }
												],
												"inventory_items": [{
													"description": "Champagne",
													"stay_date": "2024-04-20",
													"stay_cost_contribution": "Include",
													"gl_account_id": "4",
													"gl_category_id": "2",
													"amount": "75.00"
												},{
													"description": "Picnic Basket",
													"stay_date": "2024-04-20",
													"stay_cost_contribution": "Increase",
													"gl_account_id": "4",
													"gl_category_id": "2",
													"amount": "125.00"
												}],
												"discount_id": "1",
												"discount_name": "Member Discount",
												"discount_code": "",
												"discount_total": "80.00",
												"discounts": [{
													"discount_id": "1",
													"discount_name": "Member Discount",
													"discount_code": "",
													"discount_total": "20.00"
												}],
												"account_id": "14042",
												"default_client_account_id": "14042",
												"account_balance": "99.00",
												"auto_billing_limit": null,
												"site_id": "1",
												"site_name": "DC001",
												"site_status": "Clean",
												"category_id": "1",
												"category_name": "Standard Cabin (2BR) - A",
												"custom_fields": [{
													"id": 2,
													"type": "text",
													"label": "Custom Text",
													"value": "Custom Value"
												}],
												"guests": [{
													"guest_id": "1",
													"title": "Mr",
													"firstname": "John",
													"lastname": "Doe",
													"othername": "",
													"gender": null,
													"date_of_birth": null,
													"company_id": null,
													"company_name": null,
													"date_created": "2024-04-18 11:30:00",
													"modified_when": "2024-04-18 00:00:00",
													"last_note_when": "2024-04-18 00:00:00",
													"blacklisted_when": "2024-04-19 00:00:00",
													"vip_when": null,
													"account_id": "13783",
													"account_balance": "15.00",
													"auto_billing_limit": null,
													"primary_client": "1",
													"street": "Level 2, 9 Ouyan Street",
													"city": "Surfers Paradise",
													"state": "Queensland (QLD)",
													"postcode": "4217",
													"country": "Australia",
													"contact_details": [{
														"id": 1,
														"type": "phone",
														"content": "0756554600",
														"notes": "",
														"allow_transactional": "1",
														"allow_marketing": "1"
													},{
														"id": 2,
														"type": "email",
														"content": "john.doe@test.com",
														"notes": "",
														"allow_transactional": "1",
														"allow_marketing": "0"
													}],
													"custom_fields": [{
														"id": 1,
														"type": "text",
														"label": "My Test Field",
														"value": "Something"
													}],
													"membership_details": [{
														"type": "Testing Service",
														"type_id": "2",
														"service_id": 4,
														"level": null,
														"content": "1234567",
														"expiry_date": "2025-01-19"
													}],
													"equipment": [
														{
															"equipment_id": "26",
															"equipment_name": "My Honda",
															"equipment_make": "Honda",
															"equipment_model": "Accord",
															"equipment_type_id": "1",
															"equipment_type_name": "car",
															"equipment_length": "5.00",
															"equipment_width": "2.00",
															"equipment_height": "2.00",
															"equipment_registration": "222ABC",
															"equipment_registration_expiry": "2025-01-19",
															"active": "1"
														}
													],
													"dietary_requirements": [
														"1",
														"2"
													],
													"notes": [{
														"id": "1",
														"type_id": "1",
														"content": "This is my Guest note",
														"created_when": "2024-04-18 11:30:00",
														"created_by": "11",
														"updated_when": "2024-04-19 00:00:00",
														"updated_by": "5"
													}]
												}],
												"guests_memberships_id": "1",
												"equipment": [],
												"notes": [{
													"id": "1",
													"type_id": "1",
													"content": "This is my Booking note",
													"created_when": "2024-04-18 11:30:00",
													"created_by": "11",
													"updated_when": "2024-04-19 00:00:00",
													"updated_by": "5"
												}],
												"payment_plans": [],
												"access_codes": [{
													"id": "1017",
													"card_id": "354",
													"access_code": "689323",
													"type": "bookings",
													"type_id": "11034",
													"description": "Access Card: 5",
													"car_rego": "",
													"period_from": "2024-04-20 14:00:00",
													"period_to": "2024-04-24 10:00:00",
													"area_id": "18",
													"created_when": "2024-04-18 11:30:00",
													"cancelled_when": null,
													"cancelled_reason": "",
													"cancelled_by": "0",
													"access_code_status": null,
													"area_name": "All Access"
												}],
												"bookings_group_id": null,
												"bookings_group_name": null,
												"booking_cancelled": null,
												"booking_cancelled_by": null,
												"booking_cancelled_by_id": null,
												"booking_cancelled_reason_id": null,
												"booking_cancelled_reason_name": null
											},
											"message": ""
										}
									
								
AnchorBookings: Push Notification

Newbook can send a push notification every time a Booking is created or updated.

The endpoint that data is pushed to needs to be configured against the REST API User credentials. This is done by the Newbook Support team. Please contact Newbook Support if you wish to have this configured for your REST API user account.

Only one push notification endpoint can be configured per REST API User per Newbook Instance.

Request Notes:

The push notification data is similar to Bookings: Get, but only contains the booking information within the data property.

The push notification is sent as a POST request to the configured endpoint.

AnchorBookings: Retrieve Current in Site

Check a particular Site to see if a Guest is currently In-House

Request Notes:

site_id or site_name must be provided. If you use site_name it must match character for character.

Response Notes:

The returned data from this request is identical to Bookings: List but for the specific Booking alone.

If no such Site exists, the success response parameter will be "false" and no data will be returned.

Bookings: Retrieve Current in Site Example

Request URL

https://api.newbook.cloud/rest/site_inhouse_booking

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"site_name": "101"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"booking_id": 11034,
												"booking_arrival": "2024-04-20 14:00:00",
												"booking_departure": "2024-04-24 10:00:00",
												"booking_eta": "15:00",
												"booking_length": "4",
												"booking_status": "Confirmed",
												"booking_checkedin": null,
												"booking_checkedout": null,
												"booking_adults": 2,
												"booking_children": 3,
												"booking_infants": 0,
												"booking_animals": 0,
												"booking_total": "649.50",
												"booking_method_id": 2,
												"booking_method_name": "Booking.com",
												"booking_source_id": 5,
												"booking_source_name": "Booking.com",
												"booking_reason_id": 1,
												"booking_reason_name": "Business",
												"booking_demographic_id": null,
												"booking_demographic_name": "None",
												"booking_market_segment_id": null,
												"booking_market_segment_name": "None",
												"booking_parent_source_id": "1",
												"booking_parent_source_name": "Short Term",
												"booking_modified": "2024-04-18 11:30:00",
												"booking_placed": "2024-04-18 11:30:00",
												"booking_booked_by": "Newbook Support",
												"booking_booked_by_id": "-2",
												"booking_arrived_by": "None",
												"booking_arrived_by_id": null,
												"booking_departed_by": "None",
												"booking_departed_by_id": null,
												"gl_account_id": "1",
												"gl_category_id": "1",
												"company_id": null,
												"company_name": null,
												"travel_agent_id": 46,
												"travel_agent_name": "Booking.com",
												"travel_agent_commission_total": "44.50",
												"booking_reference_id": "1234567890",
												"tariff_name": "BOOK NOW",
												"tariff_total": "525.00",
												"tariffs_quoted": [
												    {
												        "tariff_quoted_id": 1,
												        "stay_date": "2024-04-20",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    },
												    {
												        "tariff_quoted_id": 2,
												        "stay_date": "2024-04-21",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    },
												    {
												        "tariff_quoted_id": 3,
												        "stay_date": "2024-04-22",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    },
												    {
												        "tariff_quoted_id": 4,
												        "stay_date": "2024-04-23",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    }
												],
												"inventory_items": [{
													"description": "Champagne",
													"stay_date": "2024-04-20",
													"stay_cost_contribution": "Include",
													"gl_account_id": "4",
													"gl_category_id": "2",
													"amount": "75.00"
												},{
													"description": "Picnic Basket",
													"stay_date": "2024-04-20",
													"stay_cost_contribution": "Increase",
													"gl_account_id": "4",
													"gl_category_id": "2",
													"amount": "125.00"
												}],
												"discount_id": "1",
												"discount_name": "Member Discount",
												"discount_code": "",
												"discount_total": "80.00",
												"discounts": [{
													"discount_id": "1",
													"discount_name": "Member Discount",
													"discount_code": "",
													"discount_total": "20.00"
												}],
												"account_id": "14042",
												"default_client_account_id": "14042",
												"account_balance": "99.00",
												"auto_billing_limit": null,
												"site_id": "1",
												"site_name": "DC001",
												"site_status": "Clean",
												"category_id": "1",
												"category_name": "Standard Cabin (2BR) - A",
												"custom_fields": [{
													"id": 2,
													"type": "text",
													"label": "Custom Text",
													"value": "Custom Value"
												}],
												"guests": [{
													"guest_id": "1",
													"title": "Mr",
													"firstname": "John",
													"lastname": "Doe",
													"othername": "",
													"gender": null,
													"date_of_birth": null,
													"company_id": null,
													"company_name": null,
													"date_created": "2024-04-18 11:30:00",
													"modified_when": "2024-04-18 00:00:00",
													"last_note_when": "2024-04-18 00:00:00",
													"blacklisted_when": "2024-04-19 00:00:00",
													"vip_when": null,
													"account_id": "13783",
													"account_balance": "15.00",
													"auto_billing_limit": null,
													"primary_client": "1",
													"street": "Level 2, 9 Ouyan Street",
													"city": "Surfers Paradise",
													"state": "Queensland (QLD)",
													"postcode": "4217",
													"country": "Australia",
													"contact_details": [{
														"id": 1,
														"type": "phone",
														"content": "0756554600",
														"notes": "",
														"allow_transactional": "1",
														"allow_marketing": "1"
													},{
														"id": 2,
														"type": "email",
														"content": "john.doe@test.com",
														"notes": "",
														"allow_transactional": "1",
														"allow_marketing": "0"
													}],
													"custom_fields": [{
														"id": 1,
														"type": "text",
														"label": "My Test Field",
														"value": "Something"
													}],
													"membership_details": [{
														"type": "Testing Service",
														"type_id": "2",
														"service_id": 4,
														"level": null,
														"content": "1234567",
														"expiry_date": "2025-01-19"
													}],
													"equipment": [
														{
															"equipment_id": "26",
															"equipment_name": "My Honda",
															"equipment_make": "Honda",
															"equipment_model": "Accord",
															"equipment_type_id": "1",
															"equipment_type_name": "car",
															"equipment_length": "5.00",
															"equipment_width": "2.00",
															"equipment_height": "2.00",
															"equipment_registration": "222ABC",
															"equipment_registration_expiry": "2025-01-19",
															"active": "1"
														}
													],
													"dietary_requirements": [
														"1",
														"2"
													],
													"notes": [{
														"id": "1",
														"type_id": "1",
														"content": "This is my Guest note",
														"created_when": "2024-04-18 11:30:00",
														"created_by": "11",
														"updated_when": "2024-04-19 00:00:00",
														"updated_by": "5"
													}]
												}],
												"guests_memberships_id": "1",
												"equipment": [],
												"notes": [{
													"id": "1",
													"type_id": "1",
													"content": "This is my Booking note",
													"created_when": "2024-04-18 11:30:00",
													"created_by": "11",
													"updated_when": "2024-04-19 00:00:00",
													"updated_by": "5"
												}],
												"payment_plans": [],
												"access_codes": [{
													"id": "1017",
													"card_id": "354",
													"access_code": "689323",
													"type": "bookings",
													"type_id": "11034",
													"description": "Access Card: 5",
													"car_rego": "",
													"period_from": "2024-04-20 14:00:00",
													"period_to": "2024-04-24 10:00:00",
													"area_id": "18",
													"created_when": "2024-04-18 11:30:00",
													"cancelled_when": null,
													"cancelled_reason": "",
													"cancelled_by": "0",
													"access_code_status": null,
													"area_name": "All Access"
												}],
												"bookings_group_id": null,
												"bookings_group_name": null,
												"booking_cancelled": null,
												"booking_cancelled_by": null,
												"booking_cancelled_by_id": null,
												"booking_cancelled_reason_id": null,
												"booking_cancelled_reason_name": null
											},
											"message": ""
										}
									
								
AnchorBookings: Pull Availability & Pricing

Advisory Notice
bookings_availability_pricing is designed to be used with most or all of its parameters provided.
Your integration should be making this request LAST, to check the pricing and availability for a specified date range, and Category or Site.
Such a request will be performant. A result will be returned to your integration quickly.

If you make this request without those parameters (to be clear, this is not advised!) the request will not be performant, as Newbook has to analyse availability information for all the Categories and all the Rate Types set up within the Instance.
Such a request will take a long time to return a result. This is not a bug or a defect in the Newbook platform - it is a misuse of this request.

Retrieve a list of Categories with the number of Sites available and the calculated tariff (cost) for bookings.

A URL is returned (online_booking_url) to convert the enquiry to an actual Booking via Newbook Online.

Request Notes:

You can provide site_id, category_id and category_type_id parameters.

You can provide length and width parameters to find Sites with matching sizes.

You can provide children, infants and animals as numeric parameters (like the adults parameter).

You can provide the following parameters for detailed Site matching based on particular Equipment Sizes or Equipment Types:

  • equipment_length, equipment_width and equipment_height (optional) to filter by sizing.
  • You can optionally provide equipment_measurement_unit as m for metres (default) or ft for feet, if you need Newbook to convert these for you.
  • equipment_type_ids to filter by supported Equipment Types.

Providing any of the above restricts the results returned.

You can provide discount_id parameter to have the response factor that provided Discount for the Booking. Please be advised some clients set up a required discount_code too like a "password" to unlock a given discount_id. If that is done, you must provide both to use the Discount.

When discount_id or discount_code parameters are provided, each object in the tariffs_available array will also include discount_success as a string boolean indicating if the Discount has applied to this Tariff, discount_total as a float indicating the Discount amount to be granted, and discount_message which will have a human-readable explanation when discount_success is false.

To see additional information in the response, you can provide daily_mode as "true". When this is done, each object in the tariffs_available array in the response will gain a new key tariffs_quoted, which is an object for each day requested detailing specifics about the price for that day.

								
									"2024-04-20": {
										"label": "Special",
										"type_id": "8",
										"tariff_id": "45",
										"tariff_name": "Special Rate",
										"stop_sell": "0",
										"minimum_periods": "7",
										"maximum_periods": "0",
										"base_min_combined": "1",
										"base_max_combined": "7",
										"tariffs_period_id": "19",
										"tariffs_period_name": "All Year",
										"tariff_applied_id": "480",
										"original_amount": "112.85",
										"calculated_amount": "112.85",
										"base_adult": 0,
										"base_child": 0,
										"base_infant": 0,
										"base_animal": 0,
										"base_combined": "2",
										"base_day_based": "1",
										"additionals_day_based": "0",
										"reset_night_counter": "1",
										"min_days_in_advance": "0",
										"max_days_in_advance": "0",
										"stop_sell_occupancy_percentage": "0",
										"amount": "112.85",
										"dynamic_base": null,
										"extras_combined": "1",
										"special_deal": "0",
										"dynamic": 0,
										"overridden": "standard",
										"close_arrival": 0,
										"close_departure": 0
									}
								
							

In addition, when daily_mode is provided as "true" the sites_available, sites_message, sites_code, and sites_extra_info keys in the response change from a single value into an object with a key/value for each day requested:

								
									"sites_available": {
    "2024-04-20": 1,
    "2024-04-21": 0,
    "2024-04-22": 5,
    "2024-04-23": 3,
    "2024-04-24": 6,
    "2024-04-25": 3
},
"sites_message": {
    "2024-04-20": "Minimum Advance Days has not been met, so there are no Sites available",
    "2024-04-21": "Minimum Advance Days has not been met, so there are no Sites available",
    "2024-04-22": "Minimum Advance Days has not been met, so there are no Sites available",
    "2024-04-23": "",
    "2024-04-24": "",
    "2024-04-25": ""
}
"sites_code": {
    "2024-04-20": 8,
    "2024-04-21": 8,
    "2024-04-22": 8,
    "2024-04-23": 0,
    "2024-04-24": 0,
    "2024-04-25": 0
}
"sites_extra_info": {
    "2024-04-20": "3",
    "2024-04-21": "3",
    "2024-04-22": "3",
    "2024-04-23": "",
    "2024-04-24": "",
    "2024-04-25": ""
}
								
							

In addition, when daily_mode is provided as "true" the response will have stay_through_sites_available, stay_through_sites_message, stay_through_sites_code, and stay_through_sites_extra_info per the original keys which would have been returned in the response:

								
									{
										"stay_through_sites_available": 1,
										"stay_through_sites_message": "",
										"stay_through_sites_code": 0,
										"stay_through_sites_extra_info": ""
									}
								
							

Another parameter you can provide is return_sites which when "true" changes sites_available in the response from just a number to an array of objects detailing the available Sites:

								
									"sites_available": [{
										"site_id": "6",
										"site_name": "Room 5",
										"category_id": "16",
										"category_name": "Single Room",
										"period_from": "2024-04-20 14:00:00",
										"period_to": "2024-04-27 10:00:00",
										"gl_account_id": "20",
										"gl_category_id": "1",
										"tax_free": "1",
										"vacancy_length": 1080
									},{
										"site_id": "15",
										"site_name": "Room 8",
										"category_id": "16",
										"category_name": "Single Room",
										"period_from": "2024-04-20 14:00:00",
										"period_to": "2024-04-27 10:00:00",
										"gl_account_id": "20",
										"gl_category_id": "1",
										"tax_free": "1",
										"vacancy_length": 45
									}]
								
							

Another parameter you can provide is return_membership_discount_pricing which when "true" calculates all the applicable Membership Discounts in each tariffs_available object:

								
									 "membership_discount_pricing": [
										{
											"membership_id": "2",
											"membership_name": "your membership program",
											"membership_description": "

Get a great discount by using your Membership!

", "membership_icon": "https://driveau.newbook.cloud/instance_manager_e240bdef70fa7392a0332a76c7431a46_5f8532ea266d2.png", "service_class": "Membership_Service_NAME", "service_level": "Your Configured Membership Service Level", "discount_id": "1", "discount_name": "Membership Discount", "discount_amount": 90.00 } ]

If the membership_discount_pricing is empty it means the calculated discount amount was $0, or there is no applicable membership discount for this combination of Category and Tariff.

You can provide return_all_membership_discount_pricing_options along with return_membership_discount_pricing. When both are provided as "true", an array will be returned of all membership discount options, including discounts configured with a discount code. This will adjust the membership_discount_pricing array to the following:

								
									 "membership_discount_pricing": [
										{
											"membership_id": "2",
											"membership_name": "your membership program",
											"membership_description": "

Get a great discount by using your Membership!

", "membership_icon": "https://driveau.newbook.cloud/instance_manager_e240bdef70fa7392a0332a76c7431a46_5f8532ea266d2.png", "service_class": "Membership_Service_NAME", "service_level": "Your Configured Membership Service Level", "discounts": [ { "discount_id": "1", "discount_code": null, "discount_name": "Membership Discount", "discount_amount": 90.00 }, { "discount_id": "2", "discount_code": "promo", "discount_name": "Membership Discount (20%)", "discount_amount": 120.00 } ] ]

Another parameter you can provide is return_general_discount_pricing which when "true" calculates all the applicable Discounts in each tariffs_available object, without needing to perform this request with the discount_id parameter:

								
									 "discount_pricing": [
										{
											"discount_id": "2",
											"discount_code": "gen_disc",
											"discount_name": "General Discount",
											"discount_amount": 100.00
										}
									]
								
							

If you were to redirect guests to Newbook Online, you could use the discount_code returned above to have the booking engine grant that same discount.

If the discount_pricing is empty it means the calculated discount amount was $0, or there is no applicable discount for this combination of Category and Tariff.


Another parameter you can provide is return_promo_code_pricing which when "true" will return all available tariffs, even the ones ordinarily locked behind a promo_code requirement. Such tariffs are returned with the others in the tariffs_available array:

								
									 "tariffs_available": [
										{
											"tariff_label": "Promotional Tariff",
											"site_selection_allowed": true,
											"site_selection_fee": "3.00",
											"tariff_short_description": "Special Tariff",
											"tariff_success": "true",
											"tariff_message": "",
											"tariff_code": 0,
											"tariff_extra_info": "",
											"promo_code": "special",
											"inventory_items": [],
											"deposits": [],
											"tariff_total": 120
										}
									]
								
							

Allotment Notes:

Important: Allotments will only be considered during availability calculations if using daily_mode.

Guaranteed Allotments will reduce site availability in the response unless allotment data below is provided in the request.

You can provide any of the Allotment type IDs to allow the availability calculations to consider guaranteed allotments that you might be booking for. For example, if the Booking was going to be for a Company that has an Allotment setup, you can provide the company_id to include availability from that Allotment in the response.

Parameters you can provide that relate to Allotments:

  • company_id - The Company a Guest might belong to
  • travel_agent_id - The Travel Agent that might be requesting availability
  • membership_id - The Membership Type ID that a Guest might have an active Membership for (see Guests: List request for more details)
  • guests_memberships_id - The Guests Membership ID
  • guest_id - If this is provided, any Company or Membership details linked to the Guest will be used for Allotment availability, without having to specify them directly.

Response Notes:

Availability is returned per-Category. For each Category in the data returned, the below are useful to understand why sites_available may be "0":

  • sites_message provides you with the internal reasoning Newbook has used to determine availability - you can present this message to your Guests if you like
  • sites_code is a numeric representation of sites_message for you to use in constructing your own messages to your Guests it you prefer
    sites_codeReasoning
    0No error occurred - a successful result
    1Requested parameters were invalid and calculation cannot be done
    2The Site is not yet opened, or already closed, over the date range requested
    3Newbook has computed there is no availability for the requested parameters
    4There is no availability due to a Special Date blocking
    5An Allotment takes the last remaining availability
    6The Category is configured for Dirty Sites to be exempt from availability, and the Site is dirty, therefore it is unavailable (same-day arrivals only)
    7The Instance Setting for Daily Stop Sell Time has passed (same-day arrivals only)
    8The Instance Setting Minimum Advance Days for Online Bookings has not been met
    9The Instance Setting Maximum Advance Days for Online Bookings has been exceeded
  • sites_extra_info is populated when there is a specific value in relation to sites_code above. It can be an integer, a date, a string, etc.

In addition, each Category returns one or more Tariffs. For each Category -> Tariff in the data returned, the below are useful to understand why tariff_success may be "false":

  • tariff_message provides you with the internal reasoning Newbook has used to determine why this tariff is not applicable - you can present this message to your Guests if you like
  • tariff_code is a numeric representation of tariff_message for you to use in constructing your own messages to your Guests it you prefer
    tariff_codeReasoning
    0No error occurred - a successful result
    1Requested parameters were invalid and calculation cannot be done
    2The Tariff Minimum Occupants has not been met
    3The Tariff Maximum Occupants has been exceeded
    4The Tariff Minimum Days in Advance for Bookings has not been met
    5The Tariff Maximum Days in Advance for Bookings has been exceeded
    6The Tariff Minimum Nights for Bookings has not been met
    7The Tariff Maximum Nights for Bookings has been exceeded
    8The Tariff is not applicable due to a Special Date blocking
    9The Tariff has a Closed to Arrival Override for the days requested - Bookings cannot use this Tariff to arrive on the date requested
    10The Tariff has a Closed to Departure Override for the days requested - Bookings cannot use this Tariff to depart on the date requested
    11The Tariff has a Stop-Sold Override for the days requested
  • tariff_extra_info is populated when there is a specific value in relation to tariff_code above. It can be an integer, a date, a string, etc.
  • online_cart_url is populated when the Tariff and Category are available for Booking. Following this link will open up a Booking Cart on Newbook Online. This first erases any cart data the guest may have assembled.

The sort key is returned, in both object and array return, to indicate the sorting order the Instance has established for the categories returned. This should be respected in your code as the sequential order the Instance intended for the categories returned.

inventory_items will be returned if they are associated with the Tariff or Category inside Newbook. Beyond the name and amount, they expose two important aspects:

  • amount_already_included_in_tariff_total: when "true", the Inventory Item amount is already factored in the tariff_total, however when "false" the expectation is your software will add the amount into the total cost - and make the Guest aware of this addition
  • discounts_apply: whether or not the Inventory Item amount has been discounted if the Booking has a discount associated. Some Inventory Items are just not eligable for this e.g. Security Bonds. This setup is up to the Instance.

adjustment_fees will be returned if they are associated with the Tariff or Category inside Newbook. An example of this response is:

								
									"adjustment_fees": [
										{
											"type": "cancellation",
											"inventory_item_id": "70",
											"gl_category_id": "2",
											"gl_account_id": "48",
											"description": "Cancellation Fee",
											"tax_free": "0",
											"override_tax_rate_ids": [],
											"start_billing_from": "2023-05-16",
											"computed_amount": 30
										}
									]
								
							

Note: Providing guests_memberships_id or membership_id in the request will suppress adjustment fees that are restricted to other membership types. Providing neither will suppress adjustment fees that are restricted with membership types other than Non Member.

The above fields are:

  • type (enum) - This will be either of the following:
    • cancellation - This states that this type of adjustment fee is to be treated as a cancellation fee. This fee will be charged to the Guest if the date is after the start_billing_from date.
    • modification - This states that this type of adjustment fee is to be treated as an Online Modification Fee. This fee will only be charged to Guests that modify their Booking on Newbook Online when the date is after the start_billing_from date.
  • inventory_item_id (int or null) - This can either be null or an integer referencing the ID of an existing Inventory Item.
  • gl_category_id (int or null) - This can either be null or an integer referencing the ID of an existing Sub Client Account. If this is null, it will instead match the Sub Client Account of the Booking.
  • gl_account_id (int or null) - This can either be null or an integer referencing the ID of an existing GL Account. If this is null, it will instead match the GL Account of the Booking.
  • description (string) - This is a short description of the adjustment fee.
  • tax_free (boolean) - This states whether the adjustment fee is tax-free or not.
  • override_tax_rate_ids (array) - This is an array of any tax ids if the adjustment fee has overridden taxes.
  • start_billing_from (date) - This is the date that the adjustment fee is set to begin charging. Provided as yyyy-mm-dd.
  • computed_amount (float) - This is the computed amount to charge for the adjustment fee if the cancellation date is on or after the start_billing_from.

This request is one which can return either an array of objects or an object of objects (default) identified by their Category ID. This can be controlled by adding

{"return": "array"}
to your request parameters. When provided, data is returned as requested.

Bookings: Pull Availability & Pricing Example

Request URL

https://api.newbook.cloud/rest/bookings_availability_pricing

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"period_from": "2024-04-20",
											"period_to": "2024-04-27",
											"adults": 2,
											"daily_mode": "false"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"16": {
													"category_id": 16,
													"category_name": "Single Room",
													"sites_available": 2,
													"sites_message": "",
													"sites_code": 0,
													"sites_extra_info": "",
													"online_booking_url": "your_online_booking_url_here?available_from=1442239200&available_to=1442887939&force_category_id=16",
													"tariffs_available": [{
														"tariff_label": "Special",
														"tariff_short_description": "Special Rate available for the Peak Seasons of the year",
														"tariff_success": "true",
														"tariff_message": "",
														"tariff_code": 0,
														"tariff_extra_info": "",
														"tariff_total": "789.95",
														"tariff_inclusions": [{
															"dates": "20 Apr 2024 to 27 Apr 2024",
															"html": "<p>Includes Breakfast</p>"
														}],
														"inventory_items": [{
															"inventory_item_id": "2",
															"item_type": "charges",
															"description": "Security Bond",
															"amount": "100.00",
															"amount_already_included_in_tariff_total": "false",
															"discounts_apply": "0"
														}],
														"adjustment_fees": [],
														"online_cart_url": "your_online_booking_url_here?rest_api_data=hj234brt89724bn49"
													},{
														"tariff_label": "Theme Park Package",
														"tariff_short_description": "Stay and Play at our local theme parks",
														"tariff_success": "false",
														"tariff_message": "There is a minimum stay length of 10 Nights",
														"tariff_code": 6,
														"tariff_extra_info": "10",
														"tariff_total": "1519.00",
														"inventory_items": [{
															"inventory_item_id": "4",
															"item_type": "charges",
															"description": "Theme Park Tickets",
															"amount": "50.00",
															"amount_already_included_in_tariff_total": "true",
															"discounts_apply": "0"
														}],
														"adjustment_fees": []
													}],
													"sort": 1
												},
												"5": {
													"category_id": 5,
													"category_name": "Double Room",
													"sites_available": 0,
													"sites_message": "Minimum Advance Days has not been met, so there are no Sites available",
													"sites_code": 8,
													"sites_extra_info": "3",
													"online_booking_url": "your_online_booking_url_here?available_from=1442239200&available_to=1442887939&force_category_id=5",
													"tariffs_available": [{
														"tariff_label": "Standard",
														"tariff_short_description": "Standard pricing for regular season",
														"tariff_success": "true",
														"tariff_message": "",
														"tariff_code": 0,
														"tariff_extra_info": "",
														"tariff_total": "900",
														"inventory_items": [],
														"adjustment_fees": []
													}],
													"sort": 2
												}
											},
											"message": ""
										}
									
								
AnchorBookings: Create Availability Email

An Availability Email is Newbook recording a set of parameters for a potential Booking, such as arrival and departure dates, number of adults, children, infants etc. and a particular Category and Tariff.

A URL is returned (online_booking_url) to convert the enquiry to an actual Booking via Newbook Online. Thanks to most of the data being pre-filled, there is very little input required from the Guest to complete a Booking.

Calling this method will create an Availability Email, but despite its name this will not send an email to the Guest.

Request Notes:

You can provide children, infants and animals as numeric parameters (like the adults parameter).

Regarding specifying a Guest:

  • If you have already used the guests_create request to create a new Guest, or the Guests: List request to find an existing Guest, you can simply provide guest_id and the other guests_create parameters will not be used or required.
  • However if you are trying to match an existing Guest, guest_firstname, guest_lastname, address_street, address_city and address_postcode are all required, and only one of guest_email or guest_phone is required, but both are acceptable.

expire_quote_on is optional, and it controls the date from which the Guest cannot accept the offer via Newbook Online. It defaults to +2 weeks from the date of the Availability Email (this default can be changed by the Instance in Newbook Settings).

source_id is optional, and is used on the resulting Booking if the Guest accepts the offer via Newbook Online. It must be a valid source_id or the request will fail.

Response Notes:

The response for this request is identical to the response for Bookings: Pull Availability & Pricing, except for the below:

In comparison to the Bookings: Pull Availability & Pricing request, the data key in the response of this method is an array of objects by default, not an object of objects.

This request is one which can return either an array of objects (default) or an object of objects identified by their Category ID. This can be controlled by adding

{"return": "object"}
to your request parameters. When provided, data is returned as requested.

Bookings: Create Availability Email Example

Request URL

https://api.newbook.cloud/rest/bookings_availability_email

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"period_from": "2024-04-20",
											"period_to": "2024-04-27",
											"guest_firstname": "Newbook",
											"guest_lastname": "Support",
											"address_street": "Level 2, 9 Ouyan Street",
											"address_city": "Surfers Paradise",
											"address_postcode": "4217",
											"guest_email": "support@newbook.cloud",
											"guest_phone": "0756554600",
											"category_id": [5,16],
											"adults": 2,
											"expire_quote_on": "2015-09-29",
											"source_id": "5"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"category_id": 5,
												"category_name": "Double Room",
												"sites_available": 4,
												"online_booking_url": "your_online_booking_url_here?newbook_api_action=process&category_id=5&availability_email_data=569dff9d56ehy",
												"tariffs_available": [{
													"tariff_label": "Regular",
													"tariff_success": "true",
													"tariff_message": "",
													"tariff_code": 0,
													"tariff_extra_info": "",
													"tariff_total": "1200.00"
												}]
											},{
												"category_id": 16,
												"category_name": "Single Room",
												"sites_available": 2,
												"online_booking_url": "your_online_booking_url_here?newbook_api_action=process&category_id=5&availability_email_data=569dff9c90afa",
												"tariffs_available": [{
													"tariff_label": "Special",
													"tariff_success": "true",
													"tariff_message": "",
													"tariff_code": 0,
													"tariff_extra_info": "",
													"tariff_total": "790.00"
												}]
											}],
											"message": ""
										}
									
								
AnchorBookings: Create

Bookings can be submitted to Newbook by using this method. Please note that these are treated equal to Newbook Online bookings and are subject to fees per booking received.

For now, the Guest will not receive an email from this process as it is expected that the implementing code will be responsible for that kind of communication. The Instance will receive an email as per normal for incoming bookings.

Request Notes:

You can provide the category_id for this request to automatically allocate an available Site from that Category, or manually provide site_id either as a string value or an array of strings. Newbook will use only one Site on a resulting Booking, so providing an array is providing "options" - Newbook will validate them all and then use the first valid Site.

You can provide an array of required_features. This data will be used to find an applicable Site; all provided Features will need to match. If multiple matching Sites are found, Newbook will use the first one. If no matching Sites are found, the request will abort and you will receive a "No availability" response.

You can provide children, infants and animals as numeric parameters (like the adults parameter).

Regarding specifying a Guest:

  • If you have already used the guests_create request to create a new Guest, or the Guests: List request to find an existing Guest, you can simply provide guest_id and the other guests_create parameters will not be used or required. A valid guests_memberships_id for this guest can optionally be provided for use with the booking.
  • However if you are trying to match an existing Guest, guest_firstname, guest_lastname, address_street, address_city and address_postcode are all required, and only one of guest_email or guest_phone is required, but both are acceptable.

Regarding specifying Equipment:

  • The equipment parameter is optional in creating a booking. However, if provided, it must be in array format, because a booking can have multiple equipment added to it as shown in the example request.
  • The following are the parameters for creating equipment on a booking:
    • equipment_name (required)
    • equipment_make
    • equipment_model
    • equipment_type (must be a number)
    • equipment_length (must be a number)
    • equipment_width (must be a number)
    • equipment_height (must be a number)
    • equipment_registration
    • equipment_registration_expiry
  • The equipment are saved onto the Equipment table and linked to the booking and guest. Please note that if an equipment is being added for an existing guest, the guest_id parameter should be specified, instead of the guest_firstname and guest_lastname parameters. Also note that if the equipment_registration is not specified, a new equipment will be created for the guest.

Regarding specifying Repeat Charges:

  • The repeat_charges parameter is optional. However, if provided, it must be an array of objects, each following the below format.
  • The following are the parameters for creating repeat charges on a booking:
    • type (string) required, must be one of:
      • charges
      • credits
    • account_id (int or "new_id") required, must match a valid Client Account ID or be "new_id" when creating a new Booking to use the Booking Client Account.
    • gl_account_id (int) required, must match a valid GL Account ID.
    • gl_category_id (int) required, must match a valid GL Category ID.
    • description (string) required.
    • amount (float) required.
    • inventory_item_id (int) optional, when provided it must match a valid Inventory Item ID.
    • interval (string) required, must be one of:
      • day
      • week
      • month
      • year
    • interval_multiplier (int) required. This is the multiplier for the above interval. E.g. When this is 2, and the interval above is "week", then charges will be raised every 2 weeks.
    • period_from (string) must be formatted as YYYY-MM-DD.
    • period_from_linked (boolean) when true, the Repeat Charge will match the Booking period_from (Arrival Date) even when it changes.
    • period_to (string) must be formatted as YYYY-MM-DD.
    • period_to_linked (boolean) when true, the Repeat Charge will match the Booking period_to (Departure Date) even when it changes.
    • next_run (string) when the repeat charge will begin its billing, must be formatted as YYYY-MM-DD.
    • tax_free (boolean)
    • override_tax_rate_ids (array) array of valid Tax Rate IDs,
    • benefit_guest (boolean)
    • generate_invoice (boolean) when true, the Repeat Charge will automatically generate invoices.
    • include_in_stay_cost (int) whether the Repeat Charge Inventory Item contributes to Booking Stay Cost - Accommodation Income - on all reports which present such a figure, must be one of:
      • 0 means this Inventory Item is Excluded from Stay Cost, and will not factor as Stay Costs on the reports mentioned above. Use case: Booking Fees.
      • 1 means Increase Stay Cost, i.e. this Inventory Item is part of the Stay Cost calculations but is costed on top of the nightly price. Use Case: optional Breakfast Package.
    • travel_agent_commission (float) whether travel agent should earn commission from the attached Inventory Item.
    • guest_visible (boolean) whether the attached Inventory Item should appear as its own line on Invoices/Receipts/Client Account Statements.
    • prorata_start (string) the initial Charge will calculate as a Daily Amount to this date, then rollover normally, must be formatted as YYYY-MM-DD.
    • prorata_end (boolean) the final Charge will calculate as a Daily Amount if the final charge does not cover an entire period.
    • status (int) must be one of:
      • 1 = Active
      • 2 = Stopped
      • 0 = Cancelled
    • disburse_to_owners (boolean) whether money received should be forwarded to Trust Owners during Disbursement.
    • invoice_description (string) if not provided, defaults to use the Description and Charge Dates.
    • generate_daily_charges (boolean) generates charges day-by-day instead of in bulk for the entire duration. When true this will force enable Automatically Generate Invoice.
    • invoice_system_template_id (int) optional, the system template to use for invoices, must match a valid System Template ID.
    • invoice_email_template_id (int) optional, the contact template to use for automatic invoice emails, defaults to null meaning do not send automatically. Must match a valid Contact Template ID.
    • booking_market_segment_id (int) optional, the booking market segment to assign to the repeat charge, defaults to null. Must match a valid Booking Market Segment ID

The following parameters are optional and save onto the Guest:

  • address_street
  • address_city
  • address_postcode
  • address_state_name
  • address_country_name
  • guest_phone
  • guest_email
  • membership_number
  • membership_program
  • membership_expiry
  • dietary_requirements

If specified, dietary_requirements can be provided based on the response to Dietary Requirements request.

The following parameters are optional and save onto the Booking:

  • tariffs_quoted
  • repeat_charges
  • inventory_items
  • status
  • reason_id
  • source_id
  • method_id
  • demographic_id
  • company_id
  • company_staff_id
  • travel_agent_id
  • travel_agent_staff_id
  • discount_id
  • eta
  • notes
  • flagged
  • locked
  • booking_group_id
  • create_charges
  • market_segment_id
  • booked_by
  • booked_when
  • arrived_by
  • arrived_when
  • departed_by
  • departed_when
  • cancelled_by
  • cancelled_when
  • booking_id
  • additional_guests

If specified, tariffs_quoted must cover the entire date range of the booking and must follow this format:

  • 									[{"specific date":{"tariff_applied_id":sourced from Newbook,"price":number}]
    								
  • tariff_applied_id is optional in each object

Note: Bookings can have neither of tariffs_quoted or repeat_charges, and therefore be set up with No Billing, but they cannot have both of tariffs_quoted and repeat_charges - please provide only one of the above billing methods.

If specified, inventory_items must follow this format:

  • 									[{
    										"inventory_item_id": sourced from Newbook,
    										"description": text value,
    										"amount": number,
    										"qty": number,
    										"per_adult": number,
    										"per_child": number,
    										"per_infant": number,
    										"per_animal": number,
    										"adults": number,
    										"children": number,
    										"infants": number,
    										"animals": number
    									}]
    								
  • inventory_item_id is required in each array, but everything else is optional

If specified, status must be one of the following (this ordering has no meaning):

  • Arrived
  • Cancelled
  • Confirmed
  • Departed
  • No Guest Data (Incomplete)
  • No-Show
  • Owner Occupied
  • Quote
  • Unconfirmed
  • Waitlist

You should have a proper understanding of what the different statuses are intended to be used for before use. Please contact Newbook Support for more information here.

If not specified, Newbook will use the value given in the Setting Status for Bookings with no payment or failed payment

If specified, notes must be an array, even if only 1 note is delivered.

If specified, booking_group_id must match an existing Bookings Group within Newbook. You can control which Client Account the Booking will bill to by providing default_client_account_id which must be either "new_id" to denote the Client Account of the Booking about to be created, or a valid Client Account ID (e.g. the Group account). If this is omitted then Newbook will analyse other Bookings in the Group - if any of those bill to themselves, so to will this Booking.

If specified, custom_fields must be based on the response to the Custom Fields request, to retrieve the different Custom Fields set up in the instance:

								
									"custom_fields": [
										{
											"field_id": 2,
											"field_value": 8
										}
									]
								
							

If specified, allow_dirty_arrivals must be "true" or "false". This parameter will tell Newbook whether or not a same day Booking can be placed in a Dirty Site. The Instance controls the default of this on each Category.

If specified, allow_backtoback_bookings must be "true" or "false". This parameter will tell Newbook whether a Booking can be placed if another Booking is Departing on the same day. The Instance controls the default of this, for each day of the week, on each Category.

If specified, suppress_generate_billing must be "true" or "false". This parameter will tell Newbook whether to ignore its default handling in terms of generating Booking billing.

If specified, override_min_stay must be "true" or "false". This parameter will tell Newbook whether to allow a Booking to be placed even if the Minimum Stay Duration is not satisfied.

If specified, additional_guests must follow this format:

  • 									[{
    										"guest_id": sourced from Newbook,
    										"guest_type": adults, children, infants
    										"guest_type_id": number
    									}]
    								
  • guest_id is required in each array object.
  • guest_type can either be: adults, children, or infants. By default, this is adults.
  • guest_type_id is the ordered number of the occupant. For example, if the booking occupies 2 adults, the ID of the additional guest is 2 (The primary guest is the first adult). If the booking occupies 2 children, the ID of the first child is 1 and the second child is 2.
  • Take note that additional guests are limited to the number of occupants set on this request.

You may provide remote_import as "true" to tell Newbook to simplify the Booking View page inside the PMS (for users). This simplified version of the page will respect items present on the Client Account to denote the total value of the Booking, rather than the normal breakdown of individual billing items/discounts/money received & outstanding. When a user edits such a Booking inside the PMS, they will be prompted to convert the Booking to Newbook financial calculations, or abort the editing process.

Response Notes:

The successful response is the same as the Bookings: Get response, with the addition of guest_id and invoice_ids.

Bookings: Create Example

Request URL

https://api.newbook.cloud/rest/bookings_create

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"guest_firstname": "Newbook",
											"guest_lastname": "Support",
											"address_street": "Level 2, 9 Ouyan Street",
											"address_city": "Surfers Paradise",
											"address_postcode": "4217",
											"guest_email": "support@newbook.cloud",
											"guest_phone": "0400000000",
											"adults": "1",
											"children": "0",
											"period_from": "2024-04-19",
											"period_to": "2024-04-21",
											"category_id": "4",
											"required_features": [
												14,
												23,
												1
											],
											"tariffs_quoted": {
												"2024-04-19": {"tariff_applied_id": 480, "price": 500},
												"2024-04-20": {"tariff_applied_id": 480, "price": 750}
											},
											"equipment": [
												{
													"equipment_name": "My Honda",
													"equipment_make": "Honda",
													"equipment_model": "Accord",
													"equipment_type": "1",
													"equipment_length": "5",
													"equipment_width": "2",
													"equipment_height": "2",
													"equipment_registration": "222ABC",
										 			"equipment_registration_expiry": "2024-04-20"
												},
												{
													"equipment_name": "My Toyota",
													"equipment_make": "Toyota",
													"equipment_model": "Camry",
													"equipment_type": "1",
													"equipment_length": "4",
													"equipment_width": "2",
													"equipment_height": "1"
												}
											],
											"repeat_charges": [
												{
													"type": "credits",
													"account_id": 123,
													"gl_account_id": 8,
													"gl_category_id": 1,
													"period_from": "2024-04-19",
													"description": "Daily Government Rebate",
													"amount": "19.99",
													"interval": "day",
													"interval_multiplier": 4,
													"override_tax_rate_ids": [2]
												},
												{
													"type": "charges",
													"account_id": 201,
													"gl_account_id": 2,
													"gl_category_id": 2,
													"description": "On Site Storage Fees",
													"amount": "10.00",
													"inventory_item_id": 1,
													"interval": "week",
													"interval_multiplier": 1,
													"period_from": "2024-04-19",
													"period_from_linked": 1,
													"period_to": "2024-04-20",
													"period_to_linked": 1,
													"next_run": "2022-12-20",
													"tax_free": 0,
													"override_tax_rate_ids": [],
													"benefit_guest": 1,
													"generate_invoice": 1,
													"include_in_stay_cost": 1,
													"travel_agent_commission": "1.00",
													"guest_visible": 1,
													"prorata_start": "2024-04-19",
													"prorata_end": 1,
													"status": "Active",
													"disburse_to_owners": 0,
													"generate_daily_charges": 1,
													"invoice_system_template_id": 1,
													"invoice_email_template_id": 1,
													"booking_market_segment_id": 1
												}
											]
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"booking_id": 11034,
												"booking_arrival": "2024-04-20 14:00:00",
												"booking_departure": "2024-04-24 10:00:00",
												"booking_eta": "15:00",
												"booking_length": "4",
												"booking_status": "Confirmed",
												"booking_checkedin": null,
												"booking_checkedout": null,
												"booking_adults": 2,
												"booking_children": 3,
												"booking_infants": 0,
												"booking_animals": 0,
												"booking_total": "649.50",
												"booking_method_id": 2,
												"booking_method_name": "Booking.com",
												"booking_source_id": 5,
												"booking_source_name": "Booking.com",
												"booking_reason_id": 1,
												"booking_reason_name": "Business",
												"booking_demographic_id": null,
												"booking_demographic_name": "None",
												"booking_market_segment_id": null,
												"booking_market_segment_name": "None",
												"booking_parent_source_id": "1",
												"booking_parent_source_name": "Short Term",
												"booking_modified": "2024-04-18 11:30:00",
												"booking_placed": "2024-04-18 11:30:00",
												"booking_booked_by": "Newbook Support",
												"booking_booked_by_id": "-2",
												"booking_arrived_by": "None",
												"booking_arrived_by_id": null,
												"booking_departed_by": "None",
												"booking_departed_by_id": null,
												"gl_account_id": "1",
												"gl_category_id": "1",
												"company_id": null,
												"company_name": null,
												"travel_agent_id": 46,
												"travel_agent_name": "Booking.com",
												"travel_agent_commission_total": "44.50",
												"booking_reference_id": "1234567890",
												"tariff_name": "BOOK NOW",
												"tariff_total": "525.00",
												"tariffs_quoted": [
												    {
												        "tariff_quoted_id": 1,
												        "stay_date": "2024-04-20",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    },
												    {
												        "tariff_quoted_id": 2,
												        "stay_date": "2024-04-21",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    },
												    {
												        "tariff_quoted_id": 3,
												        "stay_date": "2024-04-22",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    },
												    {
												        "tariff_quoted_id": 4,
												        "stay_date": "2024-04-23",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    }
												],
												"inventory_items": [{
													"description": "Champagne",
													"stay_date": "2024-04-20",
													"stay_cost_contribution": "Include",
													"gl_account_id": "4",
													"gl_category_id": "2",
													"amount": "75.00"
												},{
													"description": "Picnic Basket",
													"stay_date": "2024-04-20",
													"stay_cost_contribution": "Increase",
													"gl_account_id": "4",
													"gl_category_id": "2",
													"amount": "125.00"
												}],
												"discount_id": "1",
												"discount_name": "Member Discount",
												"discount_code": "",
												"discount_total": "80.00",
												"discounts": [{
													"discount_id": "1",
													"discount_name": "Member Discount",
													"discount_code": "",
													"discount_total": "20.00"
												}],
												"account_id": "14042",
												"default_client_account_id": "14042",
												"account_balance": "99.00",
												"auto_billing_limit": null,
												"site_id": "1",
												"site_name": "DC001",
												"site_status": "Clean",
												"category_id": "1",
												"category_name": "Standard Cabin (2BR) - A",
												"custom_fields": [{
													"id": 2,
													"type": "text",
													"label": "Custom Text",
													"value": "Custom Value"
												}],
												"guests": [{
													"guest_id": "1",
													"title": "Mr",
													"firstname": "John",
													"lastname": "Doe",
													"othername": "",
													"gender": null,
													"date_of_birth": null,
													"company_id": null,
													"company_name": null,
													"date_created": "2024-04-18 11:30:00",
													"modified_when": "2024-04-18 00:00:00",
													"last_note_when": "2024-04-18 00:00:00",
													"blacklisted_when": "2024-04-19 00:00:00",
													"vip_when": null,
													"account_id": "13783",
													"account_balance": "15.00",
													"auto_billing_limit": null,
													"primary_client": "1",
													"street": "Level 2, 9 Ouyan Street",
													"city": "Surfers Paradise",
													"state": "Queensland (QLD)",
													"postcode": "4217",
													"country": "Australia",
													"contact_details": [{
														"id": 1,
														"type": "phone",
														"content": "0756554600",
														"notes": "",
														"allow_transactional": "1",
														"allow_marketing": "1"
													},{
														"id": 2,
														"type": "email",
														"content": "john.doe@test.com",
														"notes": "",
														"allow_transactional": "1",
														"allow_marketing": "0"
													}],
													"custom_fields": [{
														"id": 1,
														"type": "text",
														"label": "My Test Field",
														"value": "Something"
													}],
													"membership_details": [{
														"type": "Testing Service",
														"type_id": "2",
														"service_id": 4,
														"level": null,
														"content": "1234567",
														"expiry_date": "2025-01-19"
													}],
													"equipment": [
														{
															"equipment_id": "26",
															"equipment_name": "My Honda",
															"equipment_make": "Honda",
															"equipment_model": "Accord",
															"equipment_type_id": "1",
															"equipment_type_name": "car",
															"equipment_length": "5.00",
															"equipment_width": "2.00",
															"equipment_height": "2.00",
															"equipment_registration": "222ABC",
															"equipment_registration_expiry": "2025-01-19",
															"active": "1"
														}
													],
													"dietary_requirements": [
														"1",
														"2"
													],
													"notes": [{
														"id": "1",
														"type_id": "1",
														"content": "This is my Guest note",
														"created_when": "2024-04-18 11:30:00",
														"created_by": "11",
														"updated_when": "2024-04-19 00:00:00",
														"updated_by": "5"
													}]
												}],
												"guests_memberships_id": "1",
												"equipment": [],
												"notes": [{
													"id": "1",
													"type_id": "1",
													"content": "This is my Booking note",
													"created_when": "2024-04-18 11:30:00",
													"created_by": "11",
													"updated_when": "2024-04-19 00:00:00",
													"updated_by": "5"
												}],
												"payment_plans": [],
												"access_codes": [{
													"id": "1017",
													"card_id": "354",
													"access_code": "689323",
													"type": "bookings",
													"type_id": "11034",
													"description": "Access Card: 5",
													"car_rego": "",
													"period_from": "2024-04-20 14:00:00",
													"period_to": "2024-04-24 10:00:00",
													"area_id": "18",
													"created_when": "2024-04-18 11:30:00",
													"cancelled_when": null,
													"cancelled_reason": "",
													"cancelled_by": "0",
													"access_code_status": null,
													"area_name": "All Access"
												}],
												"bookings_group_id": null,
												"bookings_group_name": null,
												"booking_cancelled": null,
												"booking_cancelled_by": null,
												"booking_cancelled_by_id": null,
												"booking_cancelled_reason_id": null,
												"booking_cancelled_reason_name": null,
												"guest_id": "1",
												"invoice_ids": [
													"883"
												]
												
											},
											"message": ""
										}
									
								
AnchorBookings: Update

Update an existing Booking.

Request Notes:

booking_id is required

All other parameters are optional, please see Bookings: Create for more details.

If specified, repeat_charges can update existing repeat charges by including the repeat_charge_id property. When repeat_charge_id is ommitted, a new Repeat Charge will be created.

								[{
									"repeat_charge_id": sourced from Newbook
									fields to update...
								}]
							

Bookings: Update Example

Request URL

https://api.newbook.cloud/rest/bookings_update

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"booking_id": "12345",
											"period_from": "2024-04-19",
											"period_to": "2024-04-21",
											"tariffs_quoted": {
												"2024-04-19": {"tariff_applied_id": 480, "price": 500},
												"2024-04-20": {"tariff_applied_id": 480, "price": 750}
											},
											"equipment": [
												{
													"equipment_name": "My Honda",
													"equipment_make": "Honda",
													"equipment_model": "Accord",
													"equipment_type": "1",
													"equipment_length": "5",
													"equipment_width": "2",
													"equipment_height": "2",
													"equipment_registration": "222ABC",
										 			"equipment_registration_expiry": "2024-04-20"
												}
											],
											"repeat_charges": [
												{
													"repeat_charge_id": 1,
													"amount": "123.00"
												},
												{
													"type": "charges",
													"account_id": 123,
													"gl_account_id": 8,
													"gl_category_id": 1,
													"period_from": "2024-04-19,
													"description": "Annual Fee",
													"amount": "299.99",
													"interval": "year",
													"interval_multiplier": 1
												}
											]
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"booking_id": 12345,
												"booking_arrival": "2024-04-20 14:00:00",
												"booking_departure": "2024-04-24 10:00:00",
												"booking_eta": "15:00",
												"booking_length": "4",
												"booking_status": "Confirmed",
												"booking_checkedin": null,
												"booking_checkedout": null,
												"booking_adults": 2,
												"booking_children": 3,
												"booking_infants": 0,
												"booking_animals": 0,
												"booking_total": "649.50",
												"booking_method_id": 2,
												"booking_method_name": "Booking.com",
												"booking_source_id": 5,
												"booking_source_name": "Booking.com",
												"booking_reason_id": 1,
												"booking_reason_name": "Business",
												"booking_demographic_id": null,
												"booking_demographic_name": "None",
												"booking_market_segment_id": null,
												"booking_market_segment_name": "None",
												"booking_parent_source_id": "1",
												"booking_parent_source_name": "Short Term",
												"booking_modified": "2024-04-18 11:30:00",
												"booking_placed": "2024-04-18 11:30:00",
												"booking_booked_by": "Newbook Support",
												"booking_booked_by_id": "-2",
												"booking_arrived_by": "None",
												"booking_arrived_by_id": null,
												"booking_departed_by": "None",
												"booking_departed_by_id": null,
												"gl_account_id": "1",
												"gl_category_id": "1",
												"company_id": null,
												"company_name": null,
												"travel_agent_id": 46,
												"travel_agent_name": "Booking.com",
												"travel_agent_commission_total": "44.50",
												"booking_reference_id": "1234567890",
												"tariff_name": "BOOK NOW",
												"tariff_total": "525.00",
												"tariffs_quoted": [
												    {
												        "tariff_quoted_id": 1,
												        "stay_date": "2024-04-20",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    },
												    {
												        "tariff_quoted_id": 2,
												        "stay_date": "2024-04-21",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    },
												    {
												        "tariff_quoted_id": 3,
												        "stay_date": "2024-04-22",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    },
												    {
												        "tariff_quoted_id": 4,
												        "stay_date": "2024-04-23",
												        "label": "Standard",
												        "type_id": 1,
												        "tariff_applied_id": 2,
												        "original_amount": "110.00",
												        "calculated_amount": "100.00",
												        "charge_amount": "65.00",
												        "taxes": [
												            {
												                "tax_id": 1,
												                "tax_name": "GST",
												                "tax_inclusive": true,
												                "tax_amount": "9.09"
												            }
												        ],
												        "occupant_charges": [
												            {
												                "type": "adults",
												                "price": "20.00",
												                "occupants": 2
												            },
												            {
												                "type": "children",
												                "price": "15.00",
												                "occupants": 3
												            }
												        ]
												    }
												],
												"inventory_items": [{
													"description": "Champagne",
													"stay_date": "2024-04-20",
													"stay_cost_contribution": "Include",
													"gl_account_id": "4",
													"gl_category_id": "2",
													"amount": "75.00"
												},{
													"description": "Picnic Basket",
													"stay_date": "2024-04-20",
													"stay_cost_contribution": "Increase",
													"gl_account_id": "4",
													"gl_category_id": "2",
													"amount": "125.00"
												}],
												"discount_id": "1",
												"discount_name": "Member Discount",
												"discount_code": "",
												"discount_total": "80.00",
												"discounts": [{
													"discount_id": "1",
													"discount_name": "Member Discount",
													"discount_code": "",
													"discount_total": "20.00"
												}],
												"account_id": "14042",
												"default_client_account_id": "14042",
												"account_balance": "99.00",
												"auto_billing_limit": null,
												"site_id": "1",
												"site_name": "DC001",
												"site_status": "Clean",
												"category_id": "1",
												"category_name": "Standard Cabin (2BR) - A",
												"custom_fields": [{
													"id": 2,
													"type": "text",
													"label": "Custom Text",
													"value": "Custom Value"
												}],
												"guests": [{
													"guest_id": "1",
													"title": "Mr",
													"firstname": "John",
													"lastname": "Doe",
													"othername": "",
													"gender": null,
													"date_of_birth": null,
													"company_id": null,
													"company_name": null,
													"date_created": "2024-04-18 11:30:00",
													"modified_when": "2024-04-18 00:00:00",
													"last_note_when": "2024-04-18 00:00:00",
													"blacklisted_when": "2024-04-19 00:00:00",
													"vip_when": null,
													"account_id": "13783",
													"account_balance": "15.00",
													"auto_billing_limit": null,
													"primary_client": "1",
													"street": "Level 2, 9 Ouyan Street",
													"city": "Surfers Paradise",
													"state": "Queensland (QLD)",
													"postcode": "4217",
													"country": "Australia",
													"contact_details": [{
														"id": 1,
														"type": "phone",
														"content": "0756554600",
														"notes": "",
														"allow_transactional": "1",
														"allow_marketing": "1"
													},{
														"id": 2,
														"type": "email",
														"content": "john.doe@test.com",
														"notes": "",
														"allow_transactional": "1",
														"allow_marketing": "0"
													}],
													"custom_fields": [{
														"id": 1,
														"type": "text",
														"label": "My Test Field",
														"value": "Something"
													}],
													"membership_details": [{
														"type": "Testing Service",
														"type_id": "2",
														"service_id": 4,
														"level": null,
														"content": "1234567",
														"expiry_date": "2025-01-19"
													}],
													"equipment": [
														{
															"equipment_id": "26",
															"equipment_name": "My Honda",
															"equipment_make": "Honda",
															"equipment_model": "Accord",
															"equipment_type_id": "1",
															"equipment_type_name": "car",
															"equipment_length": "5.00",
															"equipment_width": "2.00",
															"equipment_height": "2.00",
															"equipment_registration": "222ABC",
															"equipment_registration_expiry": "2025-01-19",
															"active": "1"
														}
													],
													"dietary_requirements": [
														"1",
														"2"
													],
													"notes": [{
														"id": "1",
														"type_id": "1",
														"content": "This is my Guest note",
														"created_when": "2024-04-18 11:30:00",
														"created_by": "11",
														"updated_when": "2024-04-19 00:00:00",
														"updated_by": "5"
													}]
												}],
												"guests_memberships_id": "1",
												"equipment": [],
												"notes": [{
													"id": "1",
													"type_id": "1",
													"content": "This is my Booking note",
													"created_when": "2024-04-18 11:30:00",
													"created_by": "11",
													"updated_when": "2024-04-19 00:00:00",
													"updated_by": "5"
												}],
												"payment_plans": [],
												"access_codes": [{
													"id": "1017",
													"card_id": "354",
													"access_code": "689323",
													"type": "bookings",
													"type_id": "12345",
													"description": "Access Card: 5",
													"car_rego": "",
													"period_from": "2024-04-20 14:00:00",
													"period_to": "2024-04-24 10:00:00",
													"area_id": "18",
													"created_when": "2024-04-18 11:30:00",
													"cancelled_when": null,
													"cancelled_reason": "",
													"cancelled_by": "0",
													"access_code_status": null,
													"area_name": "All Access"
												}],
												"bookings_group_id": null,
												"bookings_group_name": null,
												"booking_cancelled": null,
												"booking_cancelled_by": null,
												"booking_cancelled_by_id": null,
												"booking_cancelled_reason_id": null,
												"booking_cancelled_reason_name": null,
												"guest_id": "1",
												"invoice_ids": [
													"883"
												]
												
											},
											"message": ""
										}
									
								
AnchorBookings: Update Market Segment

Bulk update existing Bookings with a new Market Segment

Request Notes:

booking_id is required

market_segment_id is required and must be a single Market Segment ID

This method will only update the Market Segment field (instead of all fields on a single Booking and the validation involved in that process) allowing for the Market Segment to be updated faster (and in bulk).

Bookings: Update Market Segment Example

Request URL

https://api.newbook.cloud/rest/bookings_update_market_segment

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"booking_id": ["12345","123456"],
											"market_segment_id": "1"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [],
											"message": "Updated 2 Bookings"
										}
									
								
AnchorBookings: Update Booking Source

Bulk update existing Bookings with a new Booking Source.

Request Notes:

booking_id is required and may be either a single ID or an array of IDs. Unmatched IDs will be ignored

source_id is required and must be a single Booking Source ID

This method will only update the Booking Source field and will not alter or update any other field on the Booking. This request is significantly faster than Bookings: Update for bulk updating Booking Source.

Bookings: Update Source Example

Request URL

https://api.newbook.cloud/rest/bookings_update_source

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"booking_id": ["12345","123456"],
											"source_id": "1"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [],
											"message": "Updated 2 Bookings"
										}
									
								
AnchorBooking Sources: List

Pull the list of Booking Sources from within Newbook.

Request Notes:

name is optional and when provided it will restrict the results to the matching Booking Sources

show_inactive is optional, default false, and when provided it will include inactive Booking Sources in the response

Booking Sources: List Example

Request URL

https://api.newbook.cloud/rest/bookings_sources

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"name": "test",
											"show_inactive": "false"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"name": "Booking Channels",
												"available_as_parent": "true",
												"parent_id": null,
												"domain_referer": "",
												"active": "1"
											},{
												"id": "2",
												"name": "Expedia",
												"available_as_parent": "false",
												"parent_id": "1",
												"domain_referer": "https://newbook.cloud",
												"active": "1"
											}],
											"message": ""
										}
									
								
AnchorBooking Sources: Create

Create a new Booking Source within Newbook.

Request Notes:

parent_id must be a valid option from the bookings_sources list where available_as_parent is true. This can only be omitted if is_parent is true.

is_parent is optional and when provided as true this request will create a parent Booking Source. parent_id will be ignored if this is set to true.

Booking Sources: Create Example

Request URL

https://api.newbook.cloud/rest/bookings_sources_create

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"parent_id": -1,
											"is_parent": "false",
											"name": "test"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"source_id": "3"
											},
											"message": ""
										}
									
								
AnchorBooking Cancellation Reasons: List

Pull the list of Booking Cancellation Reasons from within Newbook.

Request Notes:

name is optional and when provided it will restrict the results to the matching Booking Cancellation Reasons

show_inactive is optional, default false, and when provided it will include inactive Booking Cancellation Reasons in the response

Booking Cancellation Reasons: List Example

Request URL

https://api.newbook.cloud/rest/bookings_cancellation_reasons

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"name": "Change of Plans",
												"source": "guest",
												"active": "1"
											},{
												"id": "2",
												"name": "Staying Elsewhere",
												"source": "instance",
												"active": "1"
											}],
											"message": ""
										}
									
								
AnchorBooking Methods: List

Pull the list of Booking Methods from within Newbook.

Request Notes:

name is optional and when provided it will restrict the results to the matching Booking Methods

Booking Methods: List Example

Request URL

https://api.newbook.cloud/rest/bookings_methods

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"name": "test"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"name": "Walk In"
											},{
												"id": "2",
												"name": "Email"
											}],
											"message": ""
										}
									
								
AnchorBooking Reasons: List

Pull the list of Booking Reasons from within Newbook.

Request Notes:

name is optional and when provided it will restrict the results to the matching Booking Reasons

Booking Reasons: List Example

Request URL

https://api.newbook.cloud/rest/bookings_reasons

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"name": "test"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"name": "Holiday"
											},{
												"id": "2",
												"name": "Conference"
											}],
											"message": ""
										}
									
								
AnchorBooking Demographics: List

Pull the list of Booking Demographics from within Newbook.

Request Notes:

name is optional and when provided it will restrict the results to the matching Booking Demographics

Booking Demographics: List Example

Request URL

https://api.newbook.cloud/rest/bookings_demographics

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"name": "test"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"name": "Singles"
											},{
												"id": "2",
												"name": "Couples"
											}],
											"message": ""
										}
									
								
AnchorBooking Market Segments: List

Pull the list of Booking Market Segments from within Newbook.

Request Notes:

name is optional and when provided it will restrict the results to the matching Booking Market Segments

Booking Market Segments: List Example

Request URL

https://api.newbook.cloud/rest/bookings_market_segments

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"name": "standard"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"name": "Standard - Single",
												"active": "1"
											},{
												"id": "2",
												"name": "Standard - Groups",
												"active": "1"
											}],
											"message": ""
										}
									
								
AnchorBookings Groups: Create

No emails will be sent when creating a Group Booking. These will be handled on an individual basis when adding Bookings to the Group.

Request Notes:

Regarding specifying a Guest:

  • If you have already used the guests_create request to create a new Guest, or the Guests: List request to find an existing Guest, you can simply provide guest_id and the other guests_create parameters will not be used or required.
  • However if you are trying to match an existing Guest, guest_firstname, guest_lastname, address_street, address_city and address_postcode are all required, and only one of guest_email or guest_phone is required, but both are acceptable.

The following parameters are optional and save onto the Guest:

  • address_street
  • address_city
  • address_postcode
  • address_state_name
  • address_country_name
  • guest_phone
  • guest_email
  • membership_number
  • membership_program
  • membership_expiry
  • dietary_requirements

If specified, dietary_requirements can be provided based on the response to Dietary Requirements request.

The following parameters are optional and save onto the Booking Group:

  • inventory_items
  • status
  • notes
  • eta
  • reason_id
  • source_id
  • method_id
  • demographic_id
  • company_id
  • company_staff_id
  • travel_agent_id
  • travel_agent_staff_id
  • discount_id

If specified, inventory_items must follow this format:

  • 					[{
    						"inventory_item_id": sourced from Newbook,
    						"description": text value,
    						"amount": number,
    						"per_adult": number,
    						"per_child": number,
    						"per_infant" :number,
    						"per_animal": number,
    						"adults": number,
    						"children": number,
    						"infants": number,
    						"animals": number
    					}]
    				
  • inventory_item_id is required in each array, but everything else is optional

If specified, status must be one of the following (this ordering has no meaning):

  • Arrived
  • Cancelled
  • Confirmed
  • Departed
  • No Guest Data (Incomplete)
  • No-Show
  • Owner Occupied
  • Quote
  • Unconfirmed
  • Waitlist

You should have a proper understanding of what the different statuses are intended to be used for before use. Please contact Newbook Support for more information here.

If not specified, Newbook will use the value given in the Setting Status for Bookings with no payment or failed payment

If specified, notes must be an array, even if only 1 note is delivered.

Response Notes:

account_id in the response can be used to push charges or payments onto the account

booking_group_id in the response can be used in the bookings_create request to create Bookings in the Group. Remember also to set the default_client_account_id to the Group account_id if you want the Group to handle the billing for your new Booking(s).

Bookings Groups: Create Example

Request URL

https://api.newbook.cloud/rest/bookings_groups_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "Newbook Group",
							"guest_firstname": "Newbook",
							"guest_lastname": "Support",
							"address_street": "Level 2, 9 Ouyan Street",
							"address_city": "Surfers Paradise",
							"address_postcode": "4217",
							"guest_email": "support@newbook.cloud",
							"guest_phone": "0400000000",
							"period_from": "2024-04-19",
							"period_to": "2024-04-20"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"booking_group_id": "12345",
								"account_id": "501"
							},
							"message": ""
						}
					
				
AnchorBookings Groups: Update

Updates an existing Bookings Group.

Request Notes:

booking_group_id is required

All other parameters are optional, please see Bookings Groups: Create for more details.

Bookings Groups: Update Example

Request URL

https://api.newbook.cloud/rest/bookings_groups_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"booking_group_id": "12345",
							"name": "Newbook Group",
							"guest_firstname": "Newbook",
							"guest_lastname": "Support",
							"address_street": "Level 2, 9 Ouyan Street",
							"address_city": "Surfers Paradise",
							"address_postcode": "4217",
							"guest_email": "support@newbook.cloud",
							"guest_phone": "0400000000",
							"period_from": "2024-04-19",
							"period_to": "2024-04-20"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"booking_group_id": "12345",
								"account_id": "501"
							},
							"message": ""
						}
					
				
AnchorBookings Groups: List

Retrieve a list of Group Bookings within the given time period.

Request Notes:

The only required fields are period_from, period_to and list_type - the rest are optional

If guest_id is provided it will limit results to an individual Guest

list_type Shows Group Bookings which:
arrived1

have Arrived during the specified dates

Optional parameter mode with value projected changes the behaviour to who should have Arrived, opposed to who actually Arrived

arriving2 are expected to Arrive before the specified period_to date, including Group Bookings before this date which are not yet Arrived - period_from will be ignored in this case.
To limit results to those within the specified dates, please use list_type of arrived and the mode parameter of projected (see above)
cancelled have been Cancelled during the specified dates
departed1 have Departed during the specified dates
departing3 are expected to Depart during the specified dates
inhouse3 are currently In-House (dates not required)
placed2 were placed during the specified dates
staying1 are expected to stay during the specified dates
no_show have been marked as No Show and were meant to arrive during the specified dates
all

returns all Group Bookings, this will be a Paginated List.

  • 1 ignores Group Bookings of status Cancelled, No Show, Quote, and Owner Occupied
  • 2 shows only Group Bookings of status Confirmed and Unconfirmed
  • 3 shows only Group Bookings of status Arrived

restrict_mail_outs controls whether to return Guests which have opted to be contacted automatically i.e. by systems not expressly related to their specific Group Booking (aka marketing opt-in). In Newbook, this is enabled on all Guests by default unless the Instance decides to disable it by default. If you send 1, i.e. only return Guests who allow contact automatically, and the Guest has already opted-out, the Group Booking data in the return response will still be present but the Guests array will be empty.

search is optional and when provided it will restrict the results to the matching Guest associated with the Group. It will search their name, contact details (phone, email, etc) and membership details for a match

display_guest_activities can optionally be provided as true to include the Guests Activity Tickets in the Guest response. display_cancelled_guest_activities can also be provided to include Cancelled Activity Tickets. Please see the Guests: Get request for an example of the Guest Activity response data.

display_guest_facility_hires can optionally be provided as true to include the Guests Facility Hires in the Guest response. display_cancelled_guest_facility_hires can also be provided to include Cancelled Facility Hires. Please see the Guests: Get request for an example of the Guest Facility Hire response data.

display_cancelled_group_activities can optionally be provided as true to include Cancelled Activity Tickets for the Group.

display_cancelled_group_facility_hires can optionally be provided as true to include Cancelled Facility Hire for the Group.

Response Notes:

The Guests array returned may contain more than one entry for multi-Guest Bookings - you can determine the main Guest as indicated by the primary_client field

If the Bookings Groups: List request has account_breakdown as true this will also affect the Guests array returned

The default_client_account_id field in the Booking array can be used to charge to the Booking Client Account, this may be different from the account_id where the Booking is part of a Group and the Guests are not paying individually

Inventory Item data:

The inventory_item array holds all the Inventory Item objects on the Booking.

  • stay_cost_contribution indicates whether the amount Increases the stay cost revenue, or if it is Excluded from the stay cost revenue

Guest data

title can be any string; Newbook does not restrict users to specific titles for Guests

contact_details

  • allow_transactional: Guest allows general contact related to Bookings or accounts
  • allow_marketing: Guest allows marketing contact such as newsletters

Bookings Groups: List Example

Request URL

https://api.newbook.cloud/rest/bookings_groups_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"period_from": "2024-04-19",
							"period_to": "2024-04-20",
							"list_type": "inhouse",
							"restrict_mail_outs": 1,
							"account_breakdown": true
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [{
								"id": 115231,
								"name": "Group"
								"arrival": "2024-04-20 14:00:00",
								"departure": "2024-04-24 10:00:00",
								"length": "4",
								"status": "Confirmed",
								"arrived_when": null,
								"departed_when": null,
								"total": "445.00",
								"booked_when": "2024-04-18 11:30:00",
								"booked_by": "Newbook Support",
								"booked_by_id": "-2",
								"arrived_by": "None",
								"arrived_by_id": null,
								"departed_by": "None",
								"departed_by_id": null,
								"reference_id": "1234567890",
								"inventory_items": [{
									"description": "Champagne",
									"stay_date": "2024-04-20",
									"stay_cost_contribution": "Increase",
									"gl_account_id": "4",
									"gl_category_id": "2",
									"amount": "75.00"
								},{
									"description": "Picnic Basket",
									"stay_date": "2024-04-20",
									"stay_cost_contribution": "Increase",
									"gl_account_id": "4",
									"gl_category_id": "2",
									"amount": "125.00"
								}],
								"account_id": "14042",
								"default_client_account_id": "14042",
								"account_balance": "99.00",
								"auto_billing_limit": null,
								"custom_fields": [{
									"id": 2,
									"type": "text",
									"label": "Custom Text",
									"value": "Custom Value"
								}],
								"guests": [{
									"guest_id": "1",
									"title": "Mr",
									"firstname": "John",
									"lastname": "Doe",
									"othername": "",
									"gender": null,
									"date_of_birth": null,
									"company_id": null,
									"company_name": null,
									"date_created": "2024-04-18 11:30:00",
									"modified_when": "2024-04-18 00:00:00",
									"last_note_when": "2024-04-18 00:00:00",
									"blacklisted_when": "2024-04-19 00:00:00",
									"vip_when": null,
									"account_id": "13783",
									"account_balance": "15.00",
									"auto_billing_limit": null,
									"primary_client": "1",
									"street": "Level 2, 9 Ouyan Street",
									"city": "Surfers Paradise",
									"state": "Queensland (QLD)",
									"postcode": "4217",
									"country": "Australia",
									"contact_details": [{
										"id": 1,
										"type": "phone",
										"content": "0756554600",
										"notes": "",
										"allow_transactional": "1",
										"allow_marketing": "1"
									},{
										"id": 2,
										"type": "email",
										"content": "john.doe@test.com",
										"notes": "",
										"allow_transactional": "1",
										"allow_marketing": "0"
									}],
									"custom_fields": [{
										"id": 1,
										"type": "text",
										"label": "My Test Field",
										"value": "Something"
									}],
									"membership_details": [{
										"type": "Testing Service",
										"type_id": "2",
										"service_id": 4,
										"level": null,
										"content": "1234567",
										"expiry_date": "2025-01-19"
									}],
									"equipment": [
										{
											"equipment_id": "26",
											"equipment_name": "My Honda",
											"equipment_make": "Honda",
											"equipment_model": "Accord",
											"equipment_type_id": "1",
											"equipment_type_name": "car",
											"equipment_length": "5.00",
											"equipment_width": "2.00",
											"equipment_height": "2.00",
											"equipment_registration": "222ABC",
											"equipment_registration_expiry": "2025-01-19",
											"active": "1"
										}
									],
									"dietary_requirements": [
										"1",
										"2"
									],
									"notes": [{
										"id": "1",
										"type_id": "1",
										"content": "This is my Guest note",
										"created_when": "2024-04-18 11:30:00",
										"created_by": "11",
										"updated_when": "2024-04-19 00:00:00",
										"updated_by": "5"
									}]
								}],
								"notes": [{
									"id": "1",
									"type_id": "1",
									"content": "This is my Group note",
									"created_when": "2024-04-18 11:30:00",
									"created_by": "11",
									"updated_when": "2024-04-19 00:00:00",
									"updated_by": "5"
								}],
								"bookings": [{
									"booking_id": 11034,
									"booking_arrival": "2024-04-20 14:00:00",
									"booking_departure": "2024-04-24 10:00:00",
									"booking_eta": "15:00",
									"booking_length": "4",
									"booking_status": "Confirmed",
									"booking_checkedin": null,
									"booking_checkedout": null,
									"booking_adults": 2,
									"booking_children": 3,
									"booking_infants": 0,
									"booking_animals": 0,
									"booking_total": "649.50",
									"booking_method_id": 2,
									"booking_method_name": "Booking.com",
									"booking_source_id": 5,
									"booking_source_name": "Booking.com",
									"booking_reason_id": 1,
									"booking_reason_name": "Business",
									"booking_demographic_id": null,
									"booking_demographic_name": "None",
									"booking_market_segment_id": null,
									"booking_market_segment_name": "None",
									"booking_parent_source_id": "1",
									"booking_parent_source_name": "Short Term",
									"booking_modified": "2024-04-18 11:30:00",
									"booking_placed": "2024-04-18 11:30:00",
									"booking_booked_by": "Newbook Support",
									"booking_booked_by_id": "-2",
									"booking_arrived_by": "None",
									"booking_arrived_by_id": null,
									"booking_departed_by": "None",
									"booking_departed_by_id": null,
									"gl_account_id": "1",
									"gl_category_id": "1",
									"company_id": null,
									"company_name": null,
									"travel_agent_id": 46,
									"travel_agent_name": "Booking.com",
									"travel_agent_commission_total": "44.50",
									"booking_reference_id": "1234567890",
									"tariff_name": "BOOK NOW",
									"tariff_total": "525.00",
									"tariffs_quoted": [
									    {
									        "tariff_quoted_id": 1,
									        "stay_date": "2024-04-20",
									        "label": "Standard",
									        "type_id": 1,
									        "tariff_applied_id": 2,
									        "original_amount": "110.00",
									        "calculated_amount": "100.00",
									        "charge_amount": "65.00",
									        "taxes": [
									            {
									                "tax_id": 1,
									                "tax_name": "GST",
									                "tax_inclusive": true,
									                "tax_amount": "9.09"
									            }
									        ],
									        "occupant_charges": [
									            {
									                "type": "adults",
									                "price": "20.00",
									                "occupants": 2
									            },
									            {
									                "type": "children",
									                "price": "15.00",
									                "occupants": 3
									            }
									        ]
									    },
									    {
									        "tariff_quoted_id": 2,
									        "stay_date": "2024-04-21",
									        "label": "Standard",
									        "type_id": 1,
									        "tariff_applied_id": 2,
									        "original_amount": "110.00",
									        "calculated_amount": "100.00",
									        "charge_amount": "65.00",
									        "taxes": [
									            {
									                "tax_id": 1,
									                "tax_name": "GST",
									                "tax_inclusive": true,
									                "tax_amount": "9.09"
									            }
									        ],
									        "occupant_charges": [
									            {
									                "type": "adults",
									                "price": "20.00",
									                "occupants": 2
									            },
									            {
									                "type": "children",
									                "price": "15.00",
									                "occupants": 3
									            }
									        ]
									    },
									    {
									        "tariff_quoted_id": 3,
									        "stay_date": "2024-04-22",
									        "label": "Standard",
									        "type_id": 1,
									        "tariff_applied_id": 2,
									        "original_amount": "110.00",
									        "calculated_amount": "100.00",
									        "charge_amount": "65.00",
									        "taxes": [
									            {
									                "tax_id": 1,
									                "tax_name": "GST",
									                "tax_inclusive": true,
									                "tax_amount": "9.09"
									            }
									        ],
									        "occupant_charges": [
									            {
									                "type": "adults",
									                "price": "20.00",
									                "occupants": 2
									            },
									            {
									                "type": "children",
									                "price": "15.00",
									                "occupants": 3
									            }
									        ]
									    },
									    {
									        "tariff_quoted_id": 4,
									        "stay_date": "2024-04-23",
									        "label": "Standard",
									        "type_id": 1,
									        "tariff_applied_id": 2,
									        "original_amount": "110.00",
									        "calculated_amount": "100.00",
									        "charge_amount": "65.00",
									        "taxes": [
									            {
									                "tax_id": 1,
									                "tax_name": "GST",
									                "tax_inclusive": true,
									                "tax_amount": "9.09"
									            }
									        ],
									        "occupant_charges": [
									            {
									                "type": "adults",
									                "price": "20.00",
									                "occupants": 2
									            },
									            {
									                "type": "children",
									                "price": "15.00",
									                "occupants": 3
									            }
									        ]
									    }
									],
									"inventory_items": [{
										"description": "Champagne",
										"stay_date": "2024-04-20",
										"stay_cost_contribution": "Include",
										"gl_account_id": "4",
										"gl_category_id": "2",
										"amount": "75.00"
									},{
										"description": "Picnic Basket",
										"stay_date": "2024-04-20",
										"stay_cost_contribution": "Increase",
										"gl_account_id": "4",
										"gl_category_id": "2",
										"amount": "125.00"
									}],
									"discount_id": "1",
									"discount_name": "Member Discount",
									"discount_code": "",
									"discount_total": "80.00",
									"discounts": [{
										"discount_id": "1",
										"discount_name": "Member Discount",
										"discount_code": "",
										"discount_total": "20.00"
									}],
									"account_id": "14042",
									"default_client_account_id": "14042",
									"account_balance": "99.00",
									"auto_billing_limit": null,
									"site_id": "1",
									"site_name": "DC001",
									"site_status": "Clean",
									"category_id": "1",
									"category_name": "Standard Cabin (2BR) - A",
									"custom_fields": [{
										"id": 2,
										"type": "text",
										"label": "Custom Text",
										"value": "Custom Value"
									}],
									"guests": [{
										"guest_id": "1",
										"title": "Mr",
										"firstname": "John",
										"lastname": "Doe",
										"othername": "",
										"gender": null,
										"date_of_birth": null,
										"company_id": null,
										"company_name": null,
										"date_created": "2024-04-18 11:30:00",
										"modified_when": "2024-04-18 00:00:00",
										"last_note_when": "2024-04-18 00:00:00",
										"blacklisted_when": "2024-04-19 00:00:00",
										"vip_when": null,
										"account_id": "13783",
										"account_balance": "15.00",
										"auto_billing_limit": null,
										"primary_client": "1",
										"street": "Level 2, 9 Ouyan Street",
										"city": "Surfers Paradise",
										"state": "Queensland (QLD)",
										"postcode": "4217",
										"country": "Australia",
										"contact_details": [{
											"id": 1,
											"type": "phone",
											"content": "0756554600",
											"notes": "",
											"allow_transactional": "1",
											"allow_marketing": "1"
										},{
											"id": 2,
											"type": "email",
											"content": "john.doe@test.com",
											"notes": "",
											"allow_transactional": "1",
											"allow_marketing": "0"
										}],
										"custom_fields": [{
											"id": 1,
											"type": "text",
											"label": "My Test Field",
											"value": "Something"
										}],
										"membership_details": [{
											"type": "Testing Service",
											"type_id": "2",
											"service_id": 4,
											"level": null,
											"content": "1234567",
											"expiry_date": "2025-01-19"
										}],
										"equipment": [
											{
												"equipment_id": "26",
												"equipment_name": "My Honda",
												"equipment_make": "Honda",
												"equipment_model": "Accord",
												"equipment_type_id": "1",
												"equipment_type_name": "car",
												"equipment_length": "5.00",
												"equipment_width": "2.00",
												"equipment_height": "2.00",
												"equipment_registration": "222ABC",
												"equipment_registration_expiry": "2025-01-19",
												"active": "1"
											}
										],
										"dietary_requirements": [
											"1",
											"2"
										],
										"notes": [{
											"id": "1",
											"type_id": "1",
											"content": "This is my Guest note",
											"created_when": "2024-04-18 11:30:00",
											"created_by": "11",
											"updated_when": "2024-04-19 00:00:00",
											"updated_by": "5"
										}]
									}],
									"guests_memberships_id": "1",
									"equipment": [],
									"notes": [{
										"id": "1",
										"type_id": "1",
										"content": "This is my Booking note",
										"created_when": "2024-04-18 11:30:00",
										"created_by": "11",
										"updated_when": "2024-04-19 00:00:00",
										"updated_by": "5"
									}],
									"payment_plans": [],
									"access_codes": [{
										"id": "1017",
										"card_id": "354",
										"access_code": "689323",
										"type": "bookings",
										"type_id": "11034",
										"description": "Access Card: 5",
										"car_rego": "",
										"period_from": "2024-04-20 14:00:00",
										"period_to": "2024-04-24 10:00:00",
										"area_id": "18",
										"created_when": "2024-04-18 11:30:00",
										"cancelled_when": null,
										"cancelled_reason": "",
										"cancelled_by": "0",
										"access_code_status": null,
										"area_name": "All Access"
									}],
									"bookings_group_id": null,
									"bookings_group_name": null,
									"booking_cancelled": null,
									"booking_cancelled_by": null,
									"booking_cancelled_by_id": null,
									"booking_cancelled_reason_id": null,
									"booking_cancelled_reason_name": null
								}]
								"cancelled": null,
								"cancelled_by": null,
								"cancelled_by_id": null,
								"cancelled_reason_id": null,
								"cancelled_reason_name": null
							}],
							"message": ""
						}
					
				
AnchorBookings Groups: Get

Retrieve the details of a single Group Booking.

Request Notes:

id must be provided to retrieve the Group Booking.

Send account_breakdown as true to see the balance of each associated Sub Client Account (gl_category).

client_account_tax_reconciliation can optionally be provided as true to include the amount of tax based on the reconciliation of payments / refunds. The below client_account_item_breakdown will also need to be provided as true for this to function.

client_account_item_breakdown can optionally be provided as true to include all accounting items saved on the Group Client Account in the Group response.

e.g.

				
					{
						"charges": [
							{
								"id": "3062",
								"account_id": "1796594",
								"gl_category_id": "1",
								"gl_account_id": "32",
								"description": "Standard Rate (2024-04-19)",
								"amount": 100,
								"tax_free": "0",
								"generated_by": "1",
								"generated_when": "2024-04-19 11:30:00",
								"inventory_item_id": null,
								"voided_by": "0",
								"voided_when": null,
								"link_type": "tariffs_quoted",
								"link_type_id": "123",
								"link_period_from": "2024-04-19",
								"link_period_to": "2024-04-19",
								"taxes": [
									{
										"tax_id": 1,
										"tax_name": "GST",
										"tax_inclusive": true,
										"tax_amount": 9.09
									}
								]
							}
						],
						"credits": [
							{
								"id": "4351",
								"account_id": "1796594",
								"gl_category_id": "1",
								"gl_account_id": "32",
								"description": "Discount",
								"amount": 5,
								"tax_free": "0",
								"generated_by": "1",
								"generated_when": "2024-04-19 11:30:00",
								"inventory_item_id": null,
								"voided_by": "0",
								"voided_when": null,
								"link_type": "discounts_quoted",
								"link_type_id": "1024",
								"link_period_from": "2024-04-19",
								"link_period_to": "2024-04-19",
								"taxes": [
									{
										"tax_id": 1,
										"tax_name": "GST",
										"tax_inclusive": true,
										"tax_amount": 0.45
									}
								]
							}
						],
						"payments": [
							{
								"id": "2",
								"account_id": "1796594",
								"gl_category_id": "1",
								"paid_by": "135576",
								"transaction_method": "manual",
								"transaction_id": null,
								"disbursed_booking_id": null,
								"disbursed_gl_account_id": null,
								"description": "Accommodation",
								"amount": 100,
								"tendered": 100,
								"type": "cash",
								"type_id": "5",
								"type_reference": "",
								"deposit": "0",
								"generated_by": "1",
								"generated_when": "2024-04-19",
								"voided_by": "0",
								"voided_when": null,
								"credits": [],
								"charges": [
									{
										"link_id": 1,
										"charge_id": 3062,
										"reconciled_amount": 100,
										"timestamp": "2024-04-19",
										"voided_when": null
									}
								]
							}
						],
						"refunds": [
							{
								"id": "2",
								"account_id": "1796594",
								"gl_category_id": "1",
								"refunded_to": "135576",
								"transaction_method": "manual",
								"transaction_id": null,
								"disbursed_booking_id": null,
								"disbursed_gl_account_id": null,
								"description": "Refunding Discount Overpayment",
								"amount": 5,
								"tendered": 5,
								"type": "cash",
								"type_id": "5",
								"type_reference": "",
								"generated_by": "1",
								"generated_when": "2024-04-19",
								"voided_by": "0",
								"voided_when": null,
								"credits": [
									{
										"link_id": 1,
										"credit_id": 4351,
										"reconciled_amount": 5,
										"timestamp": "2024-04-19",
										"voided_when": null
									}
								],
								"payments": []
							}
						]
					}
				
			

Example Booking Detail Attributes on charges, credits, payments, refunds when client_account_booking_details is true.

e.g.

				
					{
						"guest_visible": "1",
						"discounts_apply": "1",
						"booking_id": "1234",
						"booking_name": "John Doe",
						"booking_status": "Confirmed",
						"booking_site_id": "2",
						"booking_period_from": "2024-04-19 11:30:00",
						"booking_period_to": "2024-04-20 14:00:00",
						"booking_reference_id": "",
						"activity_booked_id": null
					}
				
			

display_guest_activities can optionally be provided as true to include the Guests Activity Tickets in the Guest response. display_cancelled_guest_activities can also be provided to include Cancelled Activity Tickets. Please see the Guests: Get request for an example of the Guest Activity response data.

display_guest_facility_hires can optionally be provided as true to include the Guests Facility Hires in the Guest response. display_cancelled_guest_facility_hires can also be provided to include Cancelled Facility Hires. Please see the Guests: Get request for an example of the Guest Facility Hire response data.

display_cancelled_group_activities can optionally be provided as true to include Cancelled Activity Tickets for the Group.

display_cancelled_group_facility_hires can optionally be provided as true to include Cancelled Facility Hire for the Group.

Response Notes:

The returned data from this request is identical to Bookings Groups: List but for the specific Group alone.

If no such Group ID exists, the success response parameter will be "false" and no data will be returned.

Bookings Groups: Get Example

Request URL

https://api.newbook.cloud/rest/bookings_groups_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": 11033
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": 115231,
								"name": "Group"
								"arrival": "2024-04-20 14:00:00",
								"departure": "2024-04-24 10:00:00",
								"length": "4",
								"status": "Confirmed",
								"arrived_when": null,
								"departed_when": null,
								"total": "445.00",
								"booked_when": "2024-04-18 11:30:00",
								"booked_by": "Newbook Support",
								"booked_by_id": "-2",
								"arrived_by": "None",
								"arrived_by_id": null,
								"departed_by": "None",
								"departed_by_id": null,
								"reference_id": "1234567890",
								"inventory_items": [{
									"description": "Champagne",
									"stay_date": "2024-04-20",
									"stay_cost_contribution": "Increase",
									"gl_account_id": "4",
									"gl_category_id": "2",
									"amount": "75.00"
								},{
									"description": "Picnic Basket",
									"stay_date": "2024-04-20",
									"stay_cost_contribution": "Increase",
									"gl_account_id": "4",
									"gl_category_id": "2",
									"amount": "125.00"
								}],
								"account_id": "14042",
								"default_client_account_id": "14042",
								"account_balance": "99.00",
								"auto_billing_limit": null,
								"custom_fields": [{
									"id": 2,
									"type": "text",
									"label": "Custom Text",
									"value": "Custom Value"
								}],
								"guests": [{
									"guest_id": "1",
									"title": "Mr",
									"firstname": "John",
									"lastname": "Doe",
									"othername": "",
									"gender": null,
									"date_of_birth": null,
									"company_id": null,
									"company_name": null,
									"date_created": "2024-04-18 11:30:00",
									"modified_when": "2024-04-18 00:00:00",
									"last_note_when": "2024-04-18 00:00:00",
									"blacklisted_when": "2024-04-19 00:00:00",
									"vip_when": null,
									"account_id": "13783",
									"account_balance": "15.00",
									"auto_billing_limit": null,
									"primary_client": "1",
									"street": "Level 2, 9 Ouyan Street",
									"city": "Surfers Paradise",
									"state": "Queensland (QLD)",
									"postcode": "4217",
									"country": "Australia",
									"contact_details": [{
										"id": 1,
										"type": "phone",
										"content": "0756554600",
										"notes": "",
										"allow_transactional": "1",
										"allow_marketing": "1"
									},{
										"id": 2,
										"type": "email",
										"content": "john.doe@test.com",
										"notes": "",
										"allow_transactional": "1",
										"allow_marketing": "0"
									}],
									"custom_fields": [{
										"id": 1,
										"type": "text",
										"label": "My Test Field",
										"value": "Something"
									}],
									"membership_details": [{
										"type": "Testing Service",
										"type_id": "2",
										"service_id": 4,
										"level": null,
										"content": "1234567",
										"expiry_date": "2025-01-19"
									}],
									"equipment": [
										{
											"equipment_id": "26",
											"equipment_name": "My Honda",
											"equipment_make": "Honda",
											"equipment_model": "Accord",
											"equipment_type_id": "1",
											"equipment_type_name": "car",
											"equipment_length": "5.00",
											"equipment_width": "2.00",
											"equipment_height": "2.00",
											"equipment_registration": "222ABC",
											"equipment_registration_expiry": "2025-01-19",
											"active": "1"
										}
									],
									"dietary_requirements": [
										"1",
										"2"
									],
									"notes": [{
										"id": "1",
										"type_id": "1",
										"content": "This is my Guest note",
										"created_when": "2024-04-18 11:30:00",
										"created_by": "11",
										"updated_when": "2024-04-19 00:00:00",
										"updated_by": "5"
									}]
								}],
								"notes": [{
									"id": "1",
									"type_id": "1",
									"content": "This is my Group note",
									"created_when": "2024-04-18 11:30:00",
									"created_by": "11",
									"updated_when": "2024-04-19 00:00:00",
									"updated_by": "5"
								}],
								"bookings": [{
									"booking_id": 11034,
									"booking_arrival": "2024-04-20 14:00:00",
									"booking_departure": "2024-04-24 10:00:00",
									"booking_eta": "15:00",
									"booking_length": "4",
									"booking_status": "Confirmed",
									"booking_checkedin": null,
									"booking_checkedout": null,
									"booking_adults": 2,
									"booking_children": 3,
									"booking_infants": 0,
									"booking_animals": 0,
									"booking_total": "649.50",
									"booking_method_id": 2,
									"booking_method_name": "Booking.com",
									"booking_source_id": 5,
									"booking_source_name": "Booking.com",
									"booking_reason_id": 1,
									"booking_reason_name": "Business",
									"booking_demographic_id": null,
									"booking_demographic_name": "None",
									"booking_market_segment_id": null,
									"booking_market_segment_name": "None",
									"booking_parent_source_id": "1",
									"booking_parent_source_name": "Short Term",
									"booking_modified": "2024-04-18 11:30:00",
									"booking_placed": "2024-04-18 11:30:00",
									"booking_booked_by": "Newbook Support",
									"booking_booked_by_id": "-2",
									"booking_arrived_by": "None",
									"booking_arrived_by_id": null,
									"booking_departed_by": "None",
									"booking_departed_by_id": null,
									"gl_account_id": "1",
									"gl_category_id": "1",
									"company_id": null,
									"company_name": null,
									"travel_agent_id": 46,
									"travel_agent_name": "Booking.com",
									"travel_agent_commission_total": "44.50",
									"booking_reference_id": "1234567890",
									"tariff_name": "BOOK NOW",
									"tariff_total": "525.00",
									"tariffs_quoted": [
									    {
									        "tariff_quoted_id": 1,
									        "stay_date": "2024-04-20",
									        "label": "Standard",
									        "type_id": 1,
									        "tariff_applied_id": 2,
									        "original_amount": "110.00",
									        "calculated_amount": "100.00",
									        "charge_amount": "65.00",
									        "taxes": [
									            {
									                "tax_id": 1,
									                "tax_name": "GST",
									                "tax_inclusive": true,
									                "tax_amount": "9.09"
									            }
									        ],
									        "occupant_charges": [
									            {
									                "type": "adults",
									                "price": "20.00",
									                "occupants": 2
									            },
									            {
									                "type": "children",
									                "price": "15.00",
									                "occupants": 3
									            }
									        ]
									    },
									    {
									        "tariff_quoted_id": 2,
									        "stay_date": "2024-04-21",
									        "label": "Standard",
									        "type_id": 1,
									        "tariff_applied_id": 2,
									        "original_amount": "110.00",
									        "calculated_amount": "100.00",
									        "charge_amount": "65.00",
									        "taxes": [
									            {
									                "tax_id": 1,
									                "tax_name": "GST",
									                "tax_inclusive": true,
									                "tax_amount": "9.09"
									            }
									        ],
									        "occupant_charges": [
									            {
									                "type": "adults",
									                "price": "20.00",
									                "occupants": 2
									            },
									            {
									                "type": "children",
									                "price": "15.00",
									                "occupants": 3
									            }
									        ]
									    },
									    {
									        "tariff_quoted_id": 3,
									        "stay_date": "2024-04-22",
									        "label": "Standard",
									        "type_id": 1,
									        "tariff_applied_id": 2,
									        "original_amount": "110.00",
									        "calculated_amount": "100.00",
									        "charge_amount": "65.00",
									        "taxes": [
									            {
									                "tax_id": 1,
									                "tax_name": "GST",
									                "tax_inclusive": true,
									                "tax_amount": "9.09"
									            }
									        ],
									        "occupant_charges": [
									            {
									                "type": "adults",
									                "price": "20.00",
									                "occupants": 2
									            },
									            {
									                "type": "children",
									                "price": "15.00",
									                "occupants": 3
									            }
									        ]
									    },
									    {
									        "tariff_quoted_id": 4,
									        "stay_date": "2024-04-23",
									        "label": "Standard",
									        "type_id": 1,
									        "tariff_applied_id": 2,
									        "original_amount": "110.00",
									        "calculated_amount": "100.00",
									        "charge_amount": "65.00",
									        "taxes": [
									            {
									                "tax_id": 1,
									                "tax_name": "GST",
									                "tax_inclusive": true,
									                "tax_amount": "9.09"
									            }
									        ],
									        "occupant_charges": [
									            {
									                "type": "adults",
									                "price": "20.00",
									                "occupants": 2
									            },
									            {
									                "type": "children",
									                "price": "15.00",
									                "occupants": 3
									            }
									        ]
									    }
									],
									"inventory_items": [{
										"description": "Champagne",
										"stay_date": "2024-04-20",
										"stay_cost_contribution": "Include",
										"gl_account_id": "4",
										"gl_category_id": "2",
										"amount": "75.00"
									},{
										"description": "Picnic Basket",
										"stay_date": "2024-04-20",
										"stay_cost_contribution": "Increase",
										"gl_account_id": "4",
										"gl_category_id": "2",
										"amount": "125.00"
									}],
									"discount_id": "1",
									"discount_name": "Member Discount",
									"discount_code": "",
									"discount_total": "80.00",
									"discounts": [{
										"discount_id": "1",
										"discount_name": "Member Discount",
										"discount_code": "",
										"discount_total": "20.00"
									}],
									"account_id": "14042",
									"default_client_account_id": "14042",
									"account_balance": "99.00",
									"auto_billing_limit": null,
									"site_id": "1",
									"site_name": "DC001",
									"site_status": "Clean",
									"category_id": "1",
									"category_name": "Standard Cabin (2BR) - A",
									"custom_fields": [{
										"id": 2,
										"type": "text",
										"label": "Custom Text",
										"value": "Custom Value"
									}],
									"guests": [{
										"guest_id": "1",
										"title": "Mr",
										"firstname": "John",
										"lastname": "Doe",
										"othername": "",
										"gender": null,
										"date_of_birth": null,
										"company_id": null,
										"company_name": null,
										"date_created": "2024-04-18 11:30:00",
										"modified_when": "2024-04-18 00:00:00",
										"last_note_when": "2024-04-18 00:00:00",
										"blacklisted_when": "2024-04-19 00:00:00",
										"vip_when": null,
										"account_id": "13783",
										"account_balance": "15.00",
										"auto_billing_limit": null,
										"primary_client": "1",
										"street": "Level 2, 9 Ouyan Street",
										"city": "Surfers Paradise",
										"state": "Queensland (QLD)",
										"postcode": "4217",
										"country": "Australia",
										"contact_details": [{
											"id": 1,
											"type": "phone",
											"content": "0756554600",
											"notes": "",
											"allow_transactional": "1",
											"allow_marketing": "1"
										},{
											"id": 2,
											"type": "email",
											"content": "john.doe@test.com",
											"notes": "",
											"allow_transactional": "1",
											"allow_marketing": "0"
										}],
										"custom_fields": [{
											"id": 1,
											"type": "text",
											"label": "My Test Field",
											"value": "Something"
										}],
										"membership_details": [{
											"type": "Testing Service",
											"type_id": "2",
											"service_id": 4,
											"level": null,
											"content": "1234567",
											"expiry_date": "2025-01-19"
										}],
										"equipment": [
											{
												"equipment_id": "26",
												"equipment_name": "My Honda",
												"equipment_make": "Honda",
												"equipment_model": "Accord",
												"equipment_type_id": "1",
												"equipment_type_name": "car",
												"equipment_length": "5.00",
												"equipment_width": "2.00",
												"equipment_height": "2.00",
												"equipment_registration": "222ABC",
												"equipment_registration_expiry": "2025-01-19",
												"active": "1"
											}
										],
										"dietary_requirements": [
											"1",
											"2"
										],
										"notes": [{
											"id": "1",
											"type_id": "1",
											"content": "This is my Guest note",
											"created_when": "2024-04-18 11:30:00",
											"created_by": "11",
											"updated_when": "2024-04-19 00:00:00",
											"updated_by": "5"
										}]
									}],
									"guests_memberships_id": "1",
									"equipment": [],
									"notes": [{
										"id": "1",
										"type_id": "1",
										"content": "This is my Booking note",
										"created_when": "2024-04-18 11:30:00",
										"created_by": "11",
										"updated_when": "2024-04-19 00:00:00",
										"updated_by": "5"
									}],
									"payment_plans": [],
									"access_codes": [{
										"id": "1017",
										"card_id": "354",
										"access_code": "689323",
										"type": "bookings",
										"type_id": "11034",
										"description": "Access Card: 5",
										"car_rego": "",
										"period_from": "2024-04-20 14:00:00",
										"period_to": "2024-04-24 10:00:00",
										"area_id": "18",
										"created_when": "2024-04-18 11:30:00",
										"cancelled_when": null,
										"cancelled_reason": "",
										"cancelled_by": "0",
										"access_code_status": null,
										"area_name": "All Access"
									}],
									"bookings_group_id": null,
									"bookings_group_name": null,
									"booking_cancelled": null,
									"booking_cancelled_by": null,
									"booking_cancelled_by_id": null,
									"booking_cancelled_reason_id": null,
									"booking_cancelled_reason_name": null
								}]
								"cancelled": null,
								"cancelled_by": null,
								"cancelled_by_id": null,
								"cancelled_reason_id": null,
								"cancelled_reason_name": null
							},
							"message": ""
						}
					
				
AnchorBookings Rule Templates: List

List Bookings Rule Templates.

Request Notes:

name (string) optional, filters results by name.

show_inactive (boolean) optional, when provided with a truthy value it will include inactive Bookings Rule Templates in the response.

Response Notes:

An array of objects will be returned. Each object will contain the following parameters.

  • name (string) name of the Bookings Rule Template.
  • type (string) type of Bookings Rule Template.
    • inventory_items
    • deposit_rules
    • adjustment_fees
  • active (boolean) determines if the Bookings Rule Template is visible.
  • associated_tariffs (array) an array of associated Rates objects with the following format:
    • id (integer) associated rate ID.
    • tariff_name (string) associated rate name.

If type is set to inventory_items:

  • inventory_items (array) an array of Inventory Item objects. See the Create request for more information on the parameters contained within each object.

If type is set to deposit_rules:

  • deposit_rules (array) an array of Deposit Rule objects. See the Create request for more information on the parameters contained within each object.

If type is set to adjustment_fees:

  • adjustment_fees (array) an array of Adjustment Fee objects. See the Create request for more information on the parameters contained within each object.

Bookings Rule Templates: List Example

Request URL

https://api.newbook.cloud/rest/bookings_rule_templates_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"show_inactive": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"id": "1",
									"name": "Low/Mid",
									"type": "deposit_rules",
									"active": "1",
									"deposit_rules": [
										{
											"deposit_due": "3",
											"deposit_due_type": "days_before",
											"booked_days_in_advance": "7",
											"deposit_type": "percentage",
											"deposit_amount": "25",
											"minimum": "50.00",
											"maximum": "100.00",
											"allow_offline": "1",
											"allow_online": "0"
										}
									],
									"associated_tariffs": [
										{
											"id": "1",
											"tariff_name": "Beach Cabins"
										}
									]
								},
								{
									"id": "2",
									"name": "Premium",
									"type": "inventory_items",
									"active": "0",
									"inventory_items": [
										{
											"id": "10"
										},
										{
											"id": "12"
										}
									],
									"associated_tariffs": []
								}
							],
							"message": ""
						}
					
				
AnchorBookings Rule Templates: Get

Retrieve a single Bookings Rule Template.

Request Notes:

  • id (integer) required, an existing Bookings Rule Template.

Response Notes:

See the List description for details on the object parameters that will be returned.

Bookings Rule Templates: Get Example

Request URL

https://api.newbook.cloud/rest/bookings_rule_templates_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "1",
								"name": "Low/Mid",
								"type": "deposit_rules",
								"active": "1",
								"deposit_rules": [
									{
										"deposit_due": "3",
										"deposit_due_type": "days_before",
										"booked_days_in_advance": "7",
										"deposit_type": "percentage",
										"deposit_amount": "25",
										"minimum": "50.00",
										"maximum": "100.00",
										"allow_offline": "1",
										"allow_online": "0"
									}
								],
								"associated_tariffs": [
									{
										"id": "1",
										"tariff_name": "Beach Cabins"
									}
								]
							},
							"message": ""
						}
					
				
AnchorBookings Rule Templates: Create

Creates a new Bookings Rule Template.

Request Notes:

The following parameters are required.

  • name (string) name of the Bookings Rule Template
  • type (integer) type of Bookings Rule Template. Options may include:
    • inventory_items
    • deposit_rules
    • adjustment_fees

Please see below for a list of optional details that can be provided.

  • active (boolean) determines if the Bookings Rule Template is visible.

If type is set to inventory_items:

  • inventory_items (array) an array of Inventory Item objects with the following format:
    • id (integer) an existing Inventory Item ID.

If type is set to deposit_rules:

  • deposit_rules (array) an array of Deposit Rule objects with the following format:
    • deposit_due (integer|date) an integer representing the number of days or a specific date depending on the deposit_due_type.
    • deposit_due_type (string) when the deposit is due. Options may include:
      • days_before (default)
      • days_after
      • specific_date
    • booked_days_in_advance (integer) how many days in advance the Booking must be placed.
    • deposit_type (string) how the deposit is calculated. Options may include:
      • percentage (default)
      • percentage_inc_prev_deposits
      • nights
      • nights_average
      • fixed
      • fixed_per_night
      • fixed_per_adult
      • fixed_per_child
      • fixed_per_person
      • fixed_per_adult_per_night
      • fixed_per_child_per_night
      • fixed_per_person_per_night
    • deposit_amount (float) deposit amount required.
    • minimum (float) the minimum total deposit amount allowed.
    • maximum (float) the maximum total deposit amount allowed (0 = Unlimited). Defaults to 0 / Unlimited.
    • allow_offline (boolean) determines if the rule is available for offline Bookings.
    • allow_online (boolean) determines if the rule is available for online Bookings.

If type is set to adjustment_fees:

  • adjustment_fees (array) an array of Adjustment Fee objects with the following format:
    • type (string) the type of Adjustment Fee. Options may include:
      • cancellation_fee
      • online_modification_fee
    • id (integer) an existing Inventory Item ID.
    • description (string) description of the Adjustment Fee.
    • gl_category_id (integer) an existing GL Category ID.
    • gl_account_id (integer) an existing GL Account ID.
    • fee_applies_days (integer) the number of days to restrict the Adjustment Fee based on the fee_applies_method.
    • fee_applies_method (string) the calculation method for the Adjustment Fee. Options may include:
      • before_booking_arrival (default)
      • after_booking_placed
    • amount_type (string) the calculation method for the Adjustment Fee amount. Options may include:
      • fixed (default)
    • amount (float) the amount of the Adjustment Fee.
    • gst_free (boolean) determines if the Adjustment Fee is GST free.

Bookings Rule Templates: Create Example

Request URL

https://api.newbook.cloud/rest/bookings_rule_templates_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "Premium",
							"type": "deposit_rules",
							"active": "1",
							"deposit_rules": [
								{
									"deposit_due": "3",
									"deposit_due_type": "days_before",
									"booked_days_in_advance": "7",
									"deposit_type": "fixed_per_night",
									"deposit_amount": "50",
									"minimum": "100.00",
									"maximum": "500.00",
									"allow_offline": "1",
									"allow_online": "0"
								},
								{
									"deposit_due": "3",
									"deposit_due_type": "days_before",
									"booked_days_in_advance": "14",
									"deposit_type": "percentage",
									"deposit_amount": "10",
									"minimum": "0",
									"maximum": "0",
									"allow_offline": "1",
									"allow_online": "1"
								}
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "3",
								"name": "Premium",
								"type": "deposit_rules",
								"active": "1",
								"deposit_rules": [
									{
										"id": "1",
										"deposit_due": "3",
										"deposit_due_type": "days_before",
										"booked_days_in_advance": "7",
										"deposit_type": "fixed_per_night",
										"deposit_amount": "50",
										"minimum": "100.00",
										"maximum": "500.00",
										"allow_offline": "1",
										"allow_online": "0"
									},
									{
										"id": "2",
										"deposit_due": "3",
										"deposit_due_type": "days_before",
										"booked_days_in_advance": "14",
										"deposit_type": "percentage",
										"deposit_amount": "10",
										"minimum": "0",
										"maximum": "0",
										"allow_offline": "1",
										"allow_online": "1"
									}
								],
								"associated_tariffs": []
							},
							"message": ""
						}
					
				
AnchorBookings Rule Templates: Update

Updates an existing Bookings Rule Template.

Request Notes:

  • id (integer) required, an existing Bookings Rule Template.

If type is set to inventory_items:

  • inventory_items (array) optional, in addition to the parameters outlined in the Create request, the following options are also available:
    • id (integer) an existing Inventory Item ID to update.
    • remove (boolean) optional, deactivates the existing Inventory Item when set to true.

If type is set to deposit_rules:

  • deposit_rules (array) optional, in addition to the parameters outlined in the Create request, the following options are also available:
    • id (integer) an existing Deposit Rule ID to update.
    • remove (boolean) optional, deactivates the existing Deposit Rule when set to true.

If type is set to adjustment_fees:

  • adjustment_fees (array) optional, in addition to the parameters outlined in the Create request, the following options are also available:
    • id (integer) an existing Adjustment Fee ID to update.
    • remove (boolean) optional, deactivates the existing Adjustment Fee when set to true.

Additional parameters are defined in Bookings Rule Templates: Create.

Bookings Rule Templates: Update Example

Request URL

https://api.newbook.cloud/rest/bookings_rule_templates_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": "3",
							"name": "School Holidays",
							"active": "0",
							"deposit_rules": [
								{
									"id": "1",
									"deposit_due": "5",
									"allow_online": "1"
								},
								{
									"id": "2",
									"remove": "1"
								}
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "3",
								"name": "School Holidays",
								"type": "deposit_rules",
								"active": "0",
								"deposit_rules": [
									{
										"id": "1",
										"deposit_due": "5",
										"deposit_due_type": "days_before",
										"booked_days_in_advance": "7",
										"deposit_type": "fixed_per_night",
										"deposit_amount": "50",
										"minimum": "100.00",
										"maximum": "500.00",
										"allow_offline": "1",
										"allow_online": "1"
									}
								],
								"associated_tariffs": [
									{
										"id": "2",
										"tariff_name": "Forest Cabins"
									}
								]
							},
							"message": ""
						}
					
				
AnchorRates: List

Retrieve a list of configured Rates based on the provided parameters.

Request Notes:

All available fields for this request are optional

id (array of ints) optional - This is an array of Rate IDs to restrict the response to.

has_inventory_items (boolean) optional - This will restrict the response to Rates with / without Inventory Items. Not providing this field will show all Rates regardless of their Inventory Items.

master_rate_id (string | array of ints) optional - This is an array of Master Rate IDs to filter the Rates to those configured to have the provided Master Rate associated with the Rate. This also supports providing the following values:

  • master - This will include Rates configured as a Master Rate
  • standalone - This will include Rates configured as a Standalone Rate

applied_after (date - yyyy-mm-dd) optional - This is a date to show all Rates that have applications after this particular date. The Rates shown are inclusive of this particular date.

applied_before (date - yyyy-mm-dd) optional - This is a date to show all Rates that have applications before this particular date. The Rates shown are inclusive of this particular date.

category_id (array of ints) optional - This is an array containing Category IDs to restrict the response to only Rates applied to any of these particular Categories.

rate_type_id (array of ints) optional - This is an array containing Rate Type IDs to restrict the response to only Rates applied to those particular Rate Types

per_person (boolean) optional - This will restrict the response to Rates that either are or are not a per-person rate. Omitting this field will result in all Rates showing regardless of whether they are a per-person rate.

allow_site_selection (boolean) optional - This will restrict the response to Rates that have / don't have site selection enabled on Newbook Online. This field can also be omitted to not restrict the filtering

show_inactive (boolean) optional, default false - If false, or not specified, inactive Rates are not included.

Rates: List Example

Request URL

https://api.newbook.cloud/rest/tariffs_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [{
								"id": 13,
								"using_master": "standalone",
								"master_id": null,
								"name": "Standard",
								"dynamic": "none",
								"base_day_based": 0,
								"additionals_day_based": 0,
								"active": true,
								"base_adult": 2,
								"base_child": 0,
								"base_infant": 0,
								"base_animal": 0,
								"extras_combined": false,
								"per_person": false,
								"minimum_charge_per_period": 0,
								"base_min_combined": 0,
								"base_max_combined": 0,
								"min_days_in_advance": 0,
								"max_days_in_advance": 0,
								"minimum_periods": 1,
								"maximum_periods": 0,
								"invoice_control": false,
								"base_max_adults": null,
								"base_max_children": null,
								"base_max_infants": null,
								"base_max_animals": null,
								"special_deal": 0,
								"first_deposit_required": true,
								"allow_cancellations": null,
								"allow_modifications": 7,
								"inclusions": "

There are no additional inclusions within this rate

", "period_amounts": [ { "id": 1, "amount": 150.00, "dynamic_min": 100.00, "dynamic_max": 220.00, "minimum_periods": 1, "charge_additionals": 1 }, { "id": 2, "amount": 130.00, "dynamic_min": 100.00, "dynamic_max": 220.00, "minimum_periods": 1, "charge_additionals": 1 } ], "additionals": [ { "id": 1, "adult_amount": 30.00, "child_amount": 20.00, "infant_amount": 10.00, "animal_amount": 5.00 }, { "id": 2, "adult_amount": 25.00, "child_amount": 15.00, "infant_amount": 5.00, "animal_amount": 0.00 } ], "load_from_master": [], "discounts": [ { "id": 1, "applies_after": 3, "applies_every": 1, "applies_retroactively": false, "base_type": "Percentage Total", "base_amount": 20.00, "additional_type": "Percentage Total", "additional_amount": 20.00, "cm_code": "" } ], "inventory_items": [ { "id": 1, "inventory_item_id": "100", "description": "Breakfast", "gl_category_id": 1, "gl_account_id": 20, "display_task_list": [ -6 ], "guest_visible": true, "travel_agent_commission": false, "include_in_stay_cost": 1, "include_in_deposit": 1, "include_in_payment_plan": true, "discounts_apply": true, "refundable": true, "disburse_to_owners": false, "item_type": "charges", "qty": 1, "amount": 20.00, "per_adult": 0, "per_child": 0, "per_infant": 0, "per_animal": 0, "calculation_type": "fixed", "tax_free": false, "daytype": "once", "ignore_other_tariffs": 0 } ], "deposits": [ { "id": 1, "due_days": "0", "due_type": "after", "days_in_advance": "0", "deposit_type": "percentage", "deposit_amount": 20, "minimum": 100.00, "maximum": 200.00, "offline_deposit": true, "online_deposit": true } ], "adjustment_fees": [ { "id": 1, "type": "cancellation", "inventory_item_id": 125, "description": "Cancellation Fee", "gl_category_id": 1, "gl_account_id": 34, "within_days": 7, "within_type": "booking_arriving", "amount_type": "percentage", "amount": 50.00, "tax_free": false } ] }], "message": "" }
AnchorRates: Get

Request Notes:

id (int) required

show_inactive (boolean) optional, default true - If false and the id belongs to an inactive Rate, a validation error is returned.

Rates: Get Example

Request URL

https://api.newbook.cloud/rest/tariffs_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": 13
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": 13,
								"using_master": "standalone",
								"master_id": null,
								"name": "Standard",
								"dynamic": "none",
								"base_day_based": 0,
								"additionals_day_based": 0,
								"active": true,
								"base_adult": 2,
								"base_child": 0,
								"base_infant": 0,
								"base_animal": 0,
								"extras_combined": false,
								"per_person": false,
								"minimum_charge_per_period": 0,
								"base_min_combined": 0,
								"base_max_combined": 0,
								"min_days_in_advance": 0,
								"max_days_in_advance": 0,
								"minimum_periods": 1,
								"maximum_periods": 0,
								"invoice_control": false,
								"base_max_adults": null,
								"base_max_children": null,
								"base_max_infants": null,
								"base_max_animals": null,
								"special_deal": 0,
								"first_deposit_required": true,
								"allow_cancellations": null,
								"allow_modifications": 7,
								"inclusions": "

There are no additional inclusions within this rate

", "period_amounts": [ { "id": 1, "amount": 150.00, "dynamic_min": 100.00, "dynamic_max": 220.00, "minimum_periods": 1, "charge_additionals": 1 }, { "id": 2, "amount": 130.00, "dynamic_min": 100.00, "dynamic_max": 220.00, "minimum_periods": 1, "charge_additionals": 1 } ], "additionals": [ { "id": 1, "adult_amount": 30.00, "child_amount": 20.00, "infant_amount": 10.00, "animal_amount": 5.00 }, { "id": 2, "adult_amount": 25.00, "child_amount": 15.00, "infant_amount": 5.00, "animal_amount": 0.00 } ], "load_from_master": [], "discounts": [ { "id": 1, "applies_after": 3, "applies_every": 1, "applies_retroactively": false, "base_type": "Percentage Total", "base_amount": 20.00, "additional_type": "Percentage Total", "additional_amount": 20.00, "cm_code": "" } ], "inventory_items": [ { "id": 1, "inventory_item_id": "100", "description": "Breakfast", "gl_category_id": 1, "gl_account_id": 20, "display_task_list": [ -6 ], "guest_visible": true, "travel_agent_commission": false, "include_in_stay_cost": 1, "include_in_deposit": 1, "include_in_payment_plan": true, "discounts_apply": true, "refundable": true, "disburse_to_owners": false, "item_type": "charges", "qty": 1, "amount": 20.00, "per_adult": 0, "per_child": 0, "per_infant": 0, "per_animal": 0, "calculation_type": "fixed", "tax_free": false, "daytype": "once", "ignore_other_tariffs": 0 } ], "deposits": [ { "id": 1, "due_days": "0", "due_type": "after", "days_in_advance": "0", "deposit_type": "percentage", "deposit_amount": 20, "minimum": 100.00, "maximum": 200.00, "offline_deposit": true, "online_deposit": true } ], "adjustment_fees": [ { "id": 1, "type": "cancellation", "inventory_item_id": 125, "description": "Cancellation Fee", "gl_category_id": 1, "gl_account_id": 34, "within_days": 7, "within_type": "booking_arriving", "amount_type": "percentage", "amount": 50.00, "tax_free": false } ] }, "message": "" }
AnchorRates: Create

Request Notes:

using_master (string - enum) required - It can be any of the following options:

  • standalone - This is for creating a standalone rate
  • master - This option specifies that the rate is a master rate
  • dependant - This options specifies that the rate is a dependant rate

master_id (int) required if using_master = dependant, otherwise this cannot be provided - When provided, this will need to be an ID of an existing Rate configured as a Master Rate.

name (string) required - It is the name of the rate you are creating and has a maximum length of 200 characters

dynamic (string - enum) required - This will need to be one of the following options:

  • none - This option specifies that the rate does not have dynamic pricing.
  • online - This option states that the rate has dynamic pricing on Newbook Online, or any connected 3rd Party Channels
  • interface - This options states that the rate has dynamic pricing inside the Newbook interface only
  • all - This states that the rate has dynamic pricing online as well as inside the interface

dynamic_min (float) optional, default: 0.00 - Lower bound for dynamic pricing. Rates will never be lower than this.

dynamic_max (float) optional, default: 0.00 - Upper bound for dynamic pricing. Rates will never be higher than this.

dynamic_base (float | null) optional, default: null - Used to calculate revenue lost or earned on the Dynamic Pricing Report by comparing this Rates Dynamic Base against its Dynamic Minimum/Maximum.

dynamic_method (enum - string) optional, default: "linear" - What formula to use to calculate the rate

  • linear - Prices are interpolated linearly between dynamic_min and dynamic_max. This is recommended for Off-Peak Rates.
  • exponential - Prices increase exponentially from dynamic_min to dynamic_max. This is recommended for Peak Rates.

dynamic_occupancy (enum - string) optional, default: "category" - Which Occupancy Percentage should be used to work out the Dynamic Pricing formula.

  • category - Use the percentage of the category occupied.
  • category_type - Use the percentage of the category type occupied.
  • instance - Use the percentage of the property occupied.

dynamic_occupancy_min (float) optional, default: 0.00 - The level of occupancy as a percentage from 0.00 to 100.00 at which dynamic pricing will start to increase prices from dynamic_min. If the occupancy level is below this percentage, dynamic_min will be used.

base_day_based (int - enum) required - This controls the format of the pricing on the rate and needs to be one of the following options:

  • 0 - Repeat for Listed Nights
  • 1 - Repeat for Days of Week
  • 2 - Use Last Listed Night
  • 3 - Use Matching Occupancy Level
  • 4 - Use Guest Equipment (This is only available for Marina instances that have Equipment enabled)
  • 5 - No Billing

base_day_based_occupancy (string - enum) required if base_day_based = 3 - This can be one of the following options:

  • category - This states that the occupancy level is determined based on the associated Category
  • category_type - This states that the occupancy level is determined based on the overall Category Type
  • instance - This states that the occupancy level is determined based on the entire Instance

additionals_day_based (string - enum) required - This controls the format of the additional occupant pricing on the rate and needs to be one of the following options:

  • 0 - Use Last Listed Price
  • 1 - Repeat for Days of Week
  • 2 - Use Last Listed Night
  • 3 - Repeat for Listed Nights

active (boolean) optional, default: true - This states whether the rate is active. This will default to true if not provided.

extras_combined (boolean) optional, default: false - This states whether your rate is configured to charge based on combined occupants or individual occupants.

  • true - base_combined can be used
  • false default - the base_adult, base_child, base_infant, base_animal fields can be used

base_adult (int) required if extras_combined = false - This is the number of adults included in the base pricing on the rate.

base_child (int) optional, default: 0 - This is the number of children included in the base pricing on the rate.

base_infant (int) optional, default: 0 - This is the number of infants included in the base pricing on the rate.

base_animal (int) optional, default: 0 - This is the number of animals included in the base pricing on the rate.

base_combined (int) required if extras_combined = true - This is the number of combined occupants included in the base pricing on the rate.

per_person (boolean) required - This controls whether the rate allows standard base pricing, or only specific pricing per occupant.

minimum_charge_per_period (float) optional, default: 0.00 - This specifies the minimum amount the rate will charge per night.

base_min_combined (int) optional, default: 0 - This controls the minimum number of guests required to book the rate. This will default to 0, which means it won't limit bookings based on occupants.

base_max_combined (int) optional, default: 0 - This controls the maximum number of guests required to book the rate. This will default to 0, which means it won't limit bookings based on occupants. This must be equal or greater than base_min_combined if both are not 0

min_days_in_advance (int) optional, default: 0 - This controls the minimum number of days in advance a booking needs to be made to use this rate. 0 means there is no restriction in place.

max_days_in_advance (int) optional, default: 0 - This controls the maximum number of days in advance a booking needs to be made to use this rate. 0 means there is no restriction in place. This must be equal or greater than min_days_in_advance if both are not 0

minimum_periods (int) optional, default: 1 - This controls the minimum number of nights a booking has to stay to be valid for the rate.

maximum_periods (int) optional, default: 0 - This controls the maximum number of nights a booking can stay to be valid for the rate. 0 means there is no limit. This must be equal or greater than minimum_periods if it's not 0

invoice_control (boolean) optional, default: false - This controls whether Bookings on this rate should automatically raise Invoices for Quoted Tariffs for each period specified in the below controls.

  • true - automatically raise Invoices for the Quoted Tariffs for each period specified
  • false - invoice and invoice_control

invoice_interval_multiplier (int) available if invoice_control = true, default: 0. This along with the invoice_interval controls how many days / weeks are invoiced at a time.

invoice_interval (string - enum) available if invoice_control = true, default: "day". This along with invoice_interval_multiplier controls the number of days / weeks to group the invoices into. This can be one of the following options:

  • day
  • week
  • month
  • year

system_template_invoices (int | null) optional, default: null. This references an invoice system template ID which is used when invoices are raised through the invoice_control setting. null which will result in the Category default being used.

system_template_receipts (int | null) optional, default: null. This references a receipt system template ID which is used when receipts are generated for bookings on this rate. This is only available when invoice_control is true. null will result in the Category default being used.

base_max_adults (int | null) optional, default: null - This specifies the maximum number of adults allowed on a booking to be able to book this rate. null means that there is no limit.

base_max_children (int | null) optional, default: null - This specifies the maximum number of children allowed on a booking to be able to book this rate. null means that there is no limit.

base_max_infants (int | null) optional, default: null - This specifies the maximum number of infants allowed on a booking to be able to book this rate. null means that there is no limit.

base_max_animals (int | null) optional, default: null - This specifies the maximum number of animals allowed on a booking to be able to book this rate. null means that there is no limit.

stop_sell_occupancy_percentage (int) optional, default: 0 - This which states at what occupancy percentage this rate should be stop-sold. 0 will disable this setting.

stop_sell_occupancy_calculation (string - enum) optional, default: "category" - This relates to the stop_sell_occupancy_percentage option and controls what the occupancy calculation is based on. This can be one of the following:

  • category
  • category_type
  • instance

reset_night_counter (boolean) optional, default: true. This determines whether the night counter resets when switching rate periods.

pre_auth_amount (float) optional, default: 0.00. This specifies the dollar amount / percentage to pre-auth for a booking at checkin. This pairs with the pre_auth_type to determine how the amount is determined.

pre_auth_type (string - enum) available if pre_auth_amount is provided, default: "percentage" - This determines how the amount entered in pre_auth_amount is used. This can be one of the following options:

  • percentage - Percentage of Total
  • nights - Number of Nights
  • nights_average - Number of Nights (Average)
  • fixed - Fixed Amount
  • fixed_per_night - Fixed Amount per Night
  • fixed_per_adult - Fixed Amount per Adult
  • fixed_per_child - Fixed Amount per Child
  • fixed_per_person - Fixed Amount per Person

special_deal (int - enum) optional - This controls how the rate appears on Newbook Online. This can be one of the following options:

  • 0 - No (Default)
  • 1 - Hot
  • 2 - Special
  • 3 - Save
  • 4 - Promotion

first_deposit_required (boolean) optional, default: true - This controls whether the booking requires a deposit payment upfront when booking on Newbook Online.

allow_cancellations (int | null) optional, default: null - This controls how many days before arrival a booking can be cancelled on Newbook Online. null means that cancellations are disabled on Newbook Online for this rate.

allow_modifications (int | null) optional, default: null - This controls how many days before arrival a booking can be modified on Newbook Online. null means that modifications are disabled on Newbook Online for this rate.

site_selection_allowed (boolean) optional, default: false - This controls whether bookings on this rate can choose their site on Newbook Online.

site_selection_inventory_item_id (int | null) optional, default: null - This references the ID of an existing Inventory Item in the system. This inventory item is used for the billing of any site selection fees.

site_selection_fee (float) optional, default: 0.00 - This specifies the charge amount for the site selection fee. This pairs with the site_selection_fee_type to determine how the fee is charged.

site_selection_fee_type (string - enum) available if site_selection_fee is provided, default: "per_night" - This controls how the site_selection_fee is charged. This can be one of the following options:

  • per_night - Per Night
  • per_booking - Per Booking

inclusions (string - html) optional, default: "" - This is some text description to specify what is included in the rate. This is shown on Newbook Online. This supports basic html to help format the display.

period_amounts (array of objects) required if base_day_based is not 5 - This will need to be provided as an array with the format provided below. The format changes based on base_day_based. This changes in the following ways

  • if base_day_based = 0 (Repeat for Listed Nights) then the period_amounts provided are handled as the first record is for the first night, the second record is for the second night, etc. The last record is used for all subsequent nights.
  • if base_day_based = 1 (Repeat for Days of Week) then exactly 7 period_amounts need to be provided. One being for each day of the week ordered from Monday to Sunday.
  • if base_day_based = 2 (Use Last Listed Night) then this behaves the same as 0 (Repeat for Listed Nights).
  • if base_day_based = 3 (Use Matching Occupancy Level) then each entry in period_amounts is based on the occupancy percentages. This requires full coverage from 0 - 100% over all the entries.
  • if base_day_based = 4 (Use Guest Equipment) then each entry in period_amounts is based on the equipment length dimensions. You will also need to include equipment_length_calculation in each entry in period_amounts.
  • if base_day_based = 5 (No Billing) then the period_amounts field cannot be used.
				
					"period_amounts": [
						{
							"id": 1,
							"amount": 150.00,
							"dynamic_min": 100.00,
							"dynamic_max": 220.00,
							"minimum_periods": 1,
							"charge_additionals": 1,
							"remove": 0
						},
						{
							"id": 2,
							"amount": 130.00,
							"dynamic_min": 100.00,
							"dynamic_max": 220.00,
							"minimum_periods": 1,
							"charge_additionals": 1,
							"remove": 0
						}
					]
				
			
  • id (int) required if editing a rate.
  • amount (float) required - This specifies the particular amount
  • dynamic_min (float | null) available if base_day_based = 1 or 3, default: null.
    • If base_day_based = 1 (Repeat for Days of Week) then this field holds the minimum amount
    • If base_day_based = 3 (Use Matching Occupancy Level) then this field will behave as the minimum occupancy percentage which is inclusive.
  • dynamic_max (float | null) available if base_day_based = 1 or 3, default: null - must be equal or greater than dynamic_min if both are not null.
    • If base_day_based = 1 (Repeat for Days of Week) then this field holds the maximum amount
    • If base_day_based = 3 (Use Matching Occupancy Level) then this field will behave as the maximum occupancy percentage which is inclusive.
  • equipment_length_calculation (int - enum) required if base_day_based = 4. This field must match one of the following:
    • 0 - Fixed Price
    • 1 - Multiplier per unit of measure that the instance has configured
  • minimum_periods (int) required if base_day_based is not 4 - This specifies the minimum stay duration required to be eligible for this particular pricing.
  • charge_additionals (boolean) required if base_day_based is not 4 - This determines whether this particular pricing will charge additionals.
  • remove (boolean) optional, default: false. If true will remove the associated period amount

additionals required - This will need to be provided as an array with the format provided below. The format changes based on additionals_day_based. This changes in the following ways

  • If additionals_day_based = 0 (Use Last Listed Price) then the additionals provided are handled as the first record is for the first additional occupant, the second record is for the second additional occupant, etc. The last record is used for all subsequent additional occupants.
  • If additionals_day_based = 1 (Repeat for Days of Week) then exactly 7 additionals need to be provided. One being for each day of the week ordered from Monday to Sunday.
  • If additionals_day_based = 2 (Use Last Listed Night) then the additionals provided are handled as the first record is for the first night, the second record is for the second night, etc. The last record is used for all subsequent nights.
  • If additionals_day_based = 3 (Repeat for Listed Nights) then this behaves the same as 2 (Use Last Listed Night).
				
					"additionals": [
						{
							"id": 1,
							"adult_amount": 30.00,
							"child_amount": 20.00,
							"infant_amount": 10.00,
							"animal_amount": 5.00,
							"remove": 0
						},
						{
							"id": 2,
							"adult_amount": 25.00,
							"child_amount": 15.00,
							"infant_amount": 5.00,
							"animal_amount": 0.00,
							"remove": 0
						}
					]
				
			
  • id (int) required if editing a rate.
  • adult_amount (float) required - This specifies the amount charged for additional adults.
  • child_amount (float) required - This specifies the amount charged for additional children.
  • infant_amount (float) required - This specifies the amount charged for additional infants.
  • animal_amount (float) required - This specifies the amount charged for additional animals.
  • remove (boolean) optional, default: 0 - If true will remove the associated additional occupant amount

load_from_master (object) available if using_master = 'dependant'. This is an object that maps each field to a boolean of whether they are loaded from the master rate or not.

				
					"load_from_master": {
						"base_adult":true,
						"base_child":true,
						"base_infant":true,
						"base_animal":true,
						"base_combined":true,
						"extras_combined":true,
						"minimum_charge_per_period":true,
						"base_min_combined":true,
						"base_max_adults":true,
						"base_max_combined":true,
						"base_max_children":true,
						"base_max_infants":true,
						"base_max_animals":true,
						"min_days_in_advance":true,
						"stop_sell_occupancy_percentage":true,
						"max_days_in_advance":true,
						"stop_sell_occupancy_calculation":true,
						"minimum_periods":true,
						"reset_night_counter":true,
						"maximum_periods":true,
						"pre_auth_amount":true,
						"pre_auth_type":true,
						"invoice_control":true,
						"invoice_interval_multiplier":true,
						"invoice_interval":true,
						"system_template_invoices":true,
						"system_template_receipts":true,
						"special_deal":true,
						"first_deposit_required":true,
						"allow_cancellations":true,
						"allow_modifications":true,
						"site_selection_allowed":false,
						"site_selection_inventory_item_id":false,
						"site_selection_fee":false,
						"site_selection_fee_type":false,
						"inclusions":false
					}
				
			

discounts - This is an array of rate discounts

				
					"discounts": [
						{
							"id": 1,
							"applies_after": 3,
							"applies_every": 1,
							"applies_retroactively": false,
							"base_type": "Percentage Total",
							"base_amount": 20.00,
							"additional_type": "Percentage Total",
							"additional_amount": 20.00,
							"cm_code": "",
							"remove": 0
						}
					]
				
			
  • id (int) required if editing a rate.
  • applies_after (int) required if creating a discount - This specifies the number of nights (inclusive) a booking must stay before it receives the discount.
  • applies_every (int) required if creating a discount - This specifies how often the discount is given. E.g. every 3 nights.
  • applies_retroactively (boolean) required if creating a discount - This specifies whether a once the booking is eligible for a discount, will it apply retroactively or not.
  • base_type (string - enum) required - This can be one of the following options:
    • Percentage Total - Percentage off of total Base
    • Dollars Total - Dollars off total Base
  • base_amount (float) optional, default: 0.00 - for the amount of the discount. This will either be a dollar figure or a percentage based on base_type.
  • additional_type (string - enum) required - This can be one of the following options:
    • Percentage Each - Percentage off per Additional
    • Dollars Each - Dollars off per Additional
    • Percentage Total - Percentage off of total Additionals
    • Dollars Total - Dollars off total Additionals
  • additional_amount (float) optional, default: 0.00 - This is the amount of the discount for additional occupants. This will be either a dollar figure or a percentage based on additional_type. base_amount + additional_amount must be greater than 0
  • cm_code (string) optional, default: "" - Specifies the channel manager code this discount will be provided to channels using. This is only supported on select third party channels.
  • remove (boolean) optional, default: false - If true will remove the associated discount from the rate.

inventory_item_template_id (int | null) optional, default: null - If it's an int it's the ID of an existing Booking Rule Template, otherwise inventory_items will be used

inventory_items (array of objects) available if inventory_item_template_id != null - This will need to be provided as an array of the inventory item details as shown below:

				
					"inventory_items": [
						{
							"id": 1,
							"inventory_item_id": "100",
							"description": "Breakfast",
							"gl_category_id": 1,
							"gl_account_id": 20,
							"display_task_list": [
								-6
							],
							"guest_visible": true,
							"travel_agent_commission": false,
							"include_in_stay_cost": 1,
							"include_in_deposit": 1,
							"include_in_payment_plan": true,
							"discounts_apply": true,
							"refundable": true,
							"disburse_to_owners": false,
							"item_type": "charges",
							"qty": 1,
							"amount": 20.00,
							"per_adult": 0,
							"per_child": 0,
							"per_infant": 0,
							"per_animal": 0,
							"calculation_type": "fixed",
							"tax_free": false,
							"daytype": "once",
							"ignore_other_tariffs": 0,
							"remove": false
						},
					]
				
			
  • id (int) required if editing an inventory item
  • inventory_item_id (int | null) optional, default: null - ID of an existing Inventory Item. Providing this will use the Inventory Item details to fill the other fields.
  • description (string) required - This is the description of the Inventory Item. This can be a maximum of 250 characters.
  • gl_category_id (int | null) optional, default: null - ID of an existing Sub Client Account or null to use the Category default.
  • gl_account_id (int | null) optional, default: null - ID of an existing GL Account or null to use the Category default.
  • display_task_list (array of ints) optional, default: [] - IDs of Task Types for the Task Lists you want to show this Inventory Item on.
  • guest_visible (boolean) optional, default: true - This for whether the Inventory Item is visible to the Guest or not.
  • travel_agent_commission (boolean) optional, default: true - This for whether the Inventory Item is commissionable.
  • include_in_stay_cost (int - enum) optional, default: 1 - This controls how the Inventory Item is contributed to the stay cost total. This can be one of the following options
    • 0 - Exclude
    • 1 - Increase
    • 2 - Include
  • include_in_deposit (int - enum) optional, default: 0 - This controls how the Inventory Item amount contributes to the deposit. This can be one of the following:
    • 0 - Exclude
    • 1 - As per Deposit Rule
    • 2 - Final Deposit
    • 3 - Initial Deposit
  • include_in_payment_plan (boolean) optional, default: true - This determines whether the Inventory Item amount will be split up into the payment plan installments or if the full amount will be taken upfront.
  • discounts_apply (boolean) optional, default: true - This controls whether discounts apply to this Inventory Item amount.
  • refundable (boolean) optional, default: true - This controls whether the charges raised from this Inventory Item are voided when the Booking is cancelled.
  • disburse_to_owners (boolean) optional, default: false - This controls whether the Inventory Item amount is disburable to owners.
  • item_type (string - enum) optional, default: "charges" - This field determines whether the Inventory Item will raise Charges or Credits. This can be either of the following
    • charges - Charges
    • credits - Credits
  • qty (float) optional, default: 1.00 - This controls the quantity of these Inventory Items to add to the Rate.
  • amount (float) optional, default: 0.00 - This specifies the base amount of the Inventory Item.
  • per_adult (float) optional, default: 0.00 - This specifies the amount per adult to charge for the Inventory Item.
  • per_child (float) optional, default: 0.00 - This specifies the amount per child to charge for the Inventory Item.
  • per_infant (float) optional, default: 0.00 - This specifies the amount per infant to charge for the Inventory Item.
  • per_animal (float) optional, default: 0.00 - This specifies the amount per animal to charge for the Inventory Item.
  • calculation_type (string - enum) optional, default: "fixed" - This controls how the Inventory Item amount is determined. It can be one of the following:
    • fixed - Fixed Amount
    • percentage_of_total - Percent of Total Rate
    • percentage_of_night - Percent of Nightly Rate
  • tax_free (boolean) optional, default: false - This controls whether the Inventory Item is tax-free or not.
  • daytype (string - enum) optional, default: "once" - This controls how the Inventory Item is going to be charged. This can be one of the following:
    • once - Once-Off
    • every_qualifying_day - Particular Days
    • every_interval - Repeat Interval
  • interval_multiplier (int) optional, default: 0 - This pairs with the interval setting to determine how frequently this Inventory Item is charged.
  • interval (string - enum) optional, default: "day" - This controls the frequency of when an Inventory Item is charged. E.g. If interval_multiplier is set to 3, and interval is week, then this will be charged every 3 weeks. The available options are:
    • day
    • week
    • month
    • year
  • interval_limit (int) optional, default: 0 - This controls the maximum number of times this Inventory Item can be charged. Setting this to 0 removes the limit.
  • daysofweek (array of strings - enum) optional, default: [] - This is an array of applicable days this Inventory Item is charged on. This can contain any of the following:
    • monday
    • tuesday
    • wednesday
    • thursday
    • friday
    • saturday
    • sunday
  • ignore_other_tariffs (int - enum) optional, default: 0 - This controls what dates restrictions apply when creating charges for this Inventory Item on a Booking that is spanning multiple Rates. This can be either of the following:
    • 0 - No Restrictions
    • 1 - Dates with this Rate
  • ignore_period_from (boolean) optional, default: false - This determines whether this Inventory Item ignores the arrival date of the Booking.
  • ignore_period_to (boolean) optional, default: true - This determines whether this Inventory Item ignores the departure date of the Booking.
  • remove (boolean) optional, default: false - If true will remove the associated Inventory Item from the rate.

deposit_template_id (int | null) optional, default: null - If it's an int it's the ID of an existing Booking Rule Template, otherwise deposits will be used.

deposits (array of objects) - available if deposit_template_id != null - This will need to be provided as an array of deposits as shown below:

				
					"deposits": [
						{
							"id": 1,
							"due_days": "0",
							"due_type": "after",
							"days_in_advance": "0",
							"deposit_type": "percentage",
							"deposit_amount": 20,
							"minimum": 100.00,
							"maximum": 200.00,
							"offline_deposit": true,
							"online_deposit": true,
							"remove": false
						}
					]
				
			
  • id (int) required if editing a deposit.
  • due_type (string - enum) optional, default: "before" - This can be either of:
    • before - Days Before Booking Arrival
    • after - Days After Booking Placed
    • date - Specific Date
  • due_days (int) required if due_type = before | after - Specifies the number of days before or after the Booking arrival date that the deposit is due.
  • due_date (string - yyyy-mm-dd) required if date - Specifies the date the deposit is due.
  • days_in_advance (int) optional, default: 0 - This specifies the number of days in advance the booking has to be made to be eligible for this deposit rule.
  • deposit_type (string - enum) optional, default: "percentage" - This controls how the deposit_amount is calculated. This can be one of the following:
    • percentage - Percentage of Total
    • percentage_inc_prev_deposits - Percentage of Total (including previous Deposits)
    • nights - Number of Nights
    • nights_average - Number of Nights (Average)
    • fixed - Fixed Amount per Booking
    • fixed_per_night - Fixed Amount per Night
    • fixed_per_adult - Fixed Amount per Adult (per Booking)
    • fixed_per_child - Fixed Amount per Child (per Booking)
    • fixed_per_person - Fixed Amount per Person (per Booking)
    • fixed_per_adult_per_night - Fixed Amount per Adult (per Night)
    • fixed_per_child_per_night - Fixed Amount per Child (per Night)
    • fixed_per_person_per_night - Fixed Amount per Person (per Night)
  • deposit_amount (float) optional, default: 0.00 - This specifies the deposit amount.
  • minimum (float) optional, default: 0.00 - This specifies the minimum amount to be charged for a deposit.
  • maximum (float) optional, default: 0.00 - This specifies the maximum amount to be charged for a deposit.
  • offline_deposit (boolean) optional, default: true - This determines whether the deposit applies to bookings made inside the Newbook interface.
  • online_deposit (boolean) optional, default: false - This determines whether the deposit applies to bookings made on Newbook Online, or a third party.
  • remove (boolean) optional, default: false - If true will remove the associated deposit from the rate.

adjustment_fee_template_id (int | null) optional, default: null - If it's an int it's the ID of an existing Booking Rule Template, otherwise adjustment_fees will be used

adjustment_fees (array of objects) available if adjustment_fee_template_id != null - This will need to be provided as an array of the adjustment fees as shown below:

				
					"adjustment_fees": [
						{
							"id": 1,
							"type": "cancellation",
							"inventory_item_id": 125,
							"description": "Cancellation Fee",
							"gl_category_id": 1,
							"gl_account_id": 34,
							"within_days": 7,
							"within_type": "booking_arriving",
							"amount_type": "percentage",
							"amount": 50.00,
							"tax_free": false,
							"remove": false
						}
					]
				
			
  • id (int) required if editing an adjustment fee.
  • type (string - enum) optional, default: "cancellation" - This controls the type of adjustment fee you are creating. This can be either of the following:
    • cancellation - Cancellation Fee
    • modification - Online Modification Fee
  • inventory_item_id (int) optional, default: null - ID of an existing Inventory Item. Providing this will use the Inventory Item details to fill the other fields.
  • description (string) optional, default: "" - This is the description of the Adjustment Fee. This can be a maximum of 250 characters.
  • gl_category_id (int | null) optional, default: null - This can either be an ID of an existing Sub Client Account or null to use the Category default.
  • gl_account_id (int | null) optional, default: null - This can either be an ID of an existing GL Account or null to use the Category default.
  • within_days (int) optional, default: 0 - This specifies the number of days from within_type to determine if a booking adjustment incurs the charge.
  • within_type (string - enum) optional, default: "booking_arriving" - This specifies the way of determining when the booking will incur a charge for the adjustment.
    • booking_arriving - Before Booking Arrival
    • booking_placed - After Booking Placed
  • amount_type (string - enum) optional, default: "fixed" - This controls how the amount is calculated. This can be one of the following:
    • percentage - Percentage of Total
    • percentage_inc_prev - Percentage of Total (including previous Fees)
    • nights - Number of Nights
    • nights_average - Number of Nights (Average)
    • fixed - Fixed Amount
    • fixed_per_night - Fixed Amount per Night
    • fixed_per_adult - Fixed Amount per Adult
    • fixed_per_child - Fixed Amount per Child
    • fixed_per_person - Fixed Amount per Person
  • amount (float) optional, default: 0.00 - This specifies the adjustment fee amount.
  • tax_free (boolean) optional, default: false - This controls whether the adjustment fee is tax-free or not.
  • remove (boolean) optional, default: false - If true will remove the associated adjustment fee from the rate.

Rates: Create Example

Request URL

https://api.newbook.cloud/rest/tariffs_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"using_master": "standalone",
							"master_id": null,
							"name": "Standard",
							"dynamic": "none",
							"base_day_based": 0,
							"additionals_day_based": 0,
							"active": true,
							"base_adult": 2,
							"base_child": 0,
							"base_infant": 0,
							"base_animal": 0,
							"extras_combined": false,
							"per_person": false,
							"minimum_charge_per_period": 0,
							"base_min_combined": 0,
							"base_max_combined": 0,
							"min_days_in_advance": 0,
							"max_days_in_advance": 0,
							"minimum_periods": 1,
							"maximum_periods": 0,
							"invoice_control": false,
							"base_max_adults": null,
							"base_max_children": null,
							"base_max_infants": null,
							"base_max_animals": null,
							"special_deal": 0,
							"first_deposit_required": true,
							"allow_cancellations": null,
							"allow_modifications": 7,
							"inclusions": "

There are no additional inclusions within this rate

", "period_amounts": [ { "amount": 150.00, "dynamic_min": 100.00, "dynamic_max": 220.00, "minimum_periods": 1, "charge_additionals": 1, "remove": false }, { "amount": 130.00, "dynamic_min": 100.00, "dynamic_max": 220.00, "minimum_periods": 1, "charge_additionals": 1, "remove": false } ], "additionals": [ { "adult_amount": 30.00, "child_amount": 20.00, "infant_amount": 10.00, "animal_amount": 5.00, "remove": false }, { "adult_amount": 25.00, "child_amount": 15.00, "infant_amount": 5.00, "animal_amount": 0.00, "remove": false } ], "load_from_master": [], "discounts": [ { "applies_after": 3, "applies_every": 1, "applies_retroactively": false, "base_type": "Percentage Total", "base_amount": 20.00, "additional_type": "Percentage Total", "additional_amount": 20.00, "cm_code": "", "remove": false } ], "inventory_items": [ { "inventory_item_id": "100", "description": "Breakfast", "gl_category_id": 1, "gl_account_id": 20, "display_task_list": [ -6 ], "guest_visible": true, "travel_agent_commission": false, "include_in_stay_cost": 1, "include_in_deposit": 1, "include_in_payment_plan": true, "discounts_apply": true, "refundable": true, "disburse_to_owners": false, "item_type": "charges", "qty": 1, "amount": 20.00, "per_adult": 0, "per_child": 0, "per_infant": 0, "per_animal": 0, "calculation_type": "fixed", "tax_free": false, "daytype": "once", "ignore_other_tariffs": 0, "remove": false } ], "deposits": [ { "due_days": "0", "due_type": "after", "days_in_advance": "0", "deposit_type": "percentage", "deposit_amount": 20, "minimum": 100.00, "maximum": 200.00, "offline_deposit": true, "online_deposit": true, "remove": false } ], "adjustment_fees": [ { "type": "cancellation", "inventory_item_id": 125, "description": "Cancellation Fee", "gl_category_id": 1, "gl_account_id": 34, "within_days": 7, "within_type": "booking_arriving", "amount_type": "percentage", "amount": 50.00, "tax_free": false, "remove": false } ] }
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": 13,
								"using_master": "standalone",
								"master_id": null,
								"name": "Standard",
								"dynamic": "none",
								"base_day_based": 0,
								"additionals_day_based": 0,
								"active": true,
								"base_adult": 2,
								"base_child": 0,
								"base_infant": 0,
								"base_animal": 0,
								"extras_combined": false,
								"per_person": false,
								"minimum_charge_per_period": 0,
								"base_min_combined": 0,
								"base_max_combined": 0,
								"min_days_in_advance": 0,
								"max_days_in_advance": 0,
								"minimum_periods": 1,
								"maximum_periods": 0,
								"invoice_control": false,
								"base_max_adults": null,
								"base_max_children": null,
								"base_max_infants": null,
								"base_max_animals": null,
								"special_deal": 0,
								"first_deposit_required": true,
								"allow_cancellations": null,
								"allow_modifications": 7,
								"inclusions": "

There are no additional inclusions within this rate

", "period_amounts": [ { "id": 1, "amount": 150.00, "dynamic_min": 100.00, "dynamic_max": 220.00, "minimum_periods": 1, "charge_additionals": 1 }, { "id": 2, "amount": 130.00, "dynamic_min": 100.00, "dynamic_max": 220.00, "minimum_periods": 1, "charge_additionals": 1 } ], "additionals": [ { "id": 1, "adult_amount": 30.00, "child_amount": 20.00, "infant_amount": 10.00, "animal_amount": 5.00 }, { "id": 2, "adult_amount": 25.00, "child_amount": 15.00, "infant_amount": 5.00, "animal_amount": 0.00 } ], "load_from_master": [], "discounts": [ { "id": 1, "applies_after": 3, "applies_every": 1, "applies_retroactively": false, "base_type": "Percentage Total", "base_amount": 20.00, "additional_type": "Percentage Total", "additional_amount": 20.00, "cm_code": "" } ], "inventory_items": [ { "id": 1, "inventory_item_id": "100", "description": "Breakfast", "gl_category_id": 1, "gl_account_id": 20, "display_task_list": [ -6 ], "guest_visible": true, "travel_agent_commission": false, "include_in_stay_cost": 1, "include_in_deposit": 1, "include_in_payment_plan": true, "discounts_apply": true, "refundable": true, "disburse_to_owners": false, "item_type": "charges", "qty": 1, "amount": 20.00, "per_adult": 0, "per_child": 0, "per_infant": 0, "per_animal": 0, "calculation_type": "fixed", "tax_free": false, "daytype": "once", "ignore_other_tariffs": 0 } ], "deposits": [ { "id": 1, "due_days": "0", "due_type": "after", "days_in_advance": "0", "deposit_type": "percentage", "deposit_amount": 20, "minimum": 100.00, "maximum": 200.00, "offline_deposit": true, "online_deposit": true } ], "adjustment_fees": [ { "id": 1, "type": "cancellation", "inventory_item_id": 125, "description": "Cancellation Fee", "gl_category_id": 1, "gl_account_id": 34, "within_days": 7, "within_type": "booking_arriving", "amount_type": "percentage", "amount": 50.00, "tax_free": false } ] }, "message": "" }
AnchorRates: Update

Request Notes:

id (int) required

All other parameters are optional, please see Rates: Create for more details.

Rates: Update Example

Request URL

https://api.newbook.cloud/rest/tariffs_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": 13,
							"using_master": "standalone",
							"master_id": null,
							"name": "Standard",
							"dynamic": "none",
							"base_day_based": 0,
							"additionals_day_based": 0,
							"active": true,
							"base_adult": 2,
							"base_child": 0,
							"base_infant": 0,
							"base_animal": 0,
							"extras_combined": false,
							"per_person": false,
							"minimum_charge_per_period": 0,
							"base_min_combined": 0,
							"base_max_combined": 0,
							"min_days_in_advance": 0,
							"max_days_in_advance": 0,
							"minimum_periods": 1,
							"maximum_periods": 0,
							"invoice_control": false,
							"base_max_adults": null,
							"base_max_children": null,
							"base_max_infants": null,
							"base_max_animals": null,
							"special_deal": 0,
							"first_deposit_required": true,
							"allow_cancellations": null,
							"allow_modifications": 7,
							"inclusions": "

There are no additional inclusions within this rate

", "period_amounts": [ { "id": 1, "amount": 150.00, "dynamic_min": 100.00, "dynamic_max": 220.00, "minimum_periods": 1, "charge_additionals": 1, "remove": false }, { "id": 2, "amount": 130.00, "dynamic_min": 100.00, "dynamic_max": 220.00, "minimum_periods": 1, "charge_additionals": 1, "remove": false } ], "additionals": [ { "id": 1, "adult_amount": 30.00, "child_amount": 20.00, "infant_amount": 10.00, "animal_amount": 5.00, "remove": false }, { "id": 2, "adult_amount": 25.00, "child_amount": 15.00, "infant_amount": 5.00, "animal_amount": 0.00, "remove": false } ], "load_from_master": [], "discounts": [ { "id": 1, "applies_after": 3, "applies_every": 1, "applies_retroactively": false, "base_type": "Percentage Total", "base_amount": 20.00, "additional_type": "Percentage Total", "additional_amount": 20.00, "cm_code": "", "remove": false } ], "inventory_items": [ { "id": 1, "inventory_item_id": "100", "description": "Breakfast", "gl_category_id": 1, "gl_account_id": 20, "display_task_list": [ -6 ], "guest_visible": true, "travel_agent_commission": false, "include_in_stay_cost": 1, "include_in_deposit": 1, "include_in_payment_plan": true, "discounts_apply": true, "refundable": true, "disburse_to_owners": false, "item_type": "charges", "qty": 1, "amount": 20.00, "per_adult": 0, "per_child": 0, "per_infant": 0, "per_animal": 0, "calculation_type": "fixed", "tax_free": false, "daytype": "once", "ignore_other_tariffs": 0, "remove": false } ], "deposits": [ { "id": 1, "due_days": "0", "due_type": "after", "days_in_advance": "0", "deposit_type": "percentage", "deposit_amount": 20, "minimum": 100.00, "maximum": 200.00, "offline_deposit": true, "online_deposit": true, "remove": false } ], "adjustment_fees": [ { "id": 1, "type": "cancellation", "inventory_item_id": 125, "description": "Cancellation Fee", "gl_category_id": 1, "gl_account_id": 34, "within_days": 7, "within_type": "booking_arriving", "amount_type": "percentage", "amount": 50.00, "tax_free": false, "remove": false } ] }
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": 13,
								"using_master": "standalone",
								"master_id": null,
								"name": "Standard",
								"dynamic": "none",
								"base_day_based": 0,
								"additionals_day_based": 0,
								"active": true,
								"base_adult": 2,
								"base_child": 0,
								"base_infant": 0,
								"base_animal": 0,
								"extras_combined": false,
								"per_person": false,
								"minimum_charge_per_period": 0,
								"base_min_combined": 0,
								"base_max_combined": 0,
								"min_days_in_advance": 0,
								"max_days_in_advance": 0,
								"minimum_periods": 1,
								"maximum_periods": 0,
								"invoice_control": false,
								"base_max_adults": null,
								"base_max_children": null,
								"base_max_infants": null,
								"base_max_animals": null,
								"special_deal": 0,
								"first_deposit_required": true,
								"allow_cancellations": null,
								"allow_modifications": 7,
								"inclusions": "

There are no additional inclusions within this rate

", "period_amounts": [ { "id": 1, "amount": 150.00, "dynamic_min": 100.00, "dynamic_max": 220.00, "minimum_periods": 1, "charge_additionals": 1 }, { "id": 2, "amount": 130.00, "dynamic_min": 100.00, "dynamic_max": 220.00, "minimum_periods": 1, "charge_additionals": 1 } ], "additionals": [ { "id": 1, "adult_amount": 30.00, "child_amount": 20.00, "infant_amount": 10.00, "animal_amount": 5.00 }, { "id": 2, "adult_amount": 25.00, "child_amount": 15.00, "infant_amount": 5.00, "animal_amount": 0.00 } ], "load_from_master": [], "discounts": [ { "id": 1, "applies_after": 3, "applies_every": 1, "applies_retroactively": false, "base_type": "Percentage Total", "base_amount": 20.00, "additional_type": "Percentage Total", "additional_amount": 20.00, "cm_code": "" } ], "inventory_items": [ { "id": 1, "inventory_item_id": "100", "description": "Breakfast", "gl_category_id": 1, "gl_account_id": 20, "display_task_list": [ -6 ], "guest_visible": true, "travel_agent_commission": false, "include_in_stay_cost": 1, "include_in_deposit": 1, "include_in_payment_plan": true, "discounts_apply": true, "refundable": true, "disburse_to_owners": false, "item_type": "charges", "qty": 1, "amount": 20.00, "per_adult": 0, "per_child": 0, "per_infant": 0, "per_animal": 0, "calculation_type": "fixed", "tax_free": false, "daytype": "once", "ignore_other_tariffs": 0 } ], "deposits": [ { "id": 1, "due_days": "0", "due_type": "after", "days_in_advance": "0", "deposit_type": "percentage", "deposit_amount": 20, "minimum": 100.00, "maximum": 200.00, "offline_deposit": true, "online_deposit": true } ], "adjustment_fees": [ { "id": 1, "type": "cancellation", "inventory_item_id": 125, "description": "Cancellation Fee", "gl_category_id": 1, "gl_account_id": 34, "within_days": 7, "within_type": "booking_arriving", "amount_type": "percentage", "amount": 50.00, "tax_free": false } ] }, "message": "" }
AnchorRate Periods: List

Returns a list of active Rate Periods.

Request Notes:

show_inactive is optional and when provided with a truthy value, it will include inactive Rate Periods in the response.

Rate Periods: List Example

Request URL

https://api.newbook.cloud/rest/tariffs_periods_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"tariffs_period_id": 1,
									"name": "Standard Rate Period",
									"daysofweek": [
										"sunday",
										"monday",
										"tuesday",
										"wednesday",
										"thursday",
										"friday",
										"saturday"
									],
									"colour": "000000",
									"created_by": "11",
									"created_when": "2024-04-18 11:30:00",
									"active": "1",
									"tariffs_periods_dates": [
										{
											"tariffs_periods_dates_id": "1",
											"period_from": "2022-07-01",
											"period_to": "2023-06-30"
										},
										{
											"tariffs_periods_dates_id": "5",
											"period_from": "2023-07-01",
											"period_to": "2024-06-30"
										}
									]
								},
								{
									"tariffs_period_id": 2,
									"name": "Weekday",
									"daysofweek": [
										"monday",
										"tuesday",
										"wednesday",
										"thursday",
										"friday"
									],
									"colour": "d636d6",
									"created_by": "11",
									"created_when": "2024-04-18 11:30:00",
									"active": "1",
									"tariffs_periods_dates": [
										{
											"tariffs_periods_dates_id": "2",
											"period_from": "2022-01-01",
											"period_to": "2030-12-31"
										}
									]
								}
							],
							"message": ""
						}
					
				
AnchorRate Periods: Create

Creates a Rate Period.

Request Notes:

  • name (string) is required.
  • daysofweek (array) should be an array containing lower case day names.
    • monday
    • tuesday
    • wednesday
    • thursday
    • friday
    • saturday
    • sunday
  • colour (string - hex) Hex code representation of a colour.
  • tariffs_periods_dates (array) of dates that the Rate Period affects.
    • period_from (date - yyyy-mm-dd)
    • period_to (date - yyyy-mm-dd)

The following parameters are optional:

  • active (boolean) whether the Tariff Period is active.

Rate Periods: Create Example

Request URL

https://api.newbook.cloud/rest/tariffs_periods_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "Weekend Rate Period",
							"daysofweek": [
								"sunday",
								"monday"
							],
							"colour": "0000FF",
							"tariffs_periods_dates": [
								{
									"period_from": "2022-07-01",
									"period_to": "2023-06-30"
								},
								{
									"period_from": "2023-07-01",
									"period_to": "2024-06-30"
								}
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"tariff_period_id": 3
							},
							"message": ""
						}
					
				
AnchorRate Periods: Get

Returns a Rate Period.

Request Notes:

tariffs_period_id (int) ID of the Tariff Period to be returned.

Rate Periods: Get Example

Request URL

https://api.newbook.cloud/rest/tariffs_periods_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"tariffs_period_id": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"tariffs_period_id": 1,
								"name": "Standard Rate Period",
								"daysofweek": [
									"sunday",
									"monday",
									"tuesday",
									"wednesday",
									"thursday",
									"friday",
									"saturday"
								],
								"colour": "000000",
								"created_by": "11",
								"created_when": "2024-04-18 11:30:00",
								"active": "1",
								"tariffs_periods_dates": [
									{
										"tariffs_periods_dates_id": "1",
										"period_from": "2022-07-01",
										"period_to": "2023-06-30"
									},
									{
										"tariffs_periods_dates_id": "5",
										"period_from": "2023-07-01",
										"period_to": "2024-06-30"
									}
								]
							},
							"message": ""
						}
					
				
AnchorRate Periods: Update

Updates an existing Rate Period.

Request Notes:

tariffs_period_id (int - required) ID of the Rate Period to update.

Please see below for a list of optional details that can be updated on the Rate Period. At least one of these must be provided.

  • name (string)
  • daysofweek (array) should be an array containing lower case day names.
    • monday
    • tuesday
    • wednesday
    • thursday
    • friday
    • saturday
    • sunday
  • colour (string - hex) Hex code representation of a colour.
  • tariffs_periods_dates (array) of dates that the Rate Period affects.
    • period_from (date - yyyy-mm-dd)
    • period_to (date - yyyy-mm-dd)
    Note: When tariffs_periods_dates is provided all existing dates will be removed and replaced with the new dates provided.
  • active (boolean) whether the Tariff Period is active.

Rate Periods: Update Example

Request URL

https://api.newbook.cloud/rest/tariffs_periods_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"tariffs_period_id": 1,
							"name": "Weekday Rate Period",
							"daysofweek": [
								"monday",
								"tuesday",
								"wednesday",
								"thursday",
								"friday"
							],
							"colour": "00CCBB",
							"tariffs_periods_dates": [
								{
									"period_from": "2023-01-01",
									"period_to": "2023-12-31"
								},
								{
									"period_from": "2024-01-01",
									"period_to": "2024-12-31"
								}
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"tariffs_period_id": 1
							},
							"message": ""
						}
					
				
AnchorRates: Override

Creates a Rate Override

When a parameter is optional and not included, or set to null in the request, the original Rate value will not be overridden.

Request Notes:

Selection Details

  • period_from (date - yyyy-mm-dd) inclusive
  • period_to (date - yyyy-mm-dd) inclusive
  • daysofweek (array) should be an array containing lower case day names.
    • monday
    • tuesday
    • wednesday
    • thursday
    • friday
    • saturday
    • sunday
  • using_master (enum) must be from the following list:
    • master This option must also provide the master_id parameter
    • standalone This option must also provide the category_id, booking_channel_id and skip_warning. Can optionally include type_id and rate_code parameters
  • active (boolean) whether the Rate Override is active.

When using_master has the value of master

  • master_id (int | array of int) Master Rate IDs. Required when using_master is set to master.

When using_master has the value of standalone

  • category_id (int | array of int) Category IDs. Required when using_master is set to standalone.
  • type_id (int) Rate Type ID. Leaving this blank will apply the Rate Override to all Rate Types
  • booking_channel_id (int | array of int) Booking Channel IDs
  • skip_warning (Boolean) Skip Specific Channel booking_channel_id warning?

Daily Pricing Overrides

  • override_type (enum) Required. Choose from the option below for how the rate will be overridden.
    • fixed Override by a fixed amount. If set, must provide these additional parameters:
      • fixed_override (float) Amount to override with.
      • fixed_method (enum) optional - Not including this will override the rate amount using fixed_override amount. Choose either below value to increase or decrease by the amount instead:
        • increase Increase by fixed_override amount.
        • decrease Decrease by fixed_override amount.
    • dynamic Dynamically set the rate depending upon occupancy. If set, must provide these additional parameters:
      • dynamic_min (float) Dynamic Min ($)
      • dynamic_max (float) Dynamic Max ($)
      • dynamic_base (float) Dynamic Base ($) This value is only used to compare against the Min and Max amounts to calculate the success of this Dynamic Rate.
      • dynamic_method (enum)
        • linear Off-Peak.
        • exponential Peak.
      • dynamic_occupancy (enum) Dynamic Occupancy. Which Occupancy Percentage should Newbook use to work out the Dynamic Pricing formula.
        • category Category.
        • category_type Category Type.
        • instance Instance.
      • dynamic_occupancy_min (float) Minimum Occupancy (%)
    • percentage if set, must provide these additional parameters:
      • percentage_override (float) Percentage to override with.
      • percentage_method (enum) Choose either below value to increase or decrease by the percentage:
        • increase Increase by percentage_override.
        • decrease Decrease by percentage_override.
  • discounts (boolean) Optional Discounts Apply (Optional, NULL = Do not override)

Base Override Details

  • stop_sell (boolean) Stop Sell (Optional, NULL = Do not override)
  • active (boolean) whether the Tariff Period is active.

Daily Inclusion Overrides

  • base_adult (integer) Adults included (Optional, NULL = Do not override)
  • base_child (integer) Children included (Optional, NULL = Do not override)
  • base_infant (integer) Infants included (Optional, NULL = Do not override)
  • base_animal (integer) Animals included (Optional, NULL = Do not override)
  • base_combined (integer) Included combined occupants (Optional, NULL = Do not override)
  • adult_amount (float) Additional Adult Amount (Optional, NULL = Do not override)
  • child_amount (float) Additional Child Amount (Optional, NULL = Do not override)
  • infant_amount (float) Additional Infant Amount (Optional, NULL = Do not override)
  • animal_amount (float) Additional Animal Amount (Optional, NULL = Do not override)

Other Daily Overrides

  • minimum_sites_online (integer) Sites reserved from Newbook Online Bookings (Optional, NULL = Do not override)
  • minimum_periods (integer) Minimum nights (Optional, NULL = Do not override)
  • maximum_periods (integer) Maximum nights (Optional, NULL = Do not override)
  • special_deal (enum) Newbook Online: "Special" (Optional, NULL = Do not override)
    • 0 No
    • 1 Hot
    • 2 Special
    • 3 Save
    • 4 Promotion
  • close_arrival (boolean) Close arrivals (Optional, NULL = Do not override)
  • close_departure (boolean) Close departures (Optional, NULL = Do not override)

Rate Override JSON

Request URL

https://api.newbook.cloud/rest/tariffs_override

Request JSON - Create a Standalone Stop Sell override
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"period_from": "2024-04-20 14:00:00",
							"period_to": "2024-04-20 14:00:00",
							"using_master": "standalone",
							"category_id": "1",
							"type_id": "3",
							"active": "1"
							"stop_sell": "1"
						}
					
				
Response JSON
					
						{
							"success": "true"
						}
					
				
Request JSON - Create a Standalone Rate Override with a fixed price
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"period_from": "2024-04-20 14:00:00",
							"period_to": "2024-04-20 14:00:00",
							"using_master": "standalone",
							"category_id": ["1","2"],
							"type_id": "3",
							"booking_channel": ["4","5"],
							"skip_warning": "1",
							"active": "1",
							"override_type": "fixed",
							"fixed_override": "120.00"
						}
					
				
Response JSON
					
						{
							"success": "true"
						}
					
				
Request JSON - Create a Master Rate Override with Dynamic pricing
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"period_from": "2024-04-20 14:00:00",
							"period_to": "2024-04-20 14:00:00",
							"using_master": "master",
							"master_id": ["1","2"],
							"active": "1"
							"override_type": "dynamic",
							"dynamic_min": "100.00",
							"dynamic_max": "200.00",
							"dynamic_base": "120.00",
							"dynamic_method": "linear",
							"dynamic_occupancy": "category"
						}
					
				
Response JSON
					
						{
							"success": "true"
						}
					
				
AnchorRate Types: List

Pull the list of Rate Types from within Newbook.

Request Notes:

name is optional and when provided it will restrict results to the matching Rate Types

show_inactive is optional, default false, and when provided with a truthy value, it will include inactive Rate Types in the response.

Rate Types: List Example

Request URL

https://api.newbook.cloud/rest/tariffs_types_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "Standard",
							"show_inactive": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"tariff_type_id": "1",
									"name": "Standard Rate",
									"description": "",
									"short_description": "Our most flexible rate",
									"display_order": "1",
									"bookings_market_segment_id": null,
									"active": "1",
									"user_profile_restrictions": [
										{
											"profile_id": "2",
											"name": "Head Office"
										},
										{
											"profile_id": "3",
											"name": "Finance"
										}
									],
									"available_discounts": [
										{
											"discount_id": "1",
											"name": "Member Rate Type 10%"
										}
									]
									"los_gl_accounts": [
									{
										"gl_account_id": "10",
										"name": "min_1_night",
										"min_nights": "1"
									},
									{
										"gl_account_id": "11",
										"name": "min_7_nights",
										"min_nights": "7"
									}
								]
								},
								{
									"tariff_type_id": "2",
									"name": "Standard Weekend Rate",
									"description": "",
									"short_description": "Our weekend rate",
									"display_order": "0",
									"bookings_market_segment_id": "3",
									"active": "0",
									"user_profile_restrictions": [],
									"available_discounts": [],
									"los_gl_accounts": []
								}
							],
							"message": ""
						}
					
				
AnchorRate Types: Create

Create a new Rate Type.

Request Notes:

name must be provided. This is the name of the Site.

The following parameters are optional:

  • description (string)
  • short_description (string)
  • display_order (int) Determines the order in which the Rate Type is displayed.
  • bookings_market_segment_id (int) An existing Booking Market Segment ID.
  • active (boolean) Defaults to true if not provided.
  • user_profile_restrictions (array) An array of user profiles that the Rate Type applies to with the following format:
    • profile_id (int)
  • available_discounts (array) An array of discounts that the Rate Type applies to with the following format:
    • discount_id (int)
  • los_gl_accounts (array) An array of Length of Stay (LOS) GL Accounts that the Rate Type applies to daily rates that meet the minimum night requirement:
    • gl_account_id (int)
    • name (string)
    • min_nights (int)

Rate Types: Create Example

Request URL

https://api.newbook.cloud/rest/tariffs_types_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "Special Rate",
							"description": "",
							"short_description": "A super special rate",
							"display_order": "0",
							"bookings_market_segment_id": null,
							"active": "0",
							"user_profile_restrictions": [
								{
									"profile_id": "1"
								}
							],
							"available_discounts": [
								{
									"discount_id": "16"
								}
							],
							"los_gl_accounts": [
								{
									"gl_account_id": "11",
									"name": "min_1_night",
									"min_nights": "1"
								}
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"tariff_type_id": "10"
								}
							],
							"message": ""
						}
					
				
AnchorRate Types: Get Details

Retrieve an existing Rate Type record.

Request Notes:

tariff_type_id must be provided to retrieve the details of a particular Rate Type.

Response Notes:

The returned data from this request is identical to Rate Types: List but for a specific Rate Type alone.

If no such Rate Type exists, the success response parameter will be "false" and no data will be returned.

Rate Types: Get Details Example

Request URL

https://api.newbook.cloud/rest/tariffs_types_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"tariff_type_id": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"tariff_type_id": "1",
								"name": "Standard Rate",
								"description": "",
								"short_description": "Our most flexible rate",
								"display_order": "1",
								"bookings_market_segment_id": null,
								"active": "1",
								"user_profile_restrictions": [
									{
										"profile_id": "2",
										"name": "Head Office"
									},
									{
										"profile_id": "3",
										"name": "Finance"
									}
								],
								"available_discounts": [
									{
										"discount_id": "1",
										"name": "Member Rate Type 10%"
									}
								],
								"los_gl_accounts": [
									{
										"gl_account_id": "11",
										"name": "min_1_night",
										"min_nights": "1"
									}
								]
							},
							"message": ""
						}
					
				
AnchorRate Types: Update

Update a Rate Type.

Request Notes:

tariff_type_id is required to advise which Rate Type you are updating.

remove can be included in the user_profile_restrictions, available_discounts and los_gl_accounts objects, this flag will remove an existing association with matching ID if set to 1.

All other parameters are optional, and are defined in Rate Types: Create.

Rate Types: Update Example

Request URL

https://api.newbook.cloud/rest/tariffs_types_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"tariff_type_id": "10",
							"name": "Better Special Rate",
							"description": "Minimum night consecutive stay of seven (7) nights is required to receive discount.",
							"short_description": "Stay 7 Nights, Get 1 Free",
							"display_order": "2",
							"bookings_market_segment_id": null,
							"active": "1",
							"user_profile_restrictions": [
								{
									"profile_id": "1",
									"remove": "1"
								},
								{
									"profile_id": "2"
								},
								{
									"profile_id": "3"
								},
							],
							"available_discounts": [
								{
									"discount_id": "16",
									"remove": "1"
								},
								{
									"discount_id": "17"
								},
								{
									"discount_id": "18"
								},
							],
							"los_gl_accounts": [
								{
									"gl_account_id": "11",
									"name": "min_1_night",
									"min_nights": "1",
									"remove": "1"
								}
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"tariff_type_id": "10"
							},
							"message": ""
						}
					
				
AnchorRate Applications: List

Lists Rate Applications.

Request Parameters:

  • active_after (string - YYYY-MM-DD) optional, when provided filters results to those that are active equal to and after the provided date.
  • active_before (string - YYYY-MM-DD) optional, when provided filters results to those that are active equal to and before the provided date.
  • tariff_type_id (array) optional, accepts an array of Rate Type IDs (int) to filter by.
  • category_id (array) optional, accepts an array of Category IDs (int) to filter by.
  • booking_channel (integer) optional, when provided filters results by Booking Channel.
  • has_channel_manager_ratecode (string) optional, when provided filters results by whether they have a Channel Manager RateCode:
    • any, returns results regardless of whether they have a Channel Manager RateCode.
    • yes, returns results that have a Channel Manager RateCode.
    • no, returns results that do not have a Channel Manager RateCode.
  • has_newbook_online_promo_code (string) optional, when provided filters results by whether they have a Newbook Online Promo Code:
    • any, returns results regardless of whether they have a Promo Code.
    • yes, returns results that have a Promo Code.
    • no, returns results that do not have a Promo Code.
  • show_inactive (boolean) optional, when true, it will include inactive Rate Applications.

Rate Applications: List Example

Request URL

https://api.newbook.cloud/rest/tariffs_applied_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"active_after": "2024-04-12",
							"active_before": "2024-04-19",
							"tariff_type_id": ["1", "2"],
							"category_id": ["2", "5"],
							"booking_channel": "2",
							"show_inactive": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"tariff_applied_id": "1",
									"tariff_type_id": "1",
									"category_id": "1",
									"tariff_period_id": "1",
									"tariff_id": "1",
									"channel_manager_ratecode": "1",
									"newbook_online_promo_code": "",
									"active": "1",
									"booking_channels": [
										{
											"booking_channel_id": "1",
											"active": "1"
										},
										{
											"booking_channel_id": "2",
											"active": "0"
										},
									],
									"companies": [
										"1",
										"5"
									],
									"travel_agents": [
										"10",
										"11"
									]
								}
							],
							"message": ""
						}
					
				
AnchorRate Applications: Create

Create a new Rate Application.

Request Parameters:

  • tariff_type_id (integer) required, a valid Rate Type ID.
  • tariff_id (integer) required, a valid Rate ID.
  • tariff_period_id (integer) required, a valid Rate Period ID.
  • category_id (integer) required, a valid Category ID.
  • channel_manager_ratecode (string) optional, the Channel Manager RateCode to use.
  • newbook_online_promo_code (string) optional, if provided the Rate will not be visible in Newbook Online until the Promo Code has been entered.
  • booking_channels (array) optional, the 3rd Party Booking Channels to apply to this Rate Application, accepts an array of objects with the following structure:
    • booking_channel_id (integer) required, a valid ID of a Booking Channel that is mapped to the Rate Application's Category and does not have a direct connection established.
    • active (boolean) optional, whether the Booking Channel mapping is active for the Rate Application.
  • companies (array) optional, the Companies to apply to this Rate Application, accepts an array of Company IDs.
  • travel_agents (string) optional, the Travel Agents to apply to this Rate Application, accepts an array of Travel Agent IDs.
  • active (boolean) optional, whether the Rate Application is active.

Rate Applications: Create Example

Request URL

https://api.newbook.cloud/rest/tariffs_applied_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"tariff_type_id": "1",
							"tariff_id": "2",
							"tariff_period_id": "3",
							"category_id": "1",
							"channel_manager_ratecode": "1",
							"newbook_online_promo_code": "abc123",
							"booking_channels": [
								{
									"booking_channel_id": "1",
									"active": "1"
								}
							],
							"companies": [
								"10"
							],
							"travel_agents": [
								"20"
							],
							"active": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"tariff_applied_id": "10",
									"tariff_type_id": "1",
									"tariff_id": "2",
									"tariff_period_id": "3",
									"category_id": "1",
									"channel_manager_ratecode": "1",
									"newbook_online_promo_code": "abc123",
									"active": "1",
									"booking_channels": [
										{
											"booking_channel_id": "1",
											"active": "1"
										}
									],
									"companies": [
										"10"
									],
									"travel_agents": [
										"20"
									]
								}
							],
							"message": ""
						}
					
				
AnchorRate Applications: Get Details

Retrieve an existing Rate Application.

Request Parameters:

  • tariff_applied_id (integer) required, a valid Rate Application ID.

Response Notes:

The returned data from this request is identical to Rate Applications: List but for a specific Rate Type alone.

If no such Rate Type exists, the success response parameter will be "false" and no data will be returned.

Rate Applications: Get Details Example

Request URL

https://api.newbook.cloud/rest/tariffs_applied_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"tariff_applied_id": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"tariff_applied_id": "1",
								"tariff_type_id": "1",
								"category_id": "1",
								"tariff_period_id": "1",
								"tariff_id": "1",
								"channel_manager_ratecode": "1",
								"newbook_online_promo_code": "",
								"active": "1",
								"booking_channels": [
									{
										"booking_channel_id": "1",
										"active": "1"
									},
									{
										"booking_channel_id": "2",
										"active": "0"
									},
								],
								"companies": [
									"1",
									"5"
								],
								"travel_agents": [
									"10",
									"11"
								]
							},
							"message": ""
						}
					
				
AnchorRate Applications: Update

Update a Rate Application.

Request Parameters:

  • tariff_applied_id (integer) required, the ID of the Rate Application to update.
  • tariff_type_id (integer) optional, a valid Rate Type ID.
  • tariff_id (integer) optional, a valid Rate ID.
  • tariff_period_id (integer) optional, a valid Rate Period ID.
  • category_id (integer) optional, a valid Category ID.
  • channel_manager_ratecode (string) optional, the Channel Manager RateCode to use.
  • newbook_online_promo_code (string) optional, if provided the Rate will not be visible in Newbook Online until the Promo Code has been entered.
  • booking_channels (array) optional, the 3rd Party Booking Channels to apply to this Rate Application, accepts an array of objects with the following structure:
    • booking_channel_id (integer) required, a valid ID of a Booking Channel that is mapped to the Rate Application's Category and does not have a direct connection established.
    • active (boolean) optional, whether the Booking Channel mapping is active for the Rate Application.
  • companies (array) optional, the Companies to apply to this Rate Application, accepts an array of Company IDs.
  • travel_agents (string) optional, the Travel Agents to apply to this Rate Application, accepts an array of Travel Agent IDs.
  • active (boolean) optional, whether the Rate Application is active.

Rate Applications: Update Example

Request URL

https://api.newbook.cloud/rest/tariffs_applied_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"tariff_applied_id": "10",
							"tariff_id": "5",
							"tariff_period_id": "10"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"tariff_applied_id": "10",
								"tariff_type_id": "1",
								"tariff_id": "5",
								"tariff_period_id": "10",
								"category_id": "1",
								"channel_manager_ratecode": "1",
								"newbook_online_promo_code": "abc123",
								"active": "1",
								"booking_channels": [
									{
										"booking_channel_id": "1",
										"active": "1"
									}
								],
								"companies": [
									"10"
								],
								"travel_agents": [
									"20"
								]
							},
							"message": ""
						}
					
				
AnchorRate Periods: List

Returns a list of active Rate Periods.

Request Notes:

show_inactive is optional and when provided with a truthy value, it will include inactive Rate Periods in the response.

Rate Periods: List Example

Request URL

https://api.newbook.cloud/rest/tariffs_periods_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"tariffs_period_id": 1,
									"name": "Standard Rate Period",
									"daysofweek": [
										"sunday",
										"monday",
										"tuesday",
										"wednesday",
										"thursday",
										"friday",
										"saturday"
									],
									"colour": "000000",
									"created_by": "11",
									"created_when": "2024-04-18 11:30:00",
									"active": "1",
									"tariffs_periods_dates": [
										{
											"tariffs_periods_dates_id": "1",
											"period_from": "2022-07-01",
											"period_to": "2023-06-30"
										},
										{
											"tariffs_periods_dates_id": "5",
											"period_from": "2023-07-01",
											"period_to": "2024-06-30"
										}
									]
								},
								{
									"tariffs_period_id": 2,
									"name": "Weekday",
									"daysofweek": [
										"monday",
										"tuesday",
										"wednesday",
										"thursday",
										"friday"
									],
									"colour": "d636d6",
									"created_by": "11",
									"created_when": "2024-04-18 11:30:00",
									"active": "1",
									"tariffs_periods_dates": [
										{
											"tariffs_periods_dates_id": "2",
											"period_from": "2022-01-01",
											"period_to": "2030-12-31"
										}
									]
								}
							],
							"message": ""
						}
					
				
AnchorRate Periods: Create

Creates a Rate Period.

Request Notes:

  • name (string) is required.
  • daysofweek (array) should be an array containing lower case day names.
    • monday
    • tuesday
    • wednesday
    • thursday
    • friday
    • saturday
    • sunday
  • colour (string - hex) Hex code representation of a colour.
  • tariffs_periods_dates (array) of dates that the Rate Period affects.
    • period_from (date - yyyy-mm-dd)
    • period_to (date - yyyy-mm-dd)

The following parameters are optional:

  • active (boolean) whether the Tariff Period is active.

Rate Periods: Create Example

Request URL

https://api.newbook.cloud/rest/tariffs_periods_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "Weekend Rate Period",
							"daysofweek": [
								"sunday",
								"monday"
							],
							"colour": "0000FF",
							"tariffs_periods_dates": [
								{
									"period_from": "2022-07-01",
									"period_to": "2023-06-30"
								},
								{
									"period_from": "2023-07-01",
									"period_to": "2024-06-30"
								}
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"tariff_period_id": 3
							},
							"message": ""
						}
					
				
AnchorRate Periods: Get

Returns a Rate Period.

Request Notes:

tariffs_period_id (int) ID of the Tariff Period to be returned.

Rate Periods: Get Example

Request URL

https://api.newbook.cloud/rest/tariffs_periods_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"tariffs_period_id": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"tariffs_period_id": 1,
								"name": "Standard Rate Period",
								"daysofweek": [
									"sunday",
									"monday",
									"tuesday",
									"wednesday",
									"thursday",
									"friday",
									"saturday"
								],
								"colour": "000000",
								"created_by": "11",
								"created_when": "2024-04-18 11:30:00",
								"active": "1",
								"tariffs_periods_dates": [
									{
										"tariffs_periods_dates_id": "1",
										"period_from": "2022-07-01",
										"period_to": "2023-06-30"
									},
									{
										"tariffs_periods_dates_id": "5",
										"period_from": "2023-07-01",
										"period_to": "2024-06-30"
									}
								]
							},
							"message": ""
						}
					
				
AnchorRate Periods: Update

Updates an existing Rate Period.

Request Notes:

tariffs_period_id (int - required) ID of the Rate Period to update.

Please see below for a list of optional details that can be updated on the Rate Period. At least one of these must be provided.

  • name (string)
  • daysofweek (array) should be an array containing lower case day names.
    • monday
    • tuesday
    • wednesday
    • thursday
    • friday
    • saturday
    • sunday
  • colour (string - hex) Hex code representation of a colour.
  • tariffs_periods_dates (array) of dates that the Rate Period affects.
    • period_from (date - yyyy-mm-dd)
    • period_to (date - yyyy-mm-dd)
    Note: When tariffs_periods_dates is provided all existing dates will be removed and replaced with the new dates provided.
  • active (boolean) whether the Tariff Period is active.

Rate Periods: Update Example

Request URL

https://api.newbook.cloud/rest/tariffs_periods_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"tariffs_period_id": 1,
							"name": "Weekday Rate Period",
							"daysofweek": [
								"monday",
								"tuesday",
								"wednesday",
								"thursday",
								"friday"
							],
							"colour": "00CCBB",
							"tariffs_periods_dates": [
								{
									"period_from": "2023-01-01",
									"period_to": "2023-12-31"
								},
								{
									"period_from": "2024-01-01",
									"period_to": "2024-12-31"
								}
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"tariffs_period_id": 1
							},
							"message": ""
						}
					
				
AnchorDiscounts: List

Pull the list of Discounts from within Newbook.

Request Notes:

name is optional and when provided it will restrict the results to the matching Discounts

Discounts: List Example

Request URL

https://api.newbook.cloud/rest/discounts_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "Demo"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								"123": {
									"id": "123",
									"name": "Demo",
									"discount_type": "percentage",
									"discount_amount": "8.92",
									"minimum": "5.00",
									"maximum": "10.00",
									"maximum_applies_per_night": "0",
									"minimum_stay_cost": null,
									"min_stay": "0",
									"min_valid_nights": "0",
									"requires_code": "0",
									"daysofweek": [
										"monday",
										"tuesday",
										"wednesday",
										"thursday",
										"friday",
										"saturday",
										"sunday"
									],
									"discount_id": "244",
									"gl_account_id": null,
									"gl_category_id": null,
									"bookings_source_id": null,
									"bookings_market_segment_id": null,
									"active": "1",
									"category_restrictions": [
										"1",
										"2"
									],
									"tariff_period_restrictions": null,
									"tariff_type_restrictions": null,
									"user_profile_restrictions": null,
									"membership_restrictions": null,
									"category_type_restrictions": null
								}
							],
							"message": ""
						}
					
				
AnchorDiscounts: Create

Create a new Discount.

Request Notes:

The following parameters are required:

  • name (string) is required
  • discount_type (string) must be from the following list:
    • percentage
    • nights
    • cheapest_night_percentage
    • nights_average
    • fixed
    • fixed_per_night
    • fixed_per_adult
    • fixed_per_child
    • fixed_per_person
    • fixed_per_adult_per_night
    • fixed_per_child_per_night
    • fixed_per_person_per_night
  • discount_amount (float)
  • minimum (float)
  • maximum (float)
  • active (boolean)

The following parameters are optional:

  • minimum_stay_cost (float)
  • min_valid_nights (int)
  • gl_account_id (int) must match a valid GL Account ID if provided
  • gl_category_id (int) must match a valid GL Category ID if provided
  • bookings_source_id (int) must match a valid Booking Source ID if provided
  • bookings_market_segment_id (int) must match a valid Booking Market Segment ID if provided
  • daysofweek (array) should be an array containing lower case day names
    • monday
    • tuesday
    • wednesday
    • thursday
    • friday
    • saturday
    • sunday
  • requires_code (boolean) should discount codes be required for this discount
  • discount_codes (array) of discount code objects
    • id (int) should be provided if updating an existing code
    • code (string) the discount code
    • available_from (string) must be a valid date if provided
    • available_to (string) must be a valid date if provided
    • staying_from (string) must be a valid date if provided
    • staying_to (string) must be a valid date if provided
    • remove (boolean) will delete an existing code with matching ID if set to 1
  • category_restrictions (array|null) optional, an array of valid Category IDs, or null for no Category restrictions
  • tariff_period_restrictions (array|null) optional, an array of valid Rate Period IDs, or null for no Rate Period restrictions
  • tariff_type_restrictions (array|null) optional, an array of valid Rate Type IDs, or null for no Rate Type restrictions
  • user_profile_restrictions (array|null) optional, an array of valid User Profile IDs, or null for no User Profile restrictions
  • membership_restrictions (array|null) optional, an array of valid Membership IDs, or null for no Membership restrictions
  • category_type_restrictions (array|null) optional, an array of valid Category Type IDs, or null for no Category Type restrictions

Discounts: Create Example

Request URL

https://api.newbook.cloud/rest/discounts_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "A Discount",
							"discount_type": "percentage",
							"discount_amount": "10.00",
							"minimum": "0.00",
							"maximum": "0.00",
							"active": "1",
							"minimum_stay_cost": "50.00",
							"min_valid_nights": "3",
							"gl_account_id": "145",
							"gl_category_id": "1",
							"bookings_source_id": null,
							"bookings_market_segment_id": null,
							"daysofweek": [
								"monday",
								"tuesday",
								"wednesday",
								"thursday",
								"friday",
								"saturday",
								"sunday"
							],
							"requires_code": "0",
							"discount_codes": [
								{
									"id": 1,
									"code": "NEWCODE"
								},
								{
									"id": 2,
									"remove": "1"
								},
								{
									"code": "ABC123",
									"available_from": "2024-04-20",
									"available_to": "2024-05-19",
									"staying_from": "2024-04-20",
									"staying_to": "2024-05-19"
								}
							],
							"category_restrictions": [
								"1",
								"2"
							],
							"tariff_period_restrictions": null,
							"tariff_type_restrictions": null,
							"user_profile_restrictions": null,
							"membership_restrictions": null,
							"category_type_restrictions": null
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								 {
									"discount_id": "123"
								}
							],
							"message": ""
						}
					
				
AnchorDiscounts: Get

Retrieve an existing Discount record.

Request Notes:

discount_id must be provided to retrieve the details of a particular Discount.

Response Notes:

The returned data from this request is identical to Discounts: List but for a specific Discount alone and with the addition of any associated Discount codes.

If no such Discount exists, the success response parameter will be "false" and no data will be returned.

Discounts: Get Example

Request URL

https://api.newbook.cloud/rest/discounts_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"discount_id": "123"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "123",
								"name": "Demo",
								"discount_type": "percentage",
								"discount_amount": "8.92",
								"minimum": "5.00",
								"maximum": "10.00",
								"maximum_applies_per_night": "0",
								"minimum_stay_cost": null,
								"min_stay": "0",
								"min_valid_nights": "0",
								"requires_code": "0",
								"daysofweek": [
									"monday",
									"tuesday",
									"wednesday",
									"thursday",
									"friday",
									"saturday",
									"sunday"
								],
								"discount_id": "243",
								"gl_account_id": null,
								"gl_category_id": null,
								"bookings_source_id": null,
								"bookings_market_segment_id": null,
								"active": "1",
								"discount_codes": [
								    {
									"id": "248",
									"discount_id": "243",
									"code": "abc",
									"available_from": "2024-03-19",
									"available_to": null,
									"staying_from": null,
									"staying_to": null,
									"maximum_use_count": "0",
									"maximum_use_technique": "0",
									"uses": 0,
									"uses_raw": []
								    }
								],
								"category_restrictions": null,
								"tariff_period_restrictions": [
									"2"
								],
								"tariff_type_restrictions": [
									"1",
									"3"
								],
								"user_profile_restrictions": null,
								"membership_restrictions": null,
								"category_type_restrictions": null
							},
							"message": ""
						}
					
				
AnchorDiscounts: Update

Update a Discount.

Request Notes:

discount_id is required to advise which Discount you are updating.

All other parameters are optional, and are defined in Discounts: Create.

Discounts: Update Example

Request URL

https://api.newbook.cloud/rest/discounts_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"discount_id": 123,
							"name": "A Better Discount",
							"discount_amount": "25.00",
							"minimum": "250.00",
							"maximum": "1000.00",
							"discount_codes": [
							    {
								"id": 1,
								"code": "NEWCODE"
							    }
							],
							"category_restrictions": [
								"1",
								"2"
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"discount_id": "123"
							},
							"message": ""
						}
					
				
AnchorActivity Setup

Returns description and image details for Activities enabled for Online use.

Please note that Activities have Configurations, and Configurations have Timeslots.
E.g. the Activity might be Jumping Castle, the Configurations might be "Single Child" vs "Family Ticket", and the Timeslots might be "9am-10am, 10am-11am, 11am-12pm".
This request shows the top level data of the Activity only (its name, facility, description, images if any, and Configurations).

If you need to see occupant limits (which are per-Timeslot) please use the Activity Availability and Pricing request.

Request Notes:

activity_id can be provided as an array to limit the response to particular Activities.

Response Notes:

facility_id the ID of the Facility this Activity occurs in (see Facilities: List)

Activity Configurations

activity_configurations the list of configurations for an Activity.

configuration_online indicates whether an Activity configuration is available from Newbook Online.

Possible ValuesDefinition
0No
1All Carts
2Standalone Cart Only

Activity Setup Example

Request URL

https://api.newbook.cloud/rest/activities

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"activity_id": 1,
									"activity_name": "Stadium Tour",
									"facility_id": 5,
									"facility_name": "A",
									"facility_category_id": 1,
									"facility_category_name": "Stadium",
									"group_description": "",
									"group_display_order": 0,
									"activity_images": [
										{
											"image_url": "https://drivelocal.newbook.cloud/instances_315806f207b1063571922698cf6af875_618361832aa1d.png",
											"image_type_name": "Stadium Tour",
											"image_file_name": "Stadium.png"
										}
									],
									"activity_configurations": [
										{
											"configuration_id": "1",
											"configuration_name": "Family Pass",
											"configuration_online": 0,
											"configuration_online_description": "Come join us on our great tour",
											"configuration_images": []
										}
									]
								},
								{
									"activity_id": "2",
									"activity_name": "Jumping Castle",
									"facility_id": null,
									"facility_name": null,
									"facility_category_id": null,
									"facility_category_name": null,
									"group_description": "",
									"group_display_order": 1,
									"activity_images": [
										{
											"image_url": "https://drivelocal.newbook.cloud/instances_315806f207b1063571922698cf6af875_618361832aa1d.png",
											"image_type_name": "Bouncy",
											"image_file_name": "Castle.png"
										}
									],
									"activity_configurations": [
										{
											"configuration_id": "2",
											"configuration_name": "Single Child",
											"configuration_online": 2,
											"configuration_online_description": "One Ticket per Child to access our Jumping Castle",
											"configuration_images": [
												{
													"image_url": "https://drivelocal.newbook.cloud/instances_315806f207b1063571922698cf6af875_618361832aa1d.png",
													"image_type_name": "Child Jumping Castle",
													"image_file_name": "castle.png"
												}
											]
										}
									]
								}
							],
							"message": ""
						}
					
				
AnchorActivity Availability and Pricing

Returns Activity availability and pricing for the requested dates/occupants.

Request Notes:

period_from and period_to are required parameters to restrict the pricing request to a particular date/time period.

adults is required to advise the number of Adults participating in the Activity.

children, infants, and animals can be optionally provided to advise of Children, Infants or Animals participating in the Activity.

activity_id can be optionally provided as an array to limit the response to particular Activities.

configuration_id can be optionally provided as an array to limit the response to particular Activity Configurations.

Response Notes:

Each activity_configurations object shows included_occupants, extra_occupants and max_occupants:

  • included_occupants defines the number of adults/children/infants/animals which are included in the Timeslot calculated_total price. Null in these values means unlimited.
  • extra_occupants defines the extra price to charge for the number of adults/children/infants/animals above each respective included_occupants number.
  • max_occupants defines the total number of adults/children/infants/animals/combined which can use the Ticket. If you need to sell more occupants than these limits, you will need to use the Create Ticket request again. Null in these values means unlimited.

Using the Create Ticket request will validate the parameters you provide against the above logic.

inventory_items provides an array of Sub-Inventory Items that are chargeable for the Ticket.

timeslot_ticket

If there is no way to sell a given Timeslot, the timeslot_ticket object will not be present, timeslot_code will have one of the values listed below, and timeslot_message will show a human-readable error message.

Each timeslot_ticket object:

  • reflects the values you have provided in the request parameters in the adults/children/infants/animals keys
  • shows how many remaining_adults/remaining_children/remaining_infants/remaining_animals and remaining_combined occupants are still able to be booked for the given Timeslot. Null in these values means unlimited. If an occupant type (or the combined figure) in the remaining_X keys reaches 0, any further Create Ticket requests using that occupant type will be rejected
  • should be used in the Create Ticket request (excluding its remaining_X keys)

timeslot_code

timeslot_code is a numeric representation of timeslot_message for you to use in constructing your own messages to your Guests it you prefer:

timeslot_codeReasoning
0No error occurred - a successful result
1The Activity Participant limit has been exceeded for this Timeslot
2The Activity Ticket Participant limit has been exceeded
3The Activity requires at least 1 participant

Activity Availability and Pricing Example

Request URL

https://api.newbook.cloud/rest/activities_pricing

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"period_from": "2024-04-20 00:00:00",
							"period_to": "2024-04-20 23:59:59",
							"adults": 1,
							"children": 0,
							"infants": 0,
							"animals": 0,
							"activity_id": [1,2],
							"configuration_id": [1,2]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"activity_id": 1,
									"activity_name": "Stadium Tour",
									"activity_configurations": [
										{
											"configuration_id": 1,
											"configuration_name": "Family Pass",
											"included_occupants": [
												"adults": 2,
												"children": 2,
												"infants": 0,
												"animals": 0
											],
											"extra_occupants": [
												"adults": 15,
												"children": 10,
												"infants": 5,
												"animals": 0
											],
											"max_occupants": [
												"adults": 20,
												"children": 20,
												"infants": 20,
												"animals": 0,
												"combined": 50
											],
											"inventory_items": [
												{
													"activity_configuration_id": "1",
													"inventory_item_id": "4",
													"gl_category_id": "1",
													"gl_account_id": "1",
													"description": "Gift Pack",
													"interval": "once",
													"interval_multiplier": "1",
													"amount": "29.90",
													"per_adult": "12.00",
													"per_child": "5.50",
													"per_infant": "0.00",
													"per_animal": "0.00",
													"tax_free": "0",
													"guest_visible": "1"
												}
											],
											"timeslots": [
												{
													"date": "2024-04-20",
													"period_from": "2024-04-20 14:00:00",
													"period_to": "2024-04-20 15:00:00",
													"duration": "60",
													"duration_interval": "minute",
													"calculated_total": 60,
													"timeslot_available": true,
													"timeslot_code": 0,
													"timeslot_message": "",
													"timeslot_ticket": {
														"period_from": "2024-04-20 14:00:00",
														"period_to": "2024-04-20 15:00:00",
														"configuration_id": "10",
														"adults": 1,
														"children": 0,
														"infants": 0,
														"animals": 0,
														"remaining_adults": 16,
														"remaining_children": 10,
														"remaining_infants": 20,
														"remaining_animals": 0,
														"remaining_combined": 36
													}
												},
												{
													"date": "2024-04-20",
													"period_from": "2024-04-20 18:00:00",
													"period_to": "2024-04-20 19:00:00",
													"duration": "60",
													"duration_interval": "minute",
													"calculated_total": 60,
													"timeslot_available": true,
													"timeslot_code": 0,
													"timeslot_message": "",
													"timeslot_ticket": {
														"period_from": "2024-04-20 18:00:00",
														"period_to": "2024-04-20 19:00:00",
														"configuration_id": "10",
														"adults": 1,
														"children": 0,
														"infants": 0,
														"animals": 0
														"remaining_adults": 4,
														"remaining_children": 8,
														"remaining_infants": 12,
														"remaining_animals": 0,
														"remaining_combined": 14
													}
												}
											]
										}
									]
								},
								{
									"activity_id": 2,
									"activity_name": "Jumping Castle",
									"activity_configurations": [
										{
											"configuration_id": 2,
											"configuration_name": "Single Child",
											"timeslots": [
												{
													"date": "2024-04-20",
													"period_from": "2024-04-20 18:00:00",
													"period_to": "2024-04-20 19:00:00",
													"duration": "60",
													"duration_interval": "minute",
													"calculated_total": 49.95,
													"timeslot_available": false,
													"timeslot_code": 1,
													"timeslot_message": "Exceeds Occupant Limits"
												}
											]
										}
									]
								}
							],
							"message": ""
						}
					
				
AnchorTicket List

Returns a list of Booked Activities aka Tickets.

Request Notes:

All of the below are optional -

activity_id can be provided as an array to limit the response to particular Activities.

ticket_id can be provided as an array to limit the response to particular Tickets.

for and for_id can be provided to limit the response to a particular Booking/Guest. e.g.

				
					{
						"for": "bookings",
						"for_id": 1234
					}
				
			

account_id can be provided to limit the response to Ticket billing to a particular Client Account.

period_from, period_to can be provided to limit the response to a particular date range.

show_cancelled can be provided as "true" to show Cancelled Activity Tickets.

Response Notes:

booking_site_id, booking_site_name, booking_category_id, and booking_category_name will only have data when the Activity Ticket is linked to a Booking, otherwise these fields will be null.

Ticket List Example

Request URL

https://api.newbook.cloud/rest/activities_ticket_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"ticket_id": 55,
									"activity_id": 1,
									"name": "Stadium Tour",
									"duration": "4",
									"duration_interval": "hour",
									"facility_id": 5,
									"facility_name": "A",
									"facility_category_id": 1,
									"facility_category_name": "Stadium",
									"configuration_name": "Family Pass",
									"id": 55,
									"period_from": "2024-04-20 06:00:00",
									"period_to": "2024-04-20 10:00:00",
									"activity_configuration_id": 4,
									"for": "bookings",
									"for_id": 1234,
									"adults": 1,
									"children": 0,
									"infants": 0,
									"animals": 0,
									"configuration_included_adults": null,
									"configuration_included_children": null,
									"configuration_included_infants": null,
									"configuration_included_animals": null,
									"inventory_item_id": 3,
									"account_id": 1897,
									"gl_category_id": 1,
									"gl_account_id": 12,
									"description": "Stadium Tour",
									"interval": "once",
									"interval_multiplier": "1",
									"amount": 0,
									"per_adult": 60,
									"per_child": 0,
									"per_infant": 30,
									"per_animal": 0,
									"tax_free": "0",
									"tax_override_amount": null,
									"cancelled_when": null,
									"cancelled_by": null,
									"created_when": "2024-04-19 11:30:00",
									"created_by": "-1",
									"for_name": "John Doe",
									"booking_site_id": "6",
									"booking_site_name": "Room 5",
									"booking_category_id": "16",
									"booking_category_name": "Single Room",
									"units": 1,
									"calculated_total": 60,
									"total_paid": 0,
									"payment_status": "Unpaid",
									"access_codes": {
										"926": {
											"id": "926",
											"card_id": null,
											"access_code": "400907",
											"type": "activities_booked",
											"type_id": "55",
											"description": "Access Code for Activity Ticket 55",
											"car_rego": "",
											"period_from": "2024-04-20 06:00:00",
											"period_to": "2024-04-20 10:00:00",
											"area_id": "1",
											"created_when": "2024-04-20 15:08:08",
											"cancelled_when": null,
											"cancelled_reason": "",
											"cancelled_by": "0",
											"access_code_status": null,
											"area_name": "ALL ACCESS"
										}
									},
									"custom_fields": [
										{
											"id": "22",
											"type": "text",
											"label": "Text Input Test",
											"value": "Random value"
										}
									],
									"payment_plans": [],
									"inventory_items": [
										{
											"ticket_id": "55",
											"inventory_item_id": "4",
											"gl_category_id": "1",
											"gl_account_id": "1",
											"description": "Gift Pack",
											"interval": "once",
											"interval_multiplier": "1",
											"amount": "29.90",
											"per_adult": "12.00",
											"per_child": "5.50",
											"per_infant": "0.00",
											"per_animal": "0.00",
											"tax_free": "0",
											"guest_visible": "1"
										}
									]
								}
							],
							"message": ""
						}
					
				
AnchorCreate Ticket

Book an Activity / Create an Activity Ticket.

Request Notes:

All fields in the Request JSON are required except for children, infants, animals and account_id.

Most of these fields can be retrieved from the timeslot_ticket object returned in the Availability and Pricing request.

for and for_id advises who the Ticket is for e.g.

				
					{
						"for": "bookings",
						"for_id": 1234
					}
				
			

account_id can be provided to advise which Client Account to bill to, if omitted the Default Client Account of the connected object will be used e.g. the Booking Default Client Account.

Response Notes:

You will receive a ticket_id when the request successfully books an Activity.

Create Ticket Example

Request URL

https://api.newbook.cloud/rest/activities_ticket_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"period_from": "2024-04-20 06:00:00",
							"period_to": "2024-04-20 10:00:00",
							"configuration_id": 1,
							"adults": 1,
							"children": 0,
							"infants": 0,
							"animals": 0,
							"for": "bookings",
							"for_id": 1234,
							"account_id": 1897
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"ticket_id": 56
							},
							"message": ""
						}
					
				
AnchorUpdate Ticket

Update an Activity Ticket.

Request Notes:

ticket_id is required to advise which Ticket you are updating.

cancel is an optional parameter, when provided as "true" Newbook will cancel the Ticket.

All other parameters are optional and documented on the Create Ticket request.

Response Notes:

You will receive the same ticket_id when the request successfully updates the Activity Ticket.

Update Ticket Example

Request URL

https://api.newbook.cloud/rest/activities_ticket_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"ticket_id": 56,
							"period_from": "2024-04-20 06:00:00",
							"period_to": "2024-04-20 10:00:00",
							"configuration_id": 1,
							"adults": 2,
							"children": 0,
							"infants": 0,
							"animals": 0,
							"for": "bookings",
							"for_id": 1234,
							"account_id": 1897
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"ticket_id": 56
							},
							"message": ""
						}
					
				
AnchorTicket PDF Content

Retrieve the HTML markup required to print a PDF version of the Activity Ticket.

Ticket PDF Content Example

Request URL

https://api.newbook.cloud/rest/activities_ticket_pdf_content

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"ticket_id": 56
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"pdf_content": "

Ticket #56

Ticket Content Here

" }, "message": "" }
AnchorAllotments: List

Pull the list of active Allotments that are available online from within Newbook.

Response Notes:

show_inactive (boolean) is optional and when provided with a truthy value, it will include inactive Allotments in the response.

for (string) is optional and when provided it will restrict the results to the matching value.

for_id (int) is optional and when provided it will restrict the results to the matching for_id.

period_from (date) is optional and when provided will include allotments with a period_to on or after this date.

period_to (date) is optional and when provided will include allotments with a period_from on or before this date.

Allotments: List Example

Request URL

https://api.newbook.cloud/rest/allotments_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [{
								"allotment_id": "1",
								"for": "travel_agents",
								"for_id": "1234",
								"category_id": "1",
								"sites_allotted": "2",
								"maximum_uses": null,
								"guaranteed": "1",
								"release_interval": "week",
								"release_interval_multiplier": "0",
								"period_from": "2024-04-19",
								"period_to": "2025-04-19",
								"daysofweek": [
									"sunday",
									"saturday"
								],
								"active": "1"
							}],
							"message": ""
						}
					
				
AnchorAllotments: Create

Creates an Allotment.

Request Notes:

The following parameters are required:

  • for (string) Must be from the following list:
    • travel_agents
    • companies
    • memberships
  • for_id (int) ID of the particular Travel Agent, Company, or Membership.
  • category_id (int) ID of the Accommodation Category.
  • sites_allotted (int) how many guaranteed sites in the specified category are assigned to this allotment.
  • release_interval (string) Along with release_interval_multiplier, determines when sites will be released from this allotment. Must be from the following list:
    • day
    • week
    • month
    • year
  • release_interval_multiplier (int)
  • period_from and period_to (date) period that this allotment is functional.
  • active (boolean) whether or not this allotment is active.

The following parameters are optional:

  • maximum_uses (int) defaults to unlimited. Maximum number of sites allowed to be used by this allotment.
  • guaranteed (boolean) defaults to true. Where or not sites should be guaranteed for this allotment.
  • daysofweek (array) defaults to daily. Should be an array containing any of the following lower case day names:
    • monday
    • tuesday
    • wednesday
    • thursday
    • friday
    • saturday
    • sunday

Allotments: Create Example

Request URL

https://api.newbook.cloud/rest/allotments_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"for": "companies",
							"for_id": 1234,
							"category_id": 1,
							"sites_allotted": 2,
							"guaranteed": true,
							"daysofweek": [
								"monday",
								"tuesday",
								"wednesday",
								"thursday",
								"friday",
								"saturday",
								"sunday"
							],
							"release_interval": "week",
							"release_interval_multiplier": 1,
							"period_from": "2024-04-19",
							"period_to": "2025-04-19",
							"active": true
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"allotment_id": 1
							},
							"message": ""
						}
					
				
AnchorAllotments: Get

Returns an existing Allotment record.

Request Notes:

allotment_id must be provided to retrieve the details of a particular Allotment.

Allotments: Get Example

Request URL

https://api.newbook.cloud/rest/allotments_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"allotment_id": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"allotment_id": "1",
								"for": "travel_agents",
								"for_id": "1234",
								"category_id": "1",
								"sites_allotted": "2",
								"maximum_uses": null,
								"guaranteed": "1",
								"release_interval": "week",
								"release_interval_multiplier": "0",
								"period_from": "2024-04-19",
								"period_to": "2025-04-19",
								"daysofweek": [
									"monday",
									"tuesday",
									"wednesday",
									"thursday",
									"friday",
									"saturday",
									"sunday"
								],
								"active": "1"
							},
							"message": ""
						}
					
				
AnchorAllotments: Update

Updates an existing Allotment.

Request Notes:

allotment_id must be provided to update a particular Allotment.

All other parameters are optional, and are defined in Allotments: Create.

Allotments: Update Example

Request URL

https://api.newbook.cloud/rest/allotments_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"allotment_id": 1,
							"active": false
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"allotment_id": 1
							},
							"message": ""
						}
					
				
AnchorAllotment Override

Creates an Allotment Override.

Request Notes:

The following parameters are required:

  • allotment_id (int) ID of the allotment being overridden.
  • date (date) date of the allotment that is being overridden.

At least one, or more, of the following parameters are required:

  • sites_allotted (int) Number of sits to be allotted. Null to use Allotment value.
  • maximum_uses (int) Maximum sites allowed to be booked for the allotment. Null to use Allotment value.
  • active (boolean) defaults to true. Whether this allotment override is active.
When creating an Allotment Override for an Allotment where an override already exists for that date, the existing Allotment Override will be updated with the new details.

Allotments Overrides: Create Example

Request URL

https://api.newbook.cloud/rest/allotments_overrides_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"allotment_id": 1,
							"date": "2024-04-21",
							"sites_allotted": 2,
							"maximum_uses": 1,
							"active": true
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"allotment_override_id": 1
							},
							"message": ""
						}
					
				
AnchorFacility Categories: List

Returns a list of active Facility Categories.

Request Notes:

show_inactive is optional, default false, and when provided with a truthy value, it will include inactive Facility Categories in the response.

Facility Categories: List Example

Request URL

https://api.newbook.cloud/rest/facility_categories_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"1": {
										"id": "1",
										"name": "Water Sports Equipment",
										"max_adults": null,
										"max_children": null,
										"max_infants": null,
										"max_animals": null,
										"max_combined": null,
										"display_order": "0",
										"hireable": "1",
										"housekeeping": "0",
										"restrict_start_time": null,
										"restrict_end_time": null,
										"restrict_hire_interval": "once",
										"restrict_hire_interval_multiplier": null,
										"online_hire_interval": "hour",
										"online_hire_interval_multiplier": "1",
										"online_hire_entire_duration": "0",
										"online_group_description": "",
										"default_inventory_item_id": "9",
										"appointments": "0",
										"system_template_terms_and_conditions": null,
										"active": "1",
										"features": [
											"1",
											"2"
										]
									},
									"2": {
										"id": "2",
										"name": "Tennis",
										"max_adults": null,
										"max_children": null,
										"max_infants": null,
										"max_animals": null,
										"max_combined": null,
										"display_order": "0",
										"hireable": "1",
										"housekeeping": "1",
										"restrict_start_time": null,
										"restrict_end_time": null,
										"restrict_hire_interval": "once",
										"restrict_hire_interval_multiplier": null,
										"online_hire_interval": "hour",
										"online_hire_interval_multiplier": "0",
										"online_hire_entire_duration": "0",
										"online_group_description": "",
										"default_inventory_item_id": null,
										"appointments": "0",
										"system_template_terms_and_conditions": "59",
										"active": "0",
										"features": [
											"3"
										]
									}
							],
							"message": ""
						}
					
				
AnchorFacility Categories: Create

Creates a Facility Category.

Request Notes:

The following parameters are required:

  • name (string: up to 200 characters) is required.

The following parameters are optional:

  • max_adults (int)
  • max_children (int)
  • max_infants (int)
  • max_animals (int)
  • max_combined (int)
  • display_order (int)
  • hireable (boolean)
  • housekeeping (boolean)
  • restrict_start_time (time: H:i:s)
  • restrict_end_time (time: H:i:s)
  • restrict_hire_interval (string) must be from the following list:
    • once
    • minute
    • hour
    • day
    • week
    • month
    • year
  • restrict_hire_interval_multiplier (int)
  • online_hire_interval (string) must be from the following list:
    • once
    • minute
    • hour
    • day
    • week
    • month
    • year
  • online_hire_interval_multiplier (int)
  • online_hire_entire_duration (boolean)
  • online_group_description (string: up to 250 characters)
  • default_inventory_item_id (int) must match a valid Inventory Item ID if provided
  • appointments (boolean)
  • system_template_terms_and_conditions (int) must match a valid System Template ID if provided
  • active (boolean)
  • features (array) of existing Facility Feature IDs

Facility Categories: Create Example

Request URL

https://api.newbook.cloud/rest/facility_categories_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "Water Sports Equipment",
							"max_adults": null,
							"max_children": null,
							"max_infants": null,
							"max_animals": null,
							"max_combined": null,
							"display_order": "0",
							"hireable": "1",
							"housekeeping": "0",
							"restrict_start_time": null,
							"restrict_end_time": null,
							"restrict_hire_interval": "once",
							"restrict_hire_interval_multiplier": null,
							"online_hire_interval": "hour",
							"online_hire_interval_multiplier": "1",
							"online_hire_entire_duration": "0",
							"online_group_description": "",
							"default_inventory_item_id": "9",
							"appointments": "0",
							"system_template_terms_and_conditions": null,
							"active": "1",
							"features": [
								"1",
								"2"
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"facility_category_id": 1
							},
							"message": ""
						}
					
				
AnchorFacility Categories: Get

Returns an existing Facility Category record.

Request Notes:

facility_category_id must be provided to retrieve the details of a particular Facility Category.

Facility Categories: Get Example

Request URL

https://api.newbook.cloud/rest/facility_categories_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"facility_category_id": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "1",
								"name": "Water Sports Equipment",
								"max_adults": null,
								"max_children": null,
								"max_infants": null,
								"max_animals": null,
								"max_combined": null,
								"display_order": "0",
								"hireable": "1",
								"housekeeping": "0",
								"restrict_start_time": null,
								"restrict_end_time": null,
								"restrict_hire_interval": "once",
								"restrict_hire_interval_multiplier": null,
								"online_hire_interval": "hour",
								"online_hire_interval_multiplier": "1",
								"online_hire_entire_duration": "0",
								"online_group_description": "",
								"default_inventory_item_id": "9",
								"appointments": "0",
								"system_template_terms_and_conditions": null,
								"active": "1",
								"features": [
									"1",
									"2"
								]
							},
							"message": ""
						}
					
				
AnchorFacility Categories: Update

Updates an existing Facility Category.

Request Notes:

facility_category_id must be provided to update a particular Facility Category.

Please see below for a list of optional details that can be updated on the Facility Category. At least one of these must be provided.

All other parameters are optional, and are defined in Facility Categories: Create.

Facility Categories: Update Example

Request URL

https://api.newbook.cloud/rest/facility_categories_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"facility_category_id": 1,
							"name": "Water Activities Equipment"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"facility_category_id": 1
							},
							"message": ""
						}
					
				
AnchorFacility Features: List

Returns a list of active Facility Features.

Request Notes:

show_inactive is optional, default false, and when provided with a truthy value, it will include inactive Facility Features in the response.

Facility Features: List Example

Request URL

https://api.newbook.cloud/rest/facility_features_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"1": {
										"id": "1",
										"name": "Kayak",
										"active": "1"
									},
									"2": {
										"id": "2",
										"name": "Canoe",
										"active": "1"
									}
							],
							"message": ""
						}
					
				
AnchorFacility Features: Create

Creates a Facility Feature.

Request Notes:

  • name is required.

Facility Features: Create Example

Request URL

https://api.newbook.cloud/rest/facility_features_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "facility name",
							"active": true
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"facility_feature_id": 1
							},
							"message": ""
						}
					
				
AnchorFacility Features: Update

Updates an existing Facility Feature.

Request Notes:

facility_feature_id must be provided to update a particular Facility Feature.

Please see below for a list of optional details that can be updated on the Facility Feature. At least one of these must be provided.

  • name
  • active - supports values like "true", false, 1.

Facility Features: Update Example

Request URL

https://api.newbook.cloud/rest/facility_features_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"facility_feature_id": 3,
							"name": "facility name",
							"active": true
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"facility_feature_id": 1
							},
							"message": ""
						}
					
				
AnchorFacilities: List

Pull the list of active Facilities that are available online from within Newbook.

Request Notes:

show_inactive is optional, default false, and when provided with a truthy value, it will include inactive Facilities in the response.

hireable_only is optional, default true, which enforces returning only those Facilities configured as able to be hired online.

Response Notes:

facility_status will be either Open or Maintenance. Permanently closed Facilities will not be returned by this request.

category_name and category_id refer to the Facility Category.

additional_information comes from the default Inventory Item for the Facility. For more details of this Inventory Item, the Inventory Items: List request can be used with the inventory_item_name from this data.

Facilities: List Example

Request URL

https://api.newbook.cloud/rest/facilities_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [{
								"facility_id": "3",
								"facility_name": "Barbeque Area 1",
								"facility_status": "Open",
								"show_on_maps": 1,
								"opened_on": "2018-08-07",
								"category_id": 1,
								"category_name": "Barbeque Areas",
								"inventory_item_id": 3,
								"inventory_item_name": "Hiring Fee",
								"inventory_item_description": "A description of the fee",
								"additional_information": "A longer description of the hiring fee"
							}],
							"message": ""
						}
					
				
AnchorFacilities: Create

Creates a Facility.

Request Notes:

The following parameters are required:

  • category_id (int) Facility Category that this Facility belongs to.
  • name (string: up to 200 characters) is required.

The following parameters are optional:

  • display_order (int)
  • status (string) must be from the following list:
    • Open
    • Maintenance
  • level_id (int)
  • manager_id (int)
  • opened_on (date: Y-m-d) defaults to today's date
  • show_online (boolean)
  • show_on_maps (boolean)
  • active (boolean)
  • features (array) of existing Facility Feature IDs

Facilities: Create Example

Request URL

https://api.newbook.cloud/rest/facilities_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"category_id": "1",
							"name": "Water Sports Equipment",
							"display_order": "1",
							"status": "Open",
							"level_id": "1",
							"manager_id": "1",
							"opened_on": "2023-01-01",
							"show_online": "1",
							"show_on_maps": "1",
							"active": "1",
							"features": [
								"1",
								"2"
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"facility_id": 1
							},
							"message": ""
						}
					
				
AnchorFacilities: Get

Returns an existing Facility record.

Request Notes:

facility_id must be provided to retrieve the details of a particular Facility.

The field override_category_features (boolean) is non-editable and is set to True when Features are linked to the Facility directly.

Facilities: Get Example

Request URL

https://api.newbook.cloud/rest/facilities_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"facility_id": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "1",
								"category_id": "1",
								"name": "Water Activities",
								"display_order": "0",
								"status": "Open",
								"level_id": "1",
								"manager_id": "1",
								"opened_on": "2023-01-01",
								"show_online": "1",
								"override_category_features": "1",
								"show_on_maps": "1",
								"active": "1",
								"features": [
									"1",
									"2"
								]
							},
							"message": ""
						}
					
				
AnchorFacilities: Update

Updates an existing Facility.

Request Notes:

facility_id must be provided to update a particular Facility.

All other parameters are optional, and are defined in Facilities: Create.

Facilities: Update Example

Request URL

https://api.newbook.cloud/rest/facilities_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"facility_id": 1,
							"name": "Water Activity Facilities",
							"manager_id": "1",
							"features": [
								"3"
							]

						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"facility_id": 1
							},
							"message": ""
						}
					
				
AnchorFacility Hire: Availability and Pricing

Returns the Facility Hire Availability and Pricing for the requested dates.

Request Notes:

period_from and period_to are required parameters to restrict the availability request to a particular date/time period.

facility_id is a required parameter provided as an array to limit the response to particular Facilities

adults, children, infants, and animals can be optionally provided for hiring the Facility, as these may affect pricing.

Response Notes:

Availability is returned per Facility. For each Facility, the below explains the response keys:

  • facility_id is the ID of the Facility
  • facility_name is the name of the Facility
  • facility_category_id is the ID of the Facility Category
  • facility_category_name is the name of the Facility Category
  • availability is an array of the timeslots, from the period_from to the period_to in increments of the Hire Interval set on the Facility, and the pricing for each period. For example, if the Hire Interval is 2 hours, the availability array will show increments of 2 hours between the period_from & period_to provided in the request.
  • availability[][available] is a boolean which indicates if the Facility is available for the timeslot
  • availability[][period_from] is the start of the timeslot
  • availability[][period_to] is the end of the timeslot
  • availability[][pricing] is an array of the pricing information for the timeslot
  • pricing[][interval] is the Hire Interval for the Facility. It can be once, minute, hour, day, week, month, or year.
  • pricing[][interval_multiplier] is an integer defining the duration of the Hire Interval. For example 15 minute, or 3 hour, or 1 day etc.
  • pricing[][amount_per_interval] is the cost to hire the Facility per Hire Interval.
  • pricing[][total_for_period] is the total cost for the timeslot.

Facility Hire: Availability and Pricing Example

Request URL

https://api.newbook.cloud/rest/facility_hire_availability_pricing

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"period_from": "2024-04-20 10:00:00",
							"period_to": "2024-04-20 13:00:00",
							"adults": 1,
							"children": 0,
							"infants": 0,
							"animals": 0,
							"facility_ids": [1,2]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"facility_id": "1",
									"facility_name": "Surfboard 1",
									"facility_category_id": "2",
									"facility_category_name": "Equipment",
									"availability": [
										{
											"available": true,
											"period_from": "2024-04-20 10:00:00",
											"period_to": "2024-04-20 11:00:00",
											"pricing": {
												"interval": "hour",
												"interval_multiplier": "1",
												"amount_per_interval": "10.00",
												"total_for_period": "30.00"
											}
										},
										{
											"available": true,
											"period_from": "2024-04-20 11:00:00",
											"period_to": "2024-04-20 12:00:00",
											"pricing": {
												"interval": "hour",
												"interval_multiplier": "1",
												"amount_per_interval": "10.00",
												"total_for_period": "30.00"
											}
										},
										{
											"available": true,
											"period_from": "2024-04-20 12:00:00",
											"period_to": "2024-04-20 13:00:00",
											"pricing": {
												"interval": "hour",
												"interval_multiplier": "1",
												"amount_per_interval": "10.00",
												"total_for_period": "30.00"
											}
										}
									]
								},
								{
									"facility_id": "2",
									"facility_name": "Surfboard 2",
									"availability": [
										{
											"available": false,
											"period_from": "2024-04-20 10:00:00",
											"period_to": "2024-04-20 11:00:00",
											"pricing": {
												"interval": "hour",
												"interval_multiplier": "1",
												"amount_per_interval": "10.00",
												"total_for_period": "30.00"
											}
										},
										{
											"available": false,
											"period_from": "2024-04-20 11:00:00",
											"period_to": "2024-04-20 12:00:00",
											"pricing": {
												"interval": "hour",
												"interval_multiplier": "1",
												"amount_per_interval": "10.00",
												"total_for_period": "30.00"
											}
										},
										{
											"available": true,
											"period_from": "2024-04-20 12:00:00",
											"period_to": "2024-04-20 13:00:00",
											"pricing": {
												"interval": "hour",
												"interval_multiplier": "1",
												"amount_per_interval": "10.00",
												"total_for_period": "30.00"
											}
										}
									]
								}
							],
							"message": ""
						}
					
				
AnchorFacility Hire: List

Returns a list of Facility Hires.

Request Notes:

All of the below are optional -

facility_ids can be provided as an array to limit the response to particular Facilities.

for and for_id can be provided to limit the response to a particular Booking/Guest e.g.

				
					{
						"for": "bookings",
						"for_id": 1234
					}
				
			

period_from, period_to can be provided to limit the response to a particular datetime range.

show_cancelled (default "false") can be provided as "true" to show Facility Hires which have been cancelled.

Facility Hire: List Example

Request URL

https://api.newbook.cloud/rest/facility_hire_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"id": "56",
									"hire_id": "56",
									"facility_id": "1",
									"facility_category_id": "2",
									"facility_category_name": "Sports Equipment",
									"period_from": "2024-04-20 10:00:00",
									"period_to": "2024-04-20 11:00:00",
									"length": "1 hour",
									"amount": "10.00",
									"per_adult": "10.00",
									"per_child": "0.00",
									"per_infant": "0.00",
									"per_animal": "0.00",
									"tax_free": "0",
									"adults": "1",
									"children": "0",
									"infants": "0",
									"animals": "0",
									"hire_account_for_id": "1234",
									"hire_account_for_name": "John Smith",
									"hire_account_for": "bookings",
									"hire_account_balance": "0.00",
									"billing_account_for_id": "1234",
									"billing_account_for_name": "John Smith",
									"billing_account_for": "bookings",
									"billing_account_balance": "0.00",
									"inventory_item_id": "14",
									"gl_category_id": "2",
									"gl_account_id": "4",
									"description": "Surf Board Hire",
									"override_tax_rate_ids": [],
									"units": "1.0000",
									"cancelled_when": null,
									"cancelled_by": null,
									"custom_fields": [
										{
											"id": "4",
											"type": "text",
											"label": "Surfboard Type",
											"value": "Mini Mal - 8"
										},
										{
											"id": "5",
											"type": "checkbox",
											"label": "Include bag?",
											"value": "1"
										}
									]
								}								
							],
							"message": ""
						}
					
				
AnchorFacility Hire: Get

Returns an existing Facility Hire record.

Request Notes:

hire_id must be provided to retrieve the details of a particular Facility Hire.

Facility Hire: Get Example

Request URL

https://api.newbook.cloud/rest/facility_hire_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"hire_id": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "56",
								"hire_id": "56",
								"facility_id": "1",
								"facility_category_id": "2",
								"facility_category_name": "Sports Equipment",
								"period_from": "2024-04-20 10:00:00",
								"period_to": "2024-04-20 11:00:00",
								"length": "1 hour",
								"amount": "10.00",
								"per_adult": "10.00",
								"per_child": "0.00",
								"per_infant": "0.00",
								"per_animal": "0.00",
								"tax_free": "0",
								"adults": "1",
								"children": "0",
								"infants": "0",
								"animals": "0",
								"hire_account_for_id": "1234",
								"hire_account_for_name": "John Smith",
								"hire_account_for": "bookings",
								"hire_account_balance": "0.00",
								"billing_account_for_id": "1234",
								"billing_account_for_name": "John Smith",
								"billing_account_for": "bookings",
								"billing_account_balance": "0.00",
								"inventory_item_id": "14",
								"gl_category_id": "2",
								"gl_account_id": "4",
								"description": "Surf Board Hire",
								"override_tax_rate_ids": [],
								"units": "1.0000",
								"cancelled_when": null,
								"cancelled_by": null,
								"custom_fields": [
									{
										"id": "4",
										"type": "text",
										"label": "Surfboard Type",
										"value": "Mini Mal - 8"
									},
									{
										"id": "5",
										"type": "checkbox",
										"label": "Include bag?",
										"value": "1"
									}
								]
							},
							"message": ""
						}
					
				
AnchorFacility Hire: Create

Create a Facility Hire.

Request Notes:

facility_id is the ID of the Facility to be hired (see Facilities: List)

hireable_only is optional, default true, which enforces hiring only those Facilities configured as able to be hired online. You can provide it as false to force the API to let you Hire a Facility not otherwise configured for this.

adults is required however children, infants, and animals can be optionally provided for hiring the Facility, as these may affect pricing.

for and for_id advises the Booking/Guest this Facility Hire should be attributed to, and must already exist in the Instance database e.g.

				
					{
						"for": "bookings",
						"for_id": 1234
					}
				
			

If specified, custom_fields must be based on the response to the Custom Fields request, to retrieve the different Custom Fields set up in the instance:

				
					"custom_fields": [
						{
							"field_id": 2,
							"field_value": 8
						}
					]
				
			

Response Notes:

success will be false when the Facility is unavailable to Hire for the requested duration.

When the Facility Hire is successful, you will receive hire_id in the data response.

Facility Hire: Create Example

Request URL

https://api.newbook.cloud/rest/facility_hire_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"period_from": "2024-04-20 12:00:00",
							"period_to": "2024-04-20 13:00:00",
							"adults": 1,
							"children": 0,
							"infants": 0,
							"animals": 0,
							"for": "bookings",
							"for_id": 1234,
							"facility_id": 2,
							"custom_fields": [
								{
									"field_id": "4",
									"field_value": "Mini Mal - 10"
								},
								{
									"field_id": "5",
									"field_value": "0"
								}
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "56",
								"hire_id": "56",
								"facility_id": "1",
								"facility_category_id": "2",
								"facility_category_name": "Sports Equipment",
								"period_from": "2024-04-20 10:00:00",
								"period_to": "2024-04-20 11:00:00",
								"length": "1 hour",
								"amount": "10.00",
								"per_adult": "10.00",
								"per_child": "0.00",
								"per_infant": "0.00",
								"per_animal": "0.00",
								"tax_free": "0",
								"adults": "1",
								"children": "0",
								"infants": "0",
								"animals": "0",
								"hire_account_for_id": "1234",
								"hire_account_for_name": "John Smith",
								"hire_account_for": "bookings",
								"hire_account_balance": "0.00",
								"billing_account_for_id": "1234",
								"billing_account_for_name": "John Smith",
								"billing_account_for": "bookings",
								"billing_account_balance": "0.00",
								"inventory_item_id": "14",
								"gl_category_id": "2",
								"gl_account_id": "4",
								"description": "Surf Board Hire",
								"override_tax_rate_ids": [],
								"units": "1.0000",
								"cancelled_when": null,
								"cancelled_by": null,
								"custom_fields": [
									{
										"id": "4",
										"type": "text",
										"label": "Surfboard Type",
										"value": "Mini Mal - 8"
									},
									{
										"id": "5",
										"type": "checkbox",
										"label": "Include bag?",
										"value": "1"
									}
								]
							},
							"message": ""
						}
					
				
AnchorFacility Hire: Update

Update a Facility Hire.

Request Notes:

hire_id is required to advise which Facility Hire you are updating.

status is an optional parameter, when provided as 0 Newbook will cancel the Facility Hire.

All other parameters are optional, and are defined in Facility Hire: Create.

Facility Hire: Update Example

Request URL

https://api.newbook.cloud/rest/facility_hire_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"hire_id": 56,
							"period_from": "2024-04-20 10:00:00",
							"period_to": "2024-04-20 11:00:00",
							"adults": 1,
							"children": 0,
							"infants": 0,
							"animals": 0,
							"for": "bookings",
							"for_id": 1234,
							"facility_id": 1
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "56",
								"hire_id": "56",
								"facility_id": "1",
								"facility_category_id": "2",
								"facility_category_name": "Sports Equipment",
								"period_from": "2024-04-20 10:00:00",
								"period_to": "2024-04-20 11:00:00",
								"length": "1 hour",
								"amount": "10.00",
								"per_adult": "10.00",
								"per_child": "0.00",
								"per_infant": "0.00",
								"per_animal": "0.00",
								"tax_free": "0",
								"adults": "1",
								"children": "0",
								"infants": "0",
								"animals": "0",
								"hire_account_for_id": "1234",
								"hire_account_for_name": "John Smith",
								"hire_account_for": "bookings",
								"hire_account_balance": "0.00",
								"billing_account_for_id": "1234",
								"billing_account_for_name": "John Smith",
								"billing_account_for": "bookings",
								"billing_account_balance": "0.00",
								"inventory_item_id": "14",
								"gl_category_id": "2",
								"gl_account_id": "4",
								"description": "Surf Board Hire",
								"override_tax_rate_ids": [],
								"units": "1.0000",
								"cancelled_when": null,
								"cancelled_by": null,
								"custom_fields": [
									{
										"id": "4",
										"type": "text",
										"label": "Surfboard Type",
										"value": "Mini Mal - 8"
									},
									{
										"id": "5",
										"type": "checkbox",
										"label": "Include bag?",
										"value": "1"
									}
								]
							},
							"message": ""
						}
					
				
AnchorInventory Items: List

Pull the list of Inventory Items from within Newbook.

Request Notes:

name is optional and when provided it will restrict the results to the matching Inventory Items

You can provide a basic booking object named calculate_price_for_booking in the request parameters and Newbook will return a new key in the response, booking_inventory_calculated_price. The calculation factors the cost per occupant so you don't have to implement such logic in your application:

				
					{
						"calculate_price_for_booking": {
							"period_from": "2024-04-19",
							"period_to": "2024-04-20",
							"total": 199.95,
							"adults": 2,
							"children": 1,
							"infants": 0,
							"animals": 0
						}
					}
				
			

If you use this, calculate_price_for_booking.period_from, calculate_price_for_booking.period_to and calculate_price_for_booking.total and at least one of the occupant keys are required for Newbook to return booking_inventory_calculated_price in the response. This is because the duration of the booking and its total cost can impact the price determination when an Inventory Item is configured that way:

				
					{
						"success": "true",
						"data": [{
							...
							"booking_inventory_calculated_price": 14.50
						}],
						"message": ""
					}
				
			

Inventory Items: List Example

Request URL

https://api.newbook.cloud/rest/inventory_item_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"data_limit": 10,
							"name": "Foldaway"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"264": {
									"id": "264",
									"category_id": null,
									"gl_category_id": null,
									"gl_account_id": null,
									"name": "Foldaway Bed",
									"description": "",
									"amount": "15.00",
									"unit_amount": "0.00",
									"unit_type": "",
									"unit_category_id": null,
									"repeat_charge_type": "credits",
									"repeat_charge_interval": "day",
									"repeat_charge_interval_multiplier": "1",
									"repeat_charge_guest_visible": "1",
									"repeat_charge_travel_agent_commission": "1",
									"repeat_charge_include_in_stay_cost": "1",
									"repeat_charge_disburse_to_owners": "0",
									"repeat_charge_prorata_end": "1",
									"repeat_charge_booking_market_segment_id": null,
									"booking_inventory_item_type": "charges",
									"booking_inventory_calculation_type": "fixed",
									"booking_inventory_calculation_amount": "0.00",
									"booking_inventory_per_adult": "0.00",
									"booking_inventory_per_child": "0.00",
									"booking_inventory_per_infant": "0.00",
									"booking_inventory_per_animal": "0.00",
									"booking_inventory_guest_visible": "1",
									"booking_inventory_travel_agent_commission": "0",
									"booking_inventory_include_in_stay_cost": "1",
									"booking_inventory_include_in_deposit": "0",
									"booking_inventory_include_in_payment_plan": "1",
									"booking_inventory_disburse_to_owners": "0",
									"booking_inventory_refundable": "1",
									"booking_inventory_daytype": "every_qualifying_day",
									"booking_inventory_interval": "day",
									"booking_inventory_interval_multiplier": "0",
									"booking_inventory_interval_limit": "0",
									"booking_inventory_daysofweek": [
										"tuesday",
										"wednesday",
										"friday"
									],
									"booking_inventory_ignore_other_tariffs": "0",
									"booking_inventory_ignore_period_from": "0",
									"booking_inventory_ignore_period_to": "1",
									"booking_inventory_discounts_apply": "1",
									"quote_inventory_item_type": "charges",
									"quote_inventory_fixed_commission": null,
									"quote_inventory_guest_visible": "1",
									"subscription_item_type": "charges",
									"subscription_interval": "week",
									"subscription_interval_multiplier": "1",
									"subscription_length": "week",
									"subscription_length_multiplier": "0",
									"subscription_invoice_description": "",
									"subscription_invoice_system_template_id": null,
									"subscription_invoice_email_template_id": null,
									"subscription_create_task_type_id": null,
									"subscription_create_task_created_for": null,
									"subscription_create_task_description": "",
									"subscription_generate_invoice": "1",
									"subscription_crm_membership": "0",
									"subscription_crm_membership_type": null,
									"subscription_minimum_membership_points": null,
									"subscription_crm_purchase": "0",
									"appointment_available_from": null,
									"appointment_available_to": null,
									"appointment_opening_time": null,
									"appointment_closing_time": null,
									"appointment_buffer_before": "0",
									"appointment_buffer_after": "0",
									"appointment_duration": "0",
									"appointment_active": "0",
									"appointment_max_adults": null,
									"appointment_max_children": null,
									"appointment_max_infants": null,
									"appointment_max_animals": null,
									"appointment_per_adult": "0.00",
									"appointment_per_child": "0.00",
									"appointment_per_infant": "0.00",
									"appointment_per_animal": "0.00",
									"appointment_group_description": "",
									"appointment_group_display_order": "0",
									"hire_per_adult": "5.00",
									"hire_per_child": "2.50",
									"hire_per_infant": "0.00",
									"hire_per_animal": "0.00",
									"hire_interval": "once",
									"hire_interval_multiplier": "0",
									"hire_travel_agent_commission": "0",
									"online_product_active": "0",
									"online_product_match_occupants": "0",
									"online_product_daytype": "once",
									"online_product_interval": "day",
									"online_product_interval_multiplier": "1",
									"online_product_daysofweek": [],
									"online_product_ignore_period_from": "0",
									"online_product_ignore_period_to": "1",
									"online_product_per_adult": "0.00",
									"online_product_per_child": "0.00",
									"online_product_per_infant": "0.00",
									"online_product_per_animal": "0.00",
									"online_product_period_from": null,
									"online_product_period_to": null,
									"online_product_default_qty": "0",
									"online_product_minimum_qty": "0",
									"online_product_maximum_qty": "0",
									"online_product_group_description": "",
									"online_product_group_display_order": "0",
									"tax_free": "1",
									"additional_information": "",
									"cost_price": "0.00",
									"image_uri": "",
									"barcode": "",
									"section_code": "",
									"stock_control": "0",
									"use_stock_serials": "0",
									"low_stock_threshold": null,
									"push_to_pos": "0",
									"default_discount_id": null,
									"active": "1",
									"images": [],
									"online_category_restrictions": [],
									"gl_account_code": null,
									"cpi_increases": [
										{
											"id": "1",
											"inventory_item_id": "264",
											"date": "2024-04-05",
											"amount": "10.00",
											"type": "fixed_amount",
											"added_by": "2",
											"added_when": "2024-04-05 09:22:04",
											"completed_when": null
										},
										{
											"id": "19",
											"inventory_item_id": "264",
											"date": "2024-05-10",
											"amount": "10.00",
											"type": "dec_percentage",
											"added_by": "-10",
											"added_when": "2024-04-19 10:30:00",
											"completed_when": null
										}
									]
								}
							},
							"message": "",
							"data_total": "17",
							"data_limit": "10",
							"data_offset": "0",
							"data_count": "1"
						}
					
				
AnchorInventory Items: Create

Create a new Inventory Item.

Request Notes:

The following parameters are required:

  • name (string) is required
  • amount (float) is required

The following parameters are optional:

  • description (string)
  • cost_price (float)
  • tax_free (boolean)
  • push_to_pos (boolean)
  • active (boolean)
  • gl_category_id (null | int)
  • gl_account_id (null | int)
  • category_id (null | int)
  • repeat_charge_interval_multiplier (boolean)
  • repeat_charge_interval (string) must be from the following list:
    • day
    • week
    • month
    • year
  • repeat_charge_type (string) must be from the following list:
    • charges
    • credits
  • repeat_charge_prorata_end (boolean)
  • repeat_charge_guest_visible (boolean)
  • repeat_charge_travel_agent_commission (boolean)
  • repeat_charge_include_in_stay_cost (boolean)
  • repeat_charge_booking_market_segment_id (int)
  • booking_inventory_item_type (string) must be from the following list:
    • charges
    • credits
  • booking_inventory_per_adult (float)
  • booking_inventory_per_child (float)
  • booking_inventory_per_infant (float)
  • booking_inventory_per_animal (float)
  • booking_inventory_daytype (string) must be from the following list:
    • once
    • every_qualifying_day
    • every_interval
  • booking_inventory_interval (string) must be from the following list:
    • day
    • week
    • month
    • year
  • booking_inventory_interval_multiplier (int)
  • booking_inventory_interval_limit (string)
  • booking_inventory_daysofweek (array) must be an array containing zero or more lower case day names:
    • monday
    • tuesday
    • wednesday
    • thursday
    • friday
    • saturday
    • sunday
  • booking_inventory_guest_visible (boolean)
  • booking_inventory_travel_agent_commission (boolean)
  • booking_inventory_include_in_stay_cost (boolean)
  • booking_inventory_include_in_deposit (boolean)
  • booking_inventory_include_in_payment_plan (boolean)
  • booking_inventory_discounts_apply (boolean)
  • booking_inventory_refundable (boolean)
  • booking_inventory_ignore_period_from (boolean)
  • booking_inventory_ignore_period_to (boolean)
  • hire_interval_multiplier (int)
  • hire_interval (string) must be from the following list:
    • once
    • minute
    • hour
    • day
    • week
    • month
    • year
  • hire_per_adult (float)
  • hire_per_child (float)
  • hire_per_infant (float)
  • hire_per_animal (float)
  • hire_travel_agent_commission (boolean)
  • barcode (string)
  • section_code (string)
  • new_cpi_increases (array) an array of objects for each scheduled price increase/decrease

    The type parameter must be from the following list:

    • fixed_amount: Set new Fixed Amount
    • inc_fixed_amount: Increase by Fixed Amount
    • dec_fixed_amount: Decrease by Fixed Amount
    • inc_percentage: Increase by Percentage
    • dec_percentage: Decrease by Percentage

    						
    							[
    								{
    									"date": "2024-04-19",
    									"amount": "25.00",
    									"type": "fixed_amount"
    								},
    								{
    									"date": "2024-05-19",
    									"amount": "10.00",
    									"type": "dec_percentage"
    								}
    							]
    						
    					

Inventory Items: Create Example

Request URL

https://api.newbook.cloud/rest/inventory_items_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "Fishing Tour",
							"description": "Few go out and fewer return. Good luck on your next fishing adventure!",
							"amount": "249.95",
							"cost_price": "0.00",
							"tax_free": "0",
							"push_to_pos": "0",
							"active": "1",
							"category_id": "1",
							"gl_category_id": "2",
							"gl_account_id": "16",
							"repeat_charge_interval_multiplier": "1",
							"repeat_charge_interval": "week",
							"repeat_charge_type": "charges",
							"repeat_charge_prorata_end": "1",
							"repeat_charge_guest_visible": "1",
							"repeat_charge_travel_agent_commission": "1",
							"repeat_charge_include_in_stay_cost": "1",
							"repeat_charge_booking_market_segment_id": "1",
							"booking_inventory_item_type": "charges",
							"booking_inventory_per_adult": "0.00",
							"booking_inventory_per_child": "0.00",
							"booking_inventory_per_infant": "0.00",
							"booking_inventory_per_animal": "0.00",
							"booking_inventory_daytype": "once",
							"booking_inventory_interval": "week",
							"booking_inventory_interval_multiplier": "1",
							"booking_inventory_interval_limit": "0",
							"booking_inventory_daysofweek": [
								"monday",
								"tuesday"
							],
							"booking_inventory_guest_visible": "1",
							"booking_inventory_travel_agent_commission": "0",
							"booking_inventory_include_in_stay_cost": "1",
							"booking_inventory_include_in_deposit": "0",
							"booking_inventory_include_in_payment_plan": "1",
							"booking_inventory_discounts_apply": "1",
							"booking_inventory_refundable": "1",
							"booking_inventory_ignore_period_from": "0",
							"booking_inventory_ignore_period_to": "1",
							"hire_interval_multiplier": "1",
							"hire_interval": "hour",
							"hire_per_adult": "25.00",
							"hire_per_child": "10.00",
							"hire_per_infant": "0.00",
							"hire_per_animal": "0.00",
							"hire_travel_agent_commission": "0",
							"barcode": "A12345",
							"section_code": "POS",
							"new_cpi_increases": [
								{
									"date": "2024-04-26",
									"amount": "5.00",
									"type": "inc_percentage"
								},
								{
									"date": "2024-05-19",
									"amount": "15.00",
									"type": "dec_percentage"
								}
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								 {
									"inventory_item_id": "123"
								}
							],
							"message": ""
						}
					
				
AnchorInventory Items: Get

Retrieve an existing Inventory Item record.

Request Notes:

inventory_item_id must be provided to retrieve the details of a particular Inventory Item.

Response Notes:

The returned data from this request is identical to Inventory Items: List but for a specific Inventory Item alone.

If no such Inventory Item exists, the success response parameter will be "false" and no data will be returned.

Inventory Items: Get Example

Request URL

https://api.newbook.cloud/rest/inventory_items_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"inventory_item_id": "12"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "12",
								"category_id": null,
								"gl_category_id": "1",
								"gl_account_id": "14",
								"name": "Upgrade/Extension",
								"description": "",
								"amount": "0.00",
								"unit_amount": "1.00",
								"unit_type": "",
								"unit_category_id": null,
								"repeat_charge_type": "charges",
								"repeat_charge_interval": "week",
								"repeat_charge_interval_multiplier": "1",
								"repeat_charge_guest_visible": "1",
								"repeat_charge_travel_agent_commission": "1",
								"repeat_charge_include_in_stay_cost": "1",
								"repeat_charge_disburse_to_owners": "0",
								"repeat_charge_prorata_end": "1",
								"repeat_charge_booking_market_segment_id": null,
								"booking_inventory_item_type": "charges",
								"booking_inventory_calculation_type": "fixed",
								"booking_inventory_calculation_amount": "0.00",
								"booking_inventory_per_adult": "0.00",
								"booking_inventory_per_child": "0.00",
								"booking_inventory_per_infant": "0.00",
								"booking_inventory_per_animal": "0.00",
								"booking_inventory_guest_visible": "1",
								"booking_inventory_travel_agent_commission": "1",
								"booking_inventory_include_in_stay_cost": "1",
								"booking_inventory_include_in_deposit": "0",
								"booking_inventory_include_in_payment_plan": "1",
								"booking_inventory_disburse_to_owners": "0",
								"booking_inventory_refundable": "1",
								"booking_inventory_daytype": "once",
								"booking_inventory_interval": "week",
								"booking_inventory_interval_multiplier": "1",
								"booking_inventory_interval_limit": "0",
								"booking_inventory_daysofweek": [
									"monday",
									"thursday"
								],
								"booking_inventory_ignore_other_tariffs": "0",
								"booking_inventory_ignore_period_from": "0",
								"booking_inventory_ignore_period_to": "1",
								"booking_inventory_discounts_apply": "1",
								"quote_inventory_item_type": "charges",
								"quote_inventory_fixed_commission": null,
								"quote_inventory_guest_visible": "1",
								"subscription_item_type": "charges",
								"subscription_interval": "week",
								"subscription_interval_multiplier": "1",
								"subscription_length": "week",
								"subscription_length_multiplier": "0",
								"subscription_invoice_description": "",
								"subscription_invoice_system_template_id": null,
								"subscription_invoice_email_template_id": null,
								"subscription_create_task_type_id": null,
								"subscription_create_task_created_for": null,
								"subscription_create_task_description": "",
								"subscription_generate_invoice": "1",
								"subscription_crm_membership": "0",
								"subscription_crm_membership_type": null,
								"subscription_minimum_membership_points": null,
								"subscription_crm_purchase": "0",
								"appointment_available_from": null,
								"appointment_available_to": null,
								"appointment_opening_time": null,
								"appointment_closing_time": null,
								"appointment_buffer_before": "0",
								"appointment_buffer_after": "0",
								"appointment_duration": "0",
								"appointment_active": "0",
								"appointment_max_adults": null,
								"appointment_max_children": null,
								"appointment_max_infants": null,
								"appointment_max_animals": null,
								"appointment_per_adult": "0.00",
								"appointment_per_child": "0.00",
								"appointment_per_infant": "0.00",
								"appointment_per_animal": "0.00",
								"appointment_group_description": "",
								"appointment_group_display_order": "0",
								"hire_per_adult": "0.00",
								"hire_per_child": "0.00",
								"hire_per_infant": "0.00",
								"hire_per_animal": "0.00",
								"hire_interval": "once",
								"hire_interval_multiplier": "1",
								"hire_travel_agent_commission": "0",
								"online_product_active": "0",
								"online_product_match_occupants": "0",
								"online_product_daytype": "once",
								"online_product_interval": "day",
								"online_product_interval_multiplier": "1",
								"online_product_daysofweek": [],
								"online_product_ignore_period_from": "0",
								"online_product_ignore_period_to": "1",
								"online_product_per_adult": "0.00",
								"online_product_per_child": "0.00",
								"online_product_per_infant": "0.00",
								"online_product_per_animal": "0.00",
								"online_product_period_from": null,
								"online_product_period_to": null,
								"online_product_default_qty": "0",
								"online_product_minimum_qty": "0",
								"online_product_maximum_qty": "0",
								"online_product_group_description": "",
								"online_product_group_display_order": "0",
								"tax_free": "0",
								"additional_information": "",
								"cost_price": "0.00",
								"image_uri": "",
								"barcode": "",
								"section_code": "",
								"stock_control": "0",
								"use_stock_serials": "0",
								"low_stock_threshold": "0",
								"push_to_pos": "0",
								"default_discount_id": null,
								"active": "1",
								"images": [
								    "https://drive.newbook.cloud/instances_41fec316f6a4227025f124211f3d875f_587ee7c1c0050.png"
								],
								"online_category_restrictions": [],
								"gl_account_code": "6000",
								"cpi_increases": [
									{
										"id": "19",
										"inventory_item_id": "12",
										"date": "2024-04-26",
										"amount": "17.00",
										"type": "dec_percentage",
										"added_by": "-10",
										"added_when": "2024-04-19 08:30:00",
										"completed_when": null
									},
									{
										"id": "13",
										"inventory_item_id": "12",
										"date": "2024-05-31",
										"amount": "5.00",
										"type": "dec_percentage",
										"added_by": "-10",
										"added_when": "2024-04-19 13:35:00",
										"completed_when": null
									}
								]
							},
							"message": ""
						}
					
				
AnchorInventory Items: Update

Update an Inventory Item.

Request Notes:

inventory_item_id is required to advise which Inventory Item you are updating.

All other parameters are optional, and are defined in Inventory Items: Create.

  • cpi_increases (array) can also be provided to remove or update existing CPI Increases.
    						
    							[
    								{
    									"id": 4,
    									"remove": true
    								},
    								{
    									"id": 5,
    									"date": "2024-05-19",
    									"amount": "10.00",
    									"type": "fixed_amount"
    								}
    							]
    						
    					

Inventory Items: Update Example

Request URL

https://api.newbook.cloud/rest/inventory_items_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"inventory_item_id": "12",
							"name": "Demo #2",
							"cpi_increases": [
								{
									"id": "13",
									"remove": true
								},
								{
									"id": "19",
									"date": "2024-04-22",
									"amount": "25.00",
									"type": "fixed_amount"
								}
							],
							"new_cpi_increases": [
								{
									"date": "2024-04-25",
									"amount": "10.00",
									"type": "dec_percentage"
								}
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"inventory_item_id": "12"
							},
							"message": ""
						}
					
				
AnchorGuests: List

Retrieve/search the Guest database.

Request Notes:

search is optional and when provided it will restrict the results to the matching Guests. It will search their name, contact details (phone, email, etc) and membership details for a match

account_id is optional and when provided it will restrict the results to the matching Client Accounts.

membership_type and membership_number can optionally be provided to search for Guests with particular membership details

membership_type when provided must match one of the ID values from a Memberships: List request

created_when is optional and when provided, restricts the returned Guests to only those which were created on the date given

staff_id is optional and when provided, restricts the returned Leads to those assigned to that User (see Users: List)

sort_ascending is optional and when provided as true, sorts the Guests by ID ascending. Defaults to false (sort the Guests by ID descending).

show_inactive_equipment (boolean) Send as true to include inactive Guest Equipment in the response.

Send account_breakdown as true to see the balance of each associated Sub Client Account (gl_category)

  • This feature is only available on CRMs
  • You can provide staff_id_include as false to show Leads not assigned to that User
  • If you provide unassigned into the request parameter staff_id Leads that are unassigned will be returned
  • staff_id can be an array of User IDs

client_account_tax_reconciliation can optionally be provided as true to include the amount of tax based on the reconciliation of payments / refunds. The below client_account_item_breakdown will also need to be provided as true for this to function.

client_account_booking_details can optionally be provided as true to include Booking details for Charges and Credits. The below client_account_item_breakdown will also need to be provided as true for this to function.

client_account_item_breakdown can optionally be provided as true to include all accounting items saved on the Guest Client Account in the Guest response. Please see the Guests: Get request for an example of the response data.

display_guest_activities can optionally be provided as true to include the Guests Activity Tickets in the Guest response. display_cancelled_guest_activities can also be provided to include Cancelled Activity Tickets. Please see the Guests: Get request for an example of the Guest Activity response data.

display_guest_facility_hires can optionally be provided as true to include the Guests Facility Hires in the Guest response. display_cancelled_guest_facility_hires can also be provided to include Cancelled Facility Hires. Please see the Guests: Get request for an example of the Guest Facility Hire response data.

Response Notes:

contact_details, custom_fields and membership_details are arrays which will be empty when no data of that type is available

The membership expiry_date can optionally be null when no date is available

The membership service_id and level can optionally be null when no Membership Service or Membership Service Level are connected to the Membership.

The Equipment array returned has the data of all the equipment related to the guest. It returns an empty array if the guest has no equipment

title can be any string; Newbook does not restrict users to specific titles for Guests

contact_details

  • allow_transactional: Guest allows general contact related to Bookings or accounts
  • allow_marketing: Guest allows marketing contact such as newsletters

staff_id and staff_sharing will only be returned for CRM clients

account_id will be null when the Instance is part of a Shared Guest Database and there has been no Guest Activity at this particular Instance.

period_from can be optionally provided to limit the response to Guests created/modified after the specified timestamp

period_to can be optionally provided to limit the response to Guests created/modified after the specified timestamp

Guests: List Example

Request URL

https://api.newbook.cloud/rest/guests_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"search": "John Doe",
											"created_when": "2016-02-01"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"title": "Mr",
												"firstname": "John",
												"lastname": "Doe",
												"othername": "",
												"gender": null,
												"date_of_birth": null,
												"company_id": null,
												"company_name": null,
												"date_created": "2024-04-18 11:30:00",
												"modified_when": "2024-04-18 00:00:00",
												"last_note_when": "2024-04-18 00:00:00",
												"blacklisted_when": "2024-04-19 00:00:00",
												"vip_when": null,
												"account_id": "13783",
												"account_balance": "15.00",
												"auto_billing_limit": null,
												"staff_id": "1",
												"staff_sharing": [{
													"staff_id": "1",
													"ownership": "50.00"
												},
												{
													"staff_id": "2",
													"ownership": "50.00"
												}],
												"street": "Level 2, 9 Ouyan Street",
												"city": "Surfers Paradise",
												"state": "Queensland (QLD)",
												"postcode": "4217",
												"country": "Australia",
												"contact_details": [{
													"id": 1,
													"type": "phone",
													"content": "0756554600",
													"notes": "",
													"allow_transactional": "1",
													"allow_marketing": "1"
												},{
													"id": 2,
													"type": "email",
													"content": "john.doe@test.com",
													"notes": "",
													"allow_transactional": "1",
													"allow_marketing": "0"
												}],
												"custom_fields": [{
													"id": 1,
													"type": "text",
													"label": "My Test Field",
													"value": "Something"
												}],
												"membership_details": [{
													"type": "Testing Service",
													"type_id": "2",
													"service_id": 4,
													"level": null,
													"content": "1234567",
													"expiry_date": "2025-01-19"
												}],
												"equipment": [
													{
														"equipment_id": "26",
														"equipment_name": "My Honda",
														"equipment_make": "Honda",
														"equipment_model": "Accord",
														"equipment_type_id": "1",
														"equipment_type_name": "car",
														"equipment_length": "5.00",
														"equipment_width": "2.00",
														"equipment_height": "2.00",
														"equipment_registration": "222ABC",
														"equipment_registration_expiry": "2025-01-19",
														"active": "1"
													}
												],
												"dietary_requirements": [
													"1",
													"2"
												],
												"notes": [{
													"id": "1",
													"type_id": "1",
													"content": "This is my Guest note",
													"created_when": "2024-04-18 11:30:00",
													"created_by": "11",
													"updated_when": "2024-04-19 00:00:00",
													"updated_by": "5"
												}]
											}],
											"message": ""
										}
									
								
AnchorGuests: Create

Create a Guest to use for placing Bookings, Availability Emails, Online Logins, and more.

Request Notes:

firstname and lastname are required. All other parameters are optional but recommended for greater data capture.

contact_email and contact_phone can be provided to create or update Contact Details for a Guest. When updating, these values will also check & not double up if the new information already exists on the Guest. And if you would like to prevent the updating of existing Contact Details please provide update_existing_details as "false".

Alternatively you can manage the Contact Details in more depth as an array:

				
					"contact_details": [
						{
							"id": 1,
							"type": "phone",
							"content": "0756554600",
							"notes": "Office landline",
							"allow_transactional": "1",
							"allow_marketing": "1",
							"remove": 0
						},
						{
							"id": 2,
							"type": "email",
							"content": "support@newbook.cloud",
							"notes": "Work email address",
							"allow_transactional": "1",
							"allow_marketing": "0",
							"remove": 0
						}
					]
				
			
  • id can be optionally provided when updating a Guest to update or remove a particular Contact Detail
  • type is required
  • content is required
  • notes is optional
  • allow_transactional is optional and will default to true when not provided
  • allow_marketing is optional and will use the Instance Setting Default when not provided
  • remove is optional and when true it will remove the Contact Detail from the Guest

notes will add new details to the Guest (not replace the existing information) and will check & not double up if the new information already exists on the Guest. This can either be provided as a string, or as array of objects containing the following options:

  • content is required and should contain the content of the note to be added
  • type_id is optional and will use the System Default if not provided as per the Note Types: List request
  • output_message is optional and will default to true when not provided. This controls whether the note will display at the top of the page.
  • task_list is optional and will default to false when note provided. This controls whether the note will display on any tasks lists.

membership_type and membership_number (and optionally membership_expiry as YYYY-MM-DD) can be provided to create a Membership for the Guest. When updating, these values will also check & not double up if the new information already exists on the Guest (based on membership_type).

Alternatively you can manage the memberships array directly:

								
									"membership_details": [
										{
											"id": 1,
											"type_id": 2,
											"content": "1234567",
											"expiry_date": "2025-02-25",
											"remove": 0
										}
									]
								
							
  • id can be optionally provided when updating a Guest to update or remove a particular Membership.
  • type_id is required and must match one of the ID values from a Memberships: List request.
  • content is required. This is the membership number.
  • expiry_date is optional. This is the expiry date of the membership formatted as YYYY-MM-DD.
  • remove is optional.

date_of_birth can optionally be provided as YYYY-MM-DD to store the guests date of birth

duplicate_matching can optionally be provided as one of the following options:

  • false: do not find duplicates
  • name: Name only
  • phone: Phone only
  • email: Email only
  • name_and_phone: Name and Phone
  • name_and_email: Name and Email
  • name_and_email_and_phone: Name and Email and Phone

When not provided, this determination falls back to the Instance Setting called When adding a Guest, Detect Duplicates using, which defaults to name.

If duplicates are encountered, Newbook will automatically update the record of the first duplicate found.

Regarding specifying Equipment:

  • The equipment parameter is optional in creating a guest. However, if provided, it must be in array format, because a guest own multiple equipment as shown in the example request.
  • The following are the parameters for creating equipment for a Guest:
    • equipment_name (required)
    • equipment_make
    • equipment_model
    • equipment_type (must be a number)
    • equipment_length (must be a number)
    • equipment_width (must be a number)
    • equipment_height (must be a number))
    • equipment_registration
    • equipment_registration_expiry
    • active (default true)
  • The equipment are saved onto the Equipment table and linked to the guest. Please note that if the equipment_registration is not specified, a new equipment will be created for the guest

If specified, custom_fields must be based on the response to the Custom Fields request, to retrieve the different Custom Fields set up in the instance:

								
									"custom_fields": [
										{
											"field_id": 2,
											"field_value": 8
										}
									]
								
							

If specified, dietary_requirements can be provided based on the response to Dietary Requirements request.

To create a new Online Login for this Guest (optional)

online_username and online_password are required to create an Online User for this Guest. Note that online_username must be an email address. If the provided online_username already exists, the whole guests_create request will fail saying the provided online_username is already in use. Newbook implements password complexity requirements: at least 8 characters, at least one upper case letter, at least one lower case letter, and at least one number.

Response Notes:

The returned data from this request is identical to Guests: List but for the newly created Guest alone

Guests: Create Example

Request URL

https://api.newbook.cloud/rest/guests_create

Request JSON
									
										{
		"region": "your_region_here",
		"api_key": "your_api_key_here",
		"firstname": "John",
		"lastname": "Doe",
		"street": "Level 2, 9 Ouyan Street",
		"city": "Surfers Paradise",
		"state_name": "QLD",
		"postcode": "4217",
		"country_name": "Australia",
		"contact_phone": "0756554600",
		"contact_email": "john.doe@test.com",
		"notes": "Some notes",
		"membership_type": "2",
		"membership_number": "1234567",
		"membership_expiry": "2025-01-19",
		"date_of_birth": "1980-03-25",
		"equipment": [
			{
				"equipment_name": "My Honda",
				"equipment_make": "Honda",
				"equipment_model": "Accord",
				"equipment_type": "1",
				"equipment_length": "5",
				"equipment_width": "2",
				"equipment_height": "2",
				"equipment_registration": "222ABC",
				"equipment_registration_expiry": "2024-04-20"
			},
			{
				"equipment_name": "My Toyota",
				"equipment_make": "Toyota",
				"equipment_model": "Camry",
				"equipment_type": "1",
				"equipment_length": "4",
				"equipment_width": "2",
				"equipment_height": "1"
			}
		]
	}									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"id": "1",
												"title": "Mr",
												"firstname": "John",
												"lastname": "Doe",
												"othername": "",
												"gender": null,
												"date_of_birth": null,
												"company_id": null,
												"company_name": null,
												"date_created": "2024-04-18 11:30:00",
												"modified_when": "2024-04-18 00:00:00",
												"last_note_when": "2024-04-18 00:00:00",
												"blacklisted_when": "2024-04-19 00:00:00",
												"vip_when": null,
												"account_id": "13783",
												"account_balance": "15.00",
												"auto_billing_limit": null,
												"staff_id": "1",
												"staff_sharing": [{
													"staff_id": "1",
													"ownership": "50.00"
												},
												{
													"staff_id": "2",
													"ownership": "50.00"
												}],
												"street": "Level 2, 9 Ouyan Street",
												"city": "Surfers Paradise",
												"state": "Queensland (QLD)",
												"postcode": "4217",
												"country": "Australia",
												"contact_details": [{
													"id": 1,
													"type": "phone",
													"content": "0756554600",
													"notes": "",
													"allow_transactional": "1",
													"allow_marketing": "1"
												},{
													"id": 2,
													"type": "email",
													"content": "john.doe@test.com",
													"notes": "",
													"allow_transactional": "1",
													"allow_marketing": "0"
												}],
												"custom_fields": [{
													"id": 1,
													"type": "text",
													"label": "My Test Field",
													"value": "Something"
												}],
												"membership_details": [{
													"type": "Testing Service",
													"type_id": "2",
													"service_id": 4,
													"level": null,
													"content": "1234567",
													"expiry_date": "2025-01-19"
												}],
												"equipment": [
													{
														"equipment_id": "26",
														"equipment_name": "My Honda",
														"equipment_make": "Honda",
														"equipment_model": "Accord",
														"equipment_type_id": "1",
														"equipment_type_name": "car",
														"equipment_length": "5.00",
														"equipment_width": "2.00",
														"equipment_height": "2.00",
														"equipment_registration": "222ABC",
														"equipment_registration_expiry": "2025-01-19",
														"active": "1"
													}
												],
												"dietary_requirements": [
													"1",
													"2"
												],
												"notes": [{
													"id": "1",
													"type_id": "1",
													"content": "This is my Guest note",
													"created_when": "2024-04-18 11:30:00",
													"created_by": "11",
													"updated_when": "2024-04-19 00:00:00",
													"updated_by": "5"
												}],
												"account_breakdown": [{
													"name": "Accommodation",
													"gl_category_id": "1",
													"balance": "7.00"
												},{
													"name": "Extras",
													"gl_category_id": "2",
													"balance": "8.00"
												}]
											},
											"message": "Created Guest"
										}
									
								
AnchorGuests: Get

Retrieve an existing Guest record.

Request Notes:

  • guest_id or account_id (integer) must be provided to retrieve the details of a particular Guest.
  • show_inactive_equipment (boolean) Send as true to include inactive Guest Equipment in the response.
  • account_breakdown (boolean) Send as true to see the balance of each associated Sub Client Account (gl_category)
  • client_account_tax_reconciliation (boolean) can optionally be provided as true to include the amount of tax based on the reconciliation of payments / refunds. The below client_account_item_breakdown will also need to be provided as true for this to function.
  • client_account_booking_details can optionally be provided as true to include Booking details for Charges and Credits. The below client_account_item_breakdown will also need to be provided as true for this to function.

  • client_account_item_breakdown can optionally be provided as true to include all accounting items saved on the Guest Client Account in the Guest response.

Example response when client_account_item_breakdown is true:

								
									{
										"charges": [
											{
												"id": "3062",
												"account_id": "1796594",
												"gl_category_id": "1",
												"gl_account_id": "32",
												"description": "Standard Rate (2024-04-19)",
												"amount": 100,
												"tax_free": "0",
												"generated_by": "1",
												"generated_when": "2024-04-19 11:30:00",
												"inventory_item_id": null,
												"voided_by": "0",
												"voided_when": null,
												"link_type": "tariffs_quoted",
												"link_type_id": "123",
												"link_period_from": "2024-04-19",
												"link_period_to": "2024-04-19",
												"taxes": [
													{
														"tax_id": 1,
														"tax_name": "GST",
														"tax_inclusive": true,
														"tax_amount": "9.09"
													}
												]
											}
										],
										"credits": [
											{
												"id": "4351",
												"account_id": "1796594",
												"gl_category_id": "1",
												"gl_account_id": "32",
												"description": "Discount",
												"amount": 5,
												"tax_free": "0",
												"generated_by": "1",
												"generated_when": "2024-04-19 11:30:00",
												"inventory_item_id": null,
												"voided_by": "0",
												"voided_when": null,
												"link_type": "discounts_quoted",
												"link_type_id": "1024",
												"link_period_from": "2024-04-19",
												"link_period_to": "2024-04-19",
												"taxes": [
													{
														"tax_id": 1,
														"tax_name": "GST",
														"tax_inclusive": true,
														"tax_amount": 0.45
													}
												]
											}
										],
										"payments": [
											{
												"id": "2",
												"account_id": "1796594",
												"gl_category_id": "1",
												"paid_by": "135576",
												"transaction_method": "manual",
												"transaction_id": null,
												"disbursed_booking_id": null,
												"disbursed_gl_account_id": null,
												"description": "Accommodation",
												"amount": 100,
												"tendered": 100,
												"type": "cash",
												"type_id": "4",
												"type_reference": "",
												"deposit": "0",
												"generated_by": "1",
												"generated_when": "2024-04-19",
												"voided_by": "0",
												"voided_when": null,
												"credits": [],
												"charges": [
													{
														"link_id": 1,
														"charge_id": 3062,
														"reconciled_amount": 100,
														"timestamp": "2024-04-19",
														"voided_when": null
													}
												]
											}
										],
										"refunds": [
											{
												"id": "2",
												"account_id": "1796594",
												"gl_category_id": "1",
												"refunded_to": "135576",
												"transaction_method": "manual",
												"transaction_id": null,
												"disbursed_booking_id": null,
												"disbursed_gl_account_id": null,
												"description": "Refunding Discount Overpayment",
												"amount": 5,
												"tendered": 5,
												"type": "cash",
												"type_id": "4",
												"type_reference": "",
												"generated_by": "1",
												"generated_when": "2024-04-19",
												"voided_by": "0",
												"voided_when": null,
												"credits": [
													{
														"link_id": 1,
														"credit_id": 4351,
														"reconciled_amount": 5,
														"timestamp": "2024-04-19",
														"voided_when": null
													}
												],
												"payments": []
											}
										]
									}
								
							

display_guest_activities can optionally be provided as true to include the Guests Activity Tickets in the Guest response. display_cancelled_guest_activities can also be provided to include Cancelled Activity Tickets.

e.g.

								
									{
		"activities": [
			{
				"ticket_id": 8,
				"activity_id": 2,
				"name": "Golf",
				"duration": "7",
				"duration_interval": "day",
				"facility_id": null,
				"facility_name": null,
				"facility_category_id": null,
				"facility_category_name": null,
				"configuration_name": "Golf - 18 Holes",
				"id": 8,
				"period_from": "2024-04-23 09:00:00",
				"period_to": "2024-04-23 11:00:00",
				"activity_configuration_id": 2,
				"for": "guests",
				"for_id": 1,
				"adults": 2,
				"children": 0,
				"infants": 0,
				"animals": 0,
				"configuration_included_adults": null,
				"configuration_included_children": null,
				"configuration_included_infants": null,
				"configuration_included_animals": null,
				"inventory_item_id": 11,
				"account_id": null,
				"gl_category_id": 1,
				"gl_account_id": 1,
				"description": "Golf - 18 holes of golf",
				"interval": "once",
				"interval_multiplier": "1",
				"amount": 0,
				"per_adult": 80,
				"per_child": 40,
				"per_infant": 0,
				"per_animal": 0,
				"tax_free": "0",
				"cancelled_when": null,
				"cancelled_by": null,
				"created_when": "2024-04-12 11:32:00",
				"created_by": "-2",
				"for_name": "John Doe",
				"booking_site_id": null,
				"booking_site_name": null,
				"booking_category_id": null,
				"booking_category_name": null,
				"inventory_items": [
					{
						"ticket_id": "8",
						"inventory_item_id": null,
						"gl_category_id": null,
						"gl_account_id": null,
						"description": "Cart Hire",
						"interval": "once",
						"interval_multiplier": "0",
						"amount": "45.00",
						"per_adult": "0.00",
						"per_child": "0.00",
						"per_infant": "0.00",
						"per_animal": "0.00",
						"tax_free": "0",
						"guest_visible": "1",
						"charge_id": "351"
					}
				],
				"units": 1,
				"calculated_total": 205,
				"total_paid": 0,
				"payment_status": "Unpaid",
				"access_codes": [],
				"custom_fields": [],
				"payment_plans": []
			}
		]
	}								
							

display_guest_facility_hires can optionally be provided as true to include the Guests Facility Hires in the Guest response. display_cancelled_guest_facility_hires can also be provided to include Cancelled Facility Hires.

e.g.

								
									{
		"facilities_hire": [
			{
				"id": "2",
				"facility_id": "2",
				"period_from": "2024-04-23 12:00:00",
				"period_to": "2024-04-23 13:00:00",
				"length": "1 hour",
				"amount": "55.00",
				"per_adult": "0.00",
				"per_child": "0.00",
				"per_infant": "0.00",
				"per_animal": "0.00",
				"tax_free": "0",
				"adults": "1",
				"children": "0",
				"infants": "0",
				"animals": "0",
				"hire_account_for_id": "51",
				"hire_account_for_name": "John Doe",
				"hire_account_for": "guests",
				"hire_account_balance": "0.00",
				"billing_account_for_id": "51",
				"billing_account_for_name": "John Doe",
				"billing_account_for": "guests",
				"billing_account_balance": "55.00",
				"inventory_item_id": "2",
				"gl_category_id": "1",
				"gl_account_id": "9",
				"description": "Kayak Hire",
				"override_tax_rate_ids": [],
				"units": 1
			}
		]
	}								
							

Example Booking Detail Attributes on charges, credits, payments, refunds when client_account_booking_details is true.

e.g.

								
									{
										"guest_visible": "1",
										"discounts_apply": "1",
										"booking_id": "1234",
										"booking_name": "John Doe",
										"booking_status": "Confirmed",
										"booking_site_id": "2",
										"booking_period_from": "2024-04-19 11:30:00",
										"booking_period_to": "2024-04-20 14:00:00",
										"booking_reference_id": "",
										"activity_booked_id": null
									}
								
							

Response Notes:

The returned data from this request is identical to Guests: List but for the specific Guest alone

If no such Guest exists, the success response parameter will be "false" and no data will be returned.

Guests: Get Example

Request URL

https://api.newbook.cloud/rest/guests_get

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"guest_id": "1",
											"account_breakdown": true
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"id": "1",
												"title": "Mr",
												"firstname": "John",
												"lastname": "Doe",
												"othername": "",
												"gender": null,
												"date_of_birth": null,
												"company_id": null,
												"company_name": null,
												"date_created": "2024-04-18 11:30:00",
												"modified_when": "2024-04-18 00:00:00",
												"last_note_when": "2024-04-18 00:00:00",
												"blacklisted_when": "2024-04-19 00:00:00",
												"vip_when": null,
												"account_id": "13783",
												"account_balance": "15.00",
												"auto_billing_limit": null,
												"staff_id": "1",
												"staff_sharing": [{
													"staff_id": "1",
													"ownership": "50.00"
												},
												{
													"staff_id": "2",
													"ownership": "50.00"
												}],
												"street": "Level 2, 9 Ouyan Street",
												"city": "Surfers Paradise",
												"state": "Queensland (QLD)",
												"postcode": "4217",
												"country": "Australia",
												"contact_details": [{
													"id": 1,
													"type": "phone",
													"content": "0756554600",
													"notes": "",
													"allow_transactional": "1",
													"allow_marketing": "1"
												},{
													"id": 2,
													"type": "email",
													"content": "john.doe@test.com",
													"notes": "",
													"allow_transactional": "1",
													"allow_marketing": "0"
												}],
												"custom_fields": [{
													"id": 1,
													"type": "text",
													"label": "My Test Field",
													"value": "Something"
												}],
												"membership_details": [{
													"type": "Testing Service",
													"type_id": "2",
													"service_id": 4,
													"level": null,
													"content": "1234567",
													"expiry_date": "2025-01-19"
												}],
												"equipment": [
													{
														"equipment_id": "26",
														"equipment_name": "My Honda",
														"equipment_make": "Honda",
														"equipment_model": "Accord",
														"equipment_type_id": "1",
														"equipment_type_name": "car",
														"equipment_length": "5.00",
														"equipment_width": "2.00",
														"equipment_height": "2.00",
														"equipment_registration": "222ABC",
														"equipment_registration_expiry": "2025-01-19",
														"active": "1"
													}
												],
												"dietary_requirements": [
													"1",
													"2"
												],
												"notes": [{
													"id": "1",
													"type_id": "1",
													"content": "This is my Guest note",
													"created_when": "2024-04-18 11:30:00",
													"created_by": "11",
													"updated_when": "2024-04-19 00:00:00",
													"updated_by": "5"
												}],
												"account_breakdown": [{
													"name": "Accommodation",
													"gl_category_id": "1",
													"balance": "7.00"
												},{
													"name": "Extras",
													"gl_category_id": "2",
													"balance": "8.00"
												}]
											},
											"message": ""
										}
									
								
AnchorGuests: Update

Update an existing Guest.

Request Notes:

guest_id or account_id must be provided to update the details of a particular Guest.

All other parameters are optional, please see Guests: Create for more details.

To update an existing Online Login for this Guest (optional):

  • Either online_user_id or online_account_id is required, and can be retrieved using the Online Users: Get request.
  • If you are updating the password for the Online User, Newbook implements password complexity requirements: at least 8 characters, at least one upper case letter, at least one lower case letter, and at least one number.
  • online_username is optional, but if provided must be an email address. If the provided online_username already exists and isn't specifically for this Online User (identified by online_user_id or online_account_id), the whole guests_update request will fail saying the provided online_username is already in use.
  • The Online User for and for_id cannot be updated.

To update an existing Equipment for this Guest (optional):

  • Specify the equipment_id of the existing equipment within the equipment array.
  • Omit equipment_id or set to null to allow creating a new equipment or automatically updating an existing equipment if a duplicate is found based on all possible equipment properties.

Guests: Update Example

Request URL

https://api.newbook.cloud/rest/guests_update

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"guest_id": "1",
											"firstname": "John",
											"lastname": "Doe",
											"street": "Level 2, 9 Ouyan Street",
											"city": "Surfers Paradise",
											"state": "Queensland (QLD)",
											"postcode": "4217",
											"country": "Australia",
											"contact_phone": "0756554600",
											"contact_email": "john.doe@test.com",
											"membership_type": "2",
											"membership_number": "1234567",
											"membership_expiry": "2025-01-19",
											"equipment": [
												{
													"equipment_id": "1",
													"equipment_name": "My Honda",
													"equipment_make": "Honda",
													"equipment_model": "Accord",
													"equipment_type": "1",
													"equipment_length": "5",
													"equipment_width": "2",
													"equipment_height": "2",
													"equipment_registration": "222ABC",
										 			"equipment_registration_expiry": "2024-04-20",
													"active": "1"
												}
											]
											"notes": "Some notes"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"id": "1",
												"title": "Mr",
												"firstname": "John",
												"lastname": "Doe",
												"othername": "",
												"gender": null,
												"date_of_birth": null,
												"company_id": null,
												"company_name": null,
												"date_created": "2024-04-18 11:30:00",
												"modified_when": "2024-04-18 00:00:00",
												"last_note_when": "2024-04-18 00:00:00",
												"blacklisted_when": "2024-04-19 00:00:00",
												"vip_when": null,
												"account_id": "13783",
												"account_balance": "15.00",
												"auto_billing_limit": null,
												"staff_id": "1",
												"staff_sharing": [{
													"staff_id": "1",
													"ownership": "50.00"
												},
												{
													"staff_id": "2",
													"ownership": "50.00"
												}],
												"street": "Level 2, 9 Ouyan Street",
												"city": "Surfers Paradise",
												"state": "Queensland (QLD)",
												"postcode": "4217",
												"country": "Australia",
												"contact_details": [{
													"id": 1,
													"type": "phone",
													"content": "0756554600",
													"notes": "",
													"allow_transactional": "1",
													"allow_marketing": "1"
												},{
													"id": 2,
													"type": "email",
													"content": "john.doe@test.com",
													"notes": "",
													"allow_transactional": "1",
													"allow_marketing": "0"
												}],
												"custom_fields": [{
													"id": 1,
													"type": "text",
													"label": "My Test Field",
													"value": "Something"
												}],
												"membership_details": [{
													"type": "Testing Service",
													"type_id": "2",
													"service_id": 4,
													"level": null,
													"content": "1234567",
													"expiry_date": "2025-01-19"
												}],
												"equipment": [
													{
														"equipment_id": "26",
														"equipment_name": "My Honda",
														"equipment_make": "Honda",
														"equipment_model": "Accord",
														"equipment_type_id": "1",
														"equipment_type_name": "car",
														"equipment_length": "5.00",
														"equipment_width": "2.00",
														"equipment_height": "2.00",
														"equipment_registration": "222ABC",
														"equipment_registration_expiry": "2025-01-19",
														"active": "1"
													}
												],
												"dietary_requirements": [
													"1",
													"2"
												],
												"notes": [{
													"id": "1",
													"type_id": "1",
													"content": "This is my Guest note",
													"created_when": "2024-04-18 11:30:00",
													"created_by": "11",
													"updated_when": "2024-04-19 00:00:00",
													"updated_by": "5"
												}],
												"account_breakdown": [{
													"name": "Accommodation",
													"gl_category_id": "1",
													"balance": "7.00"
												},{
													"name": "Extras",
													"gl_category_id": "2",
													"balance": "8.00"
												}]
											},
											"message": "Updated Guest"
										}
									
								
AnchorGuests: Deletion History

Retrieves a list of Guest ID's that have been deleted from Newbook.

Request Notes:

period_from can be optionally provided to limit the response to Guests deleted after the specified timestamp

period_to can be optionally provided to limit the response to Guests deleted after the specified timestamp

Guests: Deletion History Example

Request URL

https://api.newbook.cloud/rest/guests_deletion_history

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"period_from": "2024-04-18 11:30:00",
											"period_to": "2024-04-20 14:00:00"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [
												{
													"guest_id": 150,
													"deleted_when": "2024-04-18 11:30:00"
												},
												{
													"guest_id": 151,
													"deleted_when": "2024-04-18 11:30:00"
												}
											],
											"message": ""
										}
									
								
AnchorMemberships: List

Pull the list of Memberships from within Newbook.

Request Notes:

name is optional and when provided it will restrict the results to the matching Memberships

Response Notes:

If a discount_id is returned in the data, you can cross reference the result of a Discounts: List request to determine how much of a discount is granted based on the membership

Memberships: List Example

Request URL

https://api.newbook.cloud/rest/memberships_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"name": "test"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "3",
												"name": "Test Membership",
												"description": "Testing 10% off accommodation",
												"membership_service_id": null,
												"membership_service_level_id": null,
												"newbook_loyalty_service_id": null,
												"membership_inventory_item_id": null,
												"enforce_unique": "0",
												"discount_id": null,
												"allow_online": "0",
												"display_order": "0"
											}],
											"message": ""
										}
									
								
AnchorMembership: Purchase

Grant a Membership to one of the connected Membership Types to an existing Guest

Request Notes:

Despite the request name, no purchase transaction or account charging is involved here. This request expects you to have handled that on your side of the integration.

membership_type is required and must match one of the ID values from a Memberships: List request.

Further, only results from the Memberships: List request with a membership_service_id and membership_service_level defined are able to be purchased with this request.

Membership: Purchase Example

Request URL

https://api.newbook.cloud/rest/membership_purchase

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"membership_type": "5",
											"guest_id": "4328"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"member_id": "8",
												"member_expiry": "2025-01-19"
											}],
											"message": ""
										}
									
								
AnchorGuests: Merge

Merge one or more duplicate guests into a primary guest. When a duplicate guest has details not already in the primary guest it will be added. If the primary guest had different existing details then, depending on addtional parameters below, the details will be ignored or added as notes.

Warning, merging a guest cannot be reversed, so please ensure you are merging the correct guests.

Request Notes:

primary_id [number] Provides the primary guest id for the duplicate guests to merged into. This guest will keep its original details.

duplicate_ids [number array] Provides array of guest ids to be merged into the primary guest.

merge_tasks [true|false] Provides single or list of guest ids to be merged into the primary guest.

address_note_type_id [null|int] optional If a Note Type ID is provided then any mismatched address details against the duplicated guest will be added to the primary guest as a note of that type.

custom_fields_note_type_id [null|int] optional If a Note Type ID is provided then any unique custom fields against the duplicated guest will be added to the primary guest as a note of that type.

Guests: Merge Example

Request URL

https://api.newbook.cloud/rest/guests_merge

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"primary_id": 1,
											"duplicate_ids": [2,3,4],
											"merge_tasks": true,
											"address_note_type_id": 1,
											"custom_fields_note_type_id": 1
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {},
											"message": "Successfully merged Guests."
										}
									
								
AnchorMember Transactions: List

Retrieve a list of transactions made by Members, including details such as tax amounts and booking details.
Only transactions related to Bookings where a Guest Membership was used will be returned.

Request Notes:

membership_type_id (int, required) An existing Membership Type ID to retrieve transactions for.

period_from (datetime, defaults to today).

period_to (datetime, defaults to today).

transaction_types (array, one or more of charges/credits/payments/refunds, defaults to all).

include_booking_details (boolean, defaults to true) This can be optionally provided and set as false to limit results to not show the booking details.

include_taxes (boolean, defaults to false) This can be optionally provided to include the tax amounts of each transaction.

booking_status (array, defaults to all) This can be optionally provided to limit results to a list of particular Booking Statuses.

When booking_status is provided, the period_from and period_to parameters are used to find Bookings that reached one of the provided statuses within the date range. All transactions related to the matching Bookings will be returned.

When booking_status is NOT provided, the period_from and period_to parameters are used to find any transactions that were generated within the date range.

Response Notes:

Each Transaction Type details its Transactions in an array.

Member Transactions: List Example

Request URL

https://api.newbook.cloud/rest/member_transactions_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"membership_type_id": 2,
							"period_from": "2024-04-19",
							"period_to": "2024-04-20",
							"transaction_types": ["charges","credits","payments","refunds"],
							"booking_status": ["Departed"],
							"include_booking_details": true,
							"include_taxes": true
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"period_from": "2024-04-19",
								"period_to": "2024-04-20",
								"membership_type_id": 2,
								"charges": [
									{
										"transaction_type": "charge",
										"id": 87037,
										"account_id": 40341,
										"gl_category_id": 1,
										"gl_account_id": 13,
										"description": "Standard (Tue 20 Feb 2024) ",
										"amount": 170,
										"tax_free": false,
										"generated_by": -2,
										"generated_when": "2024-04-19 11:30:00",
										"inventory_item_id": null,
										"charge_type": "tariffs_quoted",
										"amount_inc_tax": 170,
										"amount_ex_tax": 154.55,
										"tax": 15.45,
										"guest": {
											"id": 16163,
											"title": "",
											"firstname": "Jane",
											"lastname": "Doe",
											"guest_membership_id": 427,
											"guest_membership_content": "123456"
										},
										"booking": {
											"id": 23226,
											"booking_name": "Jane Doe",
											"status": "Confirmed",
											"booking_category_id": 10,
											"booking_category": "2 Bedroom Studio",
											"booking_category_type": "Studio",
											"booking_category_type_id": 1,
											"period_from": "2024-04-19 14:00:00",
											"period_to": "2024-04-19 10:00:00"
										}
									},
									{
										"transaction_type": "charge",
										"id": 87038,
										"account_id": 40341,
										"gl_category_id": 1,
										"gl_account_id": 13,
										"description": "Standard (Wed 21 Feb 2024) ",
										"amount": 170,
										"tax_free": false,
										"generated_by": -2,
										"generated_when": "2024-04-19 11:30:00",
										"timestamp": "2024-04-19 11:30:00",
										"inventory_item_id": null,
										"charge_type": "tariffs_quoted",
										"amount_inc_tax": 170,
										"amount_ex_tax": 154.55,
										"tax": 15.45,
										"guest": {
											"id": 16163,
											"title": "",
											"firstname": "Jane",
											"lastname": "Doe",
											"guest_membership_id": 427,
											"guest_membership_content": "123456"
										},
										"booking": {
											"id": 23226,
											"booking_name": "Jane Doe",
											"status": "Confirmed",
											"booking_category_id": 10,
											"booking_category": "2 Bedroom Studio",
											"booking_category_type": "Studio",
											"booking_category_type_id": 1,
											"period_from": "2024-04-19 14:00:00",
											"period_to": "2024-04-19 10:00:00"
										}
									}
								],
								"credits": [
									{
										"transaction_type": "credit",
										"id": 3628,
										"account_id": 40341,
										"gl_category_id": 1,
										"gl_account_id": 11,
										"description": "test",
										"amount": 35,
										"tax_free": false,
										"generated_by": -2,
										"generated_when": "2024-04-19 11:30:00",
										"timestamp": "2024-04-19 11:30:00",
										"inventory_item_id": null,
										"charge_type": "tariffs_quoted",
										"amount_inc_tax": 35,
										"amount_ex_tax": 31.82,
										"tax": 3.18,
										"guest": {
											"id": 16163,
											"title": "",
											"firstname": "Jane",
											"lastname": "Doe",
											"guest_membership_id": 427,
											"guest_membership_content": "123456"
										},
										"booking": {
											"id": 23226,
											"booking_name": "Jane Doe",
											"status": "Confirmed",
											"booking_category_id": 10,
											"booking_category": "2 Bedroom Studio",
											"booking_category_type": "Studio",
											"booking_category_type_id": 1,
											"period_from": "2024-04-19 14:00:00",
											"period_to": "2024-04-19 10:00:00"
										}
									}
								],
								"payments": [
									{
										"transaction_type": "payment",
										"id": 27205,
										"account_id": 40341,
										"gl_category_id": 1,
										"paid_by": 40332,
										"transaction_method": "manual",
										"transaction_id": null,
										"disbursed_booking_id": null,
										"disbursed_gl_account_id": null,
										"description": "Accommodation",
										"amount": 340,
										"amount_inc_tax": 340,
										"amount_ex_tax": 300.88,
										"tax": 39.12,
										"tendered": 340,
										"tendered_currency": 340,
										"type": "cash",
										"type_reference": "",
										"type_instance_id": null,
										"deposit": true,
										"balance_transfer_reason_id": null,
										"generated_by": -2,
										"generated_when": "2024-04-19 11:30:00",
										"timestamp": "2024-04-19 11:30:00",
										"charge_type": "tariffs_quoted",
										"guest": {
											"id": 16163,
											"title": "",
											"firstname": "Jane",
											"lastname": "Doe",
											"guest_membership_id": 427,
											"guest_membership_content": "123456"
										},
										"booking": {
											"id": 23226,
											"booking_name": "Jane Doe",
											"status": "Confirmed",
											"booking_category_id": 10,
											"booking_category": "2 Bedroom Studio",
											"booking_category_type": "Studio",
											"booking_category_type_id": 1,
											"period_from": "2024-04-19 14:00:00",
											"period_to": "2024-04-19 10:00:00"
										}
									}
								],
								"refunds": [
									{
										"transaction_type": "refund",
										"id": 832,
										"account_id": 40341,
										"gl_category_id": 1,
										"refunded_to": 40332,
										"transaction_method": "manual",
										"transaction_id": null,
										"disbursed_booking_id": null,
										"disbursed_gl_account_id": null,
										"description": "Accommodation",
										"amount": 170,
										"amount_inc_tax": 170,
										"amount_ex_tax": 150.44,
										"tax": 19.56,
										"tendered": 170,
										"tendered_currency": 170,
										"type": "cash",
										"type_reference": "",
										"type_instance_id": null,
										"balance_transfer_reason_id": null,
										"generated_by": -2,
										"generated_when": "2024-04-19 11:30:00",
										"timestamp": "2024-04-19 11:30:00",
										"charge_type": "tariffs_quoted",
										"guest": {
											"id": 16163,
											"title": "",
											"firstname": "Jane",
											"lastname": "Doe",
											"guest_membership_id": 427,
											"guest_membership_content": "123456"
										},
										"booking": {
											"id": 23226,
											"booking_name": "Jane Doe",
											"status": "Confirmed",
											"booking_category_id": 10,
											"booking_category": "2 Bedroom Studio",
											"booking_category_type": "Studio",
											"booking_category_type_id": 1,
											"period_from": "2024-04-19 14:00:00",
											"period_to": "2024-04-19 10:00:00"
										}
									}
								]
							},
							"message": ""
						}
					
				
AnchorAccommodation Categories: List

Retrieve a list of Accommodation Categories including all the stored information about the Category.

Request Notes:

category_id can optionally be provided to limit results to a particular Category ID

type_id can optionally be provided to limit results to a particular Category Type ID

Response Notes:

Each Category details its Sites in an array. Each Site has all the same attributes as per the sites_list request.

Sites can optionally inherit Features from their parent Category (see the accommodation_category_list request). When this is the case, site_features_specified will be false, the site_features array will be empty, and the Features should be referenced from the parent Category. When this is not the case, site_features_specified will be true, and only those Features specified on the Site are valid (including an empty site_features array meaning none).

Categories have a set of Images, and Sites do as well. Those returned in site_images should be displayed in conjunction with those from the Category.

Accommodation Categories: List Example

Request URL

https://api.newbook.cloud/rest/accommodation_category_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"category_id": "56"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [{
								"category_id": "56",
								"category_name": "Holiday Rentals",
								"category_description": "A stylish holiday apartment ideally situated within the boardwalk entertainment precinct of the Surfers Paradise. Private balcony with amazing views. A walk or bike ride into Surfers Paradise central. Beautiful water ways, foreshore parks and playgrounds, rustic coastline with surf, fishing and swimming beaches.",
								"category_short_description": "Luxurious Holiday Rental apartment situated within the boardwalk entertainment precinct of Surfers Paradise.",
								"category_type_id": "7",
								"category_type_name": "Apartment",
								"category_virtual_tour_url": "https://www.newbook.cloud/virtual_tour_link",
								"category_max_adults": "5",
								"category_max_children": null,
								"category_max_infants": "0",
								"category_max_animals": "0",
								"category_max_combined": "5",
								"gl_account_id": 17,
								"gl_category_id": 1,
								"sites": [{
									"site_id": "81",
									"site_name": "Luxury Holiday Rental",
									"site_description": "A stylish holiday apartment ideally situated within the boardwalk entertainment precinct of the Surfers Paradise. Private balcony with amazing views. A walk or bike ride into Surfers Paradise central. Beautiful water ways, foreshore parks and playgrounds, rustic coastline with surf, fishing and swimming beaches.",
									"site_short_description": "Luxurious Holiday Rental apartment situated within the boardwalk entertainment precinct of Surfers Paradise.",
									"site_status": "Clean",
									"site_street": "Level 2, 9 Ouyan Street",
									"site_city": "Surfers Paradise",
									"site_postcode": "4217",
									"site_state_id": 4,
									"site_state_name": "Queensland",
									"site_country_id": 13,
									"site_country_name": "Australia",
									"site_lat": "-28.0031270",
									"site_long": "153.4177429",
									"level_id": "",
									"level_name": "",
									"site_size": {
										"id": "1",
										"name": "10x10",
										"length": "10.00",
										"width": "10.00",
										"height": "0.00",
										"unit": "m"
									},
									"parent_id": null,
									"child_ids": [],
									"custom_fields": [{
										"id": 1,
										"type": "text",
										"label": "Suitable for Families",
										"value": "No this is accommodation designed for couples-only"
									}],
									"site_images": [],
									"site_features_specified": false,
									"site_features": [],
									"map_markers": [],
									"notes": []
								}],
								"features": [{
									"feature_id": "1",
									"feature_name": "Air conditioned",
									"feature_count": "1"
								},{
									"feature_id": "2",
									"feature_name": "Balcony",
									"feature_count": "2"
								}],
								"bedding": [{
									"bedding_type_id": "2",
									"bedding_type_name": "Queen",
									"bedding_count": "1"
								},{
									"bedding_type_id": "4",
									"bedding_type_name": "Bunks double & single set",
									"bedding_count": "1"
								}],
								"images": [{
									"image_type_id": "23",
									"image_type_name": "Bedroom",
									"image_url": "https:\/\/driveau.newbook.cloud\/instances_3b951b501ee06d886428eef064d803d2_588050ccc3a87.jpeg",
									"image_file_name": "bedroom.jpeg"
								},{
									"image_type_id": "24",
									"image_type_name": "Bathroom",
									"image_url": "https:\/\/driveau.newbook.cloud\/instances_3b951b501ee06d886428eef064d803d2_58804da109eb9.jpeg",
									"image_file_name": "bathroom.jpeg"
								}],
								"category_hybrid_remote_id": null
							}],
							"message": ""
						}
					
				
AnchorAccommodation Categories: Create

Create a new Accommodation Category.

Request Notes:

The following parameters are required:

  • name (string)
  • gl_category_id (int) an existing Sub Client Account ID
  • gl_account_id (int) an existing active GL Account ID

The following parameters are optional:

  • short_description (string)
  • description (string)
  • website_url (url)
  • display_order (int) determines the display order
  • preference_order (int)
  • minimum_sites_online (int)
  • minimum_sites_cm (int)
  • online_bookings_future_days_minimum (int)
  • online_bookings_future_days_maximum (int)
  • cm_bookings_future_days_minimum (int)
  • cm_bookings_future_days_maximum (int)
  • bookings_split_after (int)
  • bookings_split_count (int)
  • bookings_split_length (int)
  • cm_bookings_split_after (int)
  • cm_bookings_split_count (int)
  • cm_bookings_split_length (int)
  • max_adults (int|null)
  • max_children (int|null)
  • max_infants (int|null)
  • max_animals (int|null)
  • min_combined (int|null)
  • max_combined (int|null)
  • tax_free (boolean)
  • system_template_receipts (int) an existing system template ID for receipts
  • system_template_invoices (int) an existing system template ID for invoices
  • system_template_clients_account_statement (int) an existing system template ID for client account statements
  • system_template_receipts_trust (int) an existing system template ID for trust receipts
  • system_template_invoices_trust (int) an existing system template ID for trust invoices
  • system_template_clients_account_statement_trust (int) an existing system template ID for trust client account statements
  • housekeeping (boolean) if the Category requires housekeeping
  • occupancy (boolean) whether the Category will contribute to occupancy reports
  • allow_dirty_bookings (boolean)
  • allow_same_day_backtoback (boolean)
  • allow_same_day_access_card_unavailable (boolean)
  • booking_action (string) action required when booking is placed. From the following list:
    • do_nothing
    • owner_approve
  • instance_channel_manager_id (int) an existing channel manager ID
  • cm_roomcode (string)
  • type_id (int) an existing accommodation category ID
  • default_tariff_type (int)
  • placeholder_image (string) Newbook Online Placeholder Image from the following list:
    • category-ship
    • category-cabin
    • category-tent
    • category-caravan
  • virtual_tour_url (url)
  • active (boolean)
  • features (array) an array of objects
  • images (array) an array of objects with the following format
    • image_type_id (int) an existing Accommodation Image Type ID
    • image_data (string) a Base64 encoded jpeg, png, or webp image
    • image_file_name (string) optional, the image file name
  • category_hybrid_remote_id - This is the identifier used on your external PMS (only available for Newbook Hybrid instances)

Accommodation Categories: Create Example

Request URL

https://api.newbook.cloud/rest/accommodation_categories_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "3 Bedroom Villa",
							"short_description": "Sleeps 6",
							"description": "

Invite the outdoors in, with glass sliding doors opening wide on to a sheltered balcony. This is the ideal location to soak in the fresh air at anytime of year!

", "website_url": "https://mywebsite.com/book/3-bedroom-villa", "display_order": "0", "preference_order": "0", "minimum_sites_online": "0", "minimum_sites_cm": "0", "online_bookings_future_days_minimum": "0", "online_bookings_future_days_maximum": "0", "cm_bookings_future_days_minimum": "0", "cm_bookings_future_days_maximum": "0", "bookings_split_after": "0", "bookings_split_count": "0", "bookings_split_length": "0", "cm_bookings_split_after": "0", "cm_bookings_split_count": "0", "cm_bookings_split_length": "0", "max_adults": "2", "max_children": "4", "max_infants": "null", "max_animals": "null", "min_combined": "null", "max_combined": "null", "gl_category_id": "1", "gl_account_id": "2", "tax_free": "", "system_template_receipts": "49", "system_template_invoices": "48", "system_template_clients_account_statement": "47", "system_template_receipts_trust": "49", "system_template_invoices_trust": "48", "system_template_clients_account_statement_trust": "47", "housekeeping": "1", "occupancy": "", "allow_dirty_bookings": "1", "allow_same_day_backtoback": "1", "allow_same_day_access_card_unavailable": "1", "booking_action": "do_nothing", "instance_channel_manager_id": "null", "cm_roomcode": "", "type_id": "4", "default_tariff_type": "-1", "placeholder_image": "category-cabin", "virtual_tour_url": "https://mywebsite.com/tour/3-bedroom-villa", "active": "1", "features": [ { "feature_id": "1", "feature_count": "2" }, { "feature_id": "3", "feature_count": "1" } ], "images": [ { "image_type_id": "1", "image_data": "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAIAAABvrngfAAAAGUlEQVR4nGI537aBARUwMWAAagoBAgAA///mwwIU2hpoYAAAAABJRU5ErkJggg==", "image_file_name": "bathroom.jpeg" }, { "image_type_id": "3", "image_data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAIAAABvrngfAAAAGUlEQVR4nGL5s5+RARUwMWAAagoBAgAA///HrwHLnpuP4AAAAABJRU5ErkJggg==" } ], "category_hybrid_remote_id": null }
Response JSON
					
						{
							"success": "true",
							"data": {
								"category_id": "123"
							},
							"message": ""
						}
					
				
AnchorAccommodation Categories: Get

Retrieve an existing Accommodation Category record.

Request Notes:

category_id must be provided to retrieve the details of a particular Accommodation Category.

Response Notes:

The returned data from this request is identical to Accommodation Categories: List but for a specific Accommodation Category alone.

If no such Accommodation Category exists, the success response parameter will be "false" and no data will be returned.

Accommodation Categories: Get Example

Request URL

https://api.newbook.cloud/rest/accommodation_categories_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"category_id": "123"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [{
								"category_id": "56",
								"category_name": "Holiday Rentals",
								"category_description": "A stylish holiday apartment ideally situated within the boardwalk entertainment precinct of the Surfers Paradise. Private balcony with amazing views. A walk or bike ride into Surfers Paradise central. Beautiful water ways, foreshore parks and playgrounds, rustic coastline with surf, fishing and swimming beaches.",
								"category_short_description": "Luxurious Holiday Rental apartment situated within the boardwalk entertainment precinct of Surfers Paradise.",
								"category_type_id": "7",
								"category_type_name": "Apartment",
								"category_virtual_tour_url": "https://www.newbook.cloud/virtual_tour_link",
								"category_max_adults": "5",
								"category_max_children": null,
								"category_max_infants": "0",
								"category_max_animals": "0",
								"category_max_combined": "5",
								"gl_account_id": 17,
								"gl_category_id": 1,
								"sites": [{
									"site_id": "81",
									"site_name": "Luxury Holiday Rental",
									"site_description": "A stylish holiday apartment ideally situated within the boardwalk entertainment precinct of the Surfers Paradise. Private balcony with amazing views. A walk or bike ride into Surfers Paradise central. Beautiful water ways, foreshore parks and playgrounds, rustic coastline with surf, fishing and swimming beaches.",
									"site_short_description": "Luxurious Holiday Rental apartment situated within the boardwalk entertainment precinct of Surfers Paradise.",
									"site_status": "Clean",
									"site_street": "Level 2, 9 Ouyan Street",
									"site_city": "Surfers Paradise",
									"site_postcode": "4217",
									"site_state_id": 4,
									"site_state_name": "Queensland",
									"site_country_id": 13,
									"site_country_name": "Australia",
									"site_lat": "-28.0031270",
									"site_long": "153.4177429",
									"level_id": "",
									"level_name": "",
									"site_size": {
										"id": "1",
										"name": "10x10",
										"length": "10.00",
										"width": "10.00",
										"height": "0.00",
										"unit": "m"
									},
									"parent_id": null,
									"child_ids": [],
									"custom_fields": [{
										"id": 1,
										"type": "text",
										"label": "Suitable for Families",
										"value": "No this is accommodation designed for couples-only"
									}],
									"site_images": [],
									"site_features_specified": false,
									"site_features": [],
									"map_markers": [],
									"notes": []
								}],
								"features": [{
									"feature_id": "1",
									"feature_name": "Air conditioned",
									"feature_count": "1"
								},{
									"feature_id": "2",
									"feature_name": "Balcony",
									"feature_count": "2"
								}],
								"bedding": [{
									"bedding_type_id": "2",
									"bedding_type_name": "Queen",
									"bedding_count": "1"
								},{
									"bedding_type_id": "4",
									"bedding_type_name": "Bunks double & single set",
									"bedding_count": "1"
								}],
								"images": [{
									"image_type_id": "23",
									"image_type_name": "Bedroom",
									"image_url": "https:\/\/driveau.newbook.cloud\/instances_3b951b501ee06d886428eef064d803d2_588050ccc3a87.jpeg",
									"image_file_name": "bedroom.jpeg"
								},{
									"image_type_id": "24",
									"image_type_name": "Bathroom",
									"image_url": "https:\/\/driveau.newbook.cloud\/instances_3b951b501ee06d886428eef064d803d2_58804da109eb9.jpeg",
									"image_file_name": "bathroom.jpeg"
								}],
								"category_hybrid_remote_id": null
							}],
							"message": ""
						}
					
				
AnchorAccommodation Categories: Update

Update an Accommodation Category.

Request Notes:

category_id is required to advise which Accommodation Category you are updating.

All other parameters are optional, and are defined in Accommodation Categories: Create.

Accommodation Categories: Update Example

Request URL

https://api.newbook.cloud/rest/accommodation_categories_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"category_id": "123",
							"name": "3 Bedroom Villa + Spa",
							"website_url": "https://mywebsite.com/book/3-bedroom-villa-spa",
							"max_adults": "4",
							"gl_account_id": "3",
							"allow_dirty_bookings": "0",
							"type_id": "5",
							"virtual_tour_url": "https://mywebsite.com/tour/3-bedroom-villa-spa",
							"features": [
								{
									"feature_id": "4",
									"feature_count": "1"
								}
							],
							"images": [
								{
									"image_type_id": "2",
									"image_data": "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAGUlEQVR4nGLpadvBgA0wYRUdtBKAAAAA//9rfwHdBdxFXQAAAABJRU5ErkJggg==",
									"image_file_name": "bedroom.jpeg"
								}
							],
							"category_hybrid_remote_id": null
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"category_id": "123"
							},
							"message": ""
						}
					
				
AnchorAccommodation Features: List

Retrieve the list of possible Accommodation Features in Newbook.

Accommodation Features: List Example

Request URL

https://api.newbook.cloud/rest/accommodation_features_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"name": "Bedroom"
											},{
												"id": "2",
												"name": "Air Conditioning"
											}],
											"message": ""
										}
									
								
AnchorAccommodation Sites: List

Pull the list of possible Sites from Newbook.

Request Notes:

category_id can optionally be provided to limit results to a particular Category ID

type_id can optionally be provided to limit results to a particular Category Type ID

show_deactivated can optionally be provided as "true" to include deactivated Sites

Response Notes:

Sites can optionally inherit Features from their parent Category (see the accommodation_category_list request). When this is the case, site_features_specified will be false, the site_features array will be empty, and the Features should be referenced from the parent Category. When this is not the case, site_features_specified will be true, and only those Features specified on the Site are valid (including an empty site_features array meaning none).

Categories have a set of Images, and Sites do as well. Those returned in site_images should be displayed in conjunction with those from the Category.

Accommodation Sites: List Example

Request URL

https://api.newbook.cloud/rest/sites_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [{
								"site_id": "81",
								"category_id": "56",
								"category_name": "Holiday Rentals",
								"site_name": "Luxury Holiday Rental",
								"site_description": "A stylish holiday apartment ideally situated within the boardwalk entertainment precinct of the Surfers Paradise. Private balcony with amazing views. A walk or bike ride into Surfers Paradise central. Beautiful water ways, foreshore parks and playgrounds, rustic coastline with surf, fishing and swimming beaches.",
								"site_short_description": "Luxurious Holiday Rental apartment situated within the boardwalk entertainment precinct of Surfers Paradise.",
								"site_status": "Clean",
								"site_street": "Level 2, 9 Ouyan Street",
								"site_city": "Surfers Paradise",
								"site_postcode": "4217",
								"site_state_id": 4,
								"site_state_name": "Queensland",
								"site_country_id": 13,
								"site_country_name": "Australia",
								"site_lat": "-28.0031270",
								"site_long": "153.4177429",
								"level_id": "",
								"level_name": "",
								"site_size": {
									"id": "1",
									"name": "10x10",
									"length": "10.00",
									"width": "10.00",
									"height": "0.00",
									"unit": "m"
								},
								"parent_id": null,
								"child_ids": [],
								"custom_fields": [{
									"id": 1,
									"type": "text",
									"label": "Suitable for Families",
									"value": "No this is accommodation designed for couples-only"
								}],
								"site_images": [],
								"site_features_specified": false,
								"site_features": [],
								"map_markers": [],
								"notes": [],
								"metering_types": [
									"1"
								]
							},{
								"site_id": "104",
								"category_id": "28",
								"category_name": "Long Term Stays",
								"site_name": "Deluxe Apartment",
								"site_description": "Long-term deluxe accommodation in Surfers Paradise. Suitable for a couple or small family. Beautiful water ways, foreshore parks and playgrounds, rustic coastline with surf, fishing and swimming beaches.",
								"site_short_description": "Long-term deluxe accommodation in Surfers Paradise for a couple or family.",
								"site_status": "Clean",
								"site_street": "Level 2, 9 Ouyan Street",
								"site_city": "Surfers Paradise",
								"site_postcode": "4217",
								"site_state_id": 4,
								"site_state_name": "Queensland",
								"site_country_id": 13,
								"site_country_name": "Australia",
								"site_lat": "-28.0031270",
								"site_long": "153.4177429",
								"level_id": "",
								"level_name": "",
								"site_size": {
									"id": "2",
									"name": "20x20",
									"length": "20.00",
									"width": "20.00",
									"height": "0.00",
									"unit": "m"
								},
								"parent_id": null,
								"child_ids": [],
								"custom_fields": [{
									"id": 1,
									"type": "text",
									"label": "Suitable for Families",
									"value": "Yes of up to 2 children"
								}],
								"site_images": [{
									"image_type_id": "12",
									"image_type_name": "Kitchen",
									"image_url": "https:\/\/driveau.newbook.cloud\/instances_3b951b501ee06d886428eef064d803d2_588050cd2ab49.jpg"
								}],
								"site_features_specified": true,
								"site_features": [{
									"feature_id": "1",
									"feature_name": "Air conditioned",
									"feature_count": "1"
								},{
									"feature_id": "2",
									"feature_name": "Balcony",
									"feature_count": "1"
								},{
									"feature_id": "3",
									"feature_name": "Bathtub",
									"feature_count": "1"
								}],
								"map_markers": [],
								"notes": ["Suitable for up to two young children. Bathroom has a bathtub with appropriate facilities for infants."],
								"metering_types": [],
								"site_hybrid_remote_id": null
							}],
							"message": ""
						}
					
				
AnchorAccommodation Sites: Get/Set Status

Retrieve/update the Status of a particular Site in Newbook.

Request Notes:

site_id or site_name must be provided to indicate the appropriate Site, but only 1 is required

site_status is optional and should only be provided when you wish to update the Status - valid options:

  • Clean
  • Dirty

Response Notes:

message will be filled only when site_status is updated

Accommodation Sites: Get/Set Status Example

Request URL

https://api.newbook.cloud/rest/sites_status

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"site_id": "3",
							"site_name": "001",
							"site_status": "Clean"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"site_id": "3",
								"site_name": "001",
								"site_status": null,
								"category_name": "Powered Site"
							},
							"message": "Successfully updated Site Status"
						}
					
				
AnchorSite Maps

Pull a list of Site Maps and their Markers from Newbook.

map_id is optional and when provided Newbook will return Markers from that Map alone.

period_from and period_to are optional and when provided, Newbook will force the Map Markers to return only for Sites, and will also perform an availability validation for the date range indicated. Please note, the Site still needs to have a Tariff applied and available for use on a booking before you can consider it sellable. This request does not validate the Tariff aspect.

adults, children, infants and animals are optional and when provided, Newbook will force the Map Markers to return only for Sites, and will also perform an occupant validation for the numbers requested. Please note, the Site still needs to have a Tariff applied and applicable for the occupant numbers for use on a booking before you can consider it sellable. This request does not validate the Tariff aspect.

Site Maps Example

Request URL

https://api.newbook.cloud/rest/sites_maps

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [{
								"id": "2",
								"name": "Park Map",
								"map_link": "https:\/\/drivedev.newbook.cloud\/instances_df16e7d1f60da0614b4b72eb95b02a86_55895e22ef045.jpg",
								"system_default": "1",
								"markers": [{
									"id": "2549",
									"marker_id": "1",
									"marker_type": "accommodation_sites",
									"top": "1012",
									"left": "554"
								}]
							}],
							"message": ""
						}
					
				
AnchorSites: Get

Pull the information for a specific Site in Newbook.

Request Notes:

site_id is a required parameter and needs to be the ID of the Site you are looking up.

Response Notes:

Sites can optionally inherit Features from their parent Category (see the accommodation_category_list request). When this is the case, site_features_specified will be false, the site_features array will be empty, and the Features should be referenced from the parent Category. When this is not the case, site_features_specified will be true, and only those Features specified on the Site are valid (including an empty site_features array meaning none).

Categories have a set of Images, and Sites do as well. Those returned in site_images should be displayed in conjunction with those from the Category.

Sites: Get Example

Request URL

https://api.newbook.cloud/rest/sites_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"site_id": 1
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"site_id": "1",
								"category_id": "56",
								"category_name": "Holiday Rentals",
								"site_name": "Luxury Holiday Rental",
								"site_description": "A stylish holiday apartment ideally situated within the boardwalk entertainment precinct of the Surfers Paradise. Private balcony with amazing views. A walk or bike ride into Surfers Paradise central. Beautiful water ways, foreshore parks and playgrounds, rustic coastline with surf, fishing and swimming beaches.",
								"site_short_description": "Luxurious Holiday Rental apartment situated within the boardwalk entertainment precinct of Surfers Paradise.",
								"site_status": "Clean",
								"site_street": "Level 2, 9 Ouyan Street",
								"site_city": "Surfers Paradise",
								"site_postcode": "4217",
								"site_state_id": 4,
								"site_state_name": "Queensland",
								"site_country_id": 13,
								"site_country_name": "Australia",
								"site_lat": "-28.0031270",
								"site_long": "153.4177429",
								"level_id": "",
								"level_name": "",
								"site_size": {
									"id": "1",
									"name": "10x10",
									"length": "10.00",
									"width": "10.00",
									"height": "0.00",
									"unit": "m"
								},
								"parent_id": null,
								"child_ids": [],
								"custom_fields": [{
									"id": 1,
									"type": "text",
									"label": "Suitable for Families",
									"value": "No this is accommodation designed for couples-only"
								}],
								"site_images": [],
								"site_features_specified": false,
								"site_features": [],
								"map_markers": [],
								"notes": [],
								"metering_types": [
									"1",
									"2"
								],
								"site_hybrid_remote_id": null
							},
							"message": ""
						}
					
				
AnchorSites: Create

Create a new site for a particular Category.

Request Notes:

name must be provided. This is the name of the Site.

category_id must be provided. This needs to be a valid Category ID as per the Category: List.

Please see below for a list of optional details that can be provided for the Site.

  • short_description
  • description
  • opened_on - Supports either "null" to remove the opening date or a date to set the opening date
  • closed_on - Supports either "null" to remove the closing date or a date to set the closing date
  • status - Either "Clean" or "Dirty"
  • gl_category_id - An existing Sub Client Account ID
  • gl_account_id - An existing active GL Account ID
  • show_online - A boolean for whether the Site is available on Newbook Online
  • overbooking - A boolean for whether the Site allows overbooking. Overbooking means that multiple Bookings can be made for the same period
  • occupancy - A boolean for whether the Site will contribute to occupancy reports
  • notes - An array of notes to add to the Site
  • site_size_id - An existing Site Size ID to assign to the Site
  • street - The street of where the Site is located
  • city - The city for where the Site is located
  • state_id - The state for where the Site is located. This needs to match a valid State ID from States List
  • postcode - The postcode for where the Site is located
  • country_id - The country for where the Site is located. This needs to match a valid Country ID from Countries List
  • lat - The latitude for the Site
  • long - The longitude for the Site
  • display_order - An integer for the display order of the Sites
  • level_id - The level of the Site. This needs to match a valid Level ID from Newbook
  • manager_id - The Manager of a specific Site. This needs to match a valid User ID from Users: List
  • pos_identifier - The POS Identifier for the Site. This is used for POS Integrations to easily charge back to particular Bookings on that Site
  • default_security_area - This is the Default Security Area used for Access Control for this particular Site
  • override_category_features - A boolean for whether the Site should override the specified Accommodation Features from the Category
  • features - This is only applicable when the "override_category_features" setting is true. This is an array of objects
  • metering_types - This is an array of Metering Type IDs. This needs to match a valid Metering Type ID from Metering Types: List
  • site_hybrid_remote_id - This is the identifier used on your external PMS (only available for Newbook Hybrid instances)

Sites: Create Example

Request URL

https://api.newbook.cloud/rest/sites_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "New Site Name",
							"category_id": 3,
							"short_description": "A short description for the site",
							"description": "A longer description for the site",
							"opened_on": "2005-02-25",
							"closed_on": "null",
							"status": "Clean",
							"gl_category_id": 1,
							"gl_account_id": 12,
							"show_online": true,
							"overbooking": false,
							"occupancy": true,
							"slab_size_id": 10,
							"street": "Level 2, 9 Ouyan Street",
							"city": "Surfers Paradise",
							"postcode": "4217",
							"state_id": 4,
							"country_id": 13,
							"lat": "-28.0031270",
							"long": "153.4177429",
							"display_order": 0,
							"level_id": 2,
							"manager_id": 1,
							"pos_identifier": "100",
							"default_security_area": "null",
							"override_category_features": true,
							"features": [
								{
									"feature_id": 5,
									"feature_count": 1
								},
								{
									"feature_id": 3,
									"feature_count": 2
								},
								{
									"feature_id": 14,
									"feature_count": 1
								},
							],
							"notes": [
								"Adding a new note"
							],
							"metering_types": [
								"1",
								"2"
							],
							"site_hybrid_remote_id": null
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"site_id": "1"
							},
							"message": ""
						}
					
				
AnchorSites: Update

Update the details of a particular site inside of Newbook.

Request Notes:

site_id must be provided to update a particular Sites details.

Please see below for a list of optional details that can be updated on the Site. At least one of these must be provided.

  • name - Changes the name of the Site
  • short_description
  • description
  • opened_on - Supports either "null" to remove the opening date or a date to set the opening date
  • closed_on - Supports either "null" to remove the closing date or a date to set the closing date
  • category_id - An existing Category ID to change where the Site belongs
  • status - Either "Clean" or "Dirty"
  • gl_category_id - An existing Sub Client Account ID
  • gl_account_id - An existing active GL Account ID
  • show_online - A boolean for whether the Site is available on Newbook Online
  • overbooking - A boolean for whether the Site allows overbooking. Overbooking means that multiple Bookings can be made for the same period
  • occupancy - A boolean for whether the Site will contribute to occupancy reports
  • notes - An array of notes to add to the Site
  • site_size_id - An existing Site Size ID to assign to the Site
  • street - The street of where the Site is located
  • city - The city for where the Site is located
  • state_id - The state for where the Site is located. This needs to match a valid State ID from States List
  • postcode - The postcode for where the Site is located
  • country_id - The country for where the Site is located. This needs to match a valid Country ID from Countries List
  • lat - The latitude for the Site
  • long - The longitude for the Site
  • display_order - An integer for the display order of the Sites
  • level_id - The level of the Site. This needs to match a valid Level ID from Newbook
  • manager_id - The Manager of a specific Site. This needs to match a valid User ID from Users: List
  • pos_identifier - The POS Identifier for the Site. This is used for POS Integrations to easily charge back to particular Bookings on that Site
  • default_security_area - This is the Default Security Area used for Access Control for this particular Site
  • override_category_features - A boolean for whether the Site should override the specified Accommodation Features from the Category
  • features - This is only applicable when the "override_category_features" setting is true. This is an array of objects
  • metering_types - This is an array of Metering Type IDs. This needs to match a valid Metering Type ID from Metering Types: List
  • site_hybrid_remote_id - This is the identifier used on your external PMS (only available for Newbook Hybrid instances)

Sites: Update Example

Request URL

https://api.newbook.cloud/rest/sites_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"site_id": "1",
							"name": "New Site Name",
							"category_id": 3,
							"short_description": "A short description for the site",
							"description": "A longer description for the site",
							"opened_on": "2005-02-25",
							"closed_on": "null",
							"status": "Clean",
							"gl_category_id": 1,
							"gl_account_id": 12,
							"show_online": true,
							"overbooking": false,
							"occupancy": true,
							"slab_size_id": 10,
							"street": "Level 2, 9 Ouyan Street",
							"city": "Surfers Paradise",
							"postcode": "4217",
							"state_id": 4,
							"country_id": 13,
							"lat": "-28.0031270",
							"long": "153.4177429",
							"display_order": 0,
							"level_id": 2,
							"manager_id": 1,
							"pos_identifier": "100",
							"default_security_area": "null",
							"override_category_features": true,
							"features": [
								{
									"feature_id": 5,
									"feature_count": 1
								},
								{
									"feature_id": 3,
									"feature_count": 2
								},
								{
									"feature_id": 14,
									"feature_count": 1
								},
							],
							"notes": [
								"Adding a new note"
							],
							"metering_types": [],
							"site_hybrid_remote_id": null
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"site_id": "1"
							},
							"message": ""
						}
					
				
AnchorSite Sizes: List

Returns a list of active Site Sizes.

Request Notes:

show_inactive is optional, default false, and when provided with a truthy value, it will include inactive Site Sizes in the response.

Response Notes:

site_count is the number of active Sites that the Site Size is associated with.

Site Sizes: List Example

Request URL

https://api.newbook.cloud/rest/site_sizes_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"site_size_id": 1,
									"name": "8m x 8.5m",
									"width": "8.50",
									"length": "8.00",
									"height": "0.00",
									"online": "1",
									"active": "1",
									"site_count": "3"
								},
								{
									"site_size_id": 2,
									"name": "4m x 4m",
									"width": "4.00",
									"length": "4.00",
									"height": "0.00",
									"online": "0",
									"active": "1",
									"site_count": "12"
								},
							],
							"message": ""
						}
					
				
AnchorSite Sizes: Create

Creates a Site Size.

Request Notes:

  • name is required.
  • online and active will default to true if not provided.
  • width, length and height will default to 0 if not provided. If provided, the values must be numeric.

Site Sizes: Create Example

Request URL

https://api.newbook.cloud/rest/site_sizes_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "10x10",
							"width": 10,
							"length": 10,
							"online": "0",
							"active": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"site_size_id": 3
							},
							"message": ""
						}
					
				
AnchorSite Sizes: Update

Updates an existing Site Size.

Request Notes:

site_size_id must be provided to update a particular Site Size details.

Please see below for a list of optional details that can be updated on the Site Size. At least one of these must be provided.

  • name
  • online - supports values like "true", false, 1.
  • active - supports values like "true", false, 1.
  • width - must be numeric.
  • length - must be numeric.
  • height - must be numeric.

Site Sizes: Update Example

Request URL

https://api.newbook.cloud/rest/site_sizes_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"site_size_id": 3,
							"name": "11x10",
							"width": 11
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"site_size_id": 3
							},
							"message": ""
						}
					
				
AnchorCompanies: List

Retrieve the list of Companies for recording non-Booking-specific charges.

Request Notes:

search is optional and when provided it will restrict the results to the matching Companies. It will search their name and contact details (phone, email, etc) for a match

account_id is optional and when provided it will restrict the results to the matching Client Accounts.

type_id is optional and when provided will limit the results to the matching Company Type

created_when is optional and when provided, restricts the returned Companies to only those which were created on the date given

Send account_breakdown as true to see the balance of each associated Sub Client Account (gl_category)

Companies: List Example

Request URL

https://api.newbook.cloud/rest/companies_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"search": "pty ltd",
											"created_when": "2016-02-01"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"type_id": 1,
												"name": "Newbook Pty Ltd",
												"street": "Level 2, 9 Ouyan Street",
												"city": "Surfers Paradise",
												"state": "Queensland (QLD)",
												"postcode": "4217",
												"country": "Australia",
												"account_id": "13783",
												"account_balance": "0.00",
												"account_currency_code": "AUD",
												"auto_billing_limit": null,
												"auto_debit": 1,
												"contact_details": [{
													"type": "phone",
													"content": "0756554600",
													"notes": "",
													"allow_transactional": 1,
													"allow_marketing": 1
												},{
													"type": "email",
													"content": "support@newbook.cloud",
													"notes": "",
													"allow_transactional": 1,
													"allow_marketing": 1
												}],
												"custom_fields": []
											},{
												"id": "2",
												"type_id": null,
												"name": "Xtreme.com.au Pty Ltd",
												"street": "15 Olympic Circuit",
												"city": "Southport",
												"state": "Queensland (QLD)",
												"postcode": "4211",
												"country": "Australia",
												"account_id": "78446",
												"account_balance": "0.00",
												"account_currency_code": "AUD",
												"auto_billing_limit": null,
												"auto_debit": 0,
												"contact_details": [{
													"type": "phone",
													"content": "0755314816",
													"notes": "",
													"allow_transactional": 1,
													"allow_marketing": 1
												},{
													"type": "email",
													"content": "support@xtreme.com.au",
													"notes": "",
													"allow_transactional": 1,
													"allow_marketing": 1
												}],
												"custom_fields": [{
													"id": 1,
													"type": "text",
													"label": "My Test Field",
													"value": "Something"
												}]
											}],
											"message": ""
										}
									
								
AnchorCompany Types: List

Retrieve the list of Company Types for limiting the Company List.

Company Types: List Example

Request URL

https://api.newbook.cloud/rest/companies_types_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": 1,
												"name": "Supplier"
											}],
											"message": ""
										}
									
								
AnchorCompanies: Update

Update a particular Company

Request Notes:

company_id is required

contact_email and contact_phone can be provided to create or update Contact Details for a Company. When updating, these values will also check & not double up if the new information already exists on the Company. And if you would like to prevent the updating of existing Contact Details please provide update_existing_details as "false".

Alternatively you can manage the Contact Details in more depth as an array:

				
					"contact_details": [
						{
							"id": 1,
							"type": "phone",
							"content": "0756554600",
							"notes": "Office landline",
							"allow_transactional": "1",
							"allow_marketing": "1",
							"remove": 0
						},
						{
							"id": 2,
							"type": "email",
							"content": "support@newbook.cloud",
							"notes": "Work email address",
							"allow_transactional": "1",
							"allow_marketing": "0",
							"remove": 0
						}
					]
				
			
  • id can be optionally provided when updating a Company to update or remove a particular Contact Detail
  • type is required
  • content is required
  • notes is optional
  • allow_transactional is optional and will default to true when not provided
  • allow_marketing is optional and will use the Instance Setting Default when not provided
  • remove is optional and when true it will remove the Contact Detail from the Company

notes will add new details to the Company (not replace the existing information) and will check & not double up if the new information already exists on the Company. This can either be provided as a string, or as array of objects containing the following options:

  • content is required and should contain the content of the note to be added
  • type_id is optional and will use the System Default if not provided as per the Note Types: List request
  • output_message is optional and will default to true when not provided. This controls whether the note will display at the top of the page.
  • task_list is optional and will default to false when note provided. This controls whether the note will display on any tasks lists.

Companies: Update Example

Request URL

https://api.newbook.cloud/rest/companies_update

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"company_id": "3",
											"name": "Website Enquiry",
											"contact_person": "John Doe",
											"contact_email": "john.doe@test.com",
											"contact_phone": "1234567890",
											"notes": [
												"Some custom information",
												"Some more information"
											],
											"custom_fields": [{
												"field_id": 1,
												"field_value": "Something"
											}]
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"company_id": "1"
											},
											"message": "Successfully updated Company"
										}
									
								
AnchorCompanies Staff: List

Retrieve the list of Companies Staff for recording non-Booking-specific charges.

Request Notes:

account_id is optional and when provided it will restrict the results to the matching Client Accounts.

company_id is optional and when provided will limit the results to the matching Company

created_when is optional and when provided, restricts the returned Staff to only those which were created on the date given

Send account_breakdown as true to see the balance of each associated Sub Client Account (gl_category)

Companies Staff: List Example

Request URL

https://api.newbook.cloud/rest/companies_staff_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"company_id": "3"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "2",
												"firstname": "John",
												"lastname": "Doe",
												"account_id": "307",
												"account_balance": "0.00",
												"auto_billing_limit": null,
												"street": "",
												"city": "",
												"postcode": "",
												"state": "Unknown",
												"country": "New Zealand",
												"company_id": "3",
												"contact_details": [],
												"custom_fields": []
											}],
											"message": ""
										}
									
								
AnchorCompanies Staff: Update

Update a particular Company Staff

Request Notes:

company_staff_id or account_id must be provided to update the details of a particular Company Staff member.

contact_email and contact_phone can be provided to create or update Contact Details for a Company Staff. When updating, these values will also check & not double up if the new information already exists on the Company Staff. And if you would like to prevent the updating of existing Contact Details please provide update_existing_details as "false".

Alternatively you can manage the Contact Details in more depth as an array:

				
					"contact_details": [
						{
							"id": 1,
							"type": "phone",
							"content": "0756554600",
							"notes": "Office landline",
							"allow_transactional": "1",
							"allow_marketing": "1",
							"remove": 0
						},
						{
							"id": 2,
							"type": "email",
							"content": "support@newbook.cloud",
							"notes": "Work email address",
							"allow_transactional": "1",
							"allow_marketing": "0",
							"remove": 0
						}
					]
				
			
  • id can be optionally provided when updating a Company Staff to update or remove a particular Contact Detail
  • type is required
  • content is required
  • notes is optional
  • allow_transactional is optional and will default to true when not provided
  • allow_marketing is optional and will use the Instance Setting Default when not provided
  • remove is optional and when true it will remove the Contact Detail from the Company Staff

notes will add new details to the Company Staff (not replace the existing information) and will check & not double up if the new information already exists on the Company Staff. This can either be provided as a string, or as array of objects containing the following options:

  • content is required and should contain the content of the note to be added
  • type_id is optional and will use the System Default if not provided as per the Note Types: List request
  • output_message is optional and will default to true when not provided. This controls whether the note will display at the top of the page.
  • task_list is optional and will default to false when note provided. This controls whether the note will display on any tasks lists.

Companies Staff: Update Example

Request URL

https://api.newbook.cloud/rest/companies_staff_update

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"company_staff_id": "2",
											"firstname": "John",
											"lastname": "Doe",
											"contact_email": "john.doe@test.com",
											"contact_phone": "1234567890",
											"notes": [
												"Some custom information",
												"Some more information"
											],
											"custom_fields": [{
												"field_id": 1,
												"field_value": "Something"
											}]
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"company_staff_id": "2"
											},
											"message": "Successfully updated Company Staff"
										}
									
								
AnchorTravel Agents: List

Retrieve the list of Travel Agents for recording non-Booking-specific charges.

Request Notes:

name is optional and when provided it will restrict the results to the matching Travel Agents

created_when is optional and when provided, restricts the returned Travel Agents to only those which were created on the date given

Send account_breakdown as true to see the balance of each associated Sub Client Account (gl_category)

Travel Agents: List Example

Request URL

https://api.newbook.cloud/rest/travel_agent_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"name": "",
											"created_when": "2016-02-01"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"name": "Booking.com",
												"street": "",
												"city": "",
												"state": "",
												"postcode": "",
												"country": "",
												"account_id": "293586",
												"account_balance": "0.00",
												"auto_billing_limit": null,
												"contact_details": [{
													"type": "email",
													"content": "support@booking.com",
													"notes": "",
													"allow_transactional": 1,
													"allow_marketing": 1
												}]
											},{
												"name": "Expedia",
												"street": "",
												"city": "",
												"state": "",
												"postcode": "",
												"country": "",
												"account_id": "294247",
												"account_balance": "0.00",
												"auto_billing_limit": null,
												"contact_details": [{
													"type": "email",
													"content": "support@expedia.com",
													"notes": "",
													"allow_transactional": 1,
													"allow_marketing": 1
												}]
											}],
											"message": ""
										}
									
								
AnchorEvents: List

Retrieve a list of Events within the given time period.

Request Notes:

The only required fields are period_from, period_to and list_type - the rest are optional

list_type Shows Events which:
incoming1 are expected to Arrive during the specified dates
ongoing2 are currently In-House (dates not required)
departing2 are expected to Depart during the specified dates
departed have Departed during the specific dates
placed1 were placed during the specified dates
cancelled have been Cancelled during the specified dates
staying1 are expected to stay during the specified dates
quoted3 were placed during the specified dates
  • 1ignores Events of status Cancelled, and Quote
  • 2shows only Events of status Ongoing
  • 3shows only Events of status Quote

search is optional and when provided it will restrict the results to the matching Billing or Contact Client Accounts.

Send account_breakdown as true to see the balance of each associated Sub Client Account (gl_category)

Response Notes:

The billing_client_account_id field in the Event array can be used to charge to the Event Client Account, this may be different from the event_account_id when the Event is billing to Group, Company, etc

Please note unlike other responses, in the Events: List response account_breakdown is prefixed as event_account_breakdown to disambiguate against the other keys.

Inventory Item data:

The inventory_item array holds all the Inventory Item objects on the Event.

  • stay_cost_contribution indicates whether the amount Increases the price of each night, or if it is Excluded from the price of each night.

Events: List Example

Request URL

https://api.newbook.cloud/rest/events_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"period_from": "2015-08-21 00:00:00",
											"period_to": "2015-08-21 23:59:59",
											"list_type": "ongoing"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "2",
												"event_package_id": "null",
												"contact_account_id": "1002",
												"billing_account_id": "1002",
												"name": "Test",
												"period_from": "2024-04-20 14:00:00",
												"period_to": "2024-04-24 10:00:00",
												"adults": "1",
												"children": "0",
												"infants": "0",
												"animals": "0",
												"status": "Unconfirmed",
												"booked_when": "2024-04-18 11:30:00",
												"booked_by": "-2",
												"cancelled_when": "null",
												"cancelled_by": "null",
												"cancellation_reason_id": "null",
												"cancel_event_date": "null",
												"create_charges": "1",
												"contact_account_for": "events",
												"contact_account_for_id": "2",
												"contact_account_name": "Jane Doe",
												"billing_account_for": "events",
												"billing_account_for_id": "2",
												"billing_account_for_name": "Jane Doe",
												"billing_account_balance": "320.00",
												"event_account_id": "870",
												"event_account_balance": "320.00",
												"event_total": "320.00",
												"guest_list": [
													{
														"title": "",
														"firstname": "John",
														"lastname": "Doe",
														"email_address": "test@test.com",
														"contact_number": ""
													}
												],
												"activities": [
													{
														"facility_id": "4",
														"facility_name": "Function Rooms Marble Room",
														"description": "Tour",
														"gl_account_id": "12",
														"gl_category_id": "1",
														"period_from": "2024-04-20 14:00:00",
														"period_to": "2024-04-24 10:00:00",
														"adults": "1",
														"children": "0",
														"infants": "0",
														"animals": "0",
														"amount": "60.00"
													}
												],
												"facilities_hire": [
													{
														"facility_id": "3",
														"facility_name": "Barbeque Area 1",
														"description": "BBQ Hire",
														"gl_account_id": "12",
														"gl_category_id": "1",
														"period_from": "2024-04-20 14:00:00",
														"period_to": "2024-04-24 10:00:00",
														"adults": "1",
														"children": "0",
														"infants": "0",
														"animals": "0",
														"amount": "60.00"
													}
												],
												"inventory_items": [{
													"description": "Champagne",
													"stay_date": "2024-04-20",
													"stay_cost_contribution": "Include",
													"gl_account_id": "4",
													"gl_category_id": "2",
													"amount": "75.00"
												},{
													"description": "Picnic Basket",
													"stay_date": "2024-04-20",
													"stay_cost_contribution": "Increase",
													"gl_account_id": "4",
													"gl_category_id": "2",
													"amount": "125.00"
												}]
											},{
												"id": "3",
												"event_package_id": "null",
												"contact_account_id": "1003",
												"billing_account_id": "1003",
												"name": "Test",
												"period_from": "2024-04-20 14:00:00",
												"period_to": "2024-04-24 10:00:00",
												"adults": "1",
												"children": "0",
												"infants": "0",
												"animals": "0",
												"status": "Unconfirmed",
												"booked_when": "2024-04-18 11:30:00",
												"booked_by": "-2",
												"cancelled_when": "null",
												"cancelled_by": "null",
												"cancellation_reason_id": "null",
												"cancel_event_date": "null",
												"create_charges": "1",
												"contact_account_for": "events",
												"contact_account_for_id": "3",
												"contact_account_name": "Jane Doe",
												"billing_account_for": "events",
												"billing_account_for_id": "3",
												"billing_account_for_name": "Jane Doe",
												"billing_account_balance": "320.00",
												"event_account_id": "870",
												"event_account_balance": "320.00",
												"event_total": "320.00",
												"guest_list": [
													{
														"title": "",
														"firstname": "John",
														"lastname": "Doe",
														"email_address": "test@test.com",
														"contact_number": ""
													}
												],
												"activities": [
													{
														"facility_id": "4",
														"facility_name": "Function Rooms Marble Room",
														"description": "Tour",
														"gl_account_id": "12",
														"gl_category_id": "1",
														"period_from": "2024-04-20 14:00:00",
														"period_to": "2024-04-24 10:00:00",
														"adults": "1",
														"children": "0",
														"infants": "0",
														"animals": "0",
														"amount": "60.00"
													}
												],
												"facilities_hire": [
													{
														"facility_id": "3",
														"facility_name": "Barbeque Area 1",
														"description": "BBQ Hire",
														"gl_account_id": "12",
														"gl_category_id": "1",
														"period_from": "2024-04-20 14:00:00",
														"period_to": "2024-04-24 10:00:00",
														"adults": "1",
														"children": "0",
														"infants": "0",
														"animals": "0",
														"amount": "60.00"
													}
												],
												"inventory_items": [{
													"description": "Champagne",
													"stay_date": "2024-04-20",
													"stay_cost_contribution": "Include",
													"gl_account_id": "4",
													"gl_category_id": "2",
													"amount": "75.00"
												},{
													"description": "Picnic Basket",
													"stay_date": "2024-04-20",
													"stay_cost_contribution": "Increase",
													"gl_account_id": "4",
													"gl_category_id": "2",
													"amount": "125.00"
												}]
											}],
											"message": ""
										}
									
								
AnchorEvents: Get

Retrieve the details of a single Event.

Request Notes:

event_id must be provided to retrieve the Event.

Send account_breakdown as true to see the balance of each associated Sub Client Account (gl_category)

Response Notes:

The returned data from this request is identical to Events: List but for the specific Event alone.

If no such Event ID exists, the success response parameter will be "false" and no data will be returned.

Please note unlike other responses, in the Events: Get response account_breakdown is prefixed as event_account_breakdown to disambiguate against the other keys.

Events: Get Example

Request URL

https://api.newbook.cloud/rest/events_get

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"event_id": 2,
											"account_breakdown": true
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"id": "2",
												"event_package_id": "null",
												"contact_account_id": "1002",
												"billing_account_id": "1002",
												"name": "Test",
												"period_from": "2024-04-20 14:00:00",
												"period_to": "2024-04-24 10:00:00",
												"adults": "1",
												"children": "0",
												"infants": "0",
												"animals": "0",
												"status": "Unconfirmed",
												"booked_when": "2024-04-18 11:30:00",
												"booked_by": "-2",
												"cancelled_when": "null",
												"cancelled_by": "null",
												"cancellation_reason_id": "null",
												"cancel_event_date": "null",
												"create_charges": "1",
												"contact_account_for": "events",
												"contact_account_for_id": "2",
												"contact_account_name": "Jane Doe",
												"billing_account_for": "events",
												"billing_account_for_id": "2",
												"billing_account_for_name": "Jane Doe",
												"billing_account_balance": "320.00",
												"event_account_id": "870",
												"event_account_balance": "320.00",
												"event_total": "320.00",
												"guest_list": [
													{
														"title": "",
														"firstname": "John",
														"lastname": "Doe",
														"email_address": "test@test.com",
														"contact_number": ""
													}
												],
												"activities": [
													{
														"facility_id": "4",
														"facility_name": "Function Rooms Marble Room",
														"description": "Tour",
														"gl_account_id": "12",
														"gl_category_id": "1",
														"period_from": "2024-04-20 14:00:00",
														"period_to": "2024-04-24 10:00:00",
														"adults": "1",
														"children": "0",
														"infants": "0",
														"animals": "0",
														"amount": "60.00"
													}
												],
												"facilities_hire": [
													{
														"facility_id": "3",
														"facility_name": "Barbeque Area 1",
														"description": "BBQ Hire",
														"gl_account_id": "12",
														"gl_category_id": "1",
														"period_from": "2024-04-20 14:00:00",
														"period_to": "2024-04-24 10:00:00",
														"adults": "1",
														"children": "0",
														"infants": "0",
														"animals": "0",
														"amount": "60.00"
													}
												],
												"inventory_items": [{
													"description": "Champagne",
													"stay_date": "2024-04-20",
													"stay_cost_contribution": "Include",
													"gl_account_id": "4",
													"gl_category_id": "2",
													"amount": "75.00"
												},{
													"description": "Picnic Basket",
													"stay_date": "2024-04-20",
													"stay_cost_contribution": "Increase",
													"gl_account_id": "4",
													"gl_category_id": "2",
													"amount": "125.00"
												}],
												"event_account_breakdown": [{
													"name": "Accommodation",
													"gl_category_id": "1",
													"balance": "20.00"
												},{
													"name": "Extras",
													"gl_category_id": "2",
													"balance": "300.00"
												}]
											},
											"message": ""
										}
									
								
AnchorLeads: List

Retrieve/search the Leads database.

Request Notes:

id is optional and when provided it will restrict the results to those with a matching id

search is optional and when provided it will restrict the results to the matching Leads. It will search their name, contact person (first name and last name), and contact details (phone, email, etc) for a match

created_when is optional and when provided, restricts the returned Leads to only those which were created on the date given

staff_id is optional and when provided, restricts the returned Leads to those assigned to that User (see Users: List)

  • You can provide staff_id_include as false to show Leads not assigned to that User
  • If you provide unassigned into the request parameter staff_id Leads that are unassigned will be returned
  • staff_id can be an array of User IDs

status_id is optional and when provided it will restrict the results to Leads with a matching Status (see Lead Statuses: List).

Send account_breakdown as true to see the balance of each associated Sub Client Account (gl_category)

Response Notes:

contact_details and custom_fields are arrays which will be empty when no data of that type is available

Leads: List Example

Request URL

https://api.newbook.cloud/rest/leads_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"search": "tourist",
											"created_when": "2016-02-01",
											"id": "1"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"firstname": "John",
												"lastname": "Doe",
												"name": "A Tourist Park",
												"account_id": "789",
												"account_balance": "0.00",
												"auto_billing_limit": null,
												"street": "Level 2, 9 Ouyan Street",
												"city": "Surfers Paradise",
												"state": "Queensland (QLD)",
												"postcode": "4217",
												"country": "Australia",
												"staff_id": "1",
												"created_when": "2017-08-25 22:44:26",
												"modified_when": "2018-12-18 10:24:51",
												"status_when": "2018-10-22 15:06:29",
												"staff_sharing": [
													{
														"staff_id": "1",
														"ownership": "50.00"
													},
													{
														"staff_id": "2",
														"ownership": "50.00"
													}
												],
												"contact_details": [{
													"type": "phone",
													"content": "0756554600",
													"notes": "",
													"allow_transactional": 1,
													"allow_marketing": 1
												},{
													"type": "email",
													"content": "john.doe@test.com",
													"notes": "",
													"allow_transactional": 1,
													"allow_marketing": 1
												}],
												"custom_fields": [{
													"id": 2,
													"type": "text",
													"label": "My Test Field",
													"value": "Something"
												}],
												"status_id": "-1",
												"status_name": "Potential",
												"status_type": "0",
												"status_type_name": "Open",
												"points": "5",
												"parent_id": null,
												"interest_level": "Low",
												"expected_revenue": "50.00",
												"othername": "Johnny",
												"created_by": "14",
												"assigned_when": "2019-07-21 13:42:14",
												"title": "Mr",
												"notes": [{
													"id": "1",
													"type_id": "1",
													"content": "This is my Lead note",
													"created_when": "2024-04-18 11:30:00",
													"created_by": "11",
													"updated_when": "2024-04-19 00:00:00",
													"updated_by": "5"
												}],
												"status_reason": {
													"id": "1",
													"name": "My Status Reason"
												},
												"method": {
													"id": "6",
													"name": "My Lead Method"
												},
												"source": {
													"id": "1",
													"name": "Telephone"
												},
												"lead_types": [
													{
														"id": "1",
														"name": "Guests"
													},
													{
														"id": "2",
														"name": "Callers"
													}
												],
												"categories": [
													{
														"id": "3",
														"name": "My Lead Category"
													}
												],
												"interests": [
													{
														"id": "5",
														"name": "Camping"
													}
												],
												"inventory_items": [
													{
														"id": "5",
														"name": "Meal Upgrade"
													}
													{
														"id": "12",
														"name": "Helicopter Ride"
													}
												]
											}],
											"message": ""
										}
									
								
AnchorLeads: Create

Create a Lead within Newbook.

Request Notes:

name and/or firstname + lastname must be provided.

contact_email and contact_phone can be provided to create or update Contact Details for a Lead. When updating, these values will also check & not double up if the new information already exists on the Lead. And if you would like to prevent the updating of existing Contact Details please provide update_existing_details as "false".

Alternatively you can manage the Contact Details in more depth as an array:

				
					"contact_details": [
						{
							"id": 1,
							"type": "phone",
							"content": "0756554600",
							"notes": "Office landline",
							"allow_transactional": "1",
							"allow_marketing": "1",
							"remove": 0
						},
						{
							"id": 2,
							"type": "email",
							"content": "support@newbook.cloud",
							"notes": "Work email address",
							"allow_transactional": "1",
							"allow_marketing": "0",
							"remove": 0
						}
					]
				
			
  • id can be optionally provided when updating a Lead to update or remove a particular Contact Detail
  • type is required
  • content is required
  • notes is optional
  • allow_transactional is optional and will default to true when not provided
  • allow_marketing is optional and will use the Instance Setting Default when not provided
  • remove is optional and when true it will remove the Contact Detail from the Lead

notes will add new details to the Lead (not replace the existing information) and will check & not double up if the new information already exists on the Lead. This can either be provided as a string, or as array of objects containing the following options:

  • content is required and should contain the content of the note to be added
  • type_id is optional and will use the System Default if not provided as per the Note Types: List request
  • output_message is optional and will default to true when not provided. This controls whether the note will display at the top of the page.
  • task_list is optional and will default to false when note provided. This controls whether the note will display on any tasks lists.

status_id is required. You must provide a valid option from the Lead Statuses: List request.

source_id is optional. You must provide a valid option from the Lead Sources: List request.

lead_type_id can optionally be provided as an array. All options must be valid options from the Lead Types: List request.

lead_categories_id can optionally be provided as an array. All options must be valid options from the Lead Categories: List request.

lead_interest_id can optionally be provided as an array. All options must be valid options from the Lead Interests: List request.

duplicate_matching can optionally be provided as one of the following options:

  • false: do not find duplicates
  • name: Name only
  • phone: Phone only
  • email: Email only
  • name_and_phone: Name and Phone
  • name_and_email: Name and Email
  • name_and_email_and_phone: Name and Email and Phone

When not provided, this determination falls back to the Instance Setting called When adding a Lead, Detect Duplicates using, which defaults to name_and_email.

If duplicates are encountered, Newbook will automatically update the record of the first duplicate found.

If specified, custom_fields must be based on the response to the Custom Fields request, to retrieve the different Custom Fields set up in the instance:

								
									"custom_fields": [
										{
											"field_id": 2,
											"field_value": 8
										}
									]
								
							

Leads: Create Example

Request URL

https://api.newbook.cloud/rest/leads_create

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"name": "Website Enquiry",
											"firstname": "John",
											"lastname": "Doe",
											"contact_email": "john.doe@test.com",
											"contact_phone": "1234567890",
											"status_id": 1,
											"notes": [
												"Some custom information",
												"Some more information"
											]
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"lead_id": "1"
											},
											"message": "Successfully Created Lead"
										}
									
								
AnchorLeads: Update

Update an existing Lead within Newbook.

Request Notes:

lead_id is required

All other parameters are optional, please see Leads: Create for more details.

Leads: Update Example

Request URL

https://api.newbook.cloud/rest/leads_update

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"lead_id": "1",
											"name": "Website Enquiry",
											"firstname": "John",
											"lastname": "Doe",
											"contact_email": "john.doe@test.com",
											"contact_phone": "1234567890",
											"notes": [
												"Some custom information",
												"Some more information"
											]
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"lead_id": "1"
											},
											"message": "Successfully updated Lead"
										}
									
								
AnchorLeads: Activity History

Retrieve Activity History for an existing Lead within Newbook.

Request Notes:

lead_id is required

Leads: Activity History Example

Request URL

https://api.newbook.cloud/rest/leads_activity_history

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"lead_id": "1"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [
												{
													"type": "Note #320",
													"date": "2019-02-08 15:01:14",
													"local_time": "3:01 PM (Brisbane, Australia)",
													"description": " Information: Called client yesterday.",
													"status": "",
													"user": "Newbook Support"
												},
												{
													"type": "Task #1341",
													"date": "2019-02-08 14:00:00",
													"local_time": "2:00 PM (Brisbane, Australia)",
													"description": "Accounting: Chase up Invoice",
													"status": "",
													"user": "Newbook Support"
												},
												{
													"type": "Sent Email #283",
													"date": "Queued",
													"local_time": "Queued",
													"description": "Test",
													"status": "Delivered,Opened x 1",
													"user": "Newbook Support"
												}
											],
											"message": ""
										}
									
								
AnchorLead Categories: List

Retrieves the list of available Lead Categories.

Lead Categories: List Example

Request URL

https://api.newbook.cloud/rest/leads_categories

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"1": "Website Contact Form",
												"2": "Website Blog Subscriber"
											},
											"message": ""
										}
									
								
AnchorLead Interests: List

Retrieves the list of available Lead Interests.

Lead Interests: List Example

Request URL

https://api.newbook.cloud/rest/leads_interests

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"1": "Product Type A",
												"2": "Product Type B"
											},
											"message": ""
										}
									
								
AnchorLead Sources: List

Retrieves the list of available Lead Sources.

Lead Sources: List Example

Request URL

https://api.newbook.cloud/rest/leads_sources

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"1": "Google",
												"2": "Facebook",
												"3": "Direct"
											},
											"message": ""
										}
									
								
AnchorLead Sources: Create

Create a new Lead Source within Newbook.

Lead Sources: Create Example

Request URL

https://api.newbook.cloud/rest/leads_sources_create

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"name": "test"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"source_id": "4"
											},
											"message": ""
										}
									
								
AnchorLead Statuses: List

Retrieves the list of available Lead Statuses.

Response Notes:

The IDs of the Lead Statuses in the example here are negative; these are defaults Newbook creates

Lead Statuses: List Example

Request URL

https://api.newbook.cloud/rest/leads_statuses

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [
												{
													"id": "1",
													"name": "Quoted",
													"status_type": "0",
													"status_type_name": "Open"
												},
												{
													"id": "-1",
													"name": "Potential",
													"status_type": "0",
													"status_type_name": "Open"
												},
												{
													"id": "-2",
													"name": "Won",
													"status_type": "1",
													"status_type_name": "Closed"
												},
												{
													"id": "-3",
													"name": "Lost",
													"status_type": "2",
													"status_type_name": "Lost"
												}
											],
											"message": ""
										}
									
								
AnchorLead Types: List

Retrieves the list of available Lead Types.

Lead Types: List Example

Request URL

https://api.newbook.cloud/rest/leads_types

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"1": "Customer",
												"2": "Supplier"
											},
											"message": ""
										}
									
								
AnchorSecurity Gates: List

Retrieve the list of Security Gates configured within Newbook

Security Gates: List Example

Request URL

https://api.newbook.cloud/rest/security_gate_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [
												{
													"security_gate_id": "1",
													"security_gate_name": "South Gate"
												},
												{
													"security_gate_id": "2",
													"security_gate_name": "North Gate"
												}
											],
											"message": ""
										}
									
								
AnchorSecurity Areas: List

Retrieve the list of Security Areas configured within Newbook.

Response Notes:

security_gates contains the list of Gates the Security Area is authorised for.

Security Areas: List Example

Request URL

https://api.newbook.cloud/rest/security_area_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [
												{
													"security_area_id": "1",
													"security_area_name": "All Access",
													"security_gates": [
														{
															"security_gate_id": "1",
															"security_gate_name": "South Gate"
														},
														{
															"security_gate_id": "2",
															"security_gate_name": "North Gate"
														}
													]
												},
												{
													"security_area_id": "2",
													"security_area_name": "North Gate Only",
													"security_gates": [
														{
															"security_gate_id": "2",
															"security_gate_name": "North Gate"
														}
													]
												}
											],
											"message": ""
										}
									
								
AnchorAccess Codes: List

Retrieve the Access Codes valid within the current 48 hour window (+ and - 24 hours).

Request Notes:

created_when is optional and when provided, restricts the returned Access Codes to only those which were created on the date given

Send access_code_mappings as true to also return a list of Access Code mapping details to other software integrations such as Access Control Systems.

Response Notes:

The booking data fields are returned if the access_code given is related to a Booking

Access Codes: List Example

Request URL

https://api.newbook.cloud/rest/access_codes_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"created_when": "2016-02-01"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"access_code_id": "442724",
												"access_code_car_rego": "ITR86B",
												"access_code_period_from": "2016-02-05 14:00:00",
												"access_code_period_to": "2016-02-08 10:00:00",
												"security_area_id": "1",
												"security_area_name": "All Access",
												"booking_id": "345",
												"booking_name": "John Doe",
												"booking_arrival": "2016-02-05 14:00:00",
												"booking_departure": "2016-02-08 10:00:00",
												"booking_status": "Confirmed",
												"guest_id": "24",
												"guest_name": "John Doe"
											},{
												"access_code_id": "450987",
												"access_code_car_rego": "VRM555",
												"access_code_period_from": "2016-02-06 14:00:00",
												"access_code_period_to": "2016-02-07 10:00:00",
												"security_area_id": "1",
												"security_area_name": "All Access",
												"booking_id": null,
												"booking_name": null,
												"booking_arrival": null,
												"booking_departure": null,
												"booking_status": null,
												"guest_id": null,
												"guest_name": null
											}],
											"message": ""
										}
									
								
AnchorAccess Codes: Push History

Records access history for particular Access Codes and their Bookings.

Request Notes:

access_history an array of individual access attempts, containing:

  • access_code_id is required
  • booking_id is optional; if not provided Newbook will try to determine the Booking based on the Access Code record in the database
  • security_gate_id is required. It can be determined from the Security Gates: List request
  • description is required to specified what happened for this entry.
  • granted is optional. If not provided Newbook will determine this based on the description being "success"
  • timestamp is optional. If not provided it will default to the current timestamp

Access Codes: Push History Example

Request URL

https://api.newbook.cloud/rest/access_codes_history

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"access_history": [{
												"access_code_id": "442724",
												"booking_id": "345",
												"security_gate_id": "1",
												"description": "Failure",
												"granted": "0",
												"timestamp": "2016-02-05 10:52:00"
											},{
												"access_code_id": "442724",
												"booking_id": "345",
												"security_gate_id": "1",
												"description": "Success",
												"granted": "1",
												"timestamp": "2016-02-05 10:55:00"
											},{
												"access_code_id": "450987",
												"booking_id": null,
												"security_gate_id": "2",
												"description": "Unlocked",
												"granted": "1",
												"timestamp": "2016-02-05 11:30:00"
											}]
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [],
											"message": "Created 3 Access History Records"
										}
									
								
AnchorAccess Codes: Get History

Returns access history for particular Access Codes.

Request Notes:

Can be provided any combination of the below filters to limit results:

  • access_code_id, booking_id and security_gate_id are allowed to be integers or arrays of integers corresponding to particular values found in Newbook.
  • description is allowed to be a string or an array of strings and will only find exact matches for the description specified.
  • period_from and period_to will restrict history to results from later or earlier than the specified times respectively. Both can be provided to find results from a specific period.

Access Codes: Get History Example

Request URL

https://api.newbook.cloud/rest/access_codes_get_history

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"access_code_id": 1234,
											"booking_id": 10,
											"security_gate_id": [1,2,3],
											"period_from": "2024-04-18",
											"period_to": "2024-04-20"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [
												{
													"id": "100",
													"access_code_id": "1234",
													"booking_id": "10",
													"security_gate_id": "1",
													"description": "granted",
													"timestamp": "2024-04-18 11:30:00"
												},
												{
													"id": "99",
													"access_code_id": "1234",
													"booking_id": "10",
													"security_gate_id": "1",
													"description": "granted",
													"timestamp": "2024-04-18 11:30:00"
												},
												{
													"id": "98",
													"access_code_id": "1234",
													"booking_id": "10",
													"security_gate_id": "2",
													"description": "granted",
													"timestamp": "2024-04-20 14:00:00"
												}
											],
											"message": ""
										}
									
								
AnchorGL Accounts: List

Pull the list of GL Accounts from within Newbook.

Request Notes:

id, code, short_description, and long_description are all optional and when any of them are provided they will restrict the results to the matching GL Accounts (each field searches specifically)

show_inactive is optional, default false, and when provided with a truthy value, it will include inactive GL Accounts in the response.

Response Notes:

If refundable is set to 1 (true) it means any charges raised in this GL Account are Security Deposits aka Bonds. When these are paid off, the assumption is that money will eventually be returned to the Guest (or converted to other income e.g. Property Damage)

GL Accounts: List Example

Request URL

https://api.newbook.cloud/rest/gl_account_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"gl_account_id": "1",
									"gl_account_code": "ACC",
									"gl_account_name": "Accommodation",
									"long_description": "",
									"refundable": "0",
									"gl_group_id": null,
									"gl_group_name": null,
									"active": "1"
								},
								{
									"gl_account_id": "2",
									"gl_account_code": "POS",
									"gl_account_name": "POS Charges",
									"long_description": "",
									"refundable": "0",
									"gl_group_id": "1",
									"gl_group_name": "Extras",
									"active": "1"
								},
								{
									"gl_account_id": "3",
									"gl_account_code": "BOND",
									"gl_account_name": "Bonds",
									"long_description": "",
									"refundable": "1",
									"gl_group_id": "1",
									"gl_group_name": "Extras",
									"active": "1"
								},
								{
									"gl_account_id": "4",
									"gl_account_code": "FD",
									"gl_account_name": "Food",
									"long_description": "",
									"refundable": "0",
									"gl_group_id": "1",
									"gl_group_name": "Extras",
									"active": "1"
								}
							],
							"message": ""
						}
					
				
AnchorGL Accounts: Create

Creates a GL Account.

Request Notes:

  • code is required.
  • name is required.
  • long_description
  • refundable will default to false if not provided.
  • reportable will default to true if not provided.
  • gl_group_id must match the ID of an existing GL Account Group ID found at GL Accounts Groups: List if provided.
  • active will default to true if not provided.

GL Accounts: Create Example

Request URL

https://api.newbook.cloud/rest/gl_account_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"code": "FD",
							"name": "Food",
							"refundable": "0",
							"reportable": "1",
							"gl_group_id": 12,
							"active": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"gl_account_id": 53
							},
							"message": ""
						}
					
				
AnchorGL Accounts: Update

Updates an existing GL Account.

Request Notes:

gl_account_id must be provided to update a particular GL Accounts details.

Please see below for a list of optional details that can be updated on the GL Account. At least one of these must be provided.

  • code
  • name
  • long_description
  • refundable - supports values like "true", false, 1.
  • reportable - supports values like "true", false, 1.
  • active - supports values like "true", false, 1.
  • gl_group_id must match the ID of an existing GL Account Group ID found at GL Accounts Groups: List if provided.

GL Accounts: Update Example

Request URL

https://api.newbook.cloud/rest/gl_account_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"gl_account_id": 3,
							"name": "Beverages"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"gl_account_id": 3
							},
							"message": ""
						}
					
				
AnchorGL Accounts Groups: List

Pull the list of GL Account Groups from within Newbook.

Request Notes:

show_inactive is optional, default false, and when provided with a truthy value, it will include inactive GL Account Groups in the response.

id can also be optionally provided to filter results to a particular GL Account Group ID.

GL Accounts Groups: List Example

Request URL

https://api.newbook.cloud/rest/gl_account_groups_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"gl_account_group_id": 1,
									"name": "Lodge Accommodation",
									"prefix": "",
									"active": "1"
								},
								{
									"gl_account_group_id": 2,
									"name": "Campsite Accommodation",
									"prefix": "",
									"active": "1"
								},
								{
									"gl_account_group_id": 3,
									"name": "Activities",
									"prefix": "",
									"active": "1"
								},
								{
									"gl_account_group_id": 4,
									"name": "F&B",
									"prefix": "",
									"active": "1"
								}
							],
							"message": ""
						}
					
				
AnchorGL Accounts Groups: Create

Creates a GL Account Group.

Request Notes:

  • name is required.
  • prefix
  • active will default to true if not provided.

GL Accounts Group: Create Example

Request URL

https://api.newbook.cloud/rest/gl_account_groups_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "Retail",
							"prefix": "",
							"active": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"gl_account_group_id": 5
							},
							"message": ""
						}
					
				
AnchorGL Accounts Groups: Update

Updates an existing GL Account Group.

Request Notes:

gl_account_group_id must be provided to update a particular GL Account Groups details.

Please see below for a list of optional details that can be updated on the GL Account Group. At least one of these must be provided.

  • name
  • prefix
  • active - supports values like "true", false, 1.

GL Accounts Group: Update Example

Request URL

https://api.newbook.cloud/rest/gl_account_groups_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"gl_account_group_id": 4,
							"name": "Food&Beverages"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"gl_account_group_id": 4
							},
							"message": ""
						}
					
				
AnchorSub Client Accounts: List

Pull the list of Sub Client Accounts (aka GL Categories) from within Newbook.

Sub Client Accounts: List Example

Request URL

https://api.newbook.cloud/rest/gl_category_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"gl_category_id": "1",
												"gl_category_name": "Accommodation"
											},{
												"gl_category_id": "2",
												"gl_category_name": "Extras"
											}],
											"message": ""
										}
									
								
AnchorClients Accounts: List

Retrieve a list of Client Accounts.

Request Notes:

for (optional): An array of the type of Client Account to return

account_breakdown, client_account_tax_reconciliation and client_account_item_breakdown can optionally be provided to return additional information about the Client Account. Please see Clients Accounts: Get for more details.

Clients Accounts: List Example

Request URL

https://api.newbook.cloud/rest/clients_accounts_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"for": [
								"companies"
							],
							"account_breakdown": true
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"id": "10",
									"for": "companies",
									"for_id": "20",
									"for_name": "Acme Pty Ltd",
									"auto_billing_type": "1",
									"auto_billing_limit": null,
									"invoice_reminders": "1",
									"invoice_reminders_due_type": "before",
									"invoice_reminders_due_days": "1",
									"invoice_reminders_interval": "day",
									"invoice_reminders_interval_multiplier": "7",
									"invoice_auto_debit_days": "0",
									"invoice_auto_debit_days_type": "before",
									"late_fee_exemption": "0",
									"invoice_payment_terms": null,
									"balance": "12.00",
									"paypal_id": "",
									"paypal_connection_id": null,
									"cc_gateway_id": null,
									"currency_id": null,
									"tax_free": "0",
									"active": "1",
									"transaction_fees": "1",
									"external_tax_id": null,
									"bpay_auto_reconcile": "1"
								}							],
							"message": ""
						}
					
				
AnchorClients Accounts: Get

Retrieve a particular Client Account.

Request Notes:

account_id: The Account ID to query

Send account_breakdown as true to see the balance of each associated Sub Client Account (gl_category)

e.g.

				
					{
						"account_breakdown": [
							{
								"name": "Accommodation",
								"gl_category_id": "1",
								"balance": "0.00"
							},
							{
								"name": "Extras",
								"gl_category_id": "2",
								"balance": "12.00"
							}
						]
					}
				
			

client_account_tax_reconciliation can optionally be provided as true to include the amount of tax based on the reconciliation of payments / refunds. The below client_account_item_breakdown will also need to be provided as true for this to function.

client_account_item_breakdown can optionally be provided as true to include all accounting items saved on the Group Client Account in the Group response.

Example response when client_account_item_breakdown is true:

				
					{
						"charges": [
							{
								"id": "3062",
								"account_id": "1796594",
								"gl_category_id": "1",
								"gl_account_id": "32",
								"description": "Standard Rate (2024-04-19)",
								"amount": 100,
								"tax_free": "0",
								"generated_by": "1",
								"generated_when": "2024-04-19 11:30:00",
								"inventory_item_id": null,
								"voided_by": "0",
								"voided_when": null,
								"link_type": "tariffs_quoted",
								"link_type_id": "123",
								"link_period_from": "2024-04-19",
								"link_period_to": "2024-04-19",
								"taxes": [
									{
										"tax_id": 1,
										"tax_name": "GST",
										"tax_inclusive": true,
										"tax_amount": "9.09"
									}
								]
							}
						],
						"credits": [
							{
								"id": "4351",
								"account_id": "1796594",
								"gl_category_id": "1",
								"gl_account_id": "32",
								"description": "Discount",
								"amount": 5,
								"tax_free": "0",
								"generated_by": "1",
								"generated_when": "2024-04-19 11:30:00",
								"inventory_item_id": null,
								"voided_by": "0",
								"voided_when": null,
								"link_type": "discounts_quoted",
								"link_type_id": "1024",
								"link_period_from": "2024-04-19",
								"link_period_to": "2024-04-19",
								"taxes": [
									{
										"tax_id": 1,
										"tax_name": "GST",
										"tax_inclusive": true,
										"tax_amount": 0.45
									}
								]
							}
						],
						"payments": [
							{
								"id": "2",
								"account_id": "1796594",
								"gl_category_id": "1",
								"paid_by": "135576",
								"transaction_method": "manual",
								"transaction_id": null,
								"disbursed_booking_id": null,
								"disbursed_gl_account_id": null,
								"description": "Accommodation",
								"amount": 100,
								"tendered": 100,
								"type": "cash",
								"type_id": "4",
								"type_reference": "",
								"deposit": "0",
								"generated_by": "1",
								"generated_when": "2024-04-19",
								"voided_by": "0",
								"voided_when": null,
								"credits": [],
								"charges": [
									{
										"link_id": 1,
										"charge_id": 3062,
										"reconciled_amount": 100,
										"timestamp": "2024-04-19",
										"voided_when": null
									}
								]
							}
						],
						"refunds": [
							{
								"id": "2",
								"account_id": "1796594",
								"gl_category_id": "1",
								"refunded_to": "135576",
								"transaction_method": "manual",
								"transaction_id": null,
								"disbursed_booking_id": null,
								"disbursed_gl_account_id": null,
								"description": "Refunding Discount Overpayment",
								"amount": 5,
								"tendered": 5,
								"type": "cash",
								"type_id": "4",
								"type_reference": "",
								"generated_by": "1",
								"generated_when": "2024-04-19",
								"voided_by": "0",
								"voided_when": null,
								"credits": [
									{
										"link_id": 1,
										"credit_id": 4351,
										"reconciled_amount": 5,
										"timestamp": "2024-04-19",
										"voided_when": null
									}
								],
								"payments": []
							}
						]
					}
				
			

Example Booking Detail Attributes on charges, credits, payments, refunds when client_account_booking_details is true.

e.g.

				
					{
						"guest_visible": "1",
						"discounts_apply": "1",
						"booking_id": "1234",
						"booking_name": "John Doe",
						"booking_status": "Confirmed",
						"booking_site_id": "2",
						"booking_period_from": "2024-04-19 11:30:00",
						"booking_period_to": "2024-04-20 14:00:00",
						"booking_reference_id": "",
						"activity_booked_id": null
					}
				
			

Clients Accounts: Get Example

Request URL

https://api.newbook.cloud/rest/clients_accounts_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"account_id": "10"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"account_id": "10",
								"account_for": "companies",
								"account_for_id": "20",
								"account_for_name": "Acme Pty Ltd",
								"account_auto_billing_type": "1",
								"account_auto_billing_limit": null,
								"account_invoice_reminders": "1",
								"account_invoice_reminders_due_type": "before",
								"account_invoice_reminders_due_days": "1",
								"account_invoice_reminders_interval": "day",
								"account_invoice_reminders_interval_multiplier": "7",
								"account_invoice_auto_debit_days": "0",
								"account_invoice_auto_debit_days_type": "before",
								"account_late_fee_exemption": "0",
								"account_invoice_payment_terms": null,
								"account_balance": "12.00",
								"account_paypal_id": "",
								"account_paypal_connection_id": null,
								"account_cc_gateway_id": null,
								"account_currency_id": null,
								"account_tax_free": "0",
								"account_active": "1",
								"account_transaction_fees": "1",
								"account_external_tax_id": null,
								"account_bpay_auto_reconcile": "1"
							},
							"message": ""
						}
					
				
AnchorCharges: Create

Used to charge to a Client Account.

Request Notes:

account_id: The Client Account ID retrieved in a previous request

generated_by (int, optional): The User ID to set who generated the charge. Defaults to the User ID making the request.

generated_when (optional): The datetime to record for the charge. Defaults to the current timestamp

gl_account_code: The GL Account code to record for the Charge. You can use gl_account_id instead by using the GL Accounts: List request for list of valid IDs

gl_category_id: Use the Sub Client Accounts: List request to retrieve a list of valid IDs

tax_free: 1 = Tax Free, 0 = Has Tax

tax_rates: (optional) Instead of Newbook calculating the Tax Amounts for you, use this parameter to manually provide Tax Amounts

  • 					
    						[
    							{"tax_id":sourced from Newbook,"tax_amount":number},
    							{"tax_id":sourced from Newbook,"tax_amount":number}
    						]
    					
    				
  • tax_id: is based on the response to 3rd Party Tax Rates

payment_amount (optional): tells Newbook how much the Payment taken was. When specified, payment_type will also be required to create the Payment.

payment_type (optional): tells Newbook how the Payment was received - valid options:

  • cash
  • cheque
  • visa
  • mastercard
  • amex
  • diners
  • discover
  • jcb
  • eftpos
  • eft (online banking funds transfer)
  • eurocard
  • bartercard

inventory_item_id (optional): links this Charge to a matching Inventory Item for reporting purposes

booking_id (optional): tells Newbook which Booking this Charge is related to, useful for when the Booking is billing to a Company Client Account

link_type (optional): tells Newbook which item this charge is linked to:

  • tariffs_quoted
  • repeat_charges
  • bookings_inventory_items
  • facilities_hire
  • bookings_adjustment_fees
  • bookings_groups_inventory_items
  • bookings_groups_adjustment_fees
  • meter_readings
  • meter_services - This relates to a meter reading

link_type_id (required when link_type is provided): tells Newbook the ID of the associated link_type provided as specified above

link_period_from (optional): This is only used when the link_type/link_type_id is provided. This states the applicable start date of the link formatted as YYYY-MM-DD

link_period_to (optional): This is only used when the link_type/link_type_id is provided. This states the applicable end date of the link formatted as YYYY-MM-DD

Response Notes:

If payment_type was provided in the request, you will receive a payment_id in the response

Charges: Create Example

Request URL

https://api.newbook.cloud/rest/charges_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"account_id": "2",
							"generated_by": "1",
							"generated_when": "2015-09-13 14:00:00",
							"description": "Misc Charge",
							"gl_account_code": "POS",
							"gl_category_id": "1",
							"amount": "3.95",
							"tax_free": "0",
							"payment_amount": "3.95",
							"payment_type": "visa"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"charge_id": "7",
								"payment_id": "10"
							},
							"message": ""
						}
					
				
AnchorCharges: List

Used to retrieve a list of Charges

Request Notes:

account_id: Can optionally filter the list by Client Account ID

account_for: Can optionally filter the list by Client Account Type, possible options include:

  • leads
  • guests
  • bookings
  • companies
  • travel_agents

period_from + period_to: Can optionally be provided together to find Charges raised or voided within that time period.

Charges: List Example

Request URL

https://api.newbook.cloud/rest/charges_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"account_id": [
								"2"
							],
							"period_from": "2017-06-15 00:00:00",
							"period_to": "2017-06-15 23:59:59"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [{
								"id": "19",
								"account_id": "10",
								"account_for": "bookings",
								"account_for_id": "34",
								"account_for_name": "John Doe",
								"account_currency_id": "1",
								"account_currency_code": "AUD",
								"gl_account_id": "1",
								"gl_account_code": "1001",
								"gl_category_id": "1",
								"description": "Accommodation",
								"amount": 119.95,
								"amount_inc_tax": 119.95,
								"amount_ex_tax": 109.05,
								"tax": 10.90,
								"tax_breakdown": [
									{
										"tax_id": 1,
										"tax_name": "GST",
										"tax_amount": 10.90
									}
								],
								"tax_free": "0",
								"generated_by": "1",
								"generated_when": "2024-04-18 11:30:00",
								"voided_when": null,
								"voided_by": "0"
							}],
							"data": [{
								"id": 9,
								"account_id": 10,
								"account_for": "bookings",
								"account_for_id": "34",
								"account_for_name": "John Doe",
								"gl_account_id": 1,
								"gl_category_id": 1,
								"description": "Accommodation",
								"amount": 119.95,
								"amount_inc_tax": 119.95,
								"amount_ex_tax": 109.05,
								"tax": 10.90,
								"tax_breakdown": [
									{
										"tax_id": 1,
										"tax_name": "GST",
										"tax_amount": 10.90
									}
								],
								"generated_by": 1,
								"generated_when": "2017-07-15 12:30:00",
								"voided_when": null,
								"gl_account_code": "1-100"
							}],
							"message": ""
						}
					
				
AnchorCharges: Get

Retrieve a particular Charge

Request Notes:

id (int) the Charge ID to retrieve (required)

The other filtering parameters per Charges: List apply here but are optional.

Charges: Get Example

Request URL

https://api.newbook.cloud/rest/charges_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": 229
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "19",
								"account_id": "10",
								"account_for": "bookings",
								"account_for_id": "34",
								"account_for_name": "John Doe",
								"account_currency_id": "1",
								"account_currency_code": "AUD",
								"gl_account_id": "1",
								"gl_account_code": "1001",
								"gl_category_id": "1",
								"description": "Accommodation",
								"amount": 119.95,
								"amount_inc_tax": 119.95,
								"amount_ex_tax": 109.05,
								"tax": 10.90,
								"tax_breakdown": [
									{
										"tax_id": 1,
										"tax_name": "GST",
										"tax_amount": 10.90
									}
								],
								"tax_free": "0",
								"generated_by": "1",
								"generated_when": "2024-04-18 11:30:00",
								"voided_when": null,
								"voided_by": "0"
							},
							"message": ""
						}
					
				
AnchorCredits: Create

Used to add negative charges to a Client Account (not to be used for payments - that is a separate request).

Request Notes:

account_id: The Client Account ID retrieved in a previous request

generated_by (int, optional): The User ID to set who generated the credit. Defaults to the User ID making the request.

generated_when (optional): The datetime to record for the credit. Defaults to the current timestamp

gl_account_code: The GL Account code to record for the Charge. You can use gl_account_id instead by using the GL Accounts: List request for list of valid IDs

gl_category_id: Use the Sub Client Accounts: List request to retrieve a list of valid IDs

tax_free: 1 = Tax Free, 0 = Has Tax

tax_rates: (optional) Instead of Newbook calculating the Tax Amounts for you, use this parameter to manually provide Tax Amounts

  • 					
    						[
    							{"tax_id":sourced from Newbook,"tax_amount":number},
    							{"tax_id":sourced from Newbook,"tax_amount":number}
    						]
    					
    				
  • tax_id: is based on the response to 3rd Party Tax Rates

refund_amount (optional): tells Newbook how much the Refund processed was for. When specified, refund_type will also be required to create the Refund.

refund_type (optional): tells Newbook if the Credit has been Refunded - valid options:

  • cash
  • cheque
  • visa
  • mastercard
  • amex
  • diners
  • discover
  • jcb
  • eftpos
  • eft (online banking funds transfer)
  • eurocard
  • bartercard

inventory_item_id (optional): links this Credit to a matching Inventory Item for reporting purposes

booking_id (optional): tells Newbook which Booking this Credit is related to, useful for when the Booking is billing to a Company Client Account

link_type (optional): tells Newbook which item this credit is linked to:

  • discounts_quoted
  • bookings_inventory_items
  • repeat_charges
  • meter_rebates - This relates to a meter reading
  • bookings_groups_inventory_items

link_type_id (required when link_type is provided): tells Newbook the ID of the associated link_type provided as specified above

link_period_from (optional): This is only used when the link_type/link_type_id is provided. This states the applicable start date of the link formatted as YYYY-MM-DD

link_period_to (optional): This is only used when the link_type/link_type_id is provided. This states the applicable end date of the link formatted as YYYY-MM-DD

Response Notes:

If refund_type was provided in the request, you will receive a refund_id in the response

Credits: Create Example

Request URL

https://api.newbook.cloud/rest/credits_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"account_id": "2",
							"generated_by": "1",
							"generated_when": "2015-09-13 14:00:00",
							"description": "Misc Credit",
							"gl_account_code": "POS",
							"gl_category_id": "1",
							"amount": "3.95",
							"tax_free": "0",
							"refund_amount": "3.95",
							"refund_type": "visa"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"credit_id": "7",
								"refund_id": "10"
							},
							"message": ""
						}
					
				
AnchorCredits: List

Used to retrieve a list of Credits

Request Notes:

account_id: Can optionally filter the list by Client Account ID

account_for: Can optionally filter the list by Client Account Type, possible options include:

  • leads
  • guests
  • bookings
  • companies
  • travel_agents

period_from + period_to: Can optionally be provided together to find Credits raised or voided within that time period.

Credits: List Example

Request URL

https://api.newbook.cloud/rest/credits_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"account_id": [
								"2",
							],
							"period_from": "2017-06-15 00:00:00",
							"period_to": "2017-06-15 23:59:59"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [{
								"id": "1",
								"account_id": "10",
								"account_for": "bookings",
								"account_for_id": "34",
								"account_for_name": "John Doe",
								"account_currency_id": "1",
								"account_currency_code": "AUD",
								"gl_account_id": "1",
								"gl_account_code": "1-100",
								"gl_category_id": "1",
								"description": "Discount",
								"amount": 20.00,
								"amount_inc_tax": 20.00,
								"amount_ex_tax": 18.18,
								"tax" 1.82:
								"tax_breakdown": [
									{
										"tax_id": 1,
										"tax_name": "GST",
										"tax_amount": 1.82
									}
								],
								"tax_free": "0",
								"generated_by": "1",
								"generated_when": "2024-04-18 11:30:00",
								"voided_when": null,
								"voided_by": "0"
							}],
							"message": ""
						}
					
				
AnchorCredits: Get

Retrieve a particular Credit

Request Notes:

id (int) the Credit ID to retrieve (required)

The other filtering parameters per Credits: List apply here but are optional.

Credits: Get Example

Request URL

https://api.newbook.cloud/rest/credits_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": 1
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "1",
								"account_id": "10",
								"account_for": "bookings",
								"account_for_id": "34",
								"account_for_name": "John Doe",
								"account_currency_id": "1",
								"account_currency_code": "AUD",
								"gl_account_id": "1",
								"gl_account_code": "1-100",
								"gl_category_id": "1",
								"description": "Discount",
								"amount": 20.00,
								"amount_inc_tax": 20.00,
								"amount_ex_tax": 18.18,
								"tax" 1.82:
								"tax_breakdown": [
									{
										"tax_id": 1,
										"tax_name": "GST",
										"tax_amount": 1.82
									}
								],
								"tax_free": "0",
								"generated_by": "1",
								"generated_when": "2024-04-18 11:30:00",
								"voided_when": null,
								"voided_by": "0"
							},
							"message": ""
						}
					
				
AnchorTransaction Fees: Get

Used to calculate Transaction Fees for the requested Payment Type

Request Notes:

amount (required): The amount to calculate transaction fee.

type (required): Please see the Payment Types request for a list of valid types.

Transaction Fees: Get Example

Request URL

https://api.newbook.cloud/rest/transaction_fees_get

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"amount": "100",
											"type": "visa"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"inventory_item_id": null,
												"id": "1",
												"name": "Transaction Fee",
												"refunds": "0",
												"gl_account_id": "1",
												"gl_category_id": "1",
												"amount": 10,
												"base_amount": 10,
												"exclusive_tax_amount": 0,
												"tax_free": "0",
												"show_offline": "1"
											}],
											"message": ""
										}
									
								
AnchorPayments: Create

Used to add payments to a Client Account.

Request Notes:

account_id (required): The Client Account ID retrieved in a previous request

amount (required): The amount to record as paid

description (required): A textual label for the payment - can be anything but is required

type (required): Please see the Payment Types request for a list of valid types. Please note that balance transfers are not currently supported for use as a Payment Type

type_reference: Alpha-numeric descriptor for the payment

generated_by (int, optional): The User ID to set who generated the payment. Defaults to the User ID making the request.

generated_when: The datetime to record for the payment. Defaults to the current timestamp

gl_category_id: Use the Sub Client Accounts: List request to retrieve a list of valid IDs

deposit: 1/0, default 0; Whether or not this payment should be considered Deposits Held for reporting purposes

invoice_id: (optional): Reconcile towards the nominated Invoice. If you need to, you can use the Invoices: List request to retrieve a Invoice(s) for an account, and return one of those IDs. This parameter can be provided as either a single Invoice ID or an array of Invoice IDs. Using this parameter will ignore reconcile_payment.

reconcile_payment (optional): 1/0, default 0; Whether saving this payment should attribute it towards existing charges on the account. This is encouraged, but for backwards-compatibility, the default behaviour is 0.

auto_receipt (optional): Please see the System Templates: List request for a list of valid System Templates. Alternatively you can provide "default" to utilise the Default Receipt Template.

Recording Credit Card Transactions (optional)

If you have a Credit Card Gateway linked to Newbook and are using the same Gateway within your application, you can provide the following parameters to record the payment as a Credit Card Transaction for future use* within Newbook:

  • type_reference (required): The Transaction ID from the Credit Card Gateway
  • cc_name (required): The name on the Credit Card
  • cc_last_digits (required): This must be the Last 4 digits of the Credit Card
  • cc_gateway (required): The type of Credit Card Gateway, will be provided by Newbook

* when provided this way, the payment can be refunded through the Gateway from within Newbook if required. The payment can also have its Gateway status verified inside Newbook if required (e.g. validate it legitimately succeeded/failed).

Payments: Create Example

Request URL

https://api.newbook.cloud/rest/payments_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"account_id": "2",
							"amount": "50",
							"description": "Misc Payment",
							"type": "visa",
							"type_id": "3",
							"type_reference": "abc_1234567890",
							"generated_by": "1",
							"generated_when": "2015-09-13 14:00:00",
							"gl_category_id": "1",
							"deposit": "0"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"payment_id": "54",
								"receipt_id": 75
							},
							"message": ""
						}
					
				
AnchorPayments: List

Used to retrieve a list of Payments

Request Notes:

account_id: Can optionally filter the list by Client Account ID

account_for: Can optionally filter the list by Client Account Type, possible options include:

  • leads
  • guests
  • bookings
  • companies
  • travel_agents

period_from + period_to: Can optionally be provided together to find Payments received or voided within that time period.

If get_paid_by is provided as "true" the Payment object in the response will include the following additional information:

				
					"paid_by": "24",
					"paid_by_for": "guests",
					"paid_by_for_id": "15",
					"paid_by_for_name": "Jane Doe"
				
			

Response Notes:

You can run the Payments Types request to get the list of possible Payment Types.

transaction_method can be one of the following:

  • manual - a manually recorded Payment
  • cc_gateway - processed through a Credit Card Gateway
  • dd_gateway - processed through a Direct Debit Gateway
  • eftpos_terminal - processed through an Eftpos Terminal

Payments: List Example

Request URL

https://api.newbook.cloud/rest/payments_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"account_id": [
								"2"
							],
							"period_from": "2017-06-15 00:00:00",
							"period_to": "2017-06-15 23:59:59"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [{
						        "id": "9",
						        "account_id": "10",
						        "account_for": "bookings",
						        "account_for_id": "34",
						        "account_for_name": "John Doe",
						        "account_currency_id": "1",
						        "account_currency_code": "AUD",
						        "gl_category_id": 1,
						        "type": "mastercard",
						        "type_id": "2",
						        "transaction_method": "cc_gateway",
						        "description": "Booking Deposit",
						        "amount": 100.00,
						        "generated_by": "1",
						        "generated_when": "2024-04-18 11:30:00",
						        "voided_when": null,
						        "voided_by": "0"
						    }],
							"data": [{
								"id": 9,
								"account_id": 10,
								"account_for": "bookings",
								"account_for_id": "34",
								"account_for_name": "John Doe",
								"gl_category_id": 1,
								"type": "mastercard",
								"type_id": "2",
								"transaction_method": "cc_gateway",
								"description": "Booking Deposit",
								"amount": "100.00",
								"generated_by": 1,
								"generated_when": "2017-07-15 12:30:00",
								"voided_when": null
							}],
							"message": ""
						}
					
				
AnchorPayments: Get

Retrieve a particular Payment

Request Notes:

id (int) the Payment ID to retrieve (required)

The other filtering parameters per Payments: List apply here but are optional.

Credits: Get Example

Request URL

https://api.newbook.cloud/rest/payments_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": 9
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
						        "id": "9",
						        "account_id": "10",
						        "account_for": "bookings",
						        "account_for_id": "34",
						        "account_for_name": "John Doe",
						        "account_currency_id": "1",
						        "account_currency_code": "AUD",
						        "gl_category_id": 1,
						        "type": "mastercard",
						        "type_id": "2",
						        "transaction_method": "cc_gateway",
						        "description": "Booking Deposit",
						        "amount": 100.00,
						        "generated_by": "1",
						        "generated_when": "2024-04-18 11:30:00",
						        "voided_when": null,
						        "voided_by": "0"
						    },
							"message": ""
						}
					
				
AnchorPayments Reconciliation: Create

Creates a Payments Reconciliation that links a Payment to Charges and/or Credits

Request Notes:

The following parameters are required:

  • payment_id (int)
  • credits (array) *
  • charges (array) *
* At least one credit or charge must be sent in the request.

The following parameters are optional:

  • timestamp (timestamp: yyyy-mm-dd 24hh:mi:ss)

Payments Reconciliation: Create Example

In the below example the payment would require an amount of $10 to balance.

Request URL

https://api.newbook.cloud/rest/payments_reconciliation_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"payment_id": 1,
							"credits": [
								{
									"credit_id": 2,
									"reconciled_amount": 20.00
								},
								{
									"credit_id": 3,
									"reconciled_amount": 30.00
								}
							],
							"charges": [
								{
									"charge_id": 4,
									"reconciled_amount": 60.00
								}
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"credits": [
									{
										"link_id": 1,
										"credit_id": 2,
										"reconciled_amount": 20.00,
										"timestamp": "2024-04-19 11:30:00",
										"voided_when": null
									},
									{
										"link_id": 2,
										"credit_id": 3,
										"reconciled_amount": 30.00,
										"timestamp": "2024-04-19 11:30:00",
										"voided_when": null
									}
								],
								"charges": [
									{
										"link_id": 3,
										"charge_id": 4,
										"reconciled_amount": 60.00,
										"timestamp": "2024-04-19 11:30:00",
										"voided_when": null
									}
								]
							},
							"message": ""
						}
					
				
AnchorPayment Types

Pull a list of Payment / Refund Types from Newbook.

Payment Types Example

Request URL

https://api.newbook.cloud/rest/payments_types

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"type": "amex",
												"default_translation": "AMEX",
												"current_translation": "AMEX",
												"active_offline": "1",
												"active_online": "1",
												"is_card": "1",
												"combine_cc": "1",
												"type_reference": "1",
												"rounding": "0"
											}],
											"message": ""
										}
									
								
AnchorRefunds: Create

Used to add refunds to a Client Account.

Request Notes:

account_id: The Client Account ID retrieved in a previous request

generated_by (int, optional): The User ID to set who generated the refund. Defaults to the User ID making the request.

generated_when (optional): The datetime to record for the refund. Defaults to the current timestamp

gl_category_id: Use the Sub Client Accounts: List request to retrieve a list of valid IDs

type: please see the Payment Types request for a list of valid types. Please note that balance transfers are not currently supported for use as a Payment Type

type_reference (optional): alpha-numeric descriptor for the refund

Refunds: Create Example

Request URL

https://api.newbook.cloud/rest/refunds_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"account_id": "2",
							"generated_by": "1",
							"generated_when": "2015-09-13 14:00:00",
							"description": "Misc Refund",
							"gl_category_id": "1",
							"amount": "50",
							"type": "visa",
							"type_reference": "def_0987654321"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"refund_id": "55"
							},
							"message": ""
						}
					
				
AnchorRefunds: List

Used to retrieve a list of Refunds

Request Notes:

account_id: Can optionally filter the list by Client Account ID

account_for: Can optionally filter the list by Client Account Type, possible options include:

  • leads
  • guests
  • bookings
  • companies
  • travel_agents

period_from + period_to: Can optionally be provided together to find Refunds given or voided within that time period.

If get_refunded_to is provided as "true" the Refund object in the response will include the following additional information:

				
					"refunded_to": "24",
					"refunded_to_for": "guests",
					"refunded_to_for_id": "15",
					"refunded_to_for_name": "Jane Doe"
				
			

Response Notes:

You can run the Payments Types request to get the list of possible Refund Types.

transaction_method can be one of the following:

  • manual - a manually recorded Payment
  • cc_gateway - processed through a Credit Card Gateway
  • dd_gateway - processed through a Direct Debit Gateway
  • eftpos_terminal - processed through an Eftpos Terminal

Refunds: List Example

Request URL

https://api.newbook.cloud/rest/refunds_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"account_id": [
								"2"
							],
							"period_from": "2017-06-15 00:00:00",
							"period_to": "2017-06-15 23:59:59"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [{
						        "id": "9",
						        "account_id": "10",
						        "account_for": "bookings",
						        "account_for_id": "34",
						        "account_for_name": "John Doe",
						        "account_currency_id": "1",
						        "account_currency_code": "AUD",
						        "gl_category_id": "1",
						        "type": "mastercard",
						        "type_id": "23",
						        "transaction_method": "cc_gateway",
						        "description": "Deposit Refund",
						        "amount": 100.00,
						        "generated_by": "1",
						        "generated_when": "2024-04-18 11:30:00",
						        "voided_when": null,
						        "voided_by": "0"
						    }],
							"message": ""
						}
					
				
AnchorRefunds: Get

Retrieve a particular Refund

Request Notes:

id (int) the Refund ID to retrieve (required)

The other filtering parameters per Refunds: List apply here but are optional.

Credits: Get Example

Request URL

https://api.newbook.cloud/rest/refunds_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": 9
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
						        "id": "9",
						        "account_id": "10",
						        "account_for": "bookings",
						        "account_for_id": "34",
						        "account_for_name": "John Doe",
						        "account_currency_id": "1",
						        "account_currency_code": "AUD",
						        "gl_category_id": "1",
						        "type": "mastercard",
						        "type_id": "23",
						        "transaction_method": "cc_gateway",
						        "description": "Deposit Refund",
						        "amount": 100.00,
						        "generated_by": "1",
						        "generated_when": "2024-04-18 11:30:00",
						        "voided_when": null,
						        "voided_by": "0"
						    },
							"message": ""
						}
					
				
AnchorRefunds Reconciliation: Create

Creates a Refunds Reconciliation that links a Refund to Credits and/or Payments

Request Notes:

The following parameters are required:

  • refund_id (int)
  • credits (array) *
  • payments (array) *
* At least one credit or payment must be sent in the request.

The following parameters are optional:

  • timestamp (timestamp: yyyy-mm-dd 24hh:mi:ss)

Refunds Reconciliation: Create Example

In the below example the refund would require an amount of $100 to balance.

Request URL

https://api.newbook.cloud/rest/refunds_reconciliation_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"refund_id": 1,
							"credits": [
								{
									"credit_id": 2,
									"reconciled_amount": 20.00
								},
								{
									"credit_id": 3,
									"reconciled_amount": 30.00
								}
							],
							"payments": [
								{
									"payment_id": 4,
									"reconciled_amount": 50.00
								}
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								"credits": [
									{
										"link_id": 1,
										"credit_id": 2,
										"reconciled_amount": 20.00
									},
									{
										"link_id": 2,
										"credit_id": 3,
										"reconciled_amount": 30.00
									}
								],
								"payments": [
									{
										"link_id": 3,
										"payment_id": 4,
										"reconciled_amount": 50.00
									}
								]
							],
							"message": ""
						}
					
				
AnchorCredit Card Authorisation: Create

Used to store a Credit Card Authorisation Token created outside of Newbook

The Credit Card Authorisation Token must be created using the same credit card gateway account as used in Newbook otherwise processing payments will fail

Request Notes:

for (string) required: Must be one of the following:

  • guests
  • leads
  • users
  • companies
  • companies_staff
  • travel_agents
  • travel_agents_staff

for_id (integer) required: ID of the above entity to create the credit card authorisation token against

token (string) required: Credit card token created using the same credit card gateway account as used in Newbook

last_digits (string) required: Last 4 digits of the credit card number to be displayed within the Newbook interface

card_name (string) optional: The name on the card

card_type (string) required: Must be one of the results from Payment Types which is marked as is_card=1

expiry (object) required: A future credit card expiry date. An object matching this format:

				
					{
						month: "MM",
						year: "YYYY"
					}
				
			

gateway_id: Can optionally store the credit card authorisation token against a specific Newbook credit card gateway connection other than the default

Credit Card Authorisation: Create Example

Request URL

https://api.newbook.cloud/rest/cc_authorisations_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"for": "guests",
							"for_id": 20,
							"token": "123abc",
							"last_digits": 1234,
							"card_name": "John Doe",
							"card_type": "visa",
							"expiry": {
								"month": "02",
								"year": "2021"
							}
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "123"
							},
							"message": "Created Credit Card Authorisation Token"
						}
					
				
AnchorCredit Card Authorisation Token: Update

Used to update a stored Credit Card Authorisation Token

Request Notes:

id (integer) required: ID of the existing Credit Card Authorisation Token

for (string) required: Must be one of the following:

  • guests
  • leads
  • users
  • companies
  • companies_staff
  • travel_agents
  • travel_agents_staff

The "for_id" of a Credit Card Authorisation Token cannot be changed. If this is required, it is advised to use the Credit Card Authorisation Delete method for the incorrect for_id, then use the Credit Card Authorisation Create method, with the correct for_id.

token (string) optional: Credit card token created using the same credit card gateway account as used in Newbook

last_digits (string) optional: Last 4 digits of the credit card number to be displayed within the Newbook interface

card_name (string) optional: The name on the card

card_type (string) optional: Must be one of the results from Payment Types which is marked as is_card=1

expiry (object) optional: A future credit card expiry date. An object matching this format:

				
					{
						"month": "MM",
						"year": "YYYY"
					}
				
			

Credit Card Authorisation Token: Update Example

Request URL

https://api.newbook.cloud/rest/cc_authorisations_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": 123,
							"for": "guests",
							"token": "123abc",
							"last_digits": 1234,
							"card_name": "John Doe",
							"card_type": "mastercard",
							"expiry": {
								"month": "04",
								"year": "2026"
							}
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "123"
							},
							"message": "Updated Credit Card Authorisation Token"
						}
					
				
AnchorCredit Card Authorisation Token: Delete

Used to delete a stored Credit Card Authorisation Token

Request Notes:

id (integer) required: ID of the existing Credit Card Authorisation Token

for (string) required: Must be one of the following:

  • guests
  • leads
  • users
  • companies
  • companies_staff
  • travel_agents
  • travel_agents_staff

Credit Card Authorisation Token: Delete Example

Request URL

https://api.newbook.cloud/rest/cc_authorisations_delete

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": 123,
							"for": "guests"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "123"
							},
							"message": "Deleted Credit Card Authorisation Token"
						}
					
				
AnchorDirect Debit Authorisations: List

Pull the list of Direct Debit Authorisations from within Newbook for a specific entity type.

Request Notes:

for (string) required: Must be one of the following entity types:

  • guests
  • companies
  • companies_staff
  • travel_agents
  • travel_agents_staff
  • users
  • leads
  • bank_accounts
  • owners

for_id can be provided to limit results to a specific entity, e.g. a single Guest, by providing the Guest ID.

status can be provided to limit results to a specific status. See Direct Debit Authorisations: Create for more details.

Direct Debit Authorisations: List Example

Request URL

https://api.newbook.cloud/rest/dd_authorisations_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"for": "guests"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"id": "16",
									"for": "guests",
									"for_id": "4",
									"for_name": "Rob Banks",
									"authorised_amount": 0,
									"added_when": "2024-04-19 11:30:00",
									"added_by": "-10",
									"status": "2",
									"status_when": "2024-04-19 11:30:00",
									"status_by": "-10",
									"document_id": null,
									"authorised_when": "2024-04-19 11:30:00",
									"bank_name": "My Bank",
									"bank_bsb_number": "987654321",
									"bank_account_number": "1234****9",
									"bank_account_name": "Mr Rob Banks"
								}
							],
							"message": ""
						}
					
				
AnchorDirect Debit Authorisations: Get

Retrieve an existing Direct Debit Authorisation from within Newbook for a specific entity.

Request Notes:

id (int) required: ID of the existing Direct Debit Authorisation

for (string) required: Must be one of the following entity types:

  • guests
  • companies
  • companies_staff
  • travel_agents
  • travel_agents_staff
  • users
  • leads
  • bank_accounts
  • owners

Direct Debit Authorisations: Get Example

Request URL

https://api.newbook.cloud/rest/dd_authorisations_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": 16,
							"for": "guests"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"id": "16",
									"for": "guests",
									"for_id": "4",
									"for_name": "Rob Banks",
									"authorised_amount": 0,
									"added_when": "2024-04-19 11:30:00",
									"added_by": "-10",
									"status": "2",
									"status_when": "2024-04-19 11:30:00",
									"status_by": "-10",
									"document_id": null,
									"authorised_when": "2024-04-19 11:30:00",
									"bank_name": "My Bank",
									"bank_bsb_number": "987654321",
									"bank_account_number": "1234****9",
									"bank_account_name": "Mr Rob Banks"
								}
							],
							"message": ""
						}
					
				
AnchorDirect Debit Authorisations: Create

Used to create a Direct Debit authorisation.

Request Notes:

for (string): Must be one of the following entity types:

  • guests
  • companies
  • companies_staff
  • travel_agents
  • travel_agents_staff
  • users
  • leads
  • bank_accounts
  • owners

for_id (int): ID of the above entity to create the Direct Debit Authorisation for

bank_name (string): The name of the bank

bank_account_name (string): The bank account name

bank_account_number (string): The bank account number

bank_bsb_number (string): The bank BSB/routing number

status (int) optional: Must be one of the following:

  • 1 - Pending Approval (default)
  • 2 - Approved Manually
  • 3 - Approved Signature
  • 4 - Approved Payment Plan
  • 5 - Deactivated

authorised_amount (float|null) optional: The amount to authorise for Direct Debits. 0 or null means unlimited.

apply_to_client_account_gl_categories (array, optional): One or more Sub Client Accounts to apply the Direct Debit Authorisation to within the Client Account for the entity, with the following parameters for each entry:

  • gl_category_id (int) required: The ID of the Sub Client Account to apply the new Direct Debit Authorisation to as the Primary Authorisation
  • primary_authorisation_auto_debit (int): Must be one of the following:
    • 0 - No, batch/auto debit disabled (default)
    • 1 - Manual, only batch debit enabled
    • 2 - Auto, batch and auto debit enabled
  • batch_debit_profile_id (int|null) optional: Must be an existing Clients Accounts Profiles ID or null to leave this unset
  • auto_billing_limit (float|null) optional: The Direct Debit limit for this Sub Client Account. 0 or null means unlimited.

Note: the Direct Debit Authorisation status must be one of the approved states (2, 3 or 4) to allow apply_to_client_account_gl_categories to be applied.

Direct Debit Authorisations: Create Example

Request URL

https://api.newbook.cloud/rest/dd_authorisations_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"for": "guests",
							"for_id": 4,
							"bank_name": "My Bank",
							"bank_account_name": "Mr Rob Banks",
							"bank_account_number": "123456789",
							"bank_bsb_number": "123456",
							"authorised_amount": null,
							"status": "2",
							"apply_to_client_account_gl_categories": [
								{
									"gl_category_id": 1,
									"primary_authorisation_auto_debit": 1,
									"batch_debit_profile_id": 1,
									"auto_billing_limit": 99.00
								},
								{
									"gl_category_id": 5,
									"primary_authorisation_auto_debit": 2
								}
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								"id": "16",
								"for": "guests",
								"for_id": "4",
								"for_name": "Rob Banks",
								"authorised_amount": 0,
								"added_when": "2024-04-19 11:30:00",
								"added_by": "-10",
								"status": "2",
								"status_when": "2024-04-19 11:30:00",
								"status_by": "-10",
								"document_id": null,
								"authorised_when": "2024-04-19 11:30:00",
								"bank_name": "My Bank",
								"bank_bsb_number": "987654321",
								"bank_account_number": "1234****9",
								"bank_account_name": "Mr Rob Banks"
							],
							"message": "Created Direct Debit Authorisation"
						}
					
				
AnchorDirect Debit Authorisations: Update

Used to update an existing Direct Debit authorisation.

Request Notes:

id (int) required: ID of the existing Direct Debit Authorisation to update

for (string) required: Must be one of the following entity types:

  • guests
  • companies
  • companies_staff
  • travel_agents
  • travel_agents_staff
  • users
  • leads
  • bank_accounts
  • owners

The "for_id" of a Direct Debit Authorisation Token cannot be changed. If this is required, it is advised to simply use the Direct Debit Authorisation Create method, with the correct for_id.

See Direct Debit Authorisations: Create for more details.

Direct Debit Authorisations: Update Example

Request URL

https://api.newbook.cloud/rest/dd_authorisations_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": 16,
							"for": "guests",
							"authorised_amount": 100.00,
							"apply_to_client_account_gl_categories": [
								{
									"gl_category_id": 1,
									"primary_authorisation_auto_debit": 2,
									"batch_debit_profile_id": 1,
									"auto_billing_limit": 100.00
								}
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								"id": "16",
								"for": "guests",
								"for_id": "4",
								"for_name": "Rob Banks",
								"authorised_amount": 100.00,
								"added_when": "2024-04-19 11:30:00",
								"added_by": "-10",
								"status": "2",
								"status_when": "2024-04-19 11:30:00",
								"status_by": "-10",
								"document_id": null,
								"authorised_when": "2024-04-19 11:30:00",
								"bank_name": "My Bank",
								"bank_bsb_number": "987654321",
								"bank_account_number": "1234****9",
								"bank_account_name": "Mr Rob Banks"
							],
							"message": "Updated Direct Debit Authorisation"
						}
					
				
Anchor3rd Party Tax Rates

Used to retrieve Tax Rates that can be used when creating Charges / Credits with custom Tax Amounts.

3rd Party Tax Rates Example

Request URL

https://api.newbook.cloud/rest/third_party_tax_rates

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [
												{
													"tax_id": "1",
													"tax_name": "Tax"
												}
											],
											"message": ""
										}
									
								
AnchorQuotes: List (CRM)

Used to retrieve a list of Quotes

Request Notes:

account_id: Can optionally filter the list by Client Account ID

account_for: Can optionally filter the list by Client Account Type, possible options include:

  • leads
  • guests
  • bookings
  • companies
  • travel_agents

period_from + period_to: Can optionally be provided together to find Invoices generated or voided within that time period.

Quotes: List (CRM) Example

Request URL

https://api.newbook.cloud/rest/quotes_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"account_id": [
												"2"
											],
											"period_from": "2017-06-15 00:00:00",
											"period_to": "2017-06-15 23:59:59"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "14",
												"account_id": "402",
												"account_for": "companies",
												"account_for_id": "3",
												"account_for_name": "Acme",
												"name": "Fix Website",
												"description": "<p>Details about this job.</p>",
												"status": "completed",
												"expiry_date": "2017-03-15",
												"approval_status": "approved",
												"approved_when": "2017-03-01 14:08:29",
												"generated_when": "2017-03-01 13:39:27",
												"total": 648.5,
												"invoice_ids": [],
												"signed_documents": [{
													"name": "Newbook Quote for Fix Website",
													"sent_on": "2017-03-01 13:57:50",
													"signed_when": "2017-03-01 14:08:29",
													"esignature_url": "http://tempurl.org/signature_link"
												}],
												"notes": [{
													"id": "1",
													"type_id": "1",
													"content": "This is my Quote note",
													"created_when": "2024-04-18 11:30:00",
													"created_by": "11",
													"updated_when": "2024-04-19 00:00:00",
													"updated_by": "5"
												}]
											}],
											"message": ""
										}
									
								
AnchorQuotes: PDF Content (CRM)

Used to retrieve the PDF content for a Quote.

Quotes: PDF Content (CRM) Example

Request URL

https://api.newbook.cloud/rest/quotes_pdf_content

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"quote_id": 882
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"pdf_content": "<p>HTML for the Quote PDF will appear here.</p>"
											},
											"message": ""
										}
									
								
AnchorInvoices: List

Used to retrieve a list of Invoices

Request Notes:

id (int) a specific Invoice ID to retrieve (optional)

account_id: Can optionally filter the list by Client Account ID

account_for: Can optionally filter the list by Client Account Type, possible options include:

  • leads
  • guests
  • bookings
  • companies
  • travel_agents

invoiced_to: Can optionally filter the list by one or more Client Account ID's Invoiced To.

period_from + period_to: Can optionally be provided together to find Invoices generated or voided within that time period.

fetch_guests: Can optionally be provided to include the guest_id for each Invoice (where available).

If get_invoiced_to is provided as "true" the Invoice object in the response will include the following additional information:

				
					"invoiced_to": "24",
					"invoiced_to_for": "guests",
					"invoiced_to_for_id": "15",
					"invoiced_to_for_name": "Jane Doe"
				
			

fetch_items_booking_details can optionally be provided as true to include Booking details for Charges and Credits. The below fetch_items will also need to be provided as true for this to function.

fetch_items can optionally be provided as true to include all Charges and Credits saved on the Invoice.

Example response when fetch_items is true:

				
					{
						"items": [
							{
								"id": "3062",
								"type": "charges",
								"account_id": "1796594",
								"gl_category_id": "1",
								"gl_account_id": "32",
								"description": "Standard Rate (2024-04-19)",
								"amount": 100,
								"tax_free": "0",
								"generated_by": "1",
								"generated_when": "2024-04-19 11:30:00",
								"inventory_item_id": null,
								"voided_by": "0",
								"voided_when": null,
								"link_type": "tariffs_quoted",
								"link_type_id": "123",
								"link_period_from": "2024-04-19",
								"link_period_to": "2024-04-19",
								"taxes": [
									{
										"tax_id": 1,
										"tax_name": "GST",
										"tax_inclusive": true,
										"tax_amount": "9.09"
									}
								]
							},
							{
								"id": "4351",
								"type": "credits",
								"account_id": "1796594",
								"gl_category_id": "1",
								"gl_account_id": "32",
								"description": "Discount",
								"amount": 5,
								"tax_free": "0",
								"generated_by": "1",
								"generated_when": "2024-04-19 11:30:00",
								"inventory_item_id": null,
								"voided_by": "0",
								"voided_when": null,
								"link_type": "discounts_quoted",
								"link_type_id": "1024",
								"link_period_from": "2024-04-19",
								"link_period_to": "2024-04-19",
								"taxes": [
									{
										"tax_id": 1,
										"tax_name": "GST",
										"tax_inclusive": true,
										"tax_amount": 0.45
									}
								]
							}
						]
					}
				
			

Invoices: List Example

Request URL

https://api.newbook.cloud/rest/invoices_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"account_id": [
								"2"
							],
							"period_from": "2017-06-15 00:00:00",
							"period_to": "2017-06-15 23:59:59"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [{
								"id": "882",
								"account_id": "10",
								"account_for": "bookings",
								"account_for_id": "34",
								"account_for_name": "John Doe",
								"account_currency_id": "1",
								"account_currency_code": "AUD",
								"description": "Accommodation",
								"po_number": "",
								"due_on": "2024-04-20",
								"total": 330,
								"paid_total": 330,
								"generated_when": "2024-04-18 11:30:00",
								"voided_when": null,
								"view_link": "https://driveau.newbook.cloud/{filename}.pdf",
								"download_link": "https://driveau.newbook.cloud/{filename}.pdf"		
							}],
							"message": ""
						}
					
				
AnchorInvoices: Get

Retrieve a particular Invoice

Request Notes:

id (int) the Invoice ID to retrieve (required)

The other filtering parameters per Invoices: List apply here but are optional.

Invoices: Get Example

Request URL

https://api.newbook.cloud/rest/invoices_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": 882
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "882",
								"account_id": "10",
								"account_for": "bookings",
								"account_for_id": "34",
								"account_for_name": "John Doe",
								"account_currency_id": "1",
								"account_currency_code": "AUD",
								"description": "Accommodation",
								"po_number": "",
								"due_on": "2024-04-20",
								"total": 330,
								"paid_total": 330,
								"generated_when": "2024-04-18 11:30:00",
								"voided_when": null,
								"view_link": "https://driveau.newbook.cloud/{filename}.pdf",
								"download_link": "https://driveau.newbook.cloud/{filename}.pdf"		
							},
							"message": ""
						}
					
								
AnchorInvoices: PDF Content

Used to retrieve the PDF content for an Invoice.

Invoices: PDF Content Example

Request URL

https://api.newbook.cloud/rest/invoices_pdf_content

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"invoice_id": 882
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"pdf_content": "<p>HTML for the Invoice PDF will appear here.</p>"
							},
							"message": ""
						}
					
				
AnchorReceipts: List

Used to retrieve a list of Receipts

Request Notes:

id (int) a specific Receipt ID to retrieve (optional)

account_id: Can optionally filter the list by Client Account ID

account_for: Can optionally filter the list by Client Account Type, possible options include:

  • leads
  • guests
  • bookings
  • companies
  • travel_agents

receipted_to: Can optionally filter the list by one or more Client Account ID's Receipted To.

period_from + period_to: Can optionally be provided together to find Receipts generated or voided within that time period.

fetch_guests: Can optionally be provided to include the guest_id for each Receipt (where available).

fetch_invoices: Can optionally be provided to include the Invoice + Payment Type breakdown for each Receipt (where available).

If get_receipted_to is provided as "true" the Receipt object in the response will include the following additional information:

				
					"receipted_to": "24",
					"receipted_to_for": "guests",
					"receipted_to_for_id": "15",
					"receipted_to_for_name": "Jane Doe"
				
			

Response Notes:

total: Will be a negative value for Payment Receipts and a positive value for Refund Receipts. This is to reflect how the Receipt affects their Client Account Balance.

Receipts: List Example

Request URL

https://api.newbook.cloud/rest/receipts_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"account_id": [
								"2"
							],
							"period_from": "2017-06-15 00:00:00",
							"period_to": "2017-06-15 23:59:59"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [{
								"id": "229",
								"account_id": "10",
								"account_for": "bookings",
								"account_for_id": "34",
								"account_for_name": "John Doe",
								"account_currency_id": "1",
								"account_currency_code": "AUD",
								"description": "Accommodation",
								"total": -70,
								"generated_when":  "2024-04-18 11:30:00",
								"voided_when": null,
								"view_link": "https://driveau.newbook.cloud/{filename}.pdf",
								"download_link": "https://driveau.newbook.cloud/{filename}.pdf"	
							}],
							"message": ""
						}
					
				
AnchorReceipts: Get

Retrieve a particular Receipt

Request Notes:

id (int) the Receipt ID to retrieve (required)

The other filtering parameters per Receipts: List apply here but are optional.

Receipts: Get Example

Request URL

https://api.newbook.cloud/rest/receipts_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": 229
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "229",
								"account_id": "10",
								"account_for": "bookings",
								"account_for_id": "34",
								"account_for_name": "John Doe",
								"account_currency_id": "1",
								"account_currency_code": "AUD",
								"description": "Accommodation",
								"total": -70,
								"generated_when":  "2024-04-18 11:30:00",
								"voided_when": null,
								"view_link": "https://driveau.newbook.cloud/{filename}.pdf",
								"download_link": "https://driveau.newbook.cloud/{filename}.pdf"	
							},
							"message": ""
						}
					
				
AnchorReceipts: PDF Content

Used to retrieve the PDF content for a Receipt.

Receipts: PDF Content Example

Request URL

https://api.newbook.cloud/rest/receipts_pdf_content

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"receipt_id": 882
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"pdf_content": "<p>HTML for the Receipt PDF will appear here.</p>"
							},
							"message": ""
						}
					
				
AnchorContact Templates: List

Retrieve a list of available Contact Templates for sending.

Request Notes:

return_all_types is optional, and will default to false when not provided.

Response Notes:

type will always be "body" or "sms", unless return_all_types is true, which can be one of the following:

  • body - indicates an Email template
  • sms - indicates an SMS template
  • signed_document - indicates an e-Signature Document template
  • internal_document - indicates an Internal Document template
  • header - indicates a Header template
  • footer - indicates a Footer template
  • insert_field - for Insert Fields
  • guestassist - for App Message templates

bind the type of object the template can be sent to e.g. bookings, guests, etc

Contact Templates: List Example

Request URL

https://api.newbook.cloud/rest/contact_templates_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"return_all_types": true
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": 1,
												"name": "Confirmation Email",
												"type": "body",
												"bind": "bookings"
											},{
												"id": 2,
												"name": "Confirmation SMS",
												"type": "sms",
												"bind": "bookings"
											}],
											"message": ""
										}
									
								
AnchorContact Templates: Send

Send a Contact Template.

Request Notes:

template_id is required and can be retrieved from Contact Templates: List

data_type is required and must match the bind of the Contact Template

data_id is required and must be an existing object e.g. if data_type is "bookings" it must be a valid Booking ID

send_via is required and must be one of

  • html_email - used for HTML emails
  • pdf_email - will attach the Template Body as a PDF and use the Email HTML in the Email
  • sms - used for SMS messages

Contact Templates: Send Example

Request URL

https://api.newbook.cloud/rest/contact_templates_send

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"template_id": 1,
											"data_type": "bookings",
											"data_id": 263,
											"send_via": "html_email"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"contact_sent": 1
											},
											"message": ""
										}
									
								
AnchorContact Templates: Create

Used to create new Contact Templates

Response Notes:

name and content are required, the rest are optional.

If email_subject is left blank then name will be used instead.

All available options for the following values are available from the Contact Templates: Options request:

  • bind
  • pdf_size
  • type
  • favourites
  • sending_type
  • send_via
  • header
  • email_header
  • footer
  • email_footer

counter_signable is only applicable when type is set to "signed_document"

When a template is sent via Email (PDF) the email_content will be sent as the email, and content will be attached as a PDF

text_content is sent as well as the email, as some email programs require a plain-text alternative version, but most will not display it. When this template is sent via Marketing Campaigns, the Plain Text Content alternative version is required.

When send_via is set to sms then only the sms_content is sent

Contact Templates: Create Example

Request URL

https://api.newbook.cloud/rest/contact_templates_create

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"name": "Confirmation Email",
											"email_subject": "",
											"content": "<p>This is an email to confirm your Booking.</p>",
											"email_content": "",
											"text_content": "",
											"sms_content": "",
											"slack_content": "",
											"type": "body",
											"pdf_size": "A4",
											"bind": null,
											"header": null,
											"email_header": null,
											"footer": null,
											"email_footer": null,
											"letterhead": null,
											"send_via": "html_email",
											"favourites": 0,
											"internal_email": 0,
											"sending_type": "transactional",
											"counter_signable": 0
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"contact_template_id": 1
											},
											"message": ""
										}
									
								
AnchorContact Templates: Get

Used to retrieve a Contact Template

Response Notes:

Retrieve a contact template by providing its id

Returns all fields, even if they were not provided when the template was created

Contact Templates: Get Example

Request URL

https://api.newbook.cloud/rest/contact_templates_get

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"id": "43"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"id": "43",
												"name": "Unconfirmed Booking Cancellation",
												"email_subject": "Your Unconfirmed Booking has been Cancelled",
												"content": "<p>Dear&nbsp;[guest:full_name],<\/p>\r\n\r\n<p>Your Booking&nbsp;[booking:id] staying&nbsp;[booking:period_from] to&nbsp;[booking:period_to] in&nbsp;[booking:category_site] has been Cancelled as it was not confirmed before:&nbsp;[booking:expire_quote_date].<\/p>\r\n\r\n<p>We hope you&#39;ll contact us to stay again in the future.<\/p>\r\n\r\n<p>Kind Regards,<\/p>\r\n\r\n<p>The team at [instance:name]<\/p>\r\n",
												"email_content": "",
												"text_content": "",
												"sms_content": "",
												"slack_content": "",
												"type": "body",
												"pdf_size": "A4",
												"bind": "bookings",
												"header": null,
												"email_header": null,
												"footer": null,
												"email_footer": null,
												"letterhead": null,
												"send_via": null,
												"last_updated": "2016-02-02 08:00:47",
												"favourites": "0",
												"internal_email": "0",
												"sending_type": "transactional",
												"counter_signable": "0",
												"active": "1"
											},
											"message": ""
										}
									
								
AnchorContact Templates: Update

Update an existing Contact Template.

Response Notes:

id is required, all other fields are optional

The other fields are the same as those provided in Contact Templates: Create

Contact Templates: Update Example

Request URL

https://api.newbook.cloud/rest/contact_templates_update

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"id": 1,
											"name": "Updated contact template"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"contact_template_updated": 1
											},
											"message": ""
										}
									
								
AnchorContact Templates: Options

Returns a list of available options for Contact Templates: Create optional values.

The results returned will depend on what is available in your database.

If an array key and value is returned, the array key is what is provided to Contact Templates: Create

The results returned by header and footer can also be used for email_header and email_footer respectively

Contact Templates: Update Example

Request URL

https://api.newbook.cloud/rest/contact_templates_options

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"data": {
													"bind": [
														"null",
														"bookings",
														"bookings_groups",
														"events",
														"guests",
														"availability_emails",
														"companies",
														"companies_staff",
														"travel_agents",
														"travel_agents_staff",
														"quotes",
														"subscriptions",
														"invoices",
														"receipts",
														"clients_accounts",
														"access_codes",
														"owners",
														"gift_vouchers_codes",
														"instances",
														"corporations",
														"corporations_staff",
														"users",
														"leads",
														"licenses_templates",
														"purchase_orders",
														"rest_api_users",
														"activities",
														"support_requests",
														"tickets",
														"tasks",
														"facilities_hire",
														"appointments",
														"jobs"
													],
													"pdf_size": [
														"A4",
														"A5",
														"Letter",
														"C5",
														"DL",
														"GC420D",
														"TMT81"
													],
													"type": [
														"body",
														"sms",
														"signed_document",
														"internal_document",
														"header",
														"footer",
														"insert_field"
													],
													"favourites": {
														"0": "No",
														"1": "Yes (Send Automatically)",
														"2": "Yes"
													},
													"sending_type": [
														"transactional",
														"marketing"
													],
													"send_via": {
														"null": "Use Page Default",
														"sms": "SMS (Unlicensed)",
														"html_email": "Email as HTML",
														"pdf_email": "Email as PDF Attachment",
														"pdf_local": "Display PDF"
													},
													"header": {
														"1": "Header",
														"null": "None"
													},
													"footer": {
														"2": "Footer",
														"null": "None"
													},
													"letterhead": {
														"1": "Plain Letterhead",
														"null": "None"
													}
												}
											},
											"message": ""
										}
									
								
AnchorSystem Templates: List

Retrieve a list of available System Templates.

Response Notes:

type will always be "body" to indicate an Email template and "sms" for an SMS template

bind the type of object the template can be sent to e.g. bookings, guests, receipts, etc

System Templates: List Example

Request URL

https://api.newbook.cloud/rest/system_templates_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"name": "access_codes_table",
												"type": "body",
												"bind": "access_codes"
											},{
												"id": "2",
												"name": "tasks_daily_sms_reminder",
												"type": "sms",
												"bind": "tasks"
											}],
											"message": ""
										}
									
								
AnchorSystem Templates: Create

Used to create new System Templates

Response Notes:

name, description and content are required, the rest are optional.

If email_subject is left blank then name will be used instead.

Valid fields:

  • name
  • description
  • content
  • email_subject
  • pdf_size
  • bind
  • table_font_size
  • table_group_by
  • type
  • letterhead
  • header
  • footer

System Templates: Create Example

Request URL

https://api.newbook.cloud/rest/system_templates_create

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"name": "Guest_agreement",
											"pdf_size": "a4",
											"bind": "guests",
											"email_subject": "The Guest Agreement",
											"description": "The agreement to be signed by new guests",
											"content": " <h2>Please read and sign the agreement</h2><p>...</p>",
											"type": "body"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"message": "Created System Template",
											"data": {
												"contact_template_id": "1"
											}
										}
									
								
AnchorSystem Templates: Get

Used to retrieve a System Template

Response Notes:

Retrieve a system template by providing its id

Returns all fields, even if they were not provided when the template was created

System Templates: Get Example

Request URL

https://api.newbook.cloud/rest/system_templates_get

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"id": "1"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"message": "Created System Template",
											"data": {
												"id": "1",
												"name": "Guest_agreement",
												"email_subject": "The Guest Agreement",
												"bind": "guests",
												"description": "The agreement to be signed by new guests",
												"content": "<h2>Please read and sign the agreement</h2><p>...</p>",
												"type": "body",
												"pdf_size": "A4",
												"table_font_size": "12",
												"table_group_by": "none",
												"header": null,
												"footer": null,
												"letterhead": null,
												"last_updated": "2018-08-29 10:33:52"
											},
											"message": ""
										}
									
								
AnchorSystem Templates: Update

Used to update a System Template

Response Notes:

Any field except ID can be updated

last_updated is set to the time that the request is processed

Valid fields:

  • name
  • description
  • content
  • email_subject
  • pdf_size
  • bind
  • table_font_size
  • table_group_by
  • type
  • letterhead
  • header
  • footer

System Templates: Update Example

Request URL

https://api.newbook.cloud/rest/system_templates_update

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"id": "1",
											"name": "Guest and Visitor agreement",
											"pdf_size": "a3"
											"bind": "bookings"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"message": "Updated System Template",
											"data": {
												"id": "1"
											}
										}
									
								
AnchorContact Emails: Create

Used to create an historical entry for an email sent.

Request Notes:

All fields except for the real_recipient_type and real_recipient_id are required and documented below:

  • name the name / subject of the email
  • recipient_type the type of recipient the email will be recorded against. The available options are:
    • guests
    • bookings
    • bookings_groups
    • events
    • activities_bookings
    • companies
    • companies_staff
    • travel_agents
    • travel_agents_staff
    • users
    • facilities_hire
    • appointments
  • recipient_id the ID of the recipient based on the recipient_type above
  • real_recipient_type the actual recipient the email was sent to. E.g. this will be the guest for a booking
  • real_recipient_id the ID of the recipient based on the real_recipient_type above
  • recipient_name the name of the recipient the email was sent to
  • content the content of the email
  • sender the name of the person who sent the email
  • sent_by the User who sent the email, and should be a valid User ID as per the Users: List
  • sent_on the timestamp of when the email was sent

Contact Emails: Create Example

Request URL

https://api.newbook.cloud/rest/contact_emails_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "Example email subject",
							"recipient_id": 123,
							"recipient_type": "bookings",
							"real_recipient_id": 321,
							"real_recipient_type": "guests",
							"recipient_name": "John Doe",
							"content": "This is the content of the email that is being saved",
							"sender": "Bob",
							"sent_by": 4,
							"sent_on": "2022-11-01 23:30:00"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "123456"
							}
						}
					
				
AnchorContact SMS: Create

Used to create an historical entry for an sms sent.

Request Notes:

All fields except for the real_recipient_type and real_recipient_id are required and documented below:

  • name the name / subject of the sms
  • recipient_type the type of recipient the sms will be recorded against. The available options are:
    • guests
    • bookings
    • bookings_groups
    • events
    • activities_bookings
    • companies
    • companies_staff
    • travel_agents
    • travel_agents_staff
    • users
    • facilities_hire
    • appointments
  • recipient_id the ID of the recipient based on the recipient_type above
  • real_recipient_type the actual recipient the sms was sent to. E.g. this will be the guest for a booking
  • real_recipient_id the ID of the recipient based on the real_recipient_type above
  • recipient_name the name of the recipient the sms was sent to
  • content the content of the sms
  • sender the name of the person who sent the sms
  • sent_by the User who sent the sms, and should be a valid User ID as per the Users: List
  • sent_on the timestamp of when the sms was sent

Contact SMS: Create Example

Request URL

https://api.newbook.cloud/rest/contact_sms_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "Example SMS subject",
							"recipient_id": 123,
							"recipient_type": "bookings",
							"real_recipient_id": 321,
							"real_recipient_type": "guests",
							"recipient_name": "John Doe",
							"content": "This is the content of the sms that is being saved",
							"sender": "Bob",
							"sent_by": 4,
							"sent_on": "2022-11-01 23:30:00"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "123456"
							}
						}
					
				
AnchorContact Documents: List

Retrieve a list of contact documents for a given recipient.

Request Notes:

You can either provide recipient_type and recipient_id, or ids, or all of them.

recipient_type (string) required if recipient_id is provided - Entity type, this determines what the recipient_id field references.

  • "bookings": Contact Documents linked to a Booking ID
  • "bookings_groups": Contact Documents linked to a Booking Group ID
  • "events": Contact Documents linked to an Event ID
  • "guests": Contact Documents linked to a Guest ID
  • "companies": Contact Documents linked to a Company ID
  • "companies_staff": Contact Documents linked to a Company Staff ID
  • "travel_agents": Contact Documents linked to a Travel Agency ID
  • "travel_agents_staff": Contact Documents linked to a Travel Agent Staff ID
  • "quotes": Contact Documents linked to a Quote ID
  • "subscriptions": Contact Documents linked to a Subscription ID
  • "invoices": Contact Documents linked to an Invoice ID
  • "receipts": Contact Documents linked to a Receipt ID
  • "clients_accounts": Contact Documents linked to a Client Account ID
  • "access_codes": Contact Documents linked to an Access Code ID
  • "owners": Contact Documents linked to an Owner ID
  • "gift_vouchers_codes": Contact Documents linked to a Gift Voucher ID
  • "users": Contact Documents linked to an User ID
  • "leads": Contact Documents linked to a Lead ID
  • "purchase_orders": Contact Documents linked to a Purchase Order ID
  • "availability_emails": Contact Documents linked to an Availability Email ID
  • "activities_bookings": Contact Documents linked to an Activity ID
  • "tickets": Contact Documents linked to a Ticket ID
  • "tasks": Contact Documents linked to a Task ID
  • "facilities_hire": Contact Documents linked to a Facility Hire ID
  • "appointments": Contact Documents linked to an Appointment ID
  • "jobs": Contact Documents linked to a Job ID

recipient_id (int) required if recipient_type is provided - ID of the recipient.

ids (array of ints) required if both recipient_type and recipient_id are not provided - Contact Documents IDs to limit the list to specific set of Contact Documents.

Contact Documents: List Example

Request URL

https://api.newbook.cloud/rest/contact_documents_list

Request JSON
					
						{
    "region": "your_region_here",
    "api_key": "your_api_key_here",
    "recipient_type": "bookings",
    "recipient_id": 712,
    "ids": [
        15,
        16,
        17
    ]
}					
				
Response JSON
					
						{
    "success": "true",
    "data": [
        {
            "id": "15",
            "name": "Document Name",
            "template_id": "83",
            "template_type": "contact",
            "recipient_id": "712",
            "recipient_type": "bookings",
            "real_recipient_id": "83",
            "real_recipient_type": "guests",
            "recipient_name": "A B",
            "content": "Any text",
            "content_plain": "",
            "pdf_size": "A4",
            "letterhead": null,
            "sender": "test@email.com",
            "sender_name": "Property XYZ",
            "recipient": "a@b.com",
            "sent_by": "-2",
            "sent_on": "2023-07-05 09:48:02",
            "contact_id": "966",
            "first_name": null,
            "last_name": null,
            "signed_when": null,
            "signature_image": null,
            "ip_address": null,
            "counter_signable": "0",
            "counter_signed_when": null,
            "counter_signature_image": null,
            "counter_signature_user_id": null,
            "signed_long": null,
            "signed_lat": null,
            "authorisation_terms_and_conditions": null,
            "signatures_required": "1",
            "signatures_count": "1",
            "signatures_required_before_checkin": "1"
        }
    ],
    "message": ""
}					
				
AnchorContact Documents: Create

Request Notes:

Create a Contact Document for a recipient from a contact template.

data_type (string) required - Entity type, this determines what the data_id field references.

  • "bookings": Contact Documents linked to a Booking ID
  • "bookings_groups": Contact Documents linked to a Booking Group ID

data_id (int) required - ID of the recipient.

template_id (int) required - ID of the Contact Template to create the Contact Document from.

duplicate (bool) optional, default: false - If false and the recipient already has a Contact Document created from the same Contact Template, that existing Contact Template is returned instead, otherwise a new Contact Document is created.

Contact Documents: Create Example

Request URL

https://api.newbook.cloud/rest/contact_documents_create

Request JSON
					
						{
    "region": "your_region_here",
    "api_key": "your_api_key_here",
    "template_id": 70,
    "data_type": "bookings",
    "data_id": 712,
    "duplicate": false
}					
				
Response JSON
					
						{
    "success": "true",
    "data": {
        "id": "15",
        "name": "Document Name",
        "template_id": "83",
        "template_type": "contact",
        "recipient_id": "712",
        "recipient_type": "bookings",
        "real_recipient_id": "83",
        "real_recipient_type": "guests",
        "recipient_name": "A B",
        "content": "Any text",
        "content_plain": "",
        "pdf_size": "A4",
        "letterhead": null,
        "sender": "test@email.com",
        "sender_name": "Property XYZ",
        "recipient": "a@b.com",
        "sent_by": "-2",
        "sent_on": "2023-07-05 09:48:02",
        "contact_id": "966",
        "first_name": null,
        "last_name": null,
        "signed_when": null,
        "signature_image": null,
        "ip_address": null,
        "counter_signable": "0",
        "counter_signed_when": null,
        "counter_signature_image": null,
        "counter_signature_user_id": null,
        "signed_long": null,
        "signed_lat": null,
        "authorisation_terms_and_conditions": null,
        "signatures_required": "1",
        "signatures_count": "1",
        "signatures_required_before_checkin": "1"
    },
    "message": ""
}					
				
AnchorContact Documents: Sign

Request Notes:

If the Contact Document is already signed, this signature will be discarded without any errors.

contact_document_id (int) required - ID of the Contact Document to add a signature to.

first_name (string) required - First name of the person singing.

last_name (string) required - Last name of the person singing.

signature_image (string) required - The image data in base64 encoded PNG format, starting with "data:image/png;base64,". E.g.: "data:image/png;base64,BASE64_ENCODED_PNG_IMAGE_DATA".

signed_long (float | null) optional, default null - Longitude of geo location where singing took place.

signed_lat (float | null) optional, default null - Latitude of geo location where singing took place.

Contact Documents: Sign Example

Request URL

https://api.newbook.cloud/rest/contact_documents_sign

Request JSON
					
						{
    "region": "your_region_here",
    "api_key": "your_api_key_here",
    "contact_document_id": "67",
    "first_name": "FirstName",
    "last_name": "LastName",
    "signature_image": "image data",
    "signed_long": 12.345678,
    "signed_lat": 87.654321
}					
				
Response JSON
					
						{
    "success": "true",
    "data": {
        "id": "15",
        "name": "Document Name",
        "template_id": "83",
        "template_type": "contact",
        "recipient_id": "712",
        "recipient_type": "bookings",
        "real_recipient_id": "83",
        "real_recipient_type": "guests",
        "recipient_name": "A B",
        "content": "Any text",
        "content_plain": "",
        "pdf_size": "A4",
        "letterhead": null,
        "sender": "test@email.com",
        "sender_name": "Property XYZ",
        "recipient": "a@b.com",
        "sent_by": "-2",
        "sent_on": "2023-07-05 09:48:02",
        "contact_id": "966",
        "first_name": null,
        "last_name": null,
        "signed_when": null,
        "signature_image": null,
        "ip_address": null,
        "counter_signable": "0",
        "counter_signed_when": null,
        "counter_signature_image": null,
        "counter_signature_user_id": null,
        "signed_long": null,
        "signed_lat": null,
        "authorisation_terms_and_conditions": null,
        "signatures_required": "1",
        "signatures_count": "1",
        "signatures_required_before_checkin": "1",
        "signatures": [
            {
                "signature_id": "123",
                "email": "noreply@newbook.cloud",
                "first_name": "FirstName",
                "last_name": "LastName",
                "signed_when": "2023-07-05 08:24:18",
                "ip_address": "172.19.0.1",
                "signed_long": "12.345678000000000",
                "signed_lat": "87.654321000000000",
                "signature_image": "BASE64_ENCODED_PNG_IMAGE_DATA"
            }
        ]
    },
    "message": ""
}					
				
AnchorReporting: Newbook Status

Pull data showing a wide range of information about the Instance.

Response Notes:

Some of the data objects in the response have keys for rest_action and rest_parameters. With these, you can submit a secondary request to elaborate on the returned value

In future releases, more of these data objects will have this ability

Reporting: Newbook Status Example

Request URL

https://api.newbook.cloud/rest/newbook_status

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"label": "Arriving Today",
												"value": "23",
												"rest_action": "bookings_list",
												"rest_parameters": {
													"period_from": "2015-08-21 00:00:00",
													"period_to": "2015-08-21 23:59:59",
													"list_type": "arriving"
												}
											},{
												"label": "Departing Today",
												"value": "5",
												"rest_action": "bookings_list",
												"rest_parameters": {
													"period_from": "2015-08-21 00:00:00",
													"period_to": "2015-08-21 23:59:59",
													"list_type": "departing"
												}
											},{
												"label": "Checked-In Today",
												"value": "20",
												"rest_action": "bookings_list",
												"rest_parameters": {
													"period_from": "2015-08-21 00:00:00",
													"period_to": "2015-08-21 23:59:59",
													"list_type": "arrived"
												}
											},{
												"label": "Checked-Out Today",
												"value": "7",
												"rest_action": "bookings_list",
												"rest_parameters": {
													"period_from": "2015-08-21 00:00:00",
													"period_to": "2015-08-21 23:59:59",
													"list_type": "departed"
												}
											},{
												"label": "In-House Today",
												"value": "40",
												"rest_action": "bookings_list",
												"rest_parameters": {
													"period_from": "2015-08-21 00:00:00",
													"period_to": "2015-08-21 23:59:59",
													"list_type": "inhouse"
												}
											},{
												"label": "Cancelled Today",
												"value": "1"
											},{
												"label": "Quoted Today",
												"value": "7"
											},{
												"label": "Flagged Today",
												"value": "2"
											},{
												"label": "Earned Revenue",
												"value": "$2500"
											},{
												"label": "Received Revenue",
												"value": "$1355"
											},{
												"label": "Payments Received",
												"value": "$1760 (12)"
											},{
												"label": "Refunds Issued",
												"value": "$405 (4)"
											},{
												"label": "Occupancy",
												"value": "87"
											},{
												"label": "Sites in Maintenance",
												"value": "4"
											}],
											"message": ""
										}
									
								
AnchorReporting: Earned Revenue

Pull data from the Earned Revenue Report for the dates specified.

Request Notes:

Optionally data_display can be provided as "list" to show each Charge/Credit individually on this report

Optionally providing get_booking_data as "true" when using list mode will also return some basic Booking data

Reporting: Earned Revenue Example

Request URL

https://api.newbook.cloud/rest/reports_earned_revenue

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"period_from": "2015-08-21 00:00:00",
											"period_to": "2015-08-21 23:59:59"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"gl_account_code": "100",
												"gl_account_description": "Accommodation",
												"charges_raised": 830,
												"charges_voided": 0,
												"credits_raised": 20,
												"credits_voided": 0,
												"earned_revenue": 810,
												"earned_revenue_ex": 736.37,
												"earned_revenue_tax": 73.63
											}],
											"message": ""
										}
									
								
AnchorReporting: Transaction Flow

Pull data from the Transaction Flow Report for the dates specified.

Reporting: Transaction Flow Example

Request URL

https://api.newbook.cloud/rest/reports_transaction_flow

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"period_from": "2015-08-21 00:00:00",
											"period_to": "2015-08-21 23:59:59"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"item_id": "143",
												"item_type": "payments_raised",
												"item_description": "Accommodation",
												"item_date": "2017-07-04 10:03:00",
												"item_amount": -50,
												"payment_type": "visa",
												"payment_type_reference": "",
												"account_id": "304",
												"account_for": "bookings",
												"account_for_id": "230",
												"account_for_name": "John Doe",
												"booking_id": "230",
												"booked_when": "2017-07-03 14:27:37"
											},{
												"item_id": "143",
												"item_type": "payments_raised",
												"item_description": "Accommodation",
												"item_date": "2017-07-04 10:30:00",
												"item_amount": 5,
												"payment_type": "cash",
												"payment_type_reference": "",
												"account_id": "305",
												"account_for": "companies",
												"account_for_id": "145",
												"account_for_name": "ACME Pty Ltd"
											 }],
											"message": ""
										}
									
								
AnchorReporting: Reconciliation

Pull data from the Reconciliation Report for the dates specified.

Reporting: Reconciliation Example

Request URL

https://api.newbook.cloud/rest/reports_reconciliation

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"period_from": "2017-08-08 00:00:00",
											"period_to": "2017-08-08 23:59:59"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"item_id": "190",
												"item_type": "payments_raised",
												"item_description": "Raised Payment #190",
												"item_date": "2017-08-08 15:34:00",
												"gl_account_id": -2,
												"gl_account_code": "",
												"gl_account_description": "Unallocated Payments",
												"reconciled_id": null,
												"reconciled_type": null,
												"payment_type": "cash",
												"payment_type_reference": "",
												"payment_transaction_method": "manual",
												"reconciled_amount": "-5.00",
												"reconciled_tax": "0.00",
												"account_id": "347",
												"account_for": "bookings",
												"account_for_id": "253",
												"account_for_name": "John Doe",
												"booking_id": "253"
											},{
												"item_id": "190",
												"item_type": "payments_linked",
												"item_description": "Payment #190 Allocated to Charge #1218",
												"item_date": "2017-08-08 15:34:00",
												"gl_account_id": -2,
												"gl_account_code": "",
												"gl_account_description": "Unallocated Payments",
												"reconciled_id": "1218",
												"reconciled_type": "charge",
												"payment_type": "cash",
												"payment_type_reference": "",
												"payment_transaction_method": "manual",
												"reconciled_amount": "5.00",
												"reconciled_tax": "0.00",
												"account_id": "347",
												"account_for": "bookings",
												"account_for_id": "253",
												"account_for_name": "John Doe",
												"booking_id": "253"
											},{
												"item_id": "190",
												"item_type": "payments_linked",
												"item_description": "Payment #190 Allocated to Charge #1218",
												"item_date": "2017-08-08 15:34:00",
												"gl_account_id": 8,
												"gl_account_code": "POS",
												"gl_account_description": "POS Items",
												"reconciled_id": "1218",
												"reconciled_type": "charge",
												"payment_type": "cash",
												"payment_type_reference": "",
												"payment_transaction_method": "manual",
												"reconciled_amount": "-5.00",
												"reconciled_tax": "-0.46",
												"account_id": "347",
												"account_for": "bookings",
												"account_for_id": "253",
												"account_for_name": "John Doe",
												"booking_id": "253"
											}],
											"message": ""
										}
									
								
AnchorReporting: Daily Audit Summary

Pull data from the Daily Audit Summary for the dates specified.

Request Notes:

debitor_gl_account can be provided to apply a GL Account to Debtors Ledger result rows

creditor_gl_account can be provided to apply a GL Account to Creditors Ledger result rows

payment_gl_account can be provided to apply a GL Account to Payment/Refund result rows

download_content_typecan be provided to return a url to the report. The value of this parameter can be either csv, pdf, xml or xlsx specifying the type of the file for the report to be created as.

Reporting: Daily Audit Summary Example

Request URL

https://api.newbook.cloud/rest/reports_daily_audit_summary

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"period_from": "2015-08-21 00:00:00",
											"period_to": "2015-08-21 23:59:59"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"report_type": "debtors_raised",
												"gl_account_id": 3,
												"gl_account_code": "A-0002",
												"date": "2017-07-04",
												"amount": -60,
												"description": "Debt Raised to Debtors Ledger"
											},{
												"report_type": "debtors_paid",
												"gl_account_id": 3,
												"gl_account_code": "A-0002",
												"date": "2017-07-04",
												"amount": 20,
												"description": "Debt Paid from Debtors Ledger"
											},{
												"report_type": "accrual_income",
												"gl_account_id": "1",
												"gl_account_code": "A-0003",
												"date": "2017-07-04",
												"tax_amount": 4.55,
												"tax_percentage": 10,
												"tax_bracket": "Full GST",
												"amount": 60,
												"description": "Studio Apartment"
											},{
												"report_type": "cash_income",
												"date": "2017-07-04",
												"description": "Visa Combined",
												"amount": -20,
												"payment_type": "visa"
											}],
											"message": ""
										}
									
								
Request URL

https://api.newbook.cloud/rest/reports_daily_audit_summary

Request JSON (with download_content_type)
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"download_content_type": "csv",
											"period_from": "2015-08-21 00:00:00",
											"period_to": "2015-08-21 23:59:59"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": "https://drive.newbook.cloud/instance_abcdef12345678790/report_file_url.csv",
											"message": ""
										}
									
								
AnchorReporting: Balances Dated

Pull data from the Balances Dated Report.

Request Notes:

period_from - which date to determine the balance as of (inclusive)

natures - determines which types of accounts will be displayed on the list:

  • 0 - Debtors only
  • 1 - Debtors and Creditors
  • 2 - Creditors only

Reporting: Balances Dated Example

Request URL

https://api.newbook.cloud/rest/reports_balances_dated

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"period_from": "2015-08-21",
											"natures": 1
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"account_id": "229",
												"account_for": "bookings",
												"account_for_id": "181",
												"account_for_name": "John Doe",
												"account_balance": 990,
												"0_days": 500,
												"30_days": 490,
												"60_days": 0,
												"90_days": 0
											}],
											"message": ""
										}
									
								
AnchorReporting: Occupancy

Retrieves a list of Categories and their occupancy for the given period.

Request Notes:

In Newbook, each Site has an option "Contribute to Occupancy Reports". It can be Yes or No. When Yes, the Site is factored into the Occupancy Report calculations. When No, it is ignored from the Occupancy Report.
The REST API Occupancy Report will factor all Sites even if their "Contribute to Occupancy Reports" option inside Newbook was set to No.
This behaviour in the REST API can be controlled using a parameter factor_site_contribute_to_occupancy_option as true.

accomm_revenue_only can optionally be provided to return accommodation revenue only. This is disabled by default. Can be 0 or 1.

Response Notes:

This request is one which can return either an array of objects or an object of objects (default) identified by their Category ID. This can be controlled by adding

{"return": "array"}
to your request parameters. When provided, data is returned as requested.

To determine the number of available Sites for a given date, subtract the occupied, maintenance, and allotted values from the available value.

Reporting: Occupancy Example

Request URL

https://api.newbook.cloud/rest/reports_occupancy

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"period_from": "2015-08-01 00:00:00",
											"period_to": "2015-08-03 23:59:59"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"category_id": "1",
												"category_name": "Single Room",
												"occupancy": {
													"2016-01-03": {
														"date": "2016-01-03",
														"available": 5,
														"occupied": 0,
														"maintenance": 0,
														"allotted": 0,
														"revenue_gross": 100.00,
														"revenue_net": 90.91
													}
												}
											}],
											"message": ""
										}
									
								
AnchorReporting: Inventory Items

Pull data from the Inventory Items Report for the dates specified.

Reporting: Inventory Items Example

Request URL

https://api.newbook.cloud/rest/reports_inventory_items

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"period_from": "2015-08-21 00:00:00",
											"period_to": "2015-08-21 23:59:59"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"inventory_item_id": 3,
												"inventory_item_description": "Accommodation",
												"generated_charges": 4,
												"generated_credits": 0,
												"earned_revenue": 80,
												"earned_revenue_ex": 72.73,
												"earned_revenue_tax": 7.27,
												"cost_price": 5
											}],
											"message": ""
										}
									
								
AnchorReporting: Survey Answers

Retrieves a list of Guests and their responses to Survey Questions, based off when the Guest answered.

Request Notes:

survey_id can optionally be provided to limit results to a particular Survey ID

answer_type can optionally be provided to limit results of a particular type of questions - valid options:

  • net_promoter_score
  • one_to_ten
  • text_field
  • enum_field
  • task_text_field
  • multiple_answers
  • multiple_text

active_only can optionally be provided to limit results to active surveys only

Reporting: Survey Answers Example

Request URL

https://api.newbook.cloud/rest/reports_surveys_answers

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"period_from": "2015-08-21 00:00:00",
											"period_to": "2015-08-21 23:59:59",
											"active_only": "1"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"survey_id": "1",
												"question_id": "1",
												"question_value": "How likely is it that you would recommend staying at this park to a friend or relative? (Not likely at all to Extremely likely)",
												"answer_type": "net_promoter_score",
												"answer_id": "1881",
												"question_type": "main",
												"answer_value": "8",
												"booking_id": "11033",
												"guest_id": "1234",
												"guest_firstname": "John",
												"guest_lastname": "Doe"
											}],
											"message": ""
										}
									
								
AnchorReporting: Surveys Completed

Provides a breakdown of Surveys Sent vs Completed.

Request Notes:

period_range can be one of the following:

  • day
  • week
  • month
  • year
  • financial_year
  • custom

period_increment is optional, and is only really required when using custom ranges

active_only can optionally be provided to limit results to active surveys only

Reporting: Surveys Completed Example

Request URL

https://api.newbook.cloud/rest/reports_surveys_completed

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"period_from": "2016-09-27 00:00:00",
											"period_to": "2016-09-27 23:59:59",
											"period_range": "year",
											"period_increment": "default",
											"active_only": "1"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"survey_id": "1",
												"survey_name": "Thank You",
												"survey_results": [{
													"period_label": "January 2016",
													"period_start": "2016-01-01 00:00:00",
													"period_end": "2016-01-31 23:59:59",
													"sent": 322,
													"answered": 41
												},{
													"period_label": "February 2016",
													"period_start": "2016-02-01 00:00:00",
													"period_end": "2016-02-29 23:59:59",
													"sent": 244,
													"answered": 36
												}]
											}],
											"message": ""
										}
									
								
AnchorSoftware Mappings: List

List Software Mappings.

Request Notes:

  • id (integer) optional. A specific Software Mapping ID to retrieve.
  • connection_id (integer) optional. Filter results by specific Software Connection ID.
  • software (string) optional. Filters results by Software Connection name.
  • software_provider (string) optional. Filters results by software provider.
  • software_type (string) optional. Filters results by the data type of the software side of the mapping.
  • sort_ascending (bool) optional, default false. Order results by oldest first when true.

Software Mappings: List Example

Request URL

https://api.newbook.cloud/rest/software_mappings_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [{
									"id": 17,
									"connection_id": 1,
									"software": "myob",
									"software_type": "account",
									"software_type_id": "4",
									"software_provider": null,
									"newbook_type": "gl_accounts",
									"newbook_type_id": 2,
									"details": null,
									"export_hash": null,
									"last_export": "2024-04-19 11:30:00"
								}],
						}
					
				
AnchorSoftware Mappings: Create

Creates a new Software Mapping.

Request Notes:

  • connection_id (integer) required. The Software Connection ID to create the mapping for.
  • software (string) required. The name of the Software Connection the mapping is for.
  • software_type (string) required. The data type being mapped on the Software Connection side.
  • software_type_id (string) required. The data identifier for the mapping on the Software Connection side.
  • newbook_type (string) required. The Newbook data type being mapped.
  • newbook_type_id (integer) required. The ID of the Newbook entity being mapped.
  • software_provider (string) optional. Any data to associate the mapping to a specific provider.
  • details (string) optional. Any other specific details to store with the mapping.
  • export_hash (string) optional. Hash of the data when mapping was exported.
  • last_export (DateTime) optional. The date/time the mapping was last exported.

Software Mappings: Create Example

Request URL

https://api.newbook.cloud/rest/software_mappings_create

Request JSON
					
						{
			"region": "your_region_here",
			"api_key": "your_api_key_here",
			"connection_id": 1,
			"software": "myob",
			"software_type": "account",
			"software_type_id": "4",
			"software_provider": null,
			"newbook_type": "gl_accounts",
			"newbook_type_id": 2,
			"details": null,
			"export_hash": null,
			"last_export": "2024-04-19 11:30:00"
		}					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": 17,
								"connection_id": 1,
								"software": "myob",
								"software_type": "account",
								"software_type_id": "4",
								"software_provider": null,
								"newbook_type": "gl_accounts",
								"newbook_type_id": 2,
								"details": null,
								"export_hash": null,
								"last_export": "2024-04-19 11:30:00"
							},
						}
					
				
AnchorSoftware Mappings: Get

Retrieve a single Software Mapping.

Request Notes:

  • id (integer) required, an existing Software Mapping ID.

Software Mappings: Get Example

Request URL

https://api.newbook.cloud/rest/software_mappings_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": "17"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": 17,
								"connection_id": 1,
								"software": "myob",
								"software_type": "account",
								"software_type_id": "4",
								"software_provider": null,
								"newbook_type": "gl_accounts",
								"newbook_type_id": 2,
								"details": null,
								"export_hash": null,
								"last_export": "2024-04-19 11:30:00"
							},
						}
					
				
AnchorSoftware Mappings: Update

Updates an existing Software Mapping.

Request Notes:

  • id (integer) required, the Software Mapping ID to update.
  • See Software Mappings: Create for details on request parameters that can be updated.

Software Mappings: Update Example

Request URL

https://api.newbook.cloud/rest/software_mappings_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": 17,
							"newbook_type_id": 10
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": 17,
								"connection_id": 1,
								"software": "myob",
								"software_type": "account",
								"software_type_id": "4",
								"software_provider": null,
								"newbook_type": "gl_accounts",
								"newbook_type_id": 10,
								"details": null,
								"export_hash": null,
								"last_export": "2024-04-19 11:30:00"
							},
						}
					
				
AnchorSpecial Dates: List

List Special Dates.

Request Notes:

  • id (integer) optional, a specific Special Date ID to retrieve.
  • name (string) optional, filters results by name.
  • period_from (date) optional, filters results by date range.
  • period_to (date) optional, filters results by date range.
  • show_inactive (bool) optional, default false. Include inactive Special Dates in the response by setting this true.

Special Dates: List Example

Request URL

https://api.newbook.cloud/rest/special_dates_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [{
									"id": 17,
									"name": "New Years Day",
									"description": "Public holiday for the first day of the year.",
									"period_from": "2010-01-01",
									"period_to": "2010-01-01",
									"yearly_event": "1",
									"allow_arrivals_offline": "1",
									"allow_arrivals_online": "1",
									"allow_departures_offline": "1",
									"allow_departures_online": "1",
									"force_period_offline": "0",
									"force_period_online": "0",
									"public_holiday": "1",
									"active": "1",
									"type_id": "1"
								}]
						}
					
				
AnchorSpecial Dates: Create

Creates a new Special Date.

Request Notes:

  • name (string) required. Max 200 characters.
  • description (string) optional.
  • period_from (date) required. The starting date of the Special Date.
  • period_to (date) optional. When not provided, will default to period_from, making it a single day period.
  • active (boolean) optional. Defaults to true.
  • yearly_event (boolean) optional. Defaults to false. Whether this Special Date repeats every year. You still need to provide a period_from, but Newbook itself will automatically utilise this Special Date every year per the day & month provided.
  • type_id (int), must be one of the following values:
    • 1 = Special Date (default)
    • 2 = Information. All settings below are ignored when using this type.
  • public_holiday (boolean) optional. Defaults to false. Whether the Special Date is a public holiday.
  • allow_arrivals_offline (boolean) optional. Defaults to true. Whether to allow arrivals on this date for Bookings made within Newbook.
  • allow_arrivals_online (boolean) optional. Defaults to true. Whether to allow arrivals on this date for Bookings made via Newbook Online.
  • allow_departures_offline (boolean) optional. Defaults to true. Whether to allow departures on this date for Bookings made within Newbook.
  • allow_departures_online (boolean) optional. Defaults to true. Whether to allow departures on this date for Bookings made via Newbook Online.
  • force_period_offline (boolean) optional. Defaults to false. Whether to force Bookings to Book the entire period of the Special Date for Bookings made within Newbook.
  • force_period_online (boolean) optional. Defaults to false. Whether to force Bookings to Book the entire period of the Special Date for Bookings made via Newbook Online.

Special Dates: Create Example

Request URL

https://api.newbook.cloud/rest/special_dates_create

Request JSON
					
						{
			"region": "your_region_here",
			"api_key": "your_api_key_here",
			"name": "New Years Day",
			"description": "Public holiday for the first day of the year.",
			"period_from": "2010-01-01",
			"period_to": "2010-01-01",
			"yearly_event": "1",
			"allow_arrivals_offline": "1",
			"allow_arrivals_online": "1",
			"allow_departures_offline": "1",
			"allow_departures_online": "1",
			"force_period_offline": "0",
			"force_period_online": "0",
			"public_holiday": "1",
			"active": "1",
			"type_id": "1"
		}					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": 17,
								"name": "New Years Day",
								"description": "Public holiday for the first day of the year.",
								"period_from": "2010-01-01",
								"period_to": "2010-01-01",
								"yearly_event": "1",
								"allow_arrivals_offline": "1",
								"allow_arrivals_online": "1",
								"allow_departures_offline": "1",
								"allow_departures_online": "1",
								"force_period_offline": "0",
								"force_period_online": "0",
								"public_holiday": "1",
								"active": "1",
								"type_id": "1"
							}						}
					
				
AnchorSpecial Dates: Get

Retrieve a single Special Date.

Request Notes:

  • id (integer) required, an existing Special Date ID.
  • show_inactive (bool) optional, default true. Does not return the inactive Special Dates if this is set to false.

Special Dates: Get Example

Request URL

https://api.newbook.cloud/rest/special_dates_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": "17"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": 17,
								"name": "New Years Day",
								"description": "Public holiday for the first day of the year.",
								"period_from": "2010-01-01",
								"period_to": "2010-01-01",
								"yearly_event": "1",
								"allow_arrivals_offline": "1",
								"allow_arrivals_online": "1",
								"allow_departures_offline": "1",
								"allow_departures_online": "1",
								"force_period_offline": "0",
								"force_period_online": "0",
								"public_holiday": "1",
								"active": "1",
								"type_id": "1"
							}						}
					
				
AnchorSpecial Dates: Update

Updates an existing Special Date.

Request Notes:

  • id (integer) required, the Special Date ID to update.
  • See Special Dates: Create for details on request parameters that can be updated.

Special Dates: Update Example

Request URL

https://api.newbook.cloud/rest/special_dates_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": 17,
							"name": "NYE"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": 17,
								"name": "NYD",
								"description": "Public holiday for the first day of the year.",
								"period_from": "2010-01-01",
								"period_to": "2010-01-01",
								"yearly_event": "1",
								"allow_arrivals_offline": "1",
								"allow_arrivals_online": "1",
								"allow_departures_offline": "1",
								"allow_departures_online": "1",
								"force_period_offline": "0",
								"force_period_online": "0",
								"public_holiday": "1",
								"active": "1",
								"type_id": "1"
							}						}
					
				
AnchorTasks: List

Retrieve a list of outstanding Tasks from Newbook

Request Notes:

task_type must be an ID returned from Task Types: List.

show_uncomplete is optional and should only be provided when you wish see tasks outstanding from previous dates (before the period_from). The default value is false which shows all outstanding tasks for the current period

created_when is optional and when provided, restricts the returned tasks to only those which were created on the date given. It references the date the task itself was created, opposed to period_from and period_to which reference the date/s the task is scheduled for

Response Notes:

booking_site_id and booking_site_name are optionally returned when the Task is associated with a Booking

Tasks: List Example

Request URL

https://api.newbook.cloud/rest/tasks_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"period_from": "2016-02-01",
											"period_to": "2016-02-01",
											"task_type": [-1,-2],
											"show_uncomplete": "true",
											"created_when": "2016-02-01"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"task_id": 1894,
												"task_location_id": 47,
												"task_location_type": "accommodation_sites",
												"task_location_name": "Single Room 101",
												"task_description": "Blocked for Maintenance",
												"task_period_from": "2015-12-01 10:00:00",
												"task_period_to": "2015-12-05 14:00:00",
												"task_type": "Maintenance",
												"task_type_id": -2,
												"task_location_occupy": 1
											},{
												"task_id": 1895,
												"task_location_id": 546,
												"task_location_type": "bookings",
												"task_location_name": "Mr John Doe",
												"task_description": "Room Service",
												"task_period_from": "2015-12-10 09:00:00",
												"task_period_to": "2015-12-10 09:00:00",
												"task_type": "Housekeeping",
												"task_type_id": -1,
												"booking_site_id": 47,
												"booking_site_name": "Single Room 101"
											}],
											"message": ""
										}
									
								
AnchorTask Types: List

Retrieve a list of the different Task Types

Task Types: List Example

Request URL

https://api.newbook.cloud/rest/tasks_types_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": -2,
												"name": "Maintenance"
											},{
												"id": -1,
												"name": "Housekeeping"
											},{
												"id": 1,
												"name": "Meeting"
											}],
											"message": ""
										}
									
								
AnchorTasks: Create

Create a new Task.

Request Notes:

location_type is required and must be one of:

  • none
  • accommodation_sites
  • facilities
  • bookings
  • bookings_groups
  • guests
  • companies
  • leads
  • quotes
  • tickets

location_id is required when the location_type is not "none" and must be a valid Booking/Guest/etc ID

location_name when location_type is set to "accommodation_sites" or "facilities" this can be provided instead of location_id and must be a valid Site/Facility Name

location_occupy when location_type is set to "accommodation_sites" this can optionally be provided as "1" to block that Site from availability

type_id is required, a valid list of options can be retrieved from the Task Types: List

description is required

period_from is required

period_to is required

Tasks: Create Example

Request URL

https://api.newbook.cloud/rest/tasks_create

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"location_type": "bookings",
											"location_id": 531,
											"type_id": "1",
											"description": "Chase up Booking Deposit",
											"period_from": "2017-10-31 16:00:00",
											"period_to": "2017-10-31 16:00:00"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"task_id": "44"
											},
											"message": "Created Task"
										}
									
								
AnchorTasks: Update

Mark an individual Task as Started or Completed.

Request Notes:

The only required field for task_update is task_id, however at least 1 other field must be provided in order to update the Task.

period_from must be before period_to

location_type must be one of the following:

  • bookings
  • bookings_groups
  • accommodation_sites
  • facilities
  • companies
  • companies_staff
  • events
  • leads
  • quotes
  • guests
  • activities

Response Notes:

Site information (site_id, site_name, etc) is returned only when the Task associated with a Booking or Site

If the site_status did not change to Clean as expected it means that either the Site is still occupied, or there are other outstanding Housekeeping Tasks to be completed

Tasks: Update Example

Request URL

https://api.newbook.cloud/rest/tasks_update

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"task_id": "1894",
											"started_on": "2016-12-02 16:00:00",
											"completed_on": "2016-12-02 16:30:00",
											"description": "Arrival Clean",
											"location_type": "bookings",
											"location_id": "13047",
											"type_id": "-1",
											"period_from": "2018-01-31 13:00",
											"period_to": "2018-01-31 14:00"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"site_id": "44",
												"site_name": "101",
												"site_status": "Clean",
												"category_name": "Single Room"
											}],
											"message": "Updated Task"
										}
									
								
AnchorTickets: List

Retrieve a list of all Tickets.

Request Notes:

account_id can optionally be provided to limit results to a particular Client Account

Response Notes:

Tickets can have a status and corresponding status_name of the following values:

  • 0: Open
  • 1: Closed
  • 2: Waiting on Client
  • 3: Waiting on Third Party
  • 4: Invalid/Spam

status_when is set to the current timestamp when a Ticket changes status. This is different to updated_when, which will be incremented if textual change is done or a new note is added to the Ticket.

Tickets: List Example

Request URL

https://api.newbook.cloud/rest/tickets_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "2",
												"account_id": "185",
												"account_for": "guests",
												"account_for_id": "20",
												"account_for_name": "John Doe",
												"queue_id": "1",
												"contact_name": "John Doe",
												"contact_email": "john.doe@newbook.cloud",
												"contact_phone": "",
												"created_on": "2017-11-08 11:18:58",
												"updated_on": "2017-11-08 13:41:14",
												"subject": "Hello World",
												"assigned_to": "null",
												"priority": "normal",
												"status": "1",
												"queue_name": "Support",
												"status_name": "Closed",
												"status_when": "2017-11-08 12:58:23"
											}],
											"message": ""
										}
									
								
AnchorTickets: Get

Retrieve a particular Ticket.

Request Notes:

ticket_id is required

Tickets: Get Example

Request URL

https://api.newbook.cloud/rest/tickets_get

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"ticket_id": 2
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"id": "2",
												"account_id": "185",
												"account_for": "guests",
												"account_for_id": "20",
												"account_for_name": "John Doe",
												"queue_id": "1",
												"contact_name": "John Doe",
												"contact_email": "john.doe@newbook.cloud",
												"contact_phone": "",
												"created_on": "2017-11-08 11:18:58",
												"updated_on": "2017-11-08 12:41:14",
												"subject": "Hello World",
												"assigned_to": "null",
												"priority": "normal",
												"status": "0",
												"queue_name": "Support",
												"status_name": "Open",
												"content": "...Truncated Ticket History HTML..."
											},
											"message": ""
										}
									
								
AnchorTickets: Create

Create a new Ticket.

Request Notes

account_id is required

queue_id is required, a valid list of options is available from Ticket Queue: List

subject is required

content is required and is expected to be valid HTML

contact_name is required

contact_email is required

Tickets: Create Example

Request URL

https://api.newbook.cloud/rest/tickets_create

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"account_id": 20,
											"subject": "Hello World",
											"content": "...Truncated HTML Content...",
											"contact_name": "John Doe",
											"contact_email": "john.doe@newbook.cloud"
										}
									
								
Response JSON
									
										{
											"succes": "true",
											"data": {
												"ticket_id": 2
											},
											"message": "Successfully created Ticket"
										}
									
								
AnchorTickets: Update

Update an existing Ticket.

Request Notes

ticket_id is required

status can optionally be provided, valid options include

  • 0 - Open
  • 1 - Closed
  • 2 - Waiting on Client
  • 3 - Waiting on Third Party
  • 4 - Invalid

priority can optionally be provided, valid options include

  • low - Low
  • normal - Normal
  • medium - Medium
  • high - High

content can optionally be provided to add an additional response to the Ticket, the response will be treated as coming from the client

Tickets: Update Example

Request URL

https://api.newbook.cloud/rest/tickets_update

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"ticket_id": 2,
											"subject": "Hello World",
											"status": 2,
											"content": "...Truncated HTML Content...",
											"contact_name": "John Doe",
											"contact_email": "john.doe@newbook.cloud"
										}
									
								
Response JSON
									
										{
											"succes": "true",
											"data": {
												"ticket_id": 2
											},
											"message": "Successfully updated Ticket"
										}
									
								
AnchorTicket Queue: List

Retrieve a list of available Ticket Queues.

Ticket Queue: List Example

Request URL

https://api.newbook.cloud/rest/tickets_queues_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"name": "Support"
											}],
											"message": ""
										}
									
								
AnchorNotes: Create

Add a Note to an entity within the system (e.g. Booking, Guest, Lead or Quote).

Request Notes:

for must be one of the following values:

  • accommodation_sites
  • accommodation_categories
  • appointment
  • availability_emails
  • bookings
  • bookings_groups
  • charges
  • clients_accounts
  • companies
  • companies_staff
  • credits
  • equipment
  • equipment_guests
  • events
  • events_packages
  • facilities_hire
  • guests
  • instances_booking_channels
  • invoices
  • leads
  • payments
  • postmaster_accounts
  • projects
  • quotes
  • receipts
  • refunds
  • tasks
  • travel_agents
  • travel_agents_staff

for_id corresponds to the particular for that this note will be attached to

type_id is optional, and will use the System Default if not provided as per the Note Types: List request.

content the note content.

output_message is optional, and will default to true when not provided. This controls whether the note will display at the top of the associated page.

task_list is optional, and will default to false when not provided. This controls whether the note will display on any tasks lists.

check_for_duplicates is optional, and will default to true if not provided.

user_id is optional, and will default to the api user if not provided. This sets the author for the note.

created_when is optional, and will default to the current timestamp if not provided. This sets the Creation timestamp for the Note.

Backwards Compatibility

This request still accepts the following parameters in place of the preferred parameters - as described above, with the "note_" prefix removed:

  • note_for
  • note_for_id
  • note_content
  • note_type_id
  • note_content

Notes: Create Example

Request URL

https://api.newbook.cloud/rest/notes_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"for": "bookings",
							"for_id": "350",
							"type_id": "1",
							"title": "Optional title",Q
							"content": "Just some information",
							"output_message": true,
							"task_list": false
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "20"
							},
							"message": ""
						}
					
				
AnchorNotes: Update

Updates an existing Note for an entity within the system (e.g. Booking, Guest, Lead or Quote).

Request Notes:

id (integer) an existing Note to update

for must be one of the following values:

  • accommodation_sites
  • accommodation_categories
  • appointment
  • availability_emails
  • bookings
  • bookings_groups
  • charges
  • clients_accounts
  • companies
  • companies_staff
  • credits
  • equipment
  • equipment_guests
  • events
  • events_packages
  • facilities_hire
  • guests
  • instances_booking_channels
  • invoices
  • leads
  • payments
  • postmaster_accounts
  • projects
  • quotes
  • receipts
  • refunds
  • tasks
  • travel_agents
  • travel_agents_staff

remove (boolean) optional, deactivates the existing note when set to true.

All other parameters are optional, please see Notes: Create for more details.

The value of for and for_id cannot be updated to point to a new entity within the system.

Notes: Update Example

Request URL

https://api.newbook.cloud/rest/notes_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"id": "20",
							"content": "Just some updated information",
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": "20"
							},
							"message": ""
						}
					
				
AnchorSurveys: List

Retrieves a list of the Surveys set up in the database.

Surveys: List Example

Request URL

https://api.newbook.cloud/rest/surveys_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"survey_id": 1,
												"survey_name": "After Departure",
												"questions": [{
													"question_id": 1,
													"question_name": "How likely is it that you would recommend staying at this park to a friend or relative? (Not likely at all to Extremely likely)",
													"answer_type": "net_promoter_score",
													"answer_required": true,
													"answer_options": [0,1,2,3,4,5,6,7,8,9,10]
												},{
													"question_id": 2,
													"question_name": "Comments",
													"answer_type": "text_field",
													"answer_required": true
												}],
												"initial_question": {
													"question_id": 1,
													"question_name": "How would you rate your stay at our park? (Not likely at all to Extremely likely)",
													"answer_type": "net_promoter_sms",
													"answer_options": [0,1,2,3,4,5,6,7,8,9,10]
												}
											}],
											"message": ""
										}
									
								
AnchorGift Vouchers: List

Pull the list of Gift Vouchers from within Newbook.

Request Notes:

name is optional and when provided it will restrict the results to the matching Gift Voucher

Gift Vouchers: List Example

Request URL

https://api.newbook.cloud/rest/gift_voucher_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"name": "test"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "7",
												"name": "Testing",
												"description": "Just testing how Gift Vouchers work",
												"amount": "100.00",
												"gl_category_id": "1",
												"display_order": "0",
												"template_id": null,
												"sell_online": "1",
												"redeem_online": "1",
												"active": "1"
											}],
											"message": ""
										}
									
								
AnchorInventory Items: List

Pull the list of Inventory Items from within Newbook.

Request Notes:

name is optional and when provided it will restrict the results to the matching Inventory Items

You can provide a basic booking object named calculate_price_for_booking in the request parameters and Newbook will return a new key in the response, booking_inventory_calculated_price. The calculation factors the cost per occupant so you don't have to implement such logic in your application:

								
									{
										"calculate_price_for_booking": {
											"period_from": "2024-04-19",
											"period_to": "2024-04-20",
											"total": 199.95,
											"adults": 2,
											"children": 1,
											"infants": 0,
											"animals": 0
										}
									}
								
							

If you use this, calculate_price_for_booking.period_from, calculate_price_for_booking.period_to and calculate_price_for_booking.total and at least one of the occupant keys are required for Newbook to return booking_inventory_calculated_price in the response. This is because the duration of the booking and its total cost can impact the price determination when an Inventory Item is configured that way:

								
									{
										"success": "true",
										"data": [{
											...
											"booking_inventory_calculated_price": 14.50
										}],
										"message": ""
									}
								
							

Inventory Items: List Example

Request URL

https://api.newbook.cloud/rest/inventory_items_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"name": "foldaway"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"category_id": null,
												"gl_category_id": "1",
												"gl_account_id": "2",
												"name": "Foldaway Bed",
												"description": "Foldaway Bed",
												"amount": "10.00",
												"unit_amount": "0.00",
												"unit_type": "",
												"unit_category_id": null,
												"repeat_charge_type": "charges",
												"repeat_charge_interval": "week",
												"repeat_charge_interval_multiplier": "1",
												"repeat_charge_guest_visible": "1",
												"repeat_charge_travel_agent_commission": "1",
												"repeat_charge_include_in_stay_cost": "1",
												"repeat_charge_disburse_to_owners": "1",
												"repeat_charge_prorata_end": "1",
												"repeat_charge_booking_market_segment_id": null,
												"booking_inventory_item_type": "charges",
												"booking_inventory_calculation_type": "fixed",
												"booking_inventory_calculation_amount": "0.00",
												"booking_inventory_task_type_id": null,
												"booking_inventory_per_adult": "0.00",
												"booking_inventory_per_child": "0.00",
												"booking_inventory_per_infant": "0.00",
												"booking_inventory_per_animal": "0.00",
												"booking_inventory_guest_visible": "0",
												"booking_inventory_travel_agent_commission": "1",
												"booking_inventory_include_in_stay_cost": "1",
												"booking_inventory_disburse_to_owners": "1",
												"booking_inventory_daytype": "once",
												"booking_inventory_interval": "day",
												"booking_inventory_interval_multiplier": "0",
												"booking_inventory_daysofweek": "0",
												"booking_inventory_ignore_other_tariffs": "0",
												"booking_inventory_ignore_period_from": "0",
												"booking_inventory_ignore_period_to": "1",
												"quote_inventory_item_type": "charges",
												"quote_inventory_fixed_commission": null,
												"quote_inventory_guest_visible": "1",
												"subscription_interval": "week",
												"subscription_interval_multiplier": "1",
												"hire_per_adult": "0.00",
												"hire_per_child": "0.00",
												"hire_per_infant": "0.00",
												"hire_per_animal": "0.00",
												"hire_interval": "day",
												"hire_interval_multiplier": "0",
												"tax_free": "0",
												"additional_information": "",
												"cost_price": "0.00",
												"image_uri": "",
												"section_code": "",
												"barcode": "",
												"stock_control": "0",
												"use_stock_serials": "0",
												"low_stock_threshold": "0",
												"push_to_pos": "1",
												"active": "1",
												"online_category_restrictions": [
													"2",
													"7",
													"16"
												]
											}],
											"message": ""
										}
									
								
AnchorDiscounts: List

Pull the list of Discounts from within Newbook.

Request Notes:

name is optional and when provided it will restrict the results to the matching Discounts

Discounts: List Example

Request URL

https://api.newbook.cloud/rest/discount_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"name": "test"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "4",
												"name": "Test Discount",
												"discount_type": "percentage",
												"discount_amount": "10.00",
												"minimum": "0.00",
												"maximum": "0.00",
												"gl_account_id": "145",
												"gl_category_id": "1",
												"bookings_source_id": null,
												"min_stay": "0",
												"requires_code": "0",
												"per_night": "0",
												"active": "1"
											}],
											"message": ""
										}
									
								
AnchorCustom Fields

Pull a list of Custom Fields configured from within Newbook.

Request Notes:

for must be provided as one of the following options:

  • leads
  • guests
  • bookings

Response Notes:

type will be one of the following options:

  • text
  • number - accepts a numeric value
  • checkbox - accepts 1 for Yes and 0 for No
  • enum_field - accepts a single option from type_options
  • multiple_enum_field - accepts multiple options from type_options
  • date - expecting a date in the format YYYY-MM-DD
  • currency - accepts a numeric value
  • company_lookup - accepts a valid Company ID from the Companies: List

Custom Fields Example

Request URL

https://api.newbook.cloud/rest/custom_fields

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"for": "bookings"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"name": "Special Requirements",
												"tab_name": "Additional Information",
												"type": "text"
											},{
												"id": "2",
												"name": "Wifi Package",
												"tab_name": "Additional Information",
												"type": "enum_field",
												"type_options": {
													"7": "100MB",
													"8": "200MB"
												}
											}],
											"message": ""
										}
									
								
AnchorNotes Types: List

Pull a list of allowed Note Types from within Newbook.

Response Notes:

The note_type_default will be used for Notes: Create if a manual note_type_id is not provided

Notes Types: List Example

Request URL

https://api.newbook.cloud/rest/notes_types

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"note_type_id": "1",
												"note_type_name": "Information",
												"note_type_default": "1"
											},{
												"note_type_id": "2",
												"note_type_name": "Warning",
												"note_type_default": "0"
											}],
											"message": ""
										}
									
								
AnchorPhone Calls: Import Calls

Push a list of call history to Newbook for importing.

Request Notes:

call_origin is recommended to be the phone extension (these can be allocated to the appropriate Site from the Phones section within Newbook)

call_duration is in seconds

To have the phone calls billed automatically (which is optional), please provide the following parameters:

e.g.

								
									{
										"region": "your_region_here",
										"api_key": "your_api_key_here",
										"autocharge": "true",
										"autocharge_gl_account_id": "2",
										"autocharge_gl_category_id": "2",
										"phone_calls": []
									}
								
							

autocharge_invoice can optionally be provided as "true" to have Newbook create an Invoice for the Phone Call Charges. The Response JSON will have an array of invoice_ids returned in the data section.

Phone Calls: Import Calls Example

Request URL

https://api.newbook.cloud/rest/phone_calls

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"phone_calls": [{
												"call_origin": "101",
												"call_destination": "0756554600",
												"call_description": "Outgoing Call",
												"call_timestamp": "2016-02-12 15:30:00",
												"call_duration": "120",
												"call_cost": "1.45"
											},{
												"call_origin": "101",
												"call_destination": "0756554600",
												"call_description": "Outgoing Call",
												"call_timestamp": "2016-02-12 16:00:00",
												"call_duration": "45",
												"call_cost": "0.80"
											}]
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [],
											"message": "Successfully imported 2 calls"
										}
									
								
AnchorPostMaster Accounts: List

Retrieve the list of PostMaster Accounts.

A PostMaster Account is usually used for recording non-Booking-specific charges i.e. generic income such as a till.

Request Notes:

Send account_breakdown as true to see the balance of each associated Sub Client Account (gl_category)

PostMaster Accounts: List Example

Request URL

https://api.newbook.cloud/rest/postmaster_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"name": "Reception",
												"pos_identifier": "",
												"user_id": "1",
												"account_id": "889",
												"active": "1",
												"account_balance": "0.00",
												"auto_billing_limit": null
											}],
											"message": ""
										}
									
								
AnchorMultiple Charges: Create

Used to record multiple sales to a Client Account in Newbook.

Request Notes:

sales: an array of different sales to record

  • account_id: The Client Account ID retrieved in a previous request
  • gl_category_id: Use the Sub Client Accounts: List to retrieve a list of valid IDs
  • generated_when: The datetime the sale was performed
  • charges: an array of charges for the sale
    • gl_account_code: The GL Account code to record for the Charge. You can optionally provide gl_account_id instead using a valid ID from the GL Accounts: List request
    • tax_free: 1 = Tax Free, 0 = Has Tax

      tax_rates: (optional) Instead of Newbook calculating the Tax Amounts for you, use this parameter to manually provide Tax Amounts

      • 					
        						[
        							{"tax_id":sourced from Newbook,"tax_amount":number},
        							{"tax_id":sourced from Newbook,"tax_amount":number}
        						]
        					
        				
      • tax_id: is based on the response to 3rd Party Tax Rates

    • inventory_item_id (optional): links this Charge to a matching Inventory Item for reporting purposes
    • booking_id (optional): tells Newbook which Booking this Charge is related to, useful for when the Booking is billing to a Company Client Account
  • credits: an array of credits for the sale
    • gl_account_code: The GL Account code to record for the Credit. You can optionally provide gl_account_id instead using a valid ID from the GL Accounts: List request
    • tax_free: 1 = Tax Free, 0 = Has Tax

      tax_rates: (optional) Instead of Newbook calculating the Tax Amounts for you, use this parameter to manually provide Tax Amounts

      • 					
        						[
        							{"tax_id":sourced from Newbook,"tax_amount":number},
        							{"tax_id":sourced from Newbook,"tax_amount":number}
        						]
        					
        				
      • tax_id: is based on the response to 3rd Party Tax Rates

    • inventory_item_id (optional): links this Credit to a matching Inventory Item for reporting purposes
    • booking_id (optional): tells Newbook which Booking this Credit is related to, useful for when the Booking is billing to a Company Client Account
  • payments: an array of payments for the sale
    • type: tells Newbook how the Payment was received - valid options:
      • cash
      • cheque
      • visa
      • mastercard
      • amex
      • diners
      • discover
      • jcb
      • eftpos
      • eft (online banking funds transfer)
      • eurocard
      • bartercard
  • refunds: an array of refunds for the sale
    • type: tells Newbook how the Refund was received - valid options:
      • cash
      • cheque
      • visa
      • mastercard
      • amex
      • diners
      • discover
      • jcb
      • eftpos
      • eft (online banking funds transfer)
      • eurocard
      • bartercard
  • invoice_description (optional): When provided Newbook will create an Invoice with this description for the new charges. The Response JSON will have an array of invoice_ids returned in the data section.
  • invoice_system_template_id (optional): When provided along with invoice_description Newbook will create an Invoice using the specified System Template.

creating an array for credits instead of charges (same options apply e.g. description, amount) will allow a "negative charge" to save - internally Newbook handles this as Credits not negative Charges

creating an array for refunds instead of payments (same options apply e.g. description, amount) will allow for recording monies given back to the Guest

Response Notes:

If the credits array was provided in the request, you will receive a credit_ids array in the response

If the payments array was provided in the request, you will receive a payment_ids array in the response

If the refunds array was provided in the request, you will receive a refund_ids array in the response

Multiple Charges: Create Example

Request URL

https://api.newbook.cloud/rest/pos_sale

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"sales": [{
												"account_id": "889",
												"gl_category_id": "2",
												"generated_when": "2015-09-13 14:00:00",
												"charges": [{
													"description": "Phone Charge Local",
													"gl_account_code": "POS",
													"amount": "3.95",
													"tax_free": "0"
												}],
												"payments": [{
													"description": "Payment received",
													"type": "visa",
													"amount": "8.95"
												}]
											}]
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"charge_ids": [7],
												"payment_ids": [10]
											},
											"message": ""
										}
									
								
AnchorSubscriptions: List (CRM)

Pull a list of Subscriptions from Newbook.

Request Notes:

account_id can optionally be provided to limit results to a particular Client Account

gl_account_id can optionally be provided to limit results to a particular GL Account

include_cancelled can optionally be provided as true to include Cancelled Subscriptions; defaults to false, which will return Active & Stopped Subscriptions.

Subscriptions: List (CRM) Example

Request URL

https://api.newbook.cloud/rest/subscriptions_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"subscription_id": "1",
												"created_when": "2020-01-23 19:56:18",
												"inventory_item_id": null,
												"account_id": "123",
												"account_for": "users",
												"account_for_id": "123",
												"account_for_name": "A Staff Member",
												"description": "Monthly Phone Service",
												"gl_account_id": "1",
												"gl_account_name": "Service Revenue",
												"gl_category_id": "1",
												"gl_category_name": "General",
												"amount": "30.00",
												"status": "Stopped",
												"stopped_when": "2020-06-13 14:56:23"
											},{
												"subscription_id": "2",
												"created_when": "2020-04-11 08:58:56",
												"inventory_item_id": "10",
												"account_id": "10",
												"account_for": "companies",
												"account_for_id": "10",
												"account_for_name": "Bobs IT Services",
												"description": "Yearly Service",
												"gl_account_id": "1",
												"gl_account_name": "Service Revenue",
												"gl_category_id": "1",
												"gl_category_name": "General",
												"amount": "150.00",
												"status": "Active",
												"stopped_when": null
											}],
											"message": ""
										}
									
								
AnchorNotifications: List

Pull a list of Notifications from Newbook.

Request Notes:

staff_id is optional and when provided it will restrict the results to the matching Notifications. You have to know the ID of the particular staff member before running this query. The ID of the staff member can be found in the Newbook web interface

created_when is optional and when provided, restricts the returned Notifications to only those which were created on the date given

Notifications: List Example

Request URL

https://api.newbook.cloud/rest/notifications_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"staff_id": "38",
											"created_when": "2016-02-01"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "23",
												"type": "2",
												"message": "<p>hi everybody, make sure you have a good day today!</p><p>- your office manager</p>",
												"all_staff": "1",
												"generated_by": "38",
												"generated_when": "2017-04-20 13:38:59"
											}],
											"message": ""
										}
									
								
AnchorOnline Users: Get

Perform a login check for a Newbook Online User.

Request Notes:

username is required

password is optional, but should be provided if you are using this method for authentication. When provided, if it does not match for the Online User requested, the whole online_users_get request will fail saying no record found.

Online Users: Get Example

Request URL

https://api.newbook.cloud/rest/online_users_get

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"username": "john@doe.com",
											"password": "somethingsecret"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"id": "4",
												"for": "guests",
												"for_id": "28",
												"username": "john@doe.com",
												"active": "1",
												"account_id": "291"
											},
											"message": ""
										}
									
								
AnchorOnline Users: Create

Create a Newbook Online User.

Request Notes:

username is required and must be an email address. If the provided username already exists, this request will return an error.

password is required. Newbook implements password complexity requirements: at least 8 characters, at least one upper case letter, at least one lower case letter, and at least one number.

for and for_id are required. This is the object associated with the Online User Login. Currently only guests, companies_staff, and travel_agents_staff and owners are supported for options.

Online Users: Create Example

Request URL

https://api.newbook.cloud/rest/online_users_create

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"username": "john@doe.com",
											"password": "mypassword",
											"for": "guests",
											"for_id": 28
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"user_id": "4"
											},
											"message": "Successfully created Online User Login"
										}
									
								
AnchorOnline Users: Update

Update a Newbook Online User.

Request Notes:

Either user_id or account_id is required, and can be retrieved using the Online Users: Get request.

If you are updating the password for the Online User, Newbook implements password complexity requirements: at least 8 characters, at least one upper case letter, at least one lower case letter, and at least one number.

username is optional, but if provided must be an email address. If the provided username already exists and isn't specifically for this Online User (identified by user_id or account_id), the whole online_users_update request will fail saying the provided username is already in use.

The Online User for and for_id cannot be updated.

Online Users: Update Example

Request URL

https://api.newbook.cloud/rest/online_users_update

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"user_id": "4",
											"password": "my_updated_password"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"user_id": "4"
											},
											"message": "Successfully updated Online User Login"
										}
									
								
AnchorDietary Requirements: List

List all Dietary Requirements, for use when adding or updating Guests.

Dietary Requirements: List Example

Request URL

https://api.newbook.cloud/rest/dietary_requirements_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"name": "Gluten Free"
											},{
												"id": "2",
												"name": "Vegetarian"
											}],
											"message": ""
										}
									
								
AnchorUsers: List

Pull a list of active Users.

Request Notes:

Send account_breakdown as true to see the balance of each associated Sub Client Account (gl_category). Not available for Corporate API requests.

Send show_inactive as true to include deactivated Users in the response

Users: List Example

Request URL

https://api.newbook.cloud/rest/users_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"account_breakdown": true
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"user_id": "1",
									"user_employee_id": "987654321",
									"user_fullname": "John Smith",
									"user_username": "john.smith",
									"user_email": "john.smith@newbook.cloud",
									"user_mobile": "0400000000",
									"user_profile_id": "1",
									"user_profile_name": "Front Office",
									"user_department_id": "1",
									"user_department_name": "Front Office",
									"user_secure_login": null,
									"user_has_mfa_device": false,
									"user_position": "Receptionist",
									"user_period_from": "null",
									"user_period_to": "null",
									"user_image_uri": "https:\/\/driveau.newbook.cloud\/images\/no_image.png",
									"user_active": true,
									"account_breakdown": {
										"1": {
											"name": "Account",
											"gl_category_id": "1",
											"balance": "0.00"
										}
									}
								}								
							],
							"message": ""
						}
					
				
AnchorUsers: Get

Retrieve the details for an existing User.

Request Notes:

user_id is required, an existing User ID.

Send account_breakdown as true to see the balance of each associated Sub Client Account (gl_category). Not available for Corporate API requests.

Users: Get Example

Request URL

https://api.newbook.cloud/rest/users_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"user_id": "1",
							"account_breakdown": true
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"user_id": "1",
								"user_employee_id": "987654321",
								"user_fullname": "John Smith",
								"user_username": "john.smith",
								"user_email": "john.smith@newbook.cloud",
								"user_mobile": "0400000000",
								"user_profile_id": "1",
								"user_profile_name": "Front Office",
								"user_department_id": "1",
								"user_department_name": "Front Office",
								"user_secure_login": null,
								"user_has_mfa_device": false,
								"user_position": "Receptionist",
								"user_period_from": "null",
								"user_period_to": "null",
								"user_image_uri": "https:\/\/driveau.newbook.cloud\/images\/no_image.png",
								"user_active": true,
								"account_breakdown": {
									"1": {
										"name": "Account",
										"gl_category_id": "1",
										"balance": "0.00"
									}
								}
							},
							"message": ""
						}
					
				
AnchorUsers: Create

Creates a User. The User will be required to change their password after first login.

Request Notes:

  • username is required
  • password is required, and will be forced to change on first login. This will need to have at least 8 characters, at least one upper case letter, at least one lower case letter, and at least one number
  • firstname is required
  • date_of_birth must be a valid date if provided, formatted as YYYY-MM-DD
  • email must be a valid email address if provided
  • profile_id must match an existing User Profile ID
  • department_id must match an existing User Department ID
  • period_from must be a valid date time if provided
  • period_to must be a valid date time if provided
  • active defaults to true if not provided

Users: Create Example

Request URL

https://api.newbook.cloud/rest/users_create

Request JSON
				
					{
						"region": "your_region_here",
						"api_key": "your_api_key_here",
						"username": "john.smith",
						"employee_id": "987654321",
						"firstname": "John",
						"lastname": "Smith",
						"password": "SomethingS3cr3t",
						"date_of_birth": "1983-08-21",
						"email": "john@company.com",
						"mobile": "123456789",
						"emergency_contact_name": "Sally Smith",
						"emergency_contact_phone": "123456788",
						"emergency_contact_address": "123 Some St, Somewhereville",
						"emergency_contact_relationship": "Partner",
						"medical_conditions": "none",
						"allergies": "none",
						"position": "Support",
						"profile_id": -1,
						"department_id": 2,
						"active": "true"
					}
				
			
Response JSON
				
					{
						"success": "true",
						"data": {
							"user_id": 3
						},
						"message": ""
					}
				
			
AnchorUsers: Update

Updates an existing User.

Request Notes:

user_id must be provided to update a particular User.

Please see the Users: Create request for the parameter explanations.

Users: Update Example

Request URL

https://api.newbook.cloud/rest/users_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"user_id": 3,
							"firstname": "Johnny"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"user_id": 3
							},
							"message": ""
						}
					
				
AnchorClient Account Profiles: List

List Client Account Profiles.

Request Notes:

  • name (string) optional, filters results by name.

Client Account Profiles: List Example

Request URL

https://api.newbook.cloud/rest/clients_accounts_profiles_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"client_account_profile_id": "1",
									"name": "Normal",
									"type": "batch_debit",
									"default": "1"
								},
								{
									"client_account_profile_id": "2",
									"name": "Rebate",
									"type": "batch_debit",
									"default": "0"
								}
								{
									"client_account_profile_id": "3",
									"name": "Metering",
									"type": "metering",
									"default": "1"
								}
							],
							"message": ""
						}
					
				
AnchorClient Account Profiles: Get

Retrieve a single Client Account Profile.

Request Notes:

  • client_account_profile_id (integer) required, an existing Client Account Profile.

Client Account Profiles: Get Example

Request URL

https://api.newbook.cloud/rest/clients_accounts_profiles_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"client_account_profile_id": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"client_account_profile_id": "1",
								"name": "Normal",
								"type": "batch_debit",
								"default": "1"
							},
							"message": ""
						}
					
				
AnchorClient Account Profiles: Create

Creates a new Client Account Profile.

Request Notes:

  • name (string) required.
  • type (string) required, must be one of the following values:
    • batch_debit
    • metering
  • default (boolean) optional, if a default Client Account Profile for the provided type does not exist, the created Client Account Profile will be set to default.

Client Account Profiles: Create Example

Request URL

https://api.newbook.cloud/rest/clients_accounts_profiles_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "Rebate",
							"type": "batch_debit",
							"defualt": "0"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"client_account_profiles_id": "2"
							},
							"message": ""
						}
					
				
AnchorClient Account Profiles: Update

Updates an existing Client Account Profile.

Request Notes:

  • client_account_profile_id (integer) required, the Client Account Profile ID to update.
  • name (string) optional.
  • type (string) optional, if the Client Account Profile being updated is currently set as default, type cannot be changed. Must be one of the following values:
    • batch_debit
    • metering
  • default (boolean) optional, if the Client Account Profile being updated is currently set as default, default cannot be set as false. Set another Client Account Profile as default instead. If a default Client Account Profile for the provided type does not exist, the updated Client Account Profile will be set to default.

Client Account Profiles: Update Example

Request URL

https://api.newbook.cloud/rest/clients_accounts_profiles_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"client_account_profiles_id": "3",
							"name": "Metering",
							"type": "metering",
							"defualt": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"client_account_profiles_id": "3"
							},
							"message": ""
						}
					
				
AnchorMetering Tariffs: List

List Metering Tariffs.

Request Notes:

  • name (string) optional, filters results by name.

Metering Tariffs: List Example

Request URL

https://api.newbook.cloud/rest/metering_tariffs_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"metering_tariff_id": "1",
									"name": "Electricity",
									"profile_id": "3",
									"meter_type_id": "1",
									"reading_inventory_item_id": "5",
									"reading_description": "Electricity",
									"reading_gl_account_id": "4",
									"reading_gl_category_id": "2",
									"reading_tax_free": "0",
									"service_item_id": "6",
									"rebate_item_id": null,
									"levels": [
										{
											"level_id": "1",
											"amount": "0.220000",
											"minimum": "0.000000"
										},
										{
											"level_id": "2",
											"amount": "0.190000",
											"minimum": "500.000000"
										}
									]
								},
								{
									"metering_tariff_id": "2",
									"name": "Rebate",
									"profile_id": "2",
									"meter_type_id": "1",
									"reading_inventory_item_id": "5",
									"reading_description": "Electricity",
									"reading_gl_account_id": "5",
									"reading_gl_category_id": "2",
									"reading_tax_free": "0",
									"service_item_id": "6",
									"rebate_item_id": "7",
									"levels": [
										{
											"level_id": "3",
											"amount": "0.220000",
											"minimum": "0.000000"
										},
										{
											"level_id": "4",
											"amount": "0.190000",
											"minimum": "500.000000"
										}
									]
								},
							],
							"message": ""
						}
					
				
AnchorMetering Tariffs: Get

Retrieve a single Metering Tariff.

Request Notes:

  • metering_tariff_id (integer) required, an existing Metering Tariff.

Metering Tariffs: Get Example

Request URL

https://api.newbook.cloud/rest/metering_tariffs_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"metering_tariff_id": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"metering_tariff_id": "1",
								"name": "Electricity",
								"profile_id": "3",
								"meter_type_id": "1",
								"reading_inventory_item_id": "5",
								"reading_description": "Electricity",
								"reading_gl_account_id": "4",
								"reading_gl_category_id": "2",
								"reading_tax_free": "0",
								"service_item_id": "6",
								"rebate_item_id": null,
								"levels": [
									{
										"level_id": "1",
										"amount": "0.220000",
										"minimum": "0.000000"
									},
									{
										"level_id": "2",
										"amount": "0.190000",
										"minimum": "500.000000"
									}
								]
							},
							"message": ""
						}
					
				
AnchorMetering Tariffs: Create

Creates a new Metering Tariff.

Request Notes:

  • name (string) required.
  • reading_description (string) required.
  • profile_id (integer) required, an existing Client Account Profile ID.
  • meter_type_id (integer) required, an existing Metering Type ID.
  • reading_gl_account_id (integer) required, an existing GL Account ID.
  • reading_gl_category_id (integer) required, an existing GL Category ID.
  • reading_tax_free (boolean) required.
  • service_item_id (integer) optional, an existing Inventory Item ID.
  • rebate_item_id (integer) optional, an existing Inventory Item ID.
  • reading_inventory_item_id (integer) optional, an existing Inventory Item ID.
  • levels (array) optional, an array of Metering Levels and Prices with the following format:
    • amount (float) required, the Price Per Unit, must be greater than or equal to 0.00.
    • minimum (float) required, the Minimum Meter Reading Value, each Metering Tariff must have a Metering Tariff Level with a minimum set to 0.00.
    If no levels are provided, a default Metering Tariff Level with an amount and minimum of 0.00 will be created.

Metering Tariffs: Create Example

Request URL

https://api.newbook.cloud/rest/metering_tariffs_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"name": "Rebate",
							"reading_description": "Rebate",
							"profile_id": 1,
							"meter_type_id": 1,
							"reading_gl_account_id": 1,
							"reading_gl_category_id": 2,
							"reading_tax_free": 0,
							"service_item_id": 3,
							"rebate_item_id": 4,
							"reading_inventory_item_id": 6,
							"levels": [
								{
									"amount": 0.220000,
									"minimum": 0.000000
								},
								{
									"amount": 0.190000,
									"minimum": 500.000000
								}
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"metering_tariff_id": "3"
							},
							"message": ""
						}
					
				
AnchorMetering Tariffs: Update

Updates an existing Metering Tariff.

Request Notes:

  • metering_tariff_id (integer) required, the Metering Tariff ID to update.
  • name (string) optional.
  • reading_description (string) optional.
  • profile_id (integer) optional, an existing Client Account Profile ID.
  • meter_type_id (integer) optional, an existing Metering Type ID.
  • reading_gl_account_id (integer) optional, an existing GL Account ID.
  • reading_gl_category_id (integer) optional, an existing GL Category ID.
  • reading_tax_free (boolean) optional.
  • service_item_id (integer) optional, an existing Inventory Item ID.
  • rebate_item_id (integer) optional, an existing Inventory Item ID.
  • reading_inventory_item_id (integer) optional, an existing Inventory Item ID.
  • levels (array) optional, an array of Metering Levels and Prices with the following format:
    • level_id (integer) optional, an existing Metering Level ID to update. If omitted, a new Metering Level will be created.
    • remove (boolean) optional, deactivates the existing Metering Level when set to true.
    • amount (float) optional, the Price Per Unit, must be greater than or equal to 0.00.
    • minimum (float) optional, the Minimum Meter Reading Value, each Metering Tariff must have a Metering Level with a minimum set to 0.00

Metering Tariffs: Update Example

Request URL

https://api.newbook.cloud/rest/metering_tariffs_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"metering_tariff_id": 1,
							"name": "Electricity",
							"reading_description": "Electricity",
							"profile_id": 1,
							"meter_type_id": 1,
							"reading_gl_account_id": 2,
							"reading_gl_category_id": 2,
							"reading_tax_free": 0,
							"service_item_id": 3,
							"rebate_item_id": 5,
							"reading_inventory_item_id": 11,
							"levels": [
								{
									"level_id": 1,
									"amount": 0.200000
								},
								{
									"level_id": 2,
									"remove": 1
								},
								{
									"amount": 0.230000,
									"minimum": 250.000000
								}
							]
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"metering_tariffs_id": "1"
							},
							"message": ""
						}
					
				
AnchorMetering Types: List

List Metering Types.

Request Notes:

  • name (string) optional, filters results by name.

Metering Types: List Example

Request URL

https://api.newbook.cloud/rest/metering_types_list

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": [
								{
									"metering_type_id": "1",
									"gl_category_id": "1",
									"name": "Electricity",
									"unit": "Kwh",
									"rollover": "99999.000000",
									"max_reading_units": "0.000000",
									"negative": "0"
								},
								{
									"metering_type_id": "2",
									"gl_category_id": "1",
									"name": "Water",
									"unit": "L",
									"rollover": "1000.000000",
									"max_reading_units": "0.000000",
									"negative": "0"
								},
							],
							"message": ""
						}
					
				
AnchorMetering Types: Get

Retrieve a single Metering Type.

Request Notes:

Metering Types: Get Example

Request URL

https://api.newbook.cloud/rest/metering_types_get

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"metering_type_id": "1"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"metering_type_id": "1",
								"gl_category_id": "1",
								"name": "Electricity",
								"unit": "Kwh",
								"rollover": "99999.000000",
								"max_reading_units": "0.000000",
								"negative": "0"
							},
							"message": ""
						}
					
				
AnchorMetering Types: Create

Creates a new Metering Type.

Request Notes:

  • gl_category_id (integer) required, an existing Sub Client Account ID as per Sub Client Accounts: List.
  • name (string) required.
  • unit (string) optional, the unit label.
  • rollover (float) optional, rollover at this unit amount, set as 0.00 to disable.
  • max_reading_units (float) optional, the maximum units allowed per reading.
  • negative (boolean) optional, whether to allow negative readings.

Metering Types: Create Example

Request URL

https://api.newbook.cloud/rest/metering_types_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"gl_category_id": "1",
							"name": "Gas",
							"unit": "m3/h",
							"rollover": "99999.000000",
							"max_reading_units": "0.000000",
							"negative": "0"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"metering_type_id": "3"
							},
							"message": ""
						}
					
				
AnchorMetering Types: Update

Updates an existing Metering Type.

Request Notes:

  • metering_type_id (integer) required, an existing Metering Type ID as per Metering Types: List.
  • gl_category_id (integer) optional, an existing GL Category ID as per Sub Client Accounts: List.
  • name (string) optional.
  • unit (string) optional, the unit label.
  • rollover (float) optional, rollover at this unit amount, set as 0.00 to disable.
  • max_reading_units (float) optional, the maximum units allowed per reading.
  • negative (boolean) optional, whether to allow negative readings.

Metering Types: Update Example

Request URL

https://api.newbook.cloud/rest/metering_types_update

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"metering_type_id": "3",
							"gl_category_id": "2",
							"name": "Gas",
							"unit": "m3/h",
							"rollover": "99999.000000",
							"max_reading_units": "0.000000",
							"negative": "0"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"metering_type_id": "3"
							},
							"message": ""
						}
					
				
AnchorIncidents: List

Pull a list of incidents.

Request Notes:

id is optional and when provided the REST API will only retrieve an Incident with the matching ID.

search is optional and when provided it will restrict the results to the matching Incidents. It will search the following fields (inclusively) for a match:

  • Incident Location
  • Incident Description
  • User First Name or Last Name
  • Guest First Name or Last Name

period_from and period_to will restrict the results from later or earlier than the specified times respectively. Both can be provided to find results from a specific period.

location_name is returned as null when location_type and location_id are provided.

Incidents: List Example

Request URL

https://api.newbook.cloud/rest/incident_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"search": "Eden"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"type_involved": "guests",
												"description": "A guest slipped over in the shower.",
												"occurred_when": "2019-07-09 18:48:00",
												"location_type": "accommodation_sites",
												"location_id": "1",
												"location_name": null,
												"lodged_when": "2019-07-09 10:50:00",
												"lodged_by": "-2",
												"lodged_by_name": "Mark Williams",
												"users": [
													{
														"id": "1",
														"firstname": "Mark",
														"lastname": "Williams"
													}
												],
												"guests": [
													{
														"id": "1",
														"firstname": "John",
														"lastname": "Wheeler"
													},
													{
														"id": "2",
														"firstname": "Eden",
														"lastname": "Kingston"
													}
												]
											}],
											"message": ""
										}
									
								
AnchorStates List

Returns the list of States which Instances can use in their address information, per the set up in Instance Manager.

Request Notes:

You can provide a country_id to limit the results to the States of that Country.

States List Example

Request URL

https://api.newbook.cloud/rest/states_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"country_id": "13"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data":[{
												"1": "Australian Capital Territory (ACT)",
												"2": "New South Wales (NSW)",
												"3": "Northern Territory (NT)",
												"4": "Queensland (QLD)",
												"5": "South Australia (SA)",
												"6": "Tasmania (TAS)",
												"7": "Victoria (VIC)",
												"8": "Western Australia (WA)"
											}],
											"message": ""
										}
									
								
AnchorCountries List

Returns the list of Countries which Instances can use in their address information, per the set up in Instance Manager.

Countries List Example

Request URL

https://api.newbook.cloud/rest/countries_list

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data":[{
												"1": "Afghanistan",
												"639": "Åland Islands",
												"7": "Albania",
												"2": "Algeria",
												"3": "American Samoa",
												"4": "Andorra",
												"5": "Angola",
												"640": "Anguilla",
												etc.
											}],
											"message": ""
										}
									
								
AnchorBulk Upload

For each create/update request documented on this page, you can construct a file containing multiple JSON request bodies.
This allows you to perform multiple operations without the overhead of performing multiple HTTP requests.

Request Notes:

bulk_upload_file_path

Construct your file per these instructions, host the file where we will be able to access it, and send its URL as the parameter bulk_upload_file_path.
The file should be formatted as a JSON request body with one request per line. Each line will be individually processed on Newbook servers.
The format of each line should match the Newbook REST API documentation, e.g. when using this method for Guests: Create, each line should be the request documented for Guests: Create.
You can optionally include an external_reference in each line which will be returned in the processed response. The intended use case for this is for mapping between Newbook and your system.
Example file contents for the guests_create request:

								
									{"firstname":"John","lastname":"Doe","street":"Level 2, 9 Ouyan Street","city":"Surfers Paradise","state_name":"QLD","postcode":"4217","country_name":"Australia","contact_phone":"0756554600","contact_email":"john.doe@test.com","notes":"Some notes","membership_type":"2","membership_number":"1234567","membership_expiry":"2025-01-19","date_of_birth":"1980-03-25","equipment":[{"equipment_name":"My Honda","equipment_make":"Honda","equipment_model":"Accord","equipment_type":"1","equipment_length":"5","equipment_width":"2","equipment_height":"2","equipment_registration":"222ABC","equipment_registration_expiry":"2024-04-20"},{"equipment_name":"My Toyota","equipment_make":"Toyota","equipment_model":"Camry","equipment_type":"1","equipment_length":"4","equipment_width":"2","equipment_height":"1"}],"external_reference":"f5a9f8b5-7b91-4c76-aab9-97a55271226e"}
									{"firstname":"Jane","lastname":"Doe","street":"Level 2, 9 Ouyan Street","city":"Surfers Paradise","state_name":"QLD","postcode":"4217","country_name":"Australia","contact_phone":"0756554600","contact_email":"jane.doe@test.com","notes":"Some notes","membership_type":"2","membership_number":"1234567","membership_expiry":"2025-01-19","date_of_birth":"1980-03-25","equipment":[{"equipment_name":"My Honda","equipment_make":"Honda","equipment_model":"Accord","equipment_type":"1","equipment_length":"5","equipment_width":"2","equipment_height":"2","equipment_registration":"222ABC","equipment_registration_expiry":"2024-04-20"},{"equipment_name":"My Toyota","equipment_make":"Toyota","equipment_model":"Camry","equipment_type":"1","equipment_length":"4","equipment_width":"2","equipment_height":"1"}],"external_reference":"60cdcd56-41b9-47a4-b982-c85f3ebc6af4"}
									{"firstname":"Bob","lastname":"Smith","street":"Level 2, 9 Ouyan Street","city":"Surfers Paradise","state_name":"QLD","postcode":"4217","country_name":"Australia","contact_phone":"0756554600","contact_email":"bob.smith@test.com","notes":"Some notes","membership_type":"2","membership_number":"1234567","membership_expiry":"2025-01-19","date_of_birth":"1980-03-25","equipment":[{"equipment_name":"My Honda","equipment_make":"Honda","equipment_model":"Accord","equipment_type":"1","equipment_length":"5","equipment_width":"2","equipment_height":"2","equipment_registration":"222ABC","equipment_registration_expiry":"2024-04-20"},{"equipment_name":"My Toyota","equipment_make":"Toyota","equipment_model":"Camry","equipment_type":"1","equipment_length":"4","equipment_width":"2","equipment_height":"1"}],"external_reference":"946aebee-2490-454b-9f58-e8257f93551c"}								
							

request_identifier

Newbook will include this value in the eventual POST request sent to the response_endpoint once all the processing has finished (see below for more details).
The intended use case of this is to can help identify which Bulk Upload request has completed, if you were to call the Bulk Upload request multiple times in succession.

response_headers

A JSON string of key-value pairs that will be included in the header of the returned POST request.

response_endpoint

A URL for Newbook to send a POST request once the file from bulk_upload_file_path completes processing.
Newbook will send a POST request with this contents (note the matching request_identifier):

								
									{
										"success": "true",
										"data":{
											"request_identifier": "e03b50a6-9e6f-42de-ab8c-2b4106bbbb71",
											"processed_response_file_path": "https://example.com/path_to_file_containing_processed_responses.json"
										},
										"message": ""
									}
								
							

We don't expect a response to the above - any response will be discarded.
As the file in processed_response_file_path will only be available for 30 minutes, it will need to be retrieved by your system as soon as possible.
The format of this file will have a response for each line provided in the original bulk_upload_file_path.
The file will show a single JSON response per line, the format of which will match the Newbook REST API documentation, e.g. when using this method for Guests: Create, each line will be the response documented for Guests: Create.
On top of this, each line will have a line_number parameter to reflect the line number processed from the bulk_upload_file_path file, as well as an external_reference matching the value from the request data (conditionally - if this was provided).
This is useful if you have unique identifiers in your system and want to keep a reference to their Newbook ID.
Example file contents:

								
									{"success":"true","data":{"id":"1","account_id":"10","line_number":1, "external_reference":"f5a9f8b5-7b91-4c76-aab9-97a55271226e"},"message":"Successfully created Guest"}
									{"success":"true","data":{"id":"2","account_id":"11","line_number":2, "external_reference":"60cdcd56-41b9-47a4-b982-c85f3ebc6af4"},"message":"Successfully created Guest"}
									{"success":"true","data":{"id":"3","account_id":"12","line_number":3, "external_reference":"946aebee-2490-454b-9f58-e8257f93551c"},"message":"Successfully created Guest"}
								
							

Bulk Upload Example

Request URL

Any of the existing Create / Update requests. E.g. https://api.newbook.cloud/rest/guests_create

Request JSON
									
										{
											"region": "your_region_here",
											"api_key": "your_api_key_here",
											"bulk_upload_file_path": "https://example.com/path_to_file.json",
											"request_identifier": "e03b50a6-9e6f-42de-ab8c-2b4106bbbb71",
											"response_endpoint": "https://example.com/endpoint_to_send_processed_response",
											"response_headers": "{\"header-key-1\":\"Header value 1\",\"header-key-2\":\"Header value 2\"}"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [],
											"message": "Pending Processing"
										}
									
								
AnchorCreate Audit Trail (Coming Soon)

Create an Audit Trail Entry (aka change event) for a Newbook table.

Request Notes:

All fields are required and documented below:

  • table the name of the Newbook table that was changed e.g. guests, bookings.
  • row the ID of the Booking/Guest/etc you're recording the change event for.
  • field the name of the Newbook Field that has been changed.
  • old_value the previous value of the field that was changed.
  • user_id the User who modified the record, and should be a valid User ID as per the Users: List
  • modified_when the timestamp the field was changed

Create Audit Trail: Example

Request URL

https://api.newbook.cloud/rest/audit_trail_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"table": "guests",
							"row": 1,
							"field": "street",
							"old_value": "9 Ouyan St",
							"user_id": "1",
							"modified_when": "2022-11-01 23:30:00"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"id": 3
							},
							"message": ""
						}
					
				
AnchorMeter Readings: Create

Create a new Meter Reading.

Request Notes:

The following parameters are accepted:

  • site_id: (int) required, must be a valid Site ID.
  • type_id: (int) required, must be a valid Metering Type ID.
  • value: (float) required, the meter reading value as a number.
  • added_by: (int) optional, must be a valid User ID as per the Users: List.
  • added_when: (string) optional, the datetime to record for the reading. Defaults to the current timestamp.

Meter Readings: Create Example

Request URL

https://api.newbook.cloud/rest/meter_readings_create

Request JSON
					
						{
							"region": "your_region_here",
							"api_key": "your_api_key_here",
							"site_id": 1,
							"type_id": 1,
							"value": 99.000000,
							"added_by": 1,
							"added_when": "2024-04-19 11:30:00"
						}
					
				
Response JSON
					
						{
							"success": "true",
							"data": {
								"meter_reading_id": "10"
							},
							"message": ""
						}