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 provided should not be used on your development servers. These are only examples and do not work.

AnchorRelease Notes

2018.11 (Next Release)

  • Booking Sources: List - show_inactive added as optional request parameter; parent_id, domain_referer and active added to each object in the response
  • Booking Sources: Create - you can now create parent Booking Sources by setting the new is_parent request parameter to true
  • Companies List: - type_id added to each object in the response
  • System Templates: List, Create, Get, Update - requests added
  • Bookings Create: - qty added to the list of potential inventory_item parameters
  • Leads: Create - duplicate Lead IDs now returned when the leads_create request encounters such
  • Guests: Create - duplicate Guest IDs now returned when the guests_create request encounters such

2018.8 (Current Release)

  • 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 Details - will return success:false in the response when the requested Booking does not exist
  • Bookings: List / Get Details - 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.5

2018.2

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 along with this document.

You must also supply an API Key with each JSON request to specify which NewBook Instance you are querying.

You must use HTTPS to communicate with the NewBook REST API, for both testing and real live use.

Your JSON request must be sent via POST. Please contact us if you are unsure about which Endpoint to use.

Live Endpoints:

Australia: https://syncau.newbook.cloud/rest

Asia Pacific: https://syncap.newbook.cloud/rest

Europe: https://synceu.newbook.cloud/rest

United States: https://syncus.newbook.cloud/rest

Test Endpoint:

Development: https://testapi.newbook.cloud/rest

Authentication Examples

Request JSON
									
										{
											"request_action": "api_keys"
										}
									
								
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/Dev Endpoint.

In your POST data/Request JSON you must supply a request_action as this tells the REST API which request to execute. For this example we will use auth_test.

HTTP Method: POST

HTTP Basic Auth Username: [as provided]

HTTP Basic Auth Password: [as provided]

URL: https://syncdev.newbook.cloud/rest/ [see Endpoints in the above section for alternates]

POST data: [see right hand side Request JSON]

Building an example Request JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "auth_test"
										}
									
								
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 JSON

Request JSON (with no pagination parameters / default behaviour)
									
										{
											"api_key": "your_api_key_here",
											"request_action": "companies_list"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [
												0-100 results
											],
											"data_offset": 0,
											"data_limit": 100,
											"data_count": 100,
											"data_total": 550,
											"message": ""
										}
									
								
Request JSON (with pagination parameters)
									
										{
											"api_key": "your_api_key_here",
											"request_action": "companies_list",
											"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 JSON

Request JSON
									
										{
											"request_action": "api_keys"
										}
									
								
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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "auth_test"
										}
									
								
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 what should have Arrived
arriving2 are expected to Arrive during the specified dates
cancelled3 have been Cancelled during the specified dates
departed1 have Departed during the specified dates
departing4 are expected to Depart during the specified dates
inhouse4 are currently In-House (dates not required)
placed2 were placed during the specified dates
staying2 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
  1. ignores bookings of status Cancelled, No Show, Quote, and Owner Occupied
  2. shows only bookings of status Confirmed and Unconfirmed
  3. shows only bookings of status Cancelled, No Show, Quote, and Owner Occupied
  4. 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


Response Notes:

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

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

The inventory_item field holds all the Inventory Items on the booking. The stay_cost_contribution key on each inventory_item 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).

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: List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "bookings_list",
											"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
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"booking_id": 11033,
												"booking_arrival": "2015-09-13 14:00:00",
												"booking_departure": "2015-09-14 10:00:00",
												"booking_eta": "15:00",
												"booking_length": "1",
												"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": 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_placed": "2015-08-21 16:59:27",
												"booking_booked_by": "NewBook Support",
												"company_id": null,
												"company_name": null,
												"travel_agent_id": 46,
												"travel_agent_name": "Booking.com",
												"travel_agent_commission_total": "8.00",
												"booking_reference_id": "1234567890",
												"tariff_name": "BOOK NOW",
												"tariff_total": "100.00",
												"tariffs_quoted": [{
													"stay_date": "2015-09-13",
													"label": "Standard",
													"tariff_applied_id": 2,
													"original_amount": "110.00",
													"calculated_amount": "100.00"
												}],
												"inventory_items": [{
													"description": "Champagne",
													"stay_date": "2015-09-13",
													"stay_cost_contribution": "Include",
													"amount": "75.00"
												},{
													"description": "Picnic Basket",
													"stay_date": "2015-09-14",
													"stay_cost_contribution": "Increase",
													"amount": "125.00"
												}],
												"discount_id": "1",
												"discount_name": "Member Discount",
												"discount_total": "20.00",
												"discounts": [{
													"discount_id": "1",
													"discount_name": "Member Discount",
													"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": "2017-01-01 10:00:00",
													"modified_when": "2017-11-17 15:48:55",
													"last_note_when": "2017-11-17 15:48:55",
													"blacklisted_when": "2017-11-17 15:46:37",
													"vip_when": null,
													"account_id": "13783",
													"account_balance": "0.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": [{
														"type": "phone",
														"content": "0756554600",
														"notes": "",
														"allow_transactional": "1",
														"allow_marketing": "1"
													},{
														"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",
														"content": "1234567",
														"expiry_date": "2020-10-01"
													}],
													"dietary_requirements": [
														"1",
														"2"
													]
												}],
												"payment_plans": [],
												"bookings_group_id": null,
												"bookings_group_name": null,
												"booking_cancelled": null,
												"booking_cancelled_reason_id": null,
												"booking_cancelled_reason_name": null
											},{
												"booking_id": 11034,
												"booking_arrival": "2018-09-01 14:00:00",
												"booking_departure": "2018-12-30 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": "2018-05-31 16:59:27",
												"booking_booked_by": "NewBook Support",
												"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_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": "2017-01-01 10:00:00",
													"modified_when": "2017-11-17 15:48:55",
													"last_note_when": "2017-11-17 15:48:55",
													"blacklisted_when": "2017-11-17 15:46:37",
													"vip_when": null,
													"account_id": "13783",
													"account_balance": "0.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": [{
														"type": "phone",
														"content": "0756554600",
														"notes": "",
														"allow_transactional": "1",
														"allow_marketing": "1"
													},{
														"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",
														"content": "1234567",
														"expiry_date": "2020-10-01"
													}],
													"dietary_requirements": [
														"1",
														"2"
													]
												}],
												"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": "2018-06-07",
													"status": "uptodate"
												}],
												"bookings_group_id": null,
												"bookings_group_name": null,
												"booking_cancelled": null,
												"booking_cancelled_reason_id": null,
												"booking_cancelled_reason_name": null
											}],
											"message": ""
										}
									
								
AnchorBookings: Get Details

Retrieve the details of a single Booking.


Request Notes:

booking_id must be provided to retrieve the Booking.

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 Details JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "bookings_get",
											"booking_id": 11033
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"booking_id": 11033,
												"booking_arrival": "2015-09-13 14:00:00",
												"booking_departure": "2015-09-14 10:00:00",
												"booking_eta": "15:00",
												"booking_length": "1",
												"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": 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_placed": "2015-08-21 16:59:27",
												"booking_booked_by": "NewBook Support",
												"company_id": null,
												"company_name": null,
												"travel_agent_id": 46,
												"travel_agent_name": "Booking.com",
												"travel_agent_commission_total": "8.00",
												"booking_reference_id": "1234567890",
												"tariff_name": "BOOK NOW",
												"tariff_total": "100.00",
												"tariffs_quoted": [{
													"stay_date": "2015-09-13",
													"label": "Standard",
													"tariff_applied_id": 2,
													"original_amount": "110.00",
													"calculated_amount": "100.00"
												}],
												"inventory_items": [{
													"description": "Champagne",
													"stay_date": "2015-09-13",
													"stay_cost_contribution": "Include",
													"amount": "75.00"
												},{
													"description": "Picnic Basket",
													"stay_date": "2015-09-14",
													"stay_cost_contribution": "Increase",
													"amount": "125.00"
												}],
												"discount_id": "1",
												"discount_name": "Member Discount",
												"discount_total": "20.00",
												"discounts": [{
													"discount_id": "1",
													"discount_name": "Member Discount",
													"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": "2017-01-01 10:00:00",
													"modified_when": "2017-11-17 15:48:55",
													"last_note_when": "2017-11-17 15:48:55",
													"blacklisted_when": "2017-11-17 15:46:37",
													"vip_when": null,
													"account_id": "13783",
													"account_balance": "0.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": [{
														"type": "phone",
														"content": "0756554600",
														"notes": "",
														"allow_transactional": "1",
														"allow_marketing": "1"
													},{
														"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",
														"content": "1234567",
														"expiry_date": "2020-10-01"
													}],
													"dietary_requirements": [
														"1",
														"2"
													]
												}],
												"payment_plans": [],
												"bookings_group_id": null,
												"bookings_group_name": null,
												"booking_cancelled": null,
												"booking_cancelled_reason_id": null,
												"booking_cancelled_reason_name": null
											},
											"message": ""
										}
									
								
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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "site_inhouse_booking",
											"site_name": "101"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"booking_id": 11033,
												"booking_arrival": "2015-09-13 14:00:00",
												"booking_departure": "2015-09-14 10:00:00",
												"booking_eta": "15:00",
												"booking_length": "1",
												"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": 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_placed": "2015-08-21 16:59:27",
												"booking_booked_by": "NewBook Support",
												"company_id": null,
												"company_name": null,
												"travel_agent_id": 46,
												"travel_agent_name": "Booking.com",
												"travel_agent_commission_total": "8.00",
												"booking_reference_id": "1234567890",
												"tariff_name": "BOOK NOW",
												"tariff_total": "100.00",
												"tariffs_quoted": [{
													"stay_date": "2015-09-13",
													"label": "Standard",
													"tariff_applied_id": 2,
													"original_amount": "110.00",
													"calculated_amount": "100.00"
												}],
												"inventory_items": [{
													"description": "Champagne",
													"stay_date": "2015-09-13",
													"stay_cost_contribution": "Include",
													"amount": "75.00"
												},{
													"description": "Picnic Basket",
													"stay_date": "2015-09-14",
													"stay_cost_contribution": "Increase",
													"amount": "125.00"
												}],
												"discount_id": "1",
												"discount_name": "Member Discount",
												"discount_total": "20.00",
												"discounts": [{
													"discount_id": "1",
													"discount_name": "Member Discount",
													"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": "2017-01-01 10:00:00",
													"modified_when": "2017-11-17 15:48:55",
													"last_note_when": "2017-11-17 15:48:55",
													"blacklisted_when": "2017-11-17 15:46:37",
													"vip_when": null,
													"account_id": "13783",
													"account_balance": "0.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": [{
														"type": "phone",
														"content": "0756554600",
														"notes": "",
														"allow_transactional": "1",
														"allow_marketing": "1"
													},{
														"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",
														"content": "1234567",
														"expiry_date": "2020-10-01"
													}],
													"dietary_requirements": [
														"1",
														"2"
													]
												}],
												"payment_plans": [],
												"bookings_group_id": null,
												"bookings_group_name": null,
												"booking_cancelled": null,
												"booking_cancelled_reason_id": null,
												"booking_cancelled_reason_name": null
											},
											"message": ""
										}
									
								
AnchorBookings: Pull Availability & Pricing

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

A URL is returned to see the same results via NewBook Online if required.


Request Notes:

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

You can also provide site_id, category_id and category_type_id parameters. Providing these restricts the results returned.

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

daily_mode defaults as "false", but when provided as "true" each object in the tariffs_available array in the response will gain a new key tariffs_quoted detailing specifics about the price for each day:

								
									"2015-09-15": {
										"label": "Special",
										"type_id": "8",
										"tariff_id": "45",
										"stop_sell": "0",
										"minimum_periods": "7",
										"maximum_periods": "0",
										"base_max_combined": "7",
										"tariffs_period_id": "19",
										"tariff_applied_id": "480",
										"original_amount": "112.85",
										"calculated_amount": "112.85"
									},
									snip: one object is returned for each day requested
								
							

Also when daily_mode is provided as "true", the sites_available key in the response changes from a single number into an object with a key for every day requested, and a value indicating the number of Sites available that day:

								
									"sites_available": {
										"2015-09-15": 1,
										"2015-09-16": 3,
										"2015-09-17": 4,
										"2015-09-18": 2,
										"2015-09-19": 2,
										"2015-09-20": 2,
										"2015-09-21": 1
									}
								
							

which can then be provided to other requests e.g. Create Booking.

When daily_mode is not provided or is provided as "false" you can provide another parameter 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": "2015-09-15 14:00:00",
										"period_to": "2015-09-22 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": "2015-09-15 14:00:00",
										"period_to": "2015-09-22 10:00:00",
										"gl_account_id": "20",
										"gl_category_id": "1",
										"tax_free": "1",
										"vacancy_length": 45
									}],
								
							

Response Notes:

When tariff_success is "false" in the tariffs_available array, tariff_messages should provide you with the reasoning why this tariff is not applicable.

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.

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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "bookings_availability_pricing",
											"period_from": "2015-09-15",
											"period_to": "2015-09-22",
											"adults": 2,
											"daily_mode": "false"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"16": {
													"category_id": 16,
													"category_name": "Single Room",
													"sites_available": 2,
													"online_booking_url": "your_online_booking_url_here?available_from=1442239200&available_to=1442887939&force_category_id=16",
													"tariffs_available": [{
														"tariff_applied_id": "480",
														"tariff_label": "Special",
														"tariff_success": "true",
														"tariff_message": "",
														"tariff_total": "789.95",
														"tariff_inclusions": [{
															"dates": "15 Sep 2015 to 22 Sep 2015",
															"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"
														}],
													},{
														"tariff_applied_id": "480",
														"tariff_label": "Special",
														"tariff_success": "true",
														"tariff_messages": "",
														"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"
														}],
													}],
													"sort": 1
												}
											},
											"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 accept the potential Booking and convert it 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 also 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 guest 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.
  • Finally if you want to create a new Guest, guest_firstname, guest_lastname are 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:

When tariff_success is false in the tariffs_available array, tariff_messages should provide you with the reasoning why this tariff is not applicable.

In comparison to the Bookings: Pull availability & pricing request, this method returns an array of objects by default, not an object of objects in data.

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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "bookings_availability_email",
											"period_from": "2015-09-15",
											"period_to": "2015-09-22",
											"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_applied_id": "480",
													"tariff_label": "Regular",
													"tariff_success": "true",
													"tariff_messages": "",
													"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_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 also provide children, infants and animals as numeric parameters (like the adults parameter).

You can also provide the category_id for this request to automatically allocate an available Site from that Category, or manually supply a specific site_id.

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 guest 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.
  • Finally if you want to create a new Guest, guest_firstname, guest_lastname are 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

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

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

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

If specified, repeat_charges must be a single array and must follow this format:

  • 									[{"interval":amount}]
    								
  • Valid values for interval are day, week, month, or year
  • Valid values for amount are 0 through to 10×1013-1
  • Currently the multiplier is assumed to be 1 e.g. every 1 interval (week) charge amount ($500)

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

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:

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

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. The Booking will then inherit the Bookings Groups Bill To options.

custom_fields can optionally be provided based on the response to Custom Fields:

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

dietary_requirements can optionally be provided based on the response to Dietary Requirements.

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. Defaults to "true".

Response Notes:

account_id in the response can be used to push charges or payments onto the account, as separate REST requests

Bookings: Create JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "bookings_create",
											"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": "2016-10-25",
											"period_to": "2016-10-28",
											"category_id": "4",
											"tariffs_quoted": {
												"2016-10-25": {"tariff_applied_id": 480, "price": 500},
												"2016-10-26": {"tariff_applied_id": 480, "price": 750},
												"2016-10-27": {"tariff_applied_id": 480, "price": 300}
											}
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"booking_id": "12345",
												"account_id": "501",
												"guest_id": "40"
											},
											"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.

Bookings: Update JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "bookings_update",
											"booking_id": "12345",
											"period_from": "2016-10-25",
											"period_to": "2016-10-29",
											"tariffs_quoted": {
												"2016-10-25": {"tariff_applied_id": 480, "price": 500},
												"2016-10-26": {"tariff_applied_id": 480, "price": 750},
												"2016-10-27": {"tariff_applied_id": 480, "price": 300},
												"2016-10-28": {"tariff_applied_id": 480, "price": 300}
											}
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"booking_id": "12345",
												"account_id": "501",
												"guest_id": "40"
											},
											"message": ""
										}
									
								
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 and when provided it will include inactive Booking Sources in the response

Booking Sources: List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "bookings_sources",
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "bookings_sources_create",
											"parent_id": -1,
											"is_parent": "false",
											"name": "test"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"source_id": "3"
											},
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "bookings_methods",
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "bookings_reasons",
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "bookings_demographics",
											"name": "test"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"name": "Singles"
											},{
												"id": "2",
												"name": "Couples"
											}],
											"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 guest 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.
  • Finally if you want to create a new Guest, guest_firstname, guest_lastname are 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

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:

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

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, as separate REST requests

booking_group_id in the response can be used to link Bookings to the Group, as separate REST requests

Bookings Groups: Create JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "bookings_groups_create",
											"name": "NewBook Group",
											"billto": "bookings_groups",
											"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": "2016-10-25",
											"period_to": "2016-10-28"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"booking_group_id": "12345",
												"account_id": "501"
											},
											"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 on of the values from a memberships_list request

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


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

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

Guests List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "guests_list",
											"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": "2017-01-01 10:00:00",
												"modified_when": "2017-11-17 15:48:55",
												"last_note_when": "2017-11-17 15:48:55",
												"blacklisted_when": "2017-11-17 15:46:37",
												"vip_when": null,
												"account_id": "13783",
												"account_balance": "0.00",
												"auto_billing_limit": null,
												"street": "Level 2, 9 Ouyan Street",
												"city": "Surfers Paradise",
												"state": "Queensland (QLD)",
												"postcode": "4217",
												"country": "Australia",
												"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": "0"
												}],
												"custom_fields": [{
													"id": 1,
													"type": "text",
													"label": "My Test Field",
													"value": "Something"
												}],
												"membership_details": [{
													"type": "Testing Service",
													"type_id": "2",
													"content": "1234567",
													"expiry_date": "2020-10-01"
												}],
												"dietary_requirements": [
													"1",
													"2"
												]
											}],
											"message": ""
										}
									
								
AnchorGuests: Create

Create a Guest to use for placing Bookings.


Request Notes:

firstname and lastname are required, the rest is optional but recommended

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, and if your connection with NewBook has the privilege for guests_list, this request will return the existing_guest_ids which were found to be duplicated by the data provided:

									
										{
											"success": "false",
											"data": {
												"existing_guest_ids": [
													"6",
													"5"
												]
											},
											"message": "2 duplicate Guests found with matching Name"
										}
									
								

custom_fields can optionally be provided based on the response to Custom Fields:

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

dietary_requirements can optionally be provided based on the response to Dietary Requirements.

Guests: Create JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "guests_create",
											"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"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"id": "1"
											},
											"message": "Successfully created Guest"
										}
									
								
AnchorGuests: Get Details

Retrieve an existing Guest record.

Request Notes:

guest_id or account_id must be provided to retrieve a particular Guest's details.

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 Details JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "guests_get",
											"guest_id": "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": "2017-01-01 10:00:00",
												"modified_when": "2017-11-17 15:48:55",
												"last_note_when": "2017-11-17 15:48:55",
												"blacklisted_when": "2017-11-17 15:46:37",
												"vip_when": null,
												"account_id": "13783",
												"account_balance": "0.00",
												"auto_billing_limit": null,
												"street": "Level 2, 9 Ouyan Street",
												"city": "Surfers Paradise",
												"state": "Queensland (QLD)",
												"postcode": "4217",
												"country": "Australia",
												"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": "0"
												}],
												"custom_fields": [{
													"id": 1,
													"type": "text",
													"label": "My Test Field",
													"value": "Something"
												}],
												"membership_details": [{
													"type": "Testing Service",
													"type_id": "2",
													"content": "1234567",
													"expiry_date": "2020-10-01"
												}],
												"dietary_requirements": [
													"1",
													"2"
												]
											},
											"message": ""
										}
									
								
AnchorGuests: Update

Update an existing Guest Record.


Request Notes:

guest_id or account_id must be provided to update a particular Guest's details.

contact_email, contact_phone, and 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

Guests: Update JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "guests_update",
											"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",
											"notes": "Some notes"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"guest_id": "1"
											},
											"message": "Successfully Updated Guest"
										}
									
								
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

Accommodation Categories List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "accommodation_category_list"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"category_id": "56",
												"category_name": "Luxury Holiday Rental",
												"category_description": "A stylish holiday apartment ideally situated within the boardwalk entertainment precinct of the Mandurah Marina. Private balcony with amazing views. A walk or bike ride into Mandurah 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 Mandurah.",
												"category_type_id": "7",
												"category_type_name": "Apartment",
												"category_max_adults": "5",
												"category_max_children": null,
												"category_max_infants": "0",
												"category_max_animals": "0",
												"category_max_combined": "5",
												"sites": [{
													"site_id": "81",
													"site_name": "Luxury Holiday Rental",
													"site_description": "A stylish holiday apartment ideally situated within the boardwalk entertainment precinct of the Mandurah Marina. Private balcony with amazing views. A walk or bike ride into Mandurah 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 Mandurah.",
													"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": "153.4177429",
													"site_long": "-28.0031270",
													"custom_fields": []
												}],
												"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": "Street view",
													"image_url": "https:\/\/driveau.newbook.cloud\/instances_72e94fdf6f7d4845ea420c144753efa9_579b0a3ae6e62.png"
												},{
													"image_type_id": "23",
													"image_type_name": "Street view",
													"image_url": "https:\/\/driveau.newbook.cloud\/instances_72e94fdf6f7d4845ea420c144753efa9_579b0a3b0c199.png"
												}]
											}],
											"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 de-activated Sites

Accommodation Sites List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "sites_list"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"site_id": "3",
												"site_name": "001",
												"site_status": null,
												"category_id": "1",
												"category_name": "Powered Site",
												"level_id": null,
												"level_name": null,
												"site_size": {
													"id": "1",
													"name": "10x10",
													"length": "10.00",
													"width": "10.00",
													"height": "0.00",
													"unit": "m"
												},
												"custom_fields": [{
													"id": 1,
													"type": "text",
													"label": "Custom Text",
													"value": "Custom Value"
												}]
											},{
												"site_id": "1",
												"site_name": "101",
												"site_status": "Clean",
												"category_id": "2",
												"category_name": "Single Room",
												"level_id": "1",
												"level_name": "Level 1",
												"site_size": null,
												"custom_fields": []
											},{
												"site_id": "2",
												"site_name": "201",
												"site_status": "Dirty",
												"category_id": "3",
												"category_name": "Double Room",
												"level_id": "2",
												"level_name": "Level 2",
												"site_size": null,
												"custom_fields": []
											}],
											"message": ""
										}
									
								
AnchorAccommodation Features List

Retrieve the list of possible Accommodation Features in NewBook.

Accommodation Features List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "accommodation_features_list"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"name": "Bedroom"
											},{
												"id": "2",
												"name": "Air Conditioning"
											}],
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "sites_status",
											"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.

Site Maps JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "sites_maps"
										}
									
								
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 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

Sites Update JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "sites_update",
											"site_id": "1",
											"name": "New Site Name",
											"notes": [
												"Adding a new note"
											]
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"site_id": "1"
											},
											"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 supplied, restricts the returned Companies to only those which were created on the date given

Companies List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "companies_list",
											"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",
												"auto_billing_limit": null,
												"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",
												"auto_billing_limit": null,
												"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": ""
										}
									
								
AnchorCompanies: Type List

Retrieve the list of Company Types for limiting the Company List.

Companies: Type List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "companies_types_list"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": 1,
												"name": "Supplier"
											}],
											"message": ""
										}
									
								
AnchorCompanies: Update

Update a particular Company


Request Notes:

company_id is required

contact_email, contact_phone, and 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

Companies: Update JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "companies_update",
											"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 supplied, restricts the returned Staff to only those which were created on the date given

Companies Staff: List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "companies_staff_list",
											"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 a particular Staff's details.

contact_email, contact_phone, and 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

Companies Staff: Update JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "companies_staff_update",
											"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 supplied, restricts the returned Travel Agents to only those which were created on the date given

Travel Agents List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "travel_agent_list",
											"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": ""
										}
									
								
AnchorLeads List

Retrieve/search the Leads database.


Request Notes:

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 supplied, restricts the returned Leads to only those which were created on the date given


Response Notes:

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

Leads List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "leads_list",
											"search": "tourist",
											"created_when": "2016-02-01"
										}
									
								
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",
												"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"
												}]
											}],
											"message": ""
										}
									
								
AnchorLeads: Create

Create a Lead within NewBook.


Request Notes:

name and/or firstname + lastname must be provided

status_id is required. You must provide a valid option from the Lead Statuses List.

source_id is optional. You must provide a valid option from the Lead Sources List.

lead_type_id can optionally be provided as an array. All options must be valid options from the Lead Types List.

lead_categories_id can optionally be provided as an array. All options must be valid options from the Lead Categories List.

lead_interest_id can optionally be provided as an array. All options must be valid options from the Lead Interests List.

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, and if your connection with NewBook has the privilege for leads_list, this request will return the existing_lead_ids which were found to be duplicated by the data provided:

									
										{
											"success": "false",
											"data": {
												"existing_lead_ids": [
													"7356"
												]
											},
											"message": "1 duplicate Leads found with matching Name and Email"
										}
									
								

custom_fields can optionally be provided based on the response to Custom Fields:

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

Leads: Create JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "leads_create",
											"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": ""
										}
									
								
AnchorLeads: Update

Update an existing Lead within NewBook.


Request Notes:

lead_id is required

contact_email, contact_phone, and notes will add new details to the Lead (not replace the existing information) and will check & not double up if the new inforamation already exists on the Lead

Leads: Update JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "leads_update",
											"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": ""
										}
									
								
AnchorLead Categories List

Retrieves the list of available Lead Categories.

Lead Categories List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "leads_categories"
										}
									
								
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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "leads_interests"
										}
									
								
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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "leads_sources"
										}
									
								
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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "leads_sources_create",
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "leads_statuses"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"-3": "Lost",
												"-2": "Won",
												"-1": "Potential"
											},
											"message": ""
										}
									
								
AnchorLead Types List

Retrieves the list of available Lead Types.

Lead Types List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "leads_types"
										}
									
								
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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "security_gate_list"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"security_gate_id": "1",
												"security_gate_name": "South Entry"
											},{
												"security_gate_id": "2",
												"security_gate_name": "South Exit"
											}],
											"message": ""
										}
									
								
AnchorSecurity Area List

Retrieve the list of Security Areas configured within NewBook.

Security Area List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "security_area_list"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"security_area_id": "1",
												"security_area_name": "All Access"
											}],
											"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 supplied, restricts the returned Access Codes to only those which were created on the date given


Response Notes:

The booking data fields are returned if the access_code given is related to a Booking

Access Codes List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "access_codes_list",
											"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"
											},{
												"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
											}],
											"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. Having the word "Success" in the description will tell NewBook that the request was successful/access was granted
  • timestamp is optional. If not provided it will default to the current timestamp

Access Codes: Push History JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "access_codes_history",
											"access_history": [{
												"access_code_id": "442724",
												"booking_id": "345",
												"security_gate_id": "1",
												"description": "Failure",
												"timestamp": "2016-02-05 10:52:00"
											},{
												"access_code_id": "442724",
												"booking_id": "345",
												"security_gate_id": "1",
												"description": "Success",
												"timestamp": "2016-02-05 10:55:00"
											},{
												"access_code_id": "450987",
												"booking_id": null,
												"security_gate_id": "2",
												"description": "Success",
												"timestamp": "2016-02-05 11:30:00"
											}]
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [],
											"message": "Created 3 Access History Records"
										}
									
								
AnchorGL Accounts List

Pull the list of GL Accounts from within NewBook.


Request Notes:

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)


Response Notes:

If refundable is set to 1 (true) it means any charges raised in this GL Account is 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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "gl_account_list"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"gl_account_id": "1",
												"gl_account_code": "ACC",
												"gl_account_name": "Accommodation",
												"refundable": "0",
												"gl_group_id": null,
												"gl_group_name": null
											},{
												"gl_account_id": "2",
												"gl_account_code": "POS",
												"gl_account_name": "POS Charges",
												"refundable": "0",
												"gl_group_id": "1",
												"gl_group_name": "Extras"
											},{
												"gl_account_id": "3",
												"gl_account_code": "BOND",
												"gl_account_name": "Bonds",
												"refundable": "1",
												"gl_group_id": "1",
												"gl_group_name": "Extras"
											}],
											"message": ""
										}
									
								
AnchorSub Client Accounts List

Pull the list of Sub Client Accounts (aka GL Categories) from within NewBook.

Sub Client Accounts List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "gl_category_list"
										}
									
								
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): The type of Client Account to return

Clients Accounts: List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "clients_accounts_list",
											"for": [
												"companies"
											]
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "10",
												"for": "companies",
												"for_id": "20",
												"for_name": "Acme Pty Ltd",
												"balance": "12.00",
												"active": "1"
											}],
											"message": ""
										}
									
								
AnchorClients Accounts: Get

Retrieve a particular Client Accounts.


Request Notes:

account_id: The Account ID to query

Clients Accounts: Get JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "clients_accounts_get",
											"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_balance": "12.00",
												"account_active": "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_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 Account 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

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

Response Notes:

If payment_type was provided in the request, you will receive a payment_id in the response

Charges: Create JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "charges_create",
											"account_id": "2",
											"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_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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "charges_list",
											"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",
												"gl_account_id": 1,
												"gl_category_id": 1,
												"description": "Accommodation",
												"amount": "100.00",
												"generated_when": "2017-07-15 12:30:00",
												"voided_when": null,
												"gl_account_code": "1-100"
											}],
											"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_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 Account 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

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

Response Notes:

If refund_type was provided in the request, you will receive a refund_id in the response

Credits: Create JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "credits_create",
											"account_id": "2",
											"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_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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "credits_list",
											"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": 6,
												"account_id": 10,
												"account_for": "bookings",
												"account_for_id": "34",
												"account_for_name": "John Doe",
												"gl_account_id": 1,
												"gl_category_id": 1,
												"description": "Discount",
												"amount": "20.00",
												"generated_when": "2017-07-15 13:30:00",
												"voided_when": null,
												"gl_account_code": "1-100"
											}],
											"message": ""
										}
									
								
AnchorPayments: Create

Used to add payments to a Client Account.


Request Notes:

account_id: The Client Account ID retrieved in a previous request

generated_when (optional): 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; whether or not this payment should be considered "Deposits Held" for reporting purposes

type: please see the Payment Types request for a list of valid types

type_reference (optional): alpha-numeric descriptor for the payment

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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "payments_create",
											"account_id": "2",
											"generated_when": "2015-09-13 14:00:00",
											"description": "Misc Payment",
											"gl_category_id": "1",
											"amount": "50",
											"deposit": "0",
											"type": "visa",
											"type_reference": "abc_1234567890"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"payment_id": "54"
											},
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "payments_list",
											"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",
												"gl_category_id": 1,
												"type": "mastercard",
												"transaction_method": "cc_gateway",
												"description": "Booking Deposit",
												"amount": "100.00",
												"generated_when": "2017-07-15 12:30:00",
												"voided_when": null
											}],
											"message": ""
										}
									
								
AnchorPayment Types

Pull a list of Payment / Refund Types from NewBook.

Payment Types JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "payments_types"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"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_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

type_reference (optional): alpha-numeric descriptor for the refund

Refunds: Create JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "refunds_create",
											"account_id": "2",
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "refunds_list",
											"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",
												"gl_category_id": 1,
												"type": "mastercard",
												"transaction_method": "cc_gateway",
												"description": "Deposit Refund",
												"amount": "100.00",
												"generated_when": "2017-07-15 12:30:00",
												"voided_when": null
											}],
											"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) JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "quotes_list",
											"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"
												}]
											}],
											"message": ""
										}
									
								
AnchorQuotes: PDF Content (CRM)

Used to retrieve the PDF content for a Quote.

Quotes: PDF Content (CRM) JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "quotes_pdf_content",
											"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:

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.

fetch_guests: Can optionally be provided to include the guest_id for each Invoice (where available).

fetch_items: Can optionally be provided to include details about each Item on Invoices.

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"
								
							

Invoices: List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "invoices_list",
											"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_for": "bookings",
												"account_for_id": "34",
												"account_for_name": "John Doe",
												"description": "Accommodation",
												"po_number": "",
												"due_on": "2017-06-27",
												"total": 330,
												"paid_total": 330,
												"generated_when": "2017-06-20 00:00:00",
												"voided_when": null
											}],
											"message": ""
										}
									
								
AnchorInvoices: PDF Content

Used to retrieve the PDF content for an Invoice.

Invoices: PDF Content JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "invoices_pdf_content",
											"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:

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 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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "receipts_list",
											"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": "371",
												"account_for": "bookings",
												"account_for_id": "34",
												"account_for_name": "John Doe",
												"description": "Accommodation",
												"total": -70,
												"generated_when": "2017-08-14 10:14:38",
												"voided_when": null
											}],
											"message": ""
										}
									
								
AnchorReceipts: PDF Content

Used to retrieve the PDF content for a Receipt.

Receipts: PDF Content JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "receipts_pdf_content",
											"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.

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, etc

Contact Templates: List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "contact_templates_list"
										}
									
								
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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "contact_templates_send",
											"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 sending_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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "contact_templates_create",
											"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: 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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "contact_templates_update",
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "contact_templates_options",
										}
									
								
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, etc

System Templates: List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "system_templates_list"
										}
									
								
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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action":"system_templates_create",
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action":"system_templates_get",
											"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: Get JSON

Request JSON
									
										{
											"id":"1",
											"name":"Guest and Visitor agreement",
											"pdf_size":"a3"
											"bind":"bookings"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"message": "Updated System Template",
											"data": {
												"id":"1"
											},
										}
									
								
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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "newbook_status"
										}
									
								
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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "reports_earned_revenue",
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "reports_transaction_flow",
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "reports_reconciliation",
											"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 Debtor's Ledger result rows

creditor_gl_account can be provided to apply a GL Account to Creditor's Ledger result rows

payment_gl_account can be provided to apply a GL Account to Payment/Refund result rows

Reporting: Daily Audit Summary JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "reports_daily_audit_summary",
											"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": ""
										}
									
								
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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "reports_balances_dated",
											"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.


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.

Reporting: Occupancy JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "reports_occupancy",
											"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
													}
												}
											}],
											"message": ""
										}
									
								
AnchorReporting: Inventory Items

Pull data from the Inventory Items Report for the dates specified.

Reporting: Inventory Items JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "reports_inventory_items",
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "reports_surveys_answers",
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "reports_surveys_completed",
											"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": ""
										}
									
								
AnchorTasks: List

Retrieve a list of outstanding Tasks from NewBook


Request Notes:

task_type must be an ID returned from Tasks: 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 supplied, 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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "tasks_list",
											"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,
												"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": ""
										}
									
								
AnchorTasks: Types List

Retrieve a list of the different Task Types

Tasks: Types List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "tasks_types_list"
										}
									
								
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 Tasks: Types List

description is required

period_from is required

period_to is required

Tasks: Create JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "tasks_create",
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "tasks_update",
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "tickets_list"
										}
									
								
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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "tickets_get",
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "tickets_create",
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "tickets_update",
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "tickets_queues_list"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"name": "Support"
											}],
											"message": ""
										}
									
								
AnchorSurveys List

Retrieves a list of the Surveys set up in the database.

Surveys List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "surveys_list"
										}
									
								
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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "gift_voucher_list",
											"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,
												"allow_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

Inventory Items List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "inventory_item_list",
											"name": "test"
										}
									
								
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",
												"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"
											}],
											"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "discount_list",
											"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": ""
										}
									
								
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 discount_list request to determine how much of a discount is granted based on the membership

Memberships List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "memberships_list",
											"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": ""
										}
									
								
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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "custom_fields",
											"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 supplied

Notes Types List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "notes_types"
										}
									
								
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": ""
										}
									
								
AnchorNotes: Create

Add a Note to a Booking.


Request Notes:

note_type_id is optional, and will use the System Default if not provided as per the Notes List request

Notes: Create JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "notes_create",
											"note_for": "bookings",
											"note_for_id": "350",
											"note_type_id": "1",
											"note_content": "Just some information"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"note_id": "20"
											},
											"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.

								
									{
										"api_key": "your_api_key_here",
										"request_action": "phone_calls",
										"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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "phone_calls",
											"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, usually used for recording non-Booking-specific charges.

PostMaster Accounts List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "postmaster_list"
										}
									
								
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 supply gl_account_id instead using a valid ID from the GL Account List request
    • tax_free: 1 = Tax Free, 0 = Has Tax
    • 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 supply gl_account_id instead using a valid ID from the GL Account List request
    • tax_free: 1 = Tax Free, 0 = Has Tax
    • 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.

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 JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "pos_sale",
											"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 the list of active 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

Subscriptions List (CRM) JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "subscriptions_list"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"subscription_id": "3",
												"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"
											}],
											"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 supplied, restricts the returned Notifications to only those which were created on the date given

Notifications List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "notifications_list",
											"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

Online Users: Get JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "online_users_get",
											"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: Update

Update a NewBook Online User.


Request Notes:

user_id is required, and can be retrieved using the Online Users: Get request

username is optional

new_password is optional, and should only be provided when updating the password

Online Users: Update JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "online_users_update",
											"user_id": "4",
											"username": "john@doe.com",
											"new_password": "mynewpassword"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": {
												"user_id": "4"
											},
											"message": "Successfully updated Online Login"
										}
									
								
AnchorDietary Requirements: List

List all Dietary Requirements, for use when adding or updating Guests.

Dietary Requirements: List JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "dietary_requirements_list",
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"id": "1",
												"name": "Gluten Free"
											},{
												"id": "2",
												"name": "Vegetarian"
											}],
											"message": ""
										}
									
								
AnchorTrust Setup

Pull a list of active Owners and Contracts with all of their details.


Response Notes:

Contract Notes

  • site_ownership - the percentage of Ownership between the Owner / Site

Contract Fee Notes

  • bookings_source_id - the Booking Source that this fee applies to, null indicates no restriction
  • minimum_periods - the minimum stay length before this fee will apply to the Bookings
  • stay_cost_only - this fee should only apply to Stay Costs (e.g. not extras or "incidentals")
  • departed_only - this fee can only be charged after the Booking has departed (so long terms like rentals will only be charged upon departure)
  • fee_type - how the fee is calculated (see below for more information)
  • payment_type - which Payment Types this fee is restricted to (payment_percentage and payment_fixed types only)

Contract Fee Types

  • percentage - based on a percentage of the Booking Cost
  • fixed - a fixed amount per Booking
  • per_disbursement - charged every time money is Disbursed to the Owner
  • payment_percentage - based on a percentage of the Payment Amount (calculated per Payment)
  • payment_fixed - a fixed amount per Payment

title can be any string; NewBook does not restrict users to specific titles for Owners

Trust Setup JSON

Request JSON
									
										{
											"api_key": "your_api_key_here",
											"request_action": "trust_setup"
										}
									
								
Response JSON
									
										{
											"success": "true",
											"data": [{
												"title": "Mr",
												"firstname": "John",
												"lastname": "Smith",
												"trust_name": "Smith Trust",
												"bank_account_abbreviation": "WBC",
												"bank_bsb_number": "999-999",
												"bank_account_name": "Mr John Smith",
												"street": "Level 2, 9 Ouyan Street",
												"city": "Surfers Paradise",
												"state_id": 4,
												"postcode": "4217",
												"country_id": 13,
												"country_name": "Australia",
												"state_name": "Queensland",
												"tax_id": "",
												"trust_reserve": "0.00",
												"contact_details": [{
													"type": "email",
													"content": "john@smith.com",
													"notes": "",
													"allow_transactional": 1,
													"allow_marketing": 1
												}],
												"contracts": [{
													"site_id": 1,
													"site_ownership": "100.00",
													"period_from": "2017-01-01",
													"period_to": "2017-12-31",
													"fees": [{
														"gl_category_id": 1,
														"gl_account_id": 2,
														"gl_account_code": "2-250",
														"description": "Management Fees",
														"bookings_source_id": null,
														"minimum_periods": 0,
														"stay_cost_only": 0,
														"departed_only": 0,
														"fee_type": "percentage",
														"fee_amount": "11.00",
														"tax_free": 0
													}]
												}]
											}],
											"message": ""
										}