Introduction
Welcome to the Narnoo live reservations API!
Narnoo now lets you check for product availability, pricing and create reservations for tourism products. Narnoo is not a booking platform, instead it acts as a gateway between major third party reservation systems. These systems include both operator direct reservation systems and tourism wholesalers.
Narnoo requires the distributor to have their own relationships with these booking platforms. You are required to have your own authentication to each system, this way Narnoo makes calls based on your relationships. Narnoo just acts as the gateway so you don’t have to develop for each platform individually.
We have language bindings in JavaScript jQuery, PHP cURL, Python and Swift! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.
If you have any issues or problems with our API or connecting with a reservations system then please contact us and we will do our best to help.
Latest Endpoints
Updated information - Extras details have been updated for reservations.
Updated information - Product options have a type field added.
Updated information - If pickUp data is provided for a product then it is manditory to pass this to the create reservation endpoint. Where a supplier requires a drop off we automatically add the pickup location as the drop off location.
Updated information - Added date param to product booking data so there is an option to check pricing for a specific date. get bookable product data Added ‘pickup label’ and 'extra label’ to the create reservation request.
Testing Environment
We have set up a testing environment which uses all the reservation systems’ testing API calls. This means you can test the API without making real time bookings.
We have a live testing product which you can use. Please email support@narnoo.com and our support staff will make sure this product is set up for you to test with.
The only real endpoint to be concerned about is the create product reservation route. Use our testing API when developing this endpoint as it will not create a live reservation. If you use the live endpoint a live booking will be made and the agent will be responsible for the costs involved with booking the product.
Testing endpoint: https://apis-test.narnoo.com/v1/
Once you’re happy with testing you can change the endpoint URL and start making live calls.
Classic Use Case Scenario
- Display all bookable suppliers. get bookable suppliers
- Return all bookable products for a supplier. get bookable products
- Check product availablity based on a date range. get product availability
- Gather bookable data for the supplier’s product. get bookable product data
- Create the reservation. create product reservation
We have provided an example walk through of how we create a booking via the Narnoo portal. Narnoo example
PHP SDK Library
We have created a PHP SDK library with documentation that further explains how to use our API. This SDK is just out of stable version. If there are issues please contact support@narnoo.com.
Authentication
To authenticate with our API you will require a access key and a secret key. These keys can be obtained from your Narnoo account.
Authentication
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/authenticate/token",
"method": "GET",
"headers": {
"API-KEY": "xxxxxxxxxxxxxxxx",
"API-SECRET-KEY": "xxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/authenticate/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"API-KEY: xxxxxxxxxxxxxxxxxxxxx",
"API-SECRET-KEY: xxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/authenticate/token"
headers = {
'API-KEY': "xxxxxxxxxxxxxxxxxxx",
'API-SECRET-KEY': "xxxxxxxxxxxxxxxxxxx",
'Cache-Control': "no-cache"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
import Foundation
let headers = [
"API-KEY": "xxxxxxxxxxxxxxxxxxx",
"API-SECRET-KEY": "xxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/authenticate/token")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"status": true,
"token": "xxxxxxxxxxxxxxxxxxx",
"queryTime": "32.35ms"
}
This endpoint retrieves a token which will be used for further authentication to our API.
HTTP Request
GET https://apis.narnoo.com/api/v1/authenticate/token
Response Parameters
[token] is used for further authentication with our API
Connect
Narnoo works by allowing you to create connections between your business and the operator’s you want to interact with.
It’s similar to a social network where you create lists of businesses that your business follows.
Find operators to follow
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/connect/find",
"method": "POST",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/connect/find",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => array(
"Authorization: bearer xxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import http.client
conn = http.client.HTTPConnection("apis,narnoo,com")
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxxxxx",
'Cache-Control': "no-cache"
}
conn.request("POST", "api,v1,connect,find", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/connect/find")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
})
The above command returns JSON structured like this:
{
"success": true,
"data": [
{
"details": {
"id": "498",
"business": "Skydive Cairns",
"location": "Shop 5 47 Shields Street, Cairns QLD 4870, Australia",
"latitude": "-16.87896377480452",
"longitude": "145.74577548129275",
"type": "operator",
"connected": false
},
"avatar": {
"id": "5031",
"uploadedAt": "2016-01-20 10:14:23",
"cropImage": "//dmxhl5sgly8nk.cloudfront.net/op_498/crop/crop_Skydive-Cairns-QWXm8y5guqmyM4C.jpg",
"xcropImage": "//dmxhl5sgly8nk.cloudfront.net/op_498/xcrop/xcrop_Skydive-Cairns-QWXm8y5guqmyM4C.jpg",
"thumbImage": "//dmxhl5sgly8nk.cloudfront.net/op_498/thumb/thumb_Skydive-Cairns-QWXm8y5guqmyM4C.jpg",
"previewImage": "//dmxhl5sgly8nk.cloudfront.net/op_498/preview/preview_Skydive-Cairns-QWXm8y5guqmyM4C.jpg",
"largeImage": "//dmxhl5sgly8nk.cloudfront.net/op_498/large/large_Skydive-Cairns-QWXm8y5guqmyM4C.jpg",
"xlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_498/xlarge/xlarge_Skydive-Cairns-QWXm8y5guqmyM4C.jpg",
"xxlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_498/xxlarge/xxlarge_Skydive-Cairns-QWXm8y5guqmyM4C.jpg",
"image200": "//dmxhl5sgly8nk.cloudfront.net/op_498/200/200_Skydive-Cairns-QWXm8y5guqmyM4C.jpg",
"image400": "//dmxhl5sgly8nk.cloudfront.net/op_498/400/400_Skydive-Cairns-QWXm8y5guqmyM4C.jpg",
"image800": "//dmxhl5sgly8nk.cloudfront.net/op_498/800/800_Skydive-Cairns-QWXm8y5guqmyM4C.jpg",
"imageSize": "5606.05",
"imageWidth": "2503",
"imageHeight": "2719",
"orientation": null,
"caption": "",
"privilege": "public",
"featureImage": true
}
},
{
"details": {
"id": "471",
"business": "Daintree Air Services",
"location": "Tom McDonald Dr, Aeroglen QLD 4870, Australia",
"latitude": "-16.882043741834117",
"longitude": "145.74662305934146",
"type": "operator",
"connected": true
},
"avatar": {
"id": "4981",
"uploadedAt": "2016-01-18 10:44:42",
"cropImage": "//dmxhl5sgly8nk.cloudfront.net/op_471/crop/crop_Daintree-Air-Services-o3LQV5mW58pzQet.jpg",
"xcropImage": "//dmxhl5sgly8nk.cloudfront.net/op_471/xcrop/xcrop_Daintree-Air-Services-o3LQV5mW58pzQet.jpg",
"thumbImage": "//dmxhl5sgly8nk.cloudfront.net/op_471/thumb/thumb_Daintree-Air-Services-o3LQV5mW58pzQet.jpg",
"previewImage": "//dmxhl5sgly8nk.cloudfront.net/op_471/preview/preview_Daintree-Air-Services-o3LQV5mW58pzQet.jpg",
"largeImage": "//dmxhl5sgly8nk.cloudfront.net/op_471/large/large_Daintree-Air-Services-o3LQV5mW58pzQet.jpg",
"xlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_471/xlarge/xlarge_Daintree-Air-Services-o3LQV5mW58pzQet.jpg",
"xxlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_471/xxlarge/xxlarge_Daintree-Air-Services-o3LQV5mW58pzQet.jpg",
"image200": "//dmxhl5sgly8nk.cloudfront.net/op_471/200/200_Daintree-Air-Services-o3LQV5mW58pzQet.jpg",
"image400": "//dmxhl5sgly8nk.cloudfront.net/op_471/400/400_Daintree-Air-Services-o3LQV5mW58pzQet.jpg",
"image800": "//dmxhl5sgly8nk.cloudfront.net/op_471/800/800_Daintree-Air-Services-o3LQV5mW58pzQet.jpg",
"imageSize": "8101.86",
"imageWidth": "4283",
"imageHeight": "2961",
"orientation": null,
"caption": "",
"privilege": "public",
"featureImage": true
}
},
{
"details": {
"id": "555",
"business": "Cairns Airport",
"location": "Unnamed Road, Aeroglen QLD 4870, Australia",
"latitude": "-16.87750590622631",
"longitude": "145.75262047869876",
"type": "operator",
"connected": true
},
"avatar": {
"id": "5245",
"uploadedAt": "2016-03-08 12:07:42",
"cropImage": "//dmxhl5sgly8nk.cloudfront.net/op_555/crop/crop_Cairns-Airport-dMJIzN4DCdx5qxv.jpg",
"xcropImage": "//dmxhl5sgly8nk.cloudfront.net/op_555/xcrop/xcrop_Cairns-Airport-dMJIzN4DCdx5qxv.jpg",
"thumbImage": "//dmxhl5sgly8nk.cloudfront.net/op_555/thumb/thumb_Cairns-Airport-dMJIzN4DCdx5qxv.jpg",
"previewImage": "//dmxhl5sgly8nk.cloudfront.net/op_555/preview/preview_Cairns-Airport-dMJIzN4DCdx5qxv.jpg",
"largeImage": "//dmxhl5sgly8nk.cloudfront.net/op_555/large/large_Cairns-Airport-dMJIzN4DCdx5qxv.jpg",
"xlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_555/xlarge/xlarge_Cairns-Airport-dMJIzN4DCdx5qxv.jpg",
"xxlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_555/xxlarge/xxlarge_Cairns-Airport-dMJIzN4DCdx5qxv.jpg",
"image200": "//dmxhl5sgly8nk.cloudfront.net/op_555/200/200_Cairns-Airport-dMJIzN4DCdx5qxv.jpg",
"image400": "//dmxhl5sgly8nk.cloudfront.net/op_555/400/400_Cairns-Airport-dMJIzN4DCdx5qxv.jpg",
"image800": "//dmxhl5sgly8nk.cloudfront.net/op_555/800/800_Cairns-Airport-dMJIzN4DCdx5qxv.jpg",
"imageSize": "4856.57",
"imageWidth": "4663",
"imageHeight": "3109",
"orientation": null,
"caption": "",
"privilege": "public",
"featureImage": false
}
},
{
"details": {
"id": "108",
"business": "Skytrans",
"location": "Cairns QLD, Australia",
"latitude": "-16.877738312555888",
"longitude": "145.75400265328983",
"type": "operator",
"connected": true
},
"avatar": {
"id": "1037",
"uploadedAt": "2016-07-26 16:40:21",
"cropImage": "//dmxhl5sgly8nk.cloudfront.net/op_108/crop/crop_6B5B4114388198e7102.jpg",
"xcropImage": "//dmxhl5sgly8nk.cloudfront.net/op_108/xcrop/xcrop_6B5B4114388198e7102.jpg",
"thumbImage": "//dmxhl5sgly8nk.cloudfront.net/op_108/thumb/thumb_6B5B4114388198e7102.jpg",
"previewImage": "//dmxhl5sgly8nk.cloudfront.net/op_108/preview/preview_6B5B4114388198e7102.jpg",
"largeImage": "//dmxhl5sgly8nk.cloudfront.net/op_108/large/large_6B5B4114388198e7102.jpg",
"xlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_108/xlarge/xlarge_6B5B4114388198e7102.jpg",
"xxlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_108/xxlarge/xxlarge_6B5B4114388198e7102.jpg",
"image200": "//dmxhl5sgly8nk.cloudfront.net/op_108/200/200_6B5B4114388198e7102.jpg",
"image400": "//dmxhl5sgly8nk.cloudfront.net/op_108/400/400_6B5B4114388198e7102.jpg",
"image800": "//dmxhl5sgly8nk.cloudfront.net/op_108/800/800_6B5B4114388198e7102.jpg",
"imageSize": null,
"imageWidth": null,
"imageHeight": null,
"orientation": null,
"caption": "",
"privilege": "public",
"featureImage": false
}
},
{
"details": {
"id": "192",
"business": "GBR Helicopters",
"location": "Bush Pilots Avenue, Cairns International Airport (CNS), Aeroglen QLD 4870, Australia",
"latitude": "-16.8856697",
"longitude": "145.7495831",
"type": "operator",
"connected": false
},
"avatar": {
"id": "4928",
"uploadedAt": "2016-01-12 13:16:56",
"cropImage": "//dmxhl5sgly8nk.cloudfront.net/op_192/crop/crop_GBR-Helicopters-q8wD2B8SXatU3UQ.jpg",
"xcropImage": "//dmxhl5sgly8nk.cloudfront.net/op_192/xcrop/xcrop_GBR-Helicopters-q8wD2B8SXatU3UQ.jpg",
"thumbImage": "//dmxhl5sgly8nk.cloudfront.net/op_192/thumb/thumb_GBR-Helicopters-q8wD2B8SXatU3UQ.jpg",
"previewImage": "//dmxhl5sgly8nk.cloudfront.net/op_192/preview/preview_GBR-Helicopters-q8wD2B8SXatU3UQ.jpg",
"largeImage": "//dmxhl5sgly8nk.cloudfront.net/op_192/large/large_GBR-Helicopters-q8wD2B8SXatU3UQ.jpg",
"xlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_192/xlarge/xlarge_GBR-Helicopters-q8wD2B8SXatU3UQ.jpg",
"xxlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_192/xxlarge/xxlarge_GBR-Helicopters-q8wD2B8SXatU3UQ.jpg",
"image200": "//dmxhl5sgly8nk.cloudfront.net/op_192/200/200_GBR-Helicopters-q8wD2B8SXatU3UQ.jpg",
"image400": "//dmxhl5sgly8nk.cloudfront.net/op_192/400/400_GBR-Helicopters-q8wD2B8SXatU3UQ.jpg",
"image800": "//dmxhl5sgly8nk.cloudfront.net/op_192/800/800_GBR-Helicopters-q8wD2B8SXatU3UQ.jpg",
"imageSize": "1089.13",
"imageWidth": "1440",
"imageHeight": "920",
"orientation": null,
"caption": "",
"privilege": "public",
"featureImage": true
}
}
],
"queryTime": "186.12ms"
}
This endpoint retrieves a “suggested” list of operators from Narnoo.
HTTP Request
POST https://apis.narnoo.com/api/v1/connect/find
Query Parameters
A json BODY request with latitude and longitude values. This will then find operators based on the latitude and longitude entered.
Parameter | Required | Description |
---|---|---|
latitude | FALSE | Pass a latitude option |
longitude | FALSE | Pass a longitude option |
Search for operators
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/connect/search",
"method": "POST",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxxxx",
"Content-Type: application/json",
"Cache-Control": "no-cache"
},
"data": "{\"name\":\"narnoo\"}"
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/connect/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"name\":\"narnoo\"}",
CURLOPT_HTTPHEADER => array(
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache",
"Postman-Token: 7b7540ba-2a97-4129-96f1-235086097a9d",
"Content-Type: application/json",
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/connect/search"
payload = "{\"name\":\"narnoo\"}"
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxxxxxx",
'Content-Type': "application/json",
'Cache-Control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Cache-Control": "no-cache"
]
let parameters = ["name": "narnoo"] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/connect/search")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"data": [
{
"id": "39",
"type": "operator",
"name": "Narnoo Demo",
"contact": "John Doe",
"email": "info@narnoo.com",
"phone": "+61 (13) 0040-6071",
"url": "https://www.narnoo.com",
"postcode": "4870",
"state": "QLD",
"suburb": "Stratford",
"country": "Australia",
"avatar": {
"id": "1258",
"uploadedAt": "2017-11-22 18:37:23",
"cropImage": "//dmxhl5sgly8nk.cloudfront.net/op_39/crop/crop_929M11Q12Z4W2773144.jpg",
"xcropImage": "//dmxhl5sgly8nk.cloudfront.net/op_39/xcrop/xcrop_929M11Q12Z4W2773144.jpg",
"thumbImage": "//dmxhl5sgly8nk.cloudfront.net/op_39/thumb/thumb_929M11Q12Z4W2773144.jpg",
"previewImage": "//dmxhl5sgly8nk.cloudfront.net/op_39/preview/preview_929M11Q12Z4W2773144.jpg",
"largeImage": "//dmxhl5sgly8nk.cloudfront.net/op_39/large/large_929M11Q12Z4W2773144.jpg",
"xlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_39/xlarge/xlarge_929M11Q12Z4W2773144.jpg",
"xxlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_39/xxlarge/xxlarge_929M11Q12Z4W2773144.jpg",
"image200": "//dmxhl5sgly8nk.cloudfront.net/op_39/200/200_929M11Q12Z4W2773144.jpg",
"image400": "//dmxhl5sgly8nk.cloudfront.net/op_39/400/400_929M11Q12Z4W2773144.jpg",
"image800": "//dmxhl5sgly8nk.cloudfront.net/op_39/800/800_929M11Q12Z4W2773144.jpg",
"imageSize": null,
"imageWidth": null,
"imageHeight": null,
"orientation": null,
"caption": "Narnoo Creative",
"privilege": "public",
"featureImage": true
},
"connected": false
}
],
"queryTime": "76.45ms"
}
This endpoint retrieves any businesses that have similar names to the search request.
HTTP Request
POST https://apis.narnoo.com/api/v1/connect/search
Query Parameters
{“name”:“narnoo”}
Parameter | Required | Description |
---|---|---|
name | true | Operator Name |
Following operators list
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/connect/following",
"method": "GET",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/connect/following",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/connect/following"
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxxxx",
'Cache-Control': "no-cache"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/connect/following")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"count": 15,
"currentPage": 1,
"totalPage": null,
"responseLimit": 100,
"data": [
{
"details": {
"id": "615",
"business": "Website Travel Demo",
"contact": "Kenny Lee",
"phone": "(61) 7369-8745",
"email": "support@websitetravel.com",
"url": "https://www.websitetravel.com/",
"type": "operator",
"role": "products",
"bookable": TRUE
},
"avatar": {
"id": "7624",
"uploadedAt": "2018-07-11 16:56:03",
"cropImage": "//dmxhl5sgly8nk.cloudfront.net/op_615/crop/crop_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"xcropImage": "//dmxhl5sgly8nk.cloudfront.net/op_615/xcrop/xcrop_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"thumbImage": "//dmxhl5sgly8nk.cloudfront.net/op_615/thumb/thumb_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"previewImage": "//dmxhl5sgly8nk.cloudfront.net/op_615/preview/preview_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"largeImage": "//dmxhl5sgly8nk.cloudfront.net/op_615/large/large_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"xlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_615/xlarge/xlarge_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"xxlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_615/xxlarge/xxlarge_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"image200": "//dmxhl5sgly8nk.cloudfront.net/op_615/200/200_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"image400": "//dmxhl5sgly8nk.cloudfront.net/op_615/400/400_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"image800": "//dmxhl5sgly8nk.cloudfront.net/op_615/800/800_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"imageSize": "992.45",
"imageWidth": "1831",
"imageHeight": "1255",
"orientation": "landscape",
"caption": "",
"privilege": "public",
"featureImage": true
}
},
{
"details": {
"id": "614",
"business": "Rezdy Demo",
"contact": "Rezdy Demo",
"phone": "+61 (02) 8244-3060",
"email": "stevie+noreply@rezdy.com",
"url": "https://www.rezdy.com",
"type": "operator",
"role": "products",
"bookable": TRUE
},
"avatar": {
"id": "7623",
"uploadedAt": "2018-07-11 14:46:48",
"cropImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/crop/crop_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"xcropImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/xcrop/xcrop_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"thumbImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/thumb/thumb_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"previewImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/preview/preview_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"largeImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/large/large_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"xlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/xlarge/xlarge_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"xxlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/xxlarge/xxlarge_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"image200": "//dmxhl5sgly8nk.cloudfront.net/op_614/200/200_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"image400": "//dmxhl5sgly8nk.cloudfront.net/op_614/400/400_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"image800": "//dmxhl5sgly8nk.cloudfront.net/op_614/800/800_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"imageSize": "997.69",
"imageWidth": "5000",
"imageHeight": "2696",
"orientation": "landscape",
"caption": "",
"privilege": "public",
"featureImage": true
}
}
],
"queryTime": "11.74ms"
}
This endpoint retrieves any businesses that are being following.
HTTP Request
GET https://apis.narnoo.com/api/v1/connect/following
Query Parameters
Parameter | Required | Description |
---|---|---|
page | false | paging |
total | false | total number of responses request |
Connect with an operator
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/connect/add",
"method": "POST",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Cache-Control": "no-cache"
},
"processData": false,
"data": "{\"type\":\"operator\",\"id\":85}"
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/connect/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"type\":\"operator\",\"id\":85}",
CURLOPT_HTTPHEADER => array(
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache",
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/connect/add"
payload = "{\"type\":\"operator\",\"id\":85}"
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxxxxxxxxx",
'Content-Type': "application/json",
'Cache-Control': "no-cache",
'Postman-Token': "d6e51ff5-ccf0-4808-90ca-5a315e135119"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Cache-Control": "no-cache"
]
let parameters = [
"type": "operator",
"id": 85
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/connect/add")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"data": "The business is now connected",
"queryTime": "76.45ms"
}
This endpoint adds an operator to your connection list.
HTTP Request
POST https://apis.narnoo.com/api/v1/connect/add
Query Parameters
{“type”:“operator”,“id”:85}
Parameter | Required | Description |
---|---|---|
type | true | Operator |
id | true | Operator ID |
Remove connected operator
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/connect/remove",
"method": "POST",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Cache-Control": "no-cache"
},
"processData": false,
"data": "{\"type\":\"operator\",\"id\":548}"
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/connect/remove",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"type\":\"operator\",\"id\":548}",
CURLOPT_HTTPHEADER => array(
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache",
"Content-Type: application/json",
"Postman-Token: 02b021fa-6f5e-4976-a330-3146bca2d505"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/connect/remove"
payload = "{\"type\":\"operator\",\"id\":548}"
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxxxxxxxx",
'Content-Type': "application/json",
'Cache-Control': "no-cache"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Cache-Control": "no-cache"
]
let parameters = [
"type": "operator",
"id": 548
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/connect/remove")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"data": "The business has been unfollowed",
"queryTime": "76.45ms"
}
This endpoint removes a following connection.
HTTP Request
POST https://apis.narnoo.com/api/v1/connect/remove
Query Parameters
{“type”:“operator”,“id”:85}
Parameter | Required | Description |
---|---|---|
type | true | Operator |
id | true | Operator ID |
Bookable operators list
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/connect/bookable",
"method": "GET",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/connect/bookable",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/connect/bookable"
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxxxx",
'Cache-Control': "no-cache"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/connect/bookable")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"count": 15,
"currentPage": 1,
"totalPage": null,
"responseLimit": 100,
"data": [
{
"details": {
"id": "615",
"business": "Website Travel Demo",
"contact": "Kenny Lee",
"phone": "(61) 7369-8745",
"email": "support@websitetravel.com",
"url": "https://www.websitetravel.com/",
"type": "operator",
"bookable": TRUE
},
"avatar": {
"id": "7624",
"uploadedAt": "2018-07-11 16:56:03",
"cropImage": "//dmxhl5sgly8nk.cloudfront.net/op_615/crop/crop_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"xcropImage": "//dmxhl5sgly8nk.cloudfront.net/op_615/xcrop/xcrop_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"thumbImage": "//dmxhl5sgly8nk.cloudfront.net/op_615/thumb/thumb_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"previewImage": "//dmxhl5sgly8nk.cloudfront.net/op_615/preview/preview_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"largeImage": "//dmxhl5sgly8nk.cloudfront.net/op_615/large/large_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"xlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_615/xlarge/xlarge_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"xxlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_615/xxlarge/xxlarge_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"image200": "//dmxhl5sgly8nk.cloudfront.net/op_615/200/200_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"image400": "//dmxhl5sgly8nk.cloudfront.net/op_615/400/400_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"image800": "//dmxhl5sgly8nk.cloudfront.net/op_615/800/800_Website-Travel-Demo-bEp1YkogxpnY31y.jpg",
"imageSize": "992.45",
"imageWidth": "1831",
"imageHeight": "1255",
"orientation": "landscape",
"caption": "",
"privilege": "public",
"featureImage": true
}
},
{
"details": {
"id": "614",
"business": "Rezdy Demo",
"contact": "Rezdy Demo",
"phone": "+61 (02) 8244-3060",
"email": "stevie+noreply@rezdy.com",
"url": "https://www.rezdy.com",
"type": "operator",
"role": "products"
},
"avatar": {
"id": "7623",
"uploadedAt": "2018-07-11 14:46:48",
"cropImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/crop/crop_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"xcropImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/xcrop/xcrop_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"thumbImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/thumb/thumb_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"previewImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/preview/preview_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"largeImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/large/large_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"xlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/xlarge/xlarge_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"xxlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/xxlarge/xxlarge_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"image200": "//dmxhl5sgly8nk.cloudfront.net/op_614/200/200_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"image400": "//dmxhl5sgly8nk.cloudfront.net/op_614/400/400_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"image800": "//dmxhl5sgly8nk.cloudfront.net/op_614/800/800_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"imageSize": "997.69",
"imageWidth": "5000",
"imageHeight": "2696",
"orientation": "landscape",
"caption": "",
"privilege": "public",
"featureImage": true
}
}
],
"queryTime": "11.74ms"
}
This endpoint retrieves any businesses that has been configured for live bookings.
HTTP Request
GET https://apis.narnoo.com/api/v1/connect/bookable
Query Parameters
Parameter | Required | Description |
---|---|---|
page | false | paging |
total | false | total number of responses request |
Search bookable Operators
You are able to search through operators that are bookable to your account.
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/connect/connected_bookable_search",
"method": "POST",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Accept": "*/*",
"Cache-Control": "no-cache",
"Host": "apis.narnoo.com",
"accept-encoding": "gzip, deflate",
"content-length": "70",
"Connection": "keep-alive",
"cache-control": "no-cache"
},
"processData": false,
"data": "{\"category\":\"Attraction\",\"subCategory\":\"Reef\", \"page\": 1, \"total\": 25}"
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/connect/connected_bookable_search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"category\":\"Attraction\",\"subCategory\":\"Reef\", \"page\": 1, \"total\": 25}",
CURLOPT_HTTPHEADER => array(
"Accept: */*",
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache",
"Connection: keep-alive",
"Content-Type: application/json",
"Host: apis.narnoo.com",
"accept-encoding: gzip, deflate",
"cache-control: no-cache",
"content-length: 70"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/connect/connected_bookable_search"
payload = "{\"category\":\"Attraction\",\"subCategory\":\"Reef\", \"page\": 1, \"total\": 25}"
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxxxxx",
'Content-Type': "application/json",
'Accept': "*/*",
'Cache-Control': "no-cache",
'Host': "apis.narnoo.com",
'accept-encoding': "gzip, deflate",
'content-length': "70",
'Connection': "keep-alive",
'cache-control': "no-cache"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Accept": "*/*",
"Cache-Control": "no-cache",
"Host": "apis.narnoo.com",
"accept-encoding": "gzip, deflate",
"content-length": "70",
"Connection": "keep-alive",
"cache-control": "no-cache"
]
let parameters = [
"category": "Attraction",
"subCategory": "Reef",
"page": 1,
"total": 25
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/connect/connected_bookable_search")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"count": 4,
"currentPage": 1,
"totalPages": 1,
"responseLimit": 25,
"data": [
{
"details":{
"id": "73",
"type": "operator",
"name": "Passions Of Paradise",
"contact": "Jon Doe",
"email": "email@pdomain",
"phone": "1234456778",
"url": "http://www.passions.com.au/",
"postcode": "4870",
"state": "QLD",
"suburb": "CAIRNS",
"country": "Australia",
"bookable":true,
"connected": true
},
"avatar": {
"id": "7810",
"uploadedAt": "2018-09-21 15:22:13",
"cropImage": "//dmxhl5sgly8nk.cloudfront.net/op_73/crop/crop_Passions-Of-Paradise-np6rk4iwrQihhMV.jpg",
"xcropImage": "//dmxhl5sgly8nk.cloudfront.net/op_73/xcrop/xcrop_Passions-Of-Paradise-np6rk4iwrQihhMV.jpg",
"thumbImage": "//dmxhl5sgly8nk.cloudfront.net/op_73/thumb/thumb_Passions-Of-Paradise-np6rk4iwrQihhMV.jpg",
"previewImage": "//dmxhl5sgly8nk.cloudfront.net/op_73/preview/preview_Passions-Of-Paradise-np6rk4iwrQihhMV.jpg",
"largeImage": "//dmxhl5sgly8nk.cloudfront.net/op_73/large/large_Passions-Of-Paradise-np6rk4iwrQihhMV.jpg",
"xlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_73/xlarge/xlarge_Passions-Of-Paradise-np6rk4iwrQihhMV.jpg",
"xxlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_73/xxlarge/xxlarge_Passions-Of-Paradise-np6rk4iwrQihhMV.jpg",
"image200": "//dmxhl5sgly8nk.cloudfront.net/op_73/200/200_Passions-Of-Paradise-np6rk4iwrQihhMV.jpg",
"image400": "//dmxhl5sgly8nk.cloudfront.net/op_73/400/400_Passions-Of-Paradise-np6rk4iwrQihhMV.jpg",
"image800": "//dmxhl5sgly8nk.cloudfront.net/op_73/800/800_Passions-Of-Paradise-np6rk4iwrQihhMV.jpg",
"imageSize": "1192.76",
"imageWidth": "2048",
"imageHeight": "1424",
"orientation": "landscape",
"caption": "",
"privilege": "public",
"featureImage": true
},
},
........
],
"queryTime": "290.85ms"
}
The search bookable endpoint returns all the operators that match you request. You can search by a number of different paramaters.
This endpoint retrieves any businesses that has been configured for live bookings.
HTTP Request
POST https://apis.narnoo.com/api/v1/connect/connected_bookable_search
JSON BODY
Parameter | Required | Description |
---|---|---|
id | optional | Search by operator id |
name | optional | Search by operator name |
category | optional | Search by category get categories |
subCategory | requires category | Search by subcategory based on a category get sub categories |
page | false | Page for results |
total | false | Amount of results you are requesting |
There is a priority order for these searches. For example if you search by ‘id’ and 'name’. Id will be used for the search.
Product
The product endpoint provides further information on an operator’s products.
Once you know the ID of a product you can drill down further for more detailed information on that product.
Get Product List
var form = new FormData();
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/product/list/614",
"method": "GET",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
},
"processData": false,
"contentType": false,
"mimeType": "multipart/form-data",
"data": form
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/product/list/614",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => array(
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/product/list/614"
payload = ""
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxxxxx",
'Cache-Control': "no-cache"
}
response = requests.request("GET", url, data=payload, headers=headers)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/product/list/614")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"data": {
"count": 1,
"currentPage": 1,
"totalPages": 1,
"responseLimit": 50,
"data": [
{
"id": "578",
"productId": "225234852",
"title": "Rezdy Day Tour",
"image": {
"id": "7623",
"uploadedAt": "2018-07-11 14:46:48",
"cropImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/crop/crop_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"xcropImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/xcrop/xcrop_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"thumbImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/thumb/thumb_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"previewImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/preview/preview_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"largeImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/large/large_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"xlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/xlarge/xlarge_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"xxlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/xxlarge/xxlarge_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"image200": "//dmxhl5sgly8nk.cloudfront.net/op_614/200/200_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"image400": "//dmxhl5sgly8nk.cloudfront.net/op_614/400/400_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"image800": "//dmxhl5sgly8nk.cloudfront.net/op_614/800/800_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"imageSize": "997.69",
"imageWidth": "5000",
"imageHeight": "2696",
"orientation": "landscape",
"caption": "",
"privilege": "public",
"featureImage": true,
"markets": false
}
}
]
},
"queryTime": "4.96ms"
}
This endpoint retrieves the list of operator products.
HTTP Request
GET https://apis.narnoo.com/api/v1/product/list/{operator_id}
Query Parameters
Parameter | Required | Description |
---|---|---|
page | False | For paging results |
total | False | To control response numbers |
Get Product Details
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/product/details/225234852/614",
"method": "POST",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/product/details/225234852/614",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => array(
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/product/details/225234852/614"
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxxxxxxxx",
'Cache-Control': "no-cache"
}
response = requests.request("POST", url, headers=headers)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/product/details/225234852/614")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"data": {
"productId": "225234852",
"dateCreated": "2018-07-11 13:42:12",
"dateModified": "2018-07-11 16:15:49",
"title": "Rezdy Day Tour",
"bookingId": "578",
"minPrice": "100.00",
"avgPrice": "100.00",
"maxPrice": "100.00",
"currency": "AUD",
"keywords": null,
"directBooking": null,
"primary": false,
"access": true,
"bookable": true,
"featureImage": {
"id": "7623",
"uploadedAt": "2018-07-11 14:46:48",
"cropImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/crop/crop_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"xcropImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/xcrop/xcrop_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"thumbImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/thumb/thumb_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"previewImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/preview/preview_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"largeImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/large/large_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"xlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/xlarge/xlarge_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"xxlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/xxlarge/xxlarge_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"image200": "//dmxhl5sgly8nk.cloudfront.net/op_614/200/200_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"image400": "//dmxhl5sgly8nk.cloudfront.net/op_614/400/400_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"image800": "//dmxhl5sgly8nk.cloudfront.net/op_614/800/800_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"imageSize": "997.69",
"imageWidth": "5000",
"imageHeight": "2696",
"orientation": "landscape",
"caption": "",
"privilege": "public",
"featureImage": true,
"markets": false
},
"featureLogo": null,
"featureVideo": null,
"featurePrint": null,
"description": {
"summary": [
{
"english": {
"entry_date": "2018-07-11 13:42:28",
"modified_date": null,
"text": "<p ><span >Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla viverra aliquam nisl eget fermentum. Mauris venenatis consequat pellentesque. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Mauris consequat turpis eu ante fermentum, nec congue mauris posuere. Vivamus risus tellus, suscipit non ex in, tincidunt vulputate sapien.</span></p>"
}
}
],
"description": [
{
"english": {
"entry_date": "2018-07-11 13:42:39",
"modified_date": null,
"text": "<p ><span >Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla viverra aliquam nisl eget fermentum. Mauris venenatis consequat pellentesque. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Mauris consequat turpis eu ante fermentum, nec congue mauris posuere. Vivamus risus tellus, suscipit non ex in, tincidunt vulputate sapien. Donec quis nisl erat. Etiam nibh ligula, imperdiet vel massa id, ultrices tincidunt justo. Proin efficitur nisi sed odio porttitor euismod. Ut lacinia purus vulputate molestie sollicitudin. Pellentesque dictum, dolor in accumsan suscipit, ante diam iaculis arcu, tincidunt dapibus nisi nibh ac orci. Proin porttitor maximus elit vel pretium.</span></p>"
}
}
]
},
"gallery": {
"total": 1,
"images": [
{
"id": "7623",
"uploadedAt": "2018-07-11 14:46:48",
"cropImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/crop/crop_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"xcropImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/xcrop/xcrop_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"thumbImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/thumb/thumb_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"previewImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/preview/preview_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"largeImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/large/large_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"xlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/xlarge/xlarge_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"xxlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_614/xxlarge/xxlarge_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"image200": "//dmxhl5sgly8nk.cloudfront.net/op_614/200/200_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"image400": "//dmxhl5sgly8nk.cloudfront.net/op_614/400/400_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"image800": "//dmxhl5sgly8nk.cloudfront.net/op_614/800/800_Rezdy-Demo-s9hHFN4a9OiaLXZ.jpg",
"imageSize": "997.69",
"imageWidth": "5000",
"imageHeight": "2696",
"orientation": "landscape",
"caption": "",
"privilege": "public",
"featureImage": true
}
]
},
"features": false,
"additionalInformation": {
"operatingHours": "4",
"startTime": "12:30:00",
"endTime": "17:30:00",
"transfer": null,
"purchases": null,
"fitness": null,
"packing": null,
"child": null,
"additional": null,
"terms": null
}
},
"queryTime": "10.08ms"
}
This endpoint retrieves the details list for the operator product.
Detailed list of endpoint response coming.
HTTP Request
GET https://apis.narnoo.com/api/v1/product/details/{productId}/{operator_id}
Booking
The booking endpoint provides information regarding the product’s bookable option.
These calls are often made live to a third party reservation/wholesaler’s system. These endpoints require a booking code id to be passed so that Narnoo can request exact information for this product via the respective third party systems. These booking codes can be found by calling get product details
Get Supplier Bookable Products
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/booking/products/{operator_id}",
"method": "GET",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/booking/products/189",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/booking/products/189"
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxxxx",
'Cache-Control': "no-cache"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/booking/products/189")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"data": {
"total": 2,
"responseTotal": 25,
"totalPages": 1,
"currentPage": 1,
"nickName": "respax",
"bookingPlatform": "Respax",
"avatar": {
"id": "2446",
"uploadedAt": "2013-05-02 17:15:46",
"cropImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/crop/crop_Cairns_Zoom_E45R71753364.jpg",
"xcropImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/xcrop/xcrop_Cairns_Zoom_E45R71753364.jpg",
"thumbImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/thumb/thumb_Cairns_Zoom_E45R71753364.jpg",
"previewImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/preview/preview_Cairns_Zoom_E45R71753364.jpg",
"largeImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/large/large_Cairns_Zoom_E45R71753364.jpg",
"xlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/xlarge/xlarge_Cairns_Zoom_E45R71753364.jpg",
"xxlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/xxlarge/xxlarge_Cairns_Zoom_E45R71753364.jpg",
"image200": "//dmxhl5sgly8nk.cloudfront.net/op_189/200/200_Cairns_Zoom_E45R71753364.jpg",
"image400": "//dmxhl5sgly8nk.cloudfront.net/op_189/400/400_Cairns_Zoom_E45R71753364.jpg",
"image800": "//dmxhl5sgly8nk.cloudfront.net/op_189/800/800_Cairns_Zoom_E45R71753364.jpg",
"imageSize": null,
"imageWidth": null,
"imageHeight": null,
"orientation": null,
"caption": "",
"privilege": "public",
"featureImage": true
},
"products": [
{
"productData": {
"productId": "624783453",
"dateCreated": "2019-03-06 15:28:35",
"dateModified": "2019-03-07 11:22:05",
"title": "Zoom Activites + Wildlife Entry",
"bookingId": "1324",
"featureImage": {
"id": "2458",
"uploadedAt": "2013-05-02 18:10:17",
"cropImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/crop/crop_Cairns_Zoom_6678765e4113.jpg",
"xcropImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/xcrop/xcrop_Cairns_Zoom_6678765e4113.jpg",
"thumbImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/thumb/thumb_Cairns_Zoom_6678765e4113.jpg",
"previewImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/preview/preview_Cairns_Zoom_6678765e4113.jpg",
"largeImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/large/large_Cairns_Zoom_6678765e4113.jpg",
"xlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/xlarge/xlarge_Cairns_Zoom_6678765e4113.jpg",
"xxlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/xxlarge/xxlarge_Cairns_Zoom_6678765e4113.jpg",
"image200": "//dmxhl5sgly8nk.cloudfront.net/op_189/200/200_Cairns_Zoom_6678765e4113.jpg",
"image400": "//dmxhl5sgly8nk.cloudfront.net/op_189/400/400_Cairns_Zoom_6678765e4113.jpg",
"image800": "//dmxhl5sgly8nk.cloudfront.net/op_189/800/800_Cairns_Zoom_6678765e4113.jpg",
"imageSize": null,
"imageWidth": null,
"imageHeight": null,
"orientation": null,
"caption": "",
"privilege": "public",
"featureImage": false,
"markets": false
},
"description": {
"summary": [
{
"english": {
"entry_date": "2019-03-07 09:39:35",
"modified_date": "2019-03-07 11:22:05",
"text": "<p>Looking for things to do in Cairns? Visit us at Cairns ZOOM & Wildlife Dome, the world’s first challenge ropes course in a wildlife park. You’ll find us in the heart of the Cairns CBD on top of The Reef Hotel Casino. Whether you are looking for a full day or half day tour, Cairns ZOOM & Wildlife Dome has you covered.</p>"
}
},
{
"english": {
"entry_date": "2019-03-07 11:05:35",
"modified_date": null,
"text": "Auf der<p>Suche nach Aktivitäten in Cairns? Besuchen Sie uns im Cairns ZOOM & Wildlife Dome, dem weltweit ersten Challenge Seilgarten in einem Wildpark. Sie finden uns im Herzen des Cairns CBD auf dem Reef Hotel Casino. Egal, ob Sie nach einer ganztägigen oder halbtägigen Tour suchen, Cairns ZOOM & Wildlife Dome hat Sie abgedeckt. </p>"
}
},
{
"chinese": {
"entry_date": "2019-03-07 11:05:35",
"modified_date": null,
"chinese_text": "<p>寻找在凯恩斯观光活动吗? 在凯恩斯 ZOOM & 野生动物圆顶参观我们,这是世界上第一个在野生动物公园挑战绳索课程。 您将在凯恩斯中央商务区中心的 The Reef 酒店赌场之上找到我们。 无论您是寻找一整天还是半日游,凯恩斯 ZOOM & 野生动物圆顶都能满足您的需求。 </p>"
}
},
{
"english": {
"entry_date": "2019-03-07 11:05:35",
"modified_date": null,
"text": "<p>케언스에서 즐길 수 있는 즐길거리 찾고 계신가요? 야생 동물 공원에서 세계 최초의 도전 로프 코스인 케언즈 ZOOM & 와일드라이프 돔을 방문하십시오. 케언즈 중심부의 더 리프 호텔 카지노 꼭대기에 자리하고 있습니다. 하루 종일 또는 반나절 투어를 원하신다면 케언즈 ZOM & 와일드라이프 돔이 여러분을 안내해 드립니다. </p>"
}
},
{
"japanese": {
"entry_date": "2019-03-07 11:05:35",
"modified_date": null,
"text": "<p>ケアンズでアクティビティを探していますか? 世界初の野生動物公園のチャレンジロープコース、ケアンズZOOM & Wildlife Dome(ケアンズZOOM & Wildlife Dome)をご覧ください。 ザ・リーフホテルカジノの上にあるケアンズのCBDの中心に位置しています。 1 日または半日のツアーをお探しの場合でも、ケアンズZOOM & ワイルドライフドームはあなたをカバーしています。 </p>"
}
}
]
}
},
"bookingCodes": [
{
"id": "RP:1654:3775",
"label": "1 Activity - Standard",
"duration": 1440,
"optionPrice": [
{
"id": "43451",
"label": "Adult",
"price": 45,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
},
{
"id": "43461",
"label": "Child (Dome Entry 4-14 Yrs, Zoom Activities 6-14 Yrs)",
"price": 28.5,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
}
]
}
],
"productTimes": [
{
"id": 1777,
"time": "00:00:00",
"default": true
}
]
},
{
"productData": {
"productId": "411376838",
"dateCreated": "2016-08-23 11:45:54",
"dateModified": "2019-03-07 11:21:14",
"title": "Cairns Zoom",
"bookingId": "78",
"featureImage": {
"id": "2446",
"uploadedAt": "2013-05-02 17:15:46",
"cropImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/crop/crop_Cairns_Zoom_E45R71753364.jpg",
"xcropImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/xcrop/xcrop_Cairns_Zoom_E45R71753364.jpg",
"thumbImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/thumb/thumb_Cairns_Zoom_E45R71753364.jpg",
"previewImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/preview/preview_Cairns_Zoom_E45R71753364.jpg",
"largeImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/large/large_Cairns_Zoom_E45R71753364.jpg",
"xlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/xlarge/xlarge_Cairns_Zoom_E45R71753364.jpg",
"xxlargeImage": "//dmxhl5sgly8nk.cloudfront.net/op_189/xxlarge/xxlarge_Cairns_Zoom_E45R71753364.jpg",
"image200": "//dmxhl5sgly8nk.cloudfront.net/op_189/200/200_Cairns_Zoom_E45R71753364.jpg",
"image400": "//dmxhl5sgly8nk.cloudfront.net/op_189/400/400_Cairns_Zoom_E45R71753364.jpg",
"image800": "//dmxhl5sgly8nk.cloudfront.net/op_189/800/800_Cairns_Zoom_E45R71753364.jpg",
"imageSize": null,
"imageWidth": null,
"imageHeight": null,
"orientation": null,
"caption": "",
"privilege": "public",
"featureImage": true,
"markets": {
"australia": "0",
"france": "1",
"germany": "1",
"greaterChina": "1",
"india": "0",
"japan": "1",
"korea": "0",
"newZealand": "1",
"northAmerica": "1",
"singapore": "1",
"unitedKindom": "1"
}
},
"description": {
"summary": [
{
"english": {
"entry_date": "2016-08-23 11:45:54",
"modified_date": "2019-03-07 11:21:14",
"text": "<p>Cairns Wildlife Dome opened on the roof of the Reef Hotel Casino in 2003, then in 2012, the exciting new Cairns ZOOM was launched.</p><p>No. of employees 29.</p><p>In 2013, it won the New Tourism Development at TTNQ Tourism Awards, the silver award for New Tourism Development at the Queensland Tourism Awards, and second place for the QTIC Prize for Innovation.</p>"
}
},
{
"chinese": {
"entry_date": "2016-08-23 11:45:54",
"modified_date": "2019-03-07 11:21:14",
"chinese_text": "<p>2003年穹顶动物园正式落成。从林滑索在2012年完成。</p><p>雇有29位员工。</p><p>2013年荣获昆士兰旅游局与北昆士兰旅游局的新旅游发展的荣誉奖项以及昆士兰旅游系理事会创意银牌奖。</p>"
}
},
{
"japanese": {
"entry_date": "2016-08-23 11:45:54",
"modified_date": "2019-03-07 11:21:14",
"text": "<p>ケアンズ・ワイルドライフ・ドームは、カジノの真上に2003年オープン、2012年にはエキサイティングなアトラクション「ズーム」が加わりました。従業員数29人です。</p><p>2013年には、クイーンズランド州北部観光業ニューツーリズム金賞、州観光業ニューツーリズム銀賞、州観光業協議会イノベーション賞第二位、革新的なアトラクションとして高い評価を受けました。</p>"
}
},
{
"korean": {
"entry_date": "2019-03-07 10:48:46",
"modified_date": null,
"text": "<p>케언즈 야생 동물 돔은 2003 년에 리프 호텔 카지노의 지붕에 문을 열었습니다, 다음 2012, 흥미 진진한 새로운 케언즈 줌이 시작되었습니다. </p><p>직원 수 29. </p><p>2013년 TTNQ 투어리즘 어워드에서 신투어리즘 개발, 퀸즐랜드관광어워드에서 신투어리즘 개발은 은상, QTIC 혁신상 2위를 수상했습니다. </p>"
}
},
{
"german": {
"entry_date": "2019-03-07 10:48:46",
"modified_date": null,
"text": "<p>Cairns Wildlife Dome wurde 2003 auf dem Dach des Reef Hotel Casino eröffnet, dann im Jahr 2012 wurde das aufregende neue Cairns ZOOM ins Leben gerufen. </p><p>Anzahl der Mitarbeiter 29. </p><p>Im Jahr 2013 gewann sie den New Tourism Development at TTNQ Tourism Awards, den Silberpreis für New Tourism Development bei den Queensland Tourism Awards und den zweiten Platz für den QTIC Prize for Innovation. </p>"
}
}
]
}
},
"bookingCodes": [
{
"id": "RP:1751:3978",
"label": "Standard - Standard",
"duration": 1440,
"optionPrice": [
{
"id": "43451",
"label": "Adult",
"price": 21.6,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
},
{
"id": "43461",
"label": "Child (Dome Entry 4-14 Yrs, Zoom Activities 6-14 Yrs)",
"price": 10.8,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
}
]
}
],
"productTimes": [
{
"id": 1981,
"time": "00:00:00",
"default": true
}
]
}
],
"paymentMethods": [
{
"id": "DOWNPAYMENT_LEVY",
"detail": "Full payment with levy paid to supplier on day.",
"default": true
},
{
"id": "DOWNPAYMENT_BALANCE",
"detail": "Commission payment to agent at time of booking.",
"default": false
}
]
},
"queryTime": "18772.08ms"
}
This endpoint retrieves the list of operators products that have been mapped to your selected reservation systems. A result here means your account has been correctly set up to see these products.
HTTP Request
GET https://apis.narnoo.com/api/v1/booking/products/{operator_id}
Query Parameters
Parameter | Required | Type | Description |
---|---|---|---|
operator_id | true | integer | The Narnoo operator Id. |
Response Parameters
Parameter | Type | Description |
---|---|---|
[success] | boolean | Was the call successful. |
[data][total] | integer | Total number of bookable products. |
[data][responseTotal] | integer | Total number available to call. |
[data][totalPages] | integer | Total number of pages available. |
[data][currentPage] | integer | Current page or results. |
[data][nickName] | string | The nickname used for the reservation system. |
[data][bookingPlatform] | string | The booking platform name. |
[data][avatar] | array | The supplier avatar image. |
[data][products][n][‘productData’] | array | The different product information available. |
[data][products][n]['productData’]['productId’] | interger | The Narnoo product ID - used to return Narnoo based information. |
[data][products][n]['productData’]['dateCreated’] | datetime | Date the product was set up in Narnoo. |
[data][products][n]['productData’]['dateModified’] | datetime | Date the product inforamtion was last modified in Narnoo. |
[data][products][n]['productData’]['title’] | string | Title of the product. |
[data][products][n]['productData’]['bookingId’] | integer | The booking Id used for calls to reservation systems. |
[data][products][n]['productData’]['featureImage’] | array | A hero image for the product. |
[data][products][n]['productData’]['description’] | array | Verious text copy for the products in multiple languages. |
[data][products][n]['bookingCodes’] | array | The product bookable data. This is used by the third party reservation systems. |
[data][products][n]['bookingCodes’][n]['id’] | string | Product booking code - used for all bookable data calls. |
[data][products][n]['bookingCodes’][n]['label’] | string | Product booking option label - sent via the third party reservation system. |
[data][products][n]['bookingCodes’][n]['duration’] | interger | The product duration in minutes. |
[data][products][n]['bookingCodes’][n][optionPrice] | array | The different fare options for the product. |
[data][products][n]['bookingCodes’][n][optionPrice][n]['id’] | integer | The fare option id. |
[data][products][n]['bookingCodes’][n][optionPrice][n]['label’] | string | The fare option label. |
[data][products][n]['bookingCodes’][n][optionPrice][n]['price’] | float | The fare option price. |
[data][products][n]['bookingCodes’][n][optionPrice][n]['pax’] | integer | The quantity of paxs the price represents. Example: a family option could have 4 here. |
[data][products][n]['bookingCodes’][n][optionPrice][n]['minQuantity’] | integer | The minumum quantity that can be booked. Default = 1 |
[data][products][n]['bookingCodes’][n][optionPrice][n]['maxQuantity’] | integer | The maximun quantity that can be booked. Default = NULL If Null then the max limit is the availability. |
[data][products][n]['bookingCodes’][n][optionPrice][n]['group’] | boolean | If the option is for a group this will be true. Option price represents the total for the product. Default = false. |
[data][products][n]['bookingCodes’][n][optionPrice][n]['commission’] | float | Not all reservation systems output commission here. This currently does not represent commissions for all products, via all reservation systems. |
[data][products][n]['bookingCodes’][n][optionPrice][n]['levy’] | float | Not all reservation systems output levy’s here. It’s common to not charge for any levy and the customer can pay on the day. This information should be made visible to the customer on the booking form. |
[data][products][n]['bookingCodes’][n][optionPrice][n]['currency’] | string | Currency name. |
[data][products][n][productTimes] | array | Any product time information - Can be NULL. If it exists it needs to be added to the [data][products][n]['bookingCodes’]['id’]:[data][products][n]['bookingCodes’][productTimes][n]['id’]. |
[data][products][n][productTimes][n]['id’] | integer | Product time ID. |
[data][products][n][productTimes][n]['time’] | time | Product time label. |
[data][products][n][productTimes][n]['default’] | boolean | The default time. |
[data][products]['paymentMethods’] | array | The payment method your agent account is set up with the supplier. |
[data][products]['paymentMethods’][n]['id’] | string | The payment method ID which is represented via a string. |
[data][products]['paymentMethods’][n]['detail’] | string | A description of the payment method. |
[data][products]['paymentMethods’][n]['default’] | boolean | The payment method which the supplier has set as default for your agent’s account. |
Get Product Booking Information
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/booking/product/189/1324",
"method": "GET",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/booking/product/189/1324",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/booking/product/189/1324"
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxxxxxxxxx",
'Cache-Control': "no-cache"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/booking/product/189/1324")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"data": {
"bookingData": {
"bookingPlatform": "Respax",
"bookingPlatformNickname": "respax",
"bookingPlatformMapping": "distributorNominated",
"bookingCodes": [
{
"id": "RP:1654:3775",
"label": "1 Activity - Standard",
"time": null,
"duration": 1440,
"optionPrice": [
{
"id": "43451",
"label": "Adult",
"price": 45,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
},
{
"id": "43461",
"label": "Child (Dome Entry 4-14 Yrs, Zoom Activities 6-14 Yrs)",
"price": 28.5,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
}
]
},
{
"id": "RP:1655:3776",
"label": "2 Activities - Standard",
"time": null,
"duration": 1440,
"optionPrice": [
{
"id": "43451",
"label": "Adult",
"price": 55,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
},
{
"id": "43461",
"label": "Child (Dome Entry 4-14 Yrs, Zoom Activities 6-14 Yrs)",
"price": 36.5,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
}
]
},
{
"id": "RP:1656:3777",
"label": "3 Activities - Standard",
"time": null,
"duration": 1440,
"optionPrice": [
{
"id": "43451",
"label": "Adult",
"price": 65,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
},
{
"id": "43461",
"label": "Child (Dome Entry 4-14 Yrs, Zoom Activities 6-14 Yrs)",
"price": 44.5,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
}
]
},
{
"id": "RP:1657:3778",
"label": "4 Activities - Standard",
"time": null,
"duration": 1440,
"optionPrice": [
{
"id": "43451",
"label": "Adult",
"price": 75,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
},
{
"id": "43461",
"label": "Child (Dome Entry 4-14 Yrs, Zoom Activities 6-14 Yrs)",
"price": 52.5,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
}
]
},
{
"id": "RP:3318:6131",
"label": "6 Activities - Standard",
"time": null,
"duration": 1440,
"optionPrice": [
{
"id": "43451",
"label": "Adult",
"price": 95,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
},
{
"id": "43461",
"label": "Child (Dome Entry 4-14 Yrs, Zoom Activities 6-14 Yrs)",
"price": 68.5,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
}
]
}
],
"productTimes": [
{
"id": 1777,
"time": "00:00:00",
"default": true
}
],
"paymentMethods": [
{
"id": "DOWNPAYMENT_LEVY",
"detail": "Full payment with levy paid to supplier on day.",
"default": true
},
{
"id": "DOWNPAYMENT_BALANCE",
"detail": "Commission payment to agent at time of booking.",
"default": false
}
],
"bookingCodesCount": 5,
"productTimesCount": 1,
"paymentMethodsCount": 2
},
"success": true,
"cacheTime": "24"
},
"queryTime": "305.54ms"
}
This endpoint retrieves the basic booking information for the product.
HTTP Request
GET https://apis.narnoo.com/api/v1/booking/product/{operator_id}/{booking_id}
Query Parameters
Parameter | Required | Description |
---|---|---|
operator_id | true | We need to pass the operator’s Narnoo ID |
booking_id | true | We need to pass the operator’s booking ID |
Response Parameters
Get Product Booking Details
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/booking/details/189/1324?id=RP:1654:3775:1777",
"method": "GET",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/booking/details/189/1324?id=RP:1654:3775:1777",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/booking/details/189/1324"
querystring = {"id":"RP:1654:3775:1777"}
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxxxxxxxxxx",
'Cache-Control': "no-cache"
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/booking/details/189/1324?id=RP:1654:3775:1777")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"data": {
"bookingData": {
"bookingPlatform": "Respax",
"bookingPlatformNickname": "respax",
"bookingPlatformMapping": "operatorPreferred",
"bookingCode": {
"id": "RP:1654:3775:1777"
},
"productPrices": [
{
"id": "43451",
"label": "Adult",
"price": 45,
"pax": 1,
"commission": 0,
"levy": null,
"currency": "AUD"
},
{
"id": "43461",
"label": "Child (Dome Entry 4-14 Yrs, Zoom Activities 6-14 Yrs)",
"price": 28.5,
"pax": 1,
"commission": 0,
"levy": null,
"currency": "AUD"
}
],
"productExtras": false,
"productPickUps": false,
"bookingFields": {
"default": true,
"perBooking": [
{
"label": "First Name",
"required": true,
"type": "text"
},
{
"label": "Last Name",
"required": true,
"type": "text"
},
{
"label": "Phone/Mobile",
"required": true,
"type": "text"
},
{
"label": "Email",
"required": true,
"type": "text"
},
{
"label": "State",
"required": true,
"type": "text"
},
{
"label": "Postcode/Zip",
"required": true,
"type": "text"
},
{
"label": "Country",
"required": true,
"type": "text"
},
{
"label": "I agree to the terms and conditions of travel",
"required": true,
"type": "checkbox"
}
],
"perParticipant": [
{
"label": "First Name",
"required": true,
"type": "text"
},
{
"label": "Last Name",
"required": true,
"type": "text"
}
]
},
"paymentMethods": [
{
"id": "DOWNPAYMENT_LEVY",
"detail": "Full payment with levy paid to supplier on day.",
"default": true
},
{
"id": "DOWNPAYMENT_BALANCE",
"detail": "Commission payment to agent at time of booking.",
"default": false
}
],
"productPricesCount": 2,
"productExtrasCount": 1,
"productPickUpsCount": 1,
"bookingFieldsPerBookingCount": 8,
"bookingFieldsPerParticipantCount": 2,
"paymentMethodsCount": 2
},
"success": true,
"cacheTime": "24"
},
"queryTime": "1455.97ms"
}
This endpoint retrieves the basic product information and also any important information required to book the product. This information includes things such as:
- Supplier contact form information.
- Supplier participant form information.
- Supplier pick up information.
- Supplier extra information - coming soon.
All information found in this call must be sent when creating a booking.
HTTP Request
GET https://apis.narnoo.com/api/v1/booking/details/{operator_id}/{booking_id}?id=<bookingCode>
Query Parameters
Parameter | Required | Description |
---|---|---|
{operator_id} | true | We need to pass the operator’s Narnoo ID |
{booking_id} | true | We need to pass the operator’s Narnoo booking ID |
id = bookingCode | true | Passed in the id parameter. This bookingCode is found in earlier calls and is the combination of bookingCode and productTimes ( if productTimes exists ). |
date = bookingDate ( date of travel ) | false | Can be passed to get an additional check on live pricing for a specific date. |
Response Parameters
Parameter | Type | Description |
---|---|---|
[success] | boolean | Was the call successful. |
[data] | array | The information returned. |
[data]['bookingData’]['bookingPlatform’] | string | The name of the booking platform used for this product. |
[data]['bookingData’]['bookingPlatformNickname’] | string | The nickname of the booking platform used for this product. |
[data]['bookingData’]['bookingPlatformMapping’] | string | Either operator perferred or distributor nominated. |
[data]['bookingData’]['bookingData’] | array | The basic booking data information. |
[data]['bookingData’]['bookingData’][bookingCode][id] | string | The string used to call the booking data. |
[data]['bookingData’]['bookingData’][bookingCode][id] | string | The string used to call the booking data. |
[data]['bookingData’]['productPrices’] | array | Details of the product price options. |
[data]['bookingData’]['productPrices’][n]['id’] | integer | Price ID. |
[data]['bookingData’]['productPrices’][n]['label’] | string | Price option label. |
[data]['bookingData’]['productPrices’][n]['price’] | float | Price option price. |
[data]['bookingData’]['productPrices’][n]['pax’] | integer | Number of paxs the price represents. |
[data]['bookingData’]['productPrices’][n]['minQuantity’] | integer | The minumum quantity that can be booked. Default = 1 |
[data]['bookingData’]['productPrices’][n]['maxQuantity’] | integer | The maximun quantity that can be booked. Default = NULL If Null then the max limit is the availability. |
[data]['bookingData’]['productPrices’][n]['group’] | boolean | If the option is for a group this will be true. Option price represents the total for the product. Default = false. |
[data]['bookingData’]['productPrices’][n]['commission’] | float | Commission on price - this is not a true representation of the commission for the product. You negiotated rates takes priority. |
[data]['bookingData’]['productPrices’][n]['levy’] | float | Any additional levy - not a true reflection. Use internally. |
[data]['bookingData’]['productPrices’][n]['curreny’] | string | The currency name used for payment. |
[data]['bookingData’]['productExtras’] | array | Any product extras. - subject to change |
[data]['bookingData’]['productExtras’][n]['id’] | interger | The extra ID. |
[data]['bookingData’]['productExtras’][n]['label’] | string | The extra label. |
[data]['bookingData’]['productExtras’][n]['pax’] | integer | The pax quantity each extra represents. |
[data]['bookingData’]['productPickUps’][n]['price’] | float | The extra price. |
[data]['bookingData’]['productPickUps’] | array | Any product pick up information. |
[data]['bookingData’]['productPickUps’][n]['id’] | interger | The pickup ID. |
[data]['bookingData’]['productPickUps’][n]['label’] | string | The pickup label. |
[data]['bookingData’]['productPickUps’][n]['pax’] | integer | The pax quantity each pick up represents. |
[data]['bookingData’]['productPickUps’][n]['price’] | float | The pickup price. |
[data]['bookingData’]['bookingFields’] | array | Required supplier booking data. |
[data]['bookingData’]['bookingFields’]['perBooking’] | array | Required supplier booking data for entire booking. |
[data]['bookingData’]['bookingFields’]['perBooking’][n]['label’] | string | Input from label. |
[data]['bookingData’]['bookingFields’]['perBooking’][n]['require’] | boolean | Is it required. |
[data]['bookingData’]['bookingFields’]['perBooking’][n]['type’] | string | Input field type. |
[data]['bookingData’]['bookingFields’]['perBooking’][n]['list’] | string | Used if there is list data for the input select. |
[data]['bookingData’]['bookingFields’]['perParticipant’] | array | Required supplier booking data for each participant booking a ticket. |
[data]['bookingData’]['bookingFields’]['perParticipant’][n]['label’] | string | Input from label. |
[data]['bookingData’]['bookingFields’]['perParticipant’][n]['require’] | boolean | Is it required. |
[data]['bookingData’]['bookingFields’]['perParticipant’][n]['type’] | string | Input field type. |
[data]['bookingData’]['bookingFields’]['perParticipant’][n]['list’] | string | Used if there is list data for the input select. |
[data]['bookingData’]['paymentMethods’] | array | The payment method your agent account is set up with the supplier. |
[data]['bookingData’]['paymentMethods’][n]['id’] | string | The payment method ID which is represented via a string. |
[data]['bookingData’]['paymentMethods’][n]['detail’] | string | A description of the payment method. |
[data]['bookingData’]['paymentMethods’][n]['default’] | boolean | The payment method which the supplier has set as default for your agent’s account. |
Availability
There are now two calls that can be used to get product availability
Get Product Availability and Pricing Details
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/booking/availability/614/578?id=RZ:578&startDate=10-08-2018&endDate=30-08-2018",
"method": "POST",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/booking/availability/614/578?id=RZ:578&startDate=10-08-2018&endDate=30-08-2018",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => array(
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/booking/availability/614/578"
querystring = {"id":"RZ:578","startDate":"10-08-2018","endDate":"30-08-2018"}
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxxxxxxxxx",
'Cache-Control': "no-cache"
}
response = requests.request("POST", url, headers=headers, params=querystring)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control": "no-cache"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/booking/availability/614/578?id=RZ:578&startDate=10-08-2018&endDate=30-08-2018")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"data": {
"bookingPlatform": "Respax",
"bookingPlatformNickname": "respax",
"bookingPlatformMapping": "operatorPreferred",
"bookingData": {
"bookingCode": {
"id": "RP:1654:3775:1777"
}
},
"availabilityStartDate": "2019-04-25T01:00:00+00:00",
"availabilityEndDate": "2019-04-28T23:00:00+00:00",
"productAvailability": [
{
"bookingDateDisplay": "27-04-2019 00:00:00",
"bookingDate": "27-04-2019",
"availability": 10,
"additionalAvailable": true,
"price": [
{
"id": "43451",
"label": "Adult",
"price": 45,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
},
{
"id": "43461",
"label": "Child (Dome Entry 4-14 Yrs, Zoom Activities 6-14 Yrs)",
"price": 28.5,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
}
]
},
{
"bookingDateDisplay": "26-04-2019 00:00:00",
"bookingDate": "26-04-2019",
"availability": 10,
"additionalAvailable": true,
"price": [
{
"id": "43451",
"label": "Adult",
"price": 45,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
},
{
"id": "43461",
"label": "Child (Dome Entry 4-14 Yrs, Zoom Activities 6-14 Yrs)",
"price": 28.5,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
}
]
},
{
"bookingDateDisplay": "29-04-2019 00:00:00",
"bookingDate": "29-04-2019",
"availability": 10,
"additionalAvailable": true,
"price": [
{
"id": "43451",
"label": "Adult",
"price": 45,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
},
{
"id": "43461",
"label": "Child (Dome Entry 4-14 Yrs, Zoom Activities 6-14 Yrs)",
"price": 28.5,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
}
]
},
{
"bookingDateDisplay": "28-04-2019 00:00:00",
"bookingDate": "28-04-2019",
"availability": 10,
"additionalAvailable": true,
"price": [
{
"id": "43451",
"label": "Adult",
"price": 45,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
},
{
"id": "43461",
"label": "Child (Dome Entry 4-14 Yrs, Zoom Activities 6-14 Yrs)",
"price": 28.5,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
}
]
},
{
"bookingDateDisplay": "25-04-2019 00:00:00",
"bookingDate": "25-04-2019",
"availability": 10,
"additionalAvailable": true,
"price": [
{
"id": "43451",
"label": "Adult",
"price": 45,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
},
{
"id": "43461",
"label": "Child (Dome Entry 4-14 Yrs, Zoom Activities 6-14 Yrs)",
"price": 28.5,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
}
]
}
],
"productAvailabilityCount": 5,
"cacheTime": "24",
"success": true
},
"queryTime": "2063.53ms"
}
This endpoint retrieves the availability and prices for each of the dates.
HTTP Request
GET https://apis.narnoo.com/api/v1/booking/availability/{operator_id}/{booking_id}?id={bookingCode}&startDate=<d-m-Y>&endDate=<d-m-Y>
Query Parameters
Parameter | Required | Description |
---|---|---|
{operator_id} | true | We need to pass the operator’s Narnoo ID |
{booking_id} | true | We need to pass the operator’s Narnoo booking ID |
{bookingCode} | true | Passed in the id parameter. This bookingCode is found in earlier calls and is the combination of bookingCode and productTimes ( if productTimes exists ). |
startDate | true | The first day we want to check availability for - Date format ( d-M-Y ) |
endDate | true | The last day we want to check availability for - Date format ( d-M-Y ) |
Response Parameters
Parameter | Type | Description |
---|---|---|
[success] | boolean | Was the call successful. |
[data] | array | The availability information. |
[data][‘bookingPlatform’] | string | The name of the booking platform used for this product. |
[data]['bookingPlatformNickname’] | string | The nickname of the booking platform used for this product. |
[data]['bookingPlatformMapping’] | string | Either operator perferred or distributor nominated. |
[data]['bookingData’] | array | The basic booking data information. |
[data]['bookingData’][bookingCode][id] | string | The string used to call the booking data. |
[data]['availabilityStartDate’] | date time | The date time used to start the date search. |
[data]['availabilityEndDate’] | date time | The date time used to end the date range search. |
[data][productAvailability] | array | The data for the product search. |
[data][productAvailability][n][bookingDateDisplay] | date time | This is a standardised date time which can be outputed to screen. |
[data][productAvailability][n][bookingDate] | mixed | This needs to be sent over to the reservation write when creating a booking. It can contain a date time or integers. This follows guidelines of each reservation system. |
[data][productAvailability][n][price] | array | Data containing the pricing for the dates. |
[data][productAvailability][n][price][n]['id’] | integer | Price ID. |
[data][productAvailability][n][price][n]['label’] | string | Price option label. |
[data][productAvailability][n][price][n]['price’] | float | Price option price. |
[data][productAvailability][n][price][n]['pax’] | integer | Number of paxs the price represents. |
[data][productAvailability][n][price][n]['minQuantity’] | integer | The minumum quantity that can be booked. Default = 1 |
[data][productAvailability][n][price][n]['maxQuantity’] | integer | The maximun quantity that can be booked. Default = NULL If Null then the max limit is the availability. |
[data][productAvailability][n][price][n]['group’] | boolean | If the option is for a group this will be true. Option price represents the total for the product. Default = false. |
[data][productAvailability][n][price][n]['commission’] | float | Commission on price - this is not a true representation of the commission for the product. You negiotated rates takes priority. |
[data][productAvailability][n][price][n]['levy’] | float | Any additional levy - not a true reflection. Use internally. |
[data][productAvailability][n][price][n]['curreny’] | string | The currency name used for payment. |
Get Multiple Product Availability and Pricing Details
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/booking/multi_availability",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Authorization": "bearer xxxxxxxxxxxxxxxxxxx",
"Accept": "*/*",
"Cache-Control": "no-cache",
"Host": "apis.narnoo.com",
"accept-encoding": "gzip, deflate",
"content-length": "163",
"Connection": "keep-alive",
"cache-control": "no-cache"
},
"processData": false,
"data": "{\"products\":[{\"operatorId\":93,\"productId\":624,\"bookingCode\":\"RP:95:121:137\",\"startDate\":\"20-06-2019\",\"endDate\":\"23-06-2019\"}]}"
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/booking/multi_availability",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"products\":[{\"operatorId\":93,\"productId\":624,\"bookingCode\":\"RP:95:121:137\",\"startDate\":\"20-06-2019\",\"endDate\":\"23-06-2019\"}]}",
CURLOPT_HTTPHEADER => array(
"Accept: */*",
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache",
"Connection: keep-alive",
"Content-Type: application/json",
"Host: apis.narnoo.com",
"accept-encoding: gzip, deflate",
"cache-control: no-cache",
"content-length: 163"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/booking/multi_availability"
payload = "{\"products\":[{\"operatorId\":93,\"productId\":624,\"bookingCode\":\"RP:95:121:137\",\"startDate\":\"20-06-2019\",\"endDate\":\"23-06-2019\"}]}"
headers = {
'Content-Type': "application/json",
'Authorization': "bearer xxxxxxxxxxxxxxxxxxxxxxxxxx",
'Accept': "*/*",
'Cache-Control': "no-cache",
'Host': "apis.narnoo.com",
'accept-encoding': "gzip, deflate",
'content-length': "163",
'Connection': "keep-alive",
'cache-control': "no-cache"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
import Foundation
let headers = [
"Content-Type": "application/json",
"Authorization": "bearer xxxxxxxxxxxxxxxxxx",
"User-Agent": "PostmanRuntime/7.13.0",
"Accept": "*/*",
"Cache-Control": "no-cache",
"Host": "apis.narnoo.com",
"accept-encoding": "gzip, deflate",
"content-length": "163",
"Connection": "keep-alive",
"cache-control": "no-cache"
]
let parameters = [
"products": [
[
"operatorId": 93,
"productId": 624,
"bookingCode": "RP:95:121:137",
"startDate": "20-06-2019",
"endDate": "23-06-2019"
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/booking/multi_availability")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"data": [
{
"operatorId": 93,
"productId": "624",
"bookingCode": "RP:95:121:137",
"bookingPlatform": "respax",
"isLive": true,
"availabilityStartDate": "2019-06-20T01:00:00+00:00",
"availabilityEndDate": "2019-06-23T23:00:00+00:00",
"productAvailability": [
{
"bookingDateDisplay": "20-06-2019 13:15:00",
"bookingDate": "20-06-2019",
"availability": 10,
"additionalAvailable": true,
"price": [
{
"id": "43245",
"label": "Adult",
"price": 135,
"pax": 1,
"commission": 25,
"levy": 0,
"currency": "AUD"
},
{
"id": "43246",
"label": "Child",
"price": 105,
"pax": 1,
"commission": 25,
"levy": 0,
"currency": "AUD"
},
{
"id": "43247",
"label": "Infant",
"price": 0,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
}
]
},
{
"bookingDateDisplay": "21-06-2019 13:15:00",
"bookingDate": "21-06-2019",
"availability": 10,
"additionalAvailable": true,
"price": [
{
"id": "43245",
"label": "Adult",
"price": 135,
"pax": 1,
"commission": 25,
"levy": 0,
"currency": "AUD"
},
{
"id": "43246",
"label": "Child",
"price": 105,
"pax": 1,
"commission": 25,
"levy": 0,
"currency": "AUD"
},
{
"id": "43247",
"label": "Infant",
"price": 0,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
}
]
},
{
"bookingDateDisplay": "22-06-2019 13:15:00",
"bookingDate": "22-06-2019",
"availability": 10,
"additionalAvailable": true,
"price": [
{
"id": "43245",
"label": "Adult",
"price": 135,
"pax": 1,
"commission": 25,
"levy": 0,
"currency": "AUD"
},
{
"id": "43246",
"label": "Child",
"price": 105,
"pax": 1,
"commission": 25,
"levy": 0,
"currency": "AUD"
},
{
"id": "43247",
"label": "Infant",
"price": 0,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
}
]
},
{
"bookingDateDisplay": "23-06-2019 13:15:00",
"bookingDate": "23-06-2019",
"availability": 10,
"additionalAvailable": true,
"price": [
{
"id": "43245",
"label": "Adult",
"price": 135,
"pax": 1,
"commission": 25,
"levy": 0,
"currency": "AUD"
},
{
"id": "43246",
"label": "Child",
"price": 105,
"pax": 1,
"commission": 25,
"levy": 0,
"currency": "AUD"
},
{
"id": "43247",
"label": "Infant",
"price": 0,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
}
]
},
{
"bookingDateDisplay": "24-06-2019 13:15:00",
"bookingDate": "24-06-2019",
"availability": 10,
"additionalAvailable": true,
"price": [
{
"id": "43245",
"label": "Adult",
"price": 135,
"pax": 1,
"commission": 25,
"levy": 0,
"currency": "AUD"
},
{
"id": "43246",
"label": "Child",
"price": 105,
"pax": 1,
"commission": 25,
"levy": 0,
"currency": "AUD"
},
{
"id": "43247",
"label": "Infant",
"price": 0,
"pax": 1,
"commission": 0,
"levy": 0,
"currency": "AUD"
}
]
}
]
}
],
"productAvailabilityCount": 1,
"cacheTime": "24",
"queryTime": "2055.16ms"
}
This endpoint retrieves the availability and prices for each of the dates and products requested.
HTTP Request
POST https://apis.narnoo.com/api/v1/booking/multi_availability
JSON BODY
Parameter | Required | Description |
---|---|---|
[products][n][operatorId] | true | We need to pass the operator’s Narnoo ID |
[products][n][bookingId] | true | We need to pass the operator’s Narnoo booking ID |
[products][n][bookingCode] | true | Passed in the id parameter. This bookingCode is found in earlier calls and is the combination of bookingCode and productTimes ( if productTimes exists ). |
[products][n][startDate] | true | The first day we want to check availability for - Date format ( d-M-Y ) |
[products][n][endDate] | true | The last day we want to check availability for - Date format ( d-M-Y ) |
Response Parameters
Parameter | Type | Description |
---|---|---|
[success] | boolean | Was the call successful. |
[data] | array | The availability information. |
[data][n]['operatorId’] | integer | The requested operator’s Narnoo ID. |
[data][n]['productId’] | integer | The requested operator’s Narnoo product ID. |
[data][n]['bookingPlatform’] | string | The name of the booking platform used for this product. |
[data][n]['isLive’] | boolean | Is this product live - used for wholesaler systems |
[data][n][bookingCode] | string | The string used to call the booking data. |
[data][n]['availabilityStartDate’] | date time | The date time used to start the date search. |
[data][n]['availabilityEndDate’] | date time | The date time used to end the date range search. |
[data][n][productAvailability] | array | The data for the product search. |
[data][n][productAvailability][n][bookingDateDisplay] | date time | This is a standardised date time which can be outputed to screen. |
[data][n][productAvailability][n][bookingDate] | mixed | This needs to be sent over to the reservation write when creating a booking. It can contain a date time or integers. This follows guidelines of each reservation system. |
[data][n][productAvailability][n][price] | array | Data containing the pricing for the dates. |
[data][n][productAvailability][n][price][n]['id’] | integer | Price ID. |
[data][n][productAvailability][n][price][n]['label’] | string | Price option label. |
[data][n][productAvailability][n][price][n]['price’] | float | Price option price. |
[data][n][productAvailability][n][price][n]['pax’] | integer | Number of paxs the price represents. |
[data][n][productAvailability][n][price][n]['commission’] | float | Commission on price - this is not a true representation of the commission for the product. You negiotated rates takes priority. |
[data][n][productAvailability][n][price][n]['levy’] | float | Any additional levy - not a true reflection. Use internally. |
[data][n][productAvailability][n][price][n]['curreny’] | string | The currency name used for payment. |
Reservation
The reservation endpoint performs all the live reservation tasks. This endpoint submits reservation details to the nominated products reservation system.
Create Reservation
This is the main endpoint to create a reservation for the nominated products.
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/booking/create",
"method": "POST",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Cache-Control": "no-cache"
},
"data": "{\"contact\":{\"firstName\":\"Jon”,”lastName”:”Doe”,”email”:”jon.doe@gmail.com\",\"phone”:”123457890\",\"country\":\"Australia\"},\"payment\":{\"type\":\"CREDITCARD\",\"currency\":\"AUD\"},\"products\":[{\"productId\":578,\"bookingCode\":\"RZ:578\",\"bookingDate\":\"2018-07-25 09:00:00\",\"paymentMethod\":\"FULL_AGENT\",\"option\":[{\"id\":\"11801\",\"label\":\"Bronze Ticket\",\"quantity\":2,\"price\":20}],\"pickUp\":{\"id\":\"To Be Advised\"},\"participants\":[[{\"label\":\"First Name\",\"value\":\"Jon”},{“label\":\"Last Name\",\"value”:”Doe”},{“label\":\"Country\",\"value\":\"Australia\"}],[{\"label\":\"First Name\",\"value”:”Jane”},{“label\":\"Last Name\",\"value”:”Doe”},{“label\":\"Country\",\"value\":\"Australia\"}]],\"bookingForm\":[{\"label\":\"Special Requirements\",\"value\":\"None\"},{\"label\":\"Mobile\",\"value\":\"0412194550\"}]}]}"
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/booking/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"contact\":{\"firstName\":\"Jon”,”lastName”:”Doe”,”email”:”jon.doe@gmail.com\",\"phone”:”123457890\",\"country\":\"Australia\"},\"payment\":{\"type\":\"CREDITCARD\",\"currency\":\"AUD\"},\"products\":[{\"productId\":578,\"bookingCode\":\"RZ:578\",\"bookingDate\":\"2018-07-25 09:00:00\",\"paymentMethod\":\"FULL_AGENT\",\"option\":[{\"id\":\"11801\",\"label\":\"Bronze Ticket\",\"quantity\":2,\"price\":20}],\"pickUp\":{\"id\":\"To Be Advised\"},\"participants\":[[{\"label\":\"First Name\",\"value\":\"Jon”},{“label\":\"Last Name\",\"value”:”Doe”},{“label\":\"Country\",\"value\":\"Australia\"}],[{\"label\":\"First Name\",\"value”:”Jane”},{“label\":\"Last Name\",\"value”:”Doe”},{“label\":\"Country\",\"value\":\"Australia\"}]],\"bookingForm\":[{\"label\":\"Special Requirements\",\"value\":\"None\"},{\"label\":\"Mobile\",\"value\":\"0412194550\"}]}]}",
CURLOPT_HTTPHEADER => array(
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache",
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/booking/create"
payload = "{\"contact\":{\"firstName\":\"Jon”,”lastName”:”Doe”,”email”:”jon.doe@gmail.com\",\"phone”:”123457890\",\"country\":\"Australia\"},\"payment\":{\"type\":\"CREDITCARD\",\"currency\":\"AUD\"},\"products\":[{\"productId\":578,\"bookingCode\":\"RZ:578\",\"bookingDate\":\"2018-07-25 09:00:00\",\"paymentMethod\":\"FULL_AGENT\",\"option\":[{\"id\":\"11801\",\"label\":\"Bronze Ticket\",\"quantity\":2,\"price\":20,\"group\":false}],\"pickUp\":{\"id\":\"To Be Advised\"},\"participants\":[[{\"label\":\"First Name\",\"value\":\"Jon”},{“label\":\"Last Name\",\"value”:”Doe”},{“label\":\"Country\",\"value\":\"Australia\"}],[{\"label\":\"First Name\",\"value”:”Jane”},{“label\":\"Last Name\",\"value”:”Doe”},{“label\":\"Country\",\"value\":\"Australia\"}]],\"bookingForm\":[{\"label\":\"Special Requirements\",\"value\":\"None\"},{\"label\":\"Mobile\",\"value\":\"0412194550\"}]}]}"
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
'Content-Type': "application/json",
'Cache-Control': "no-cache"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Cache-Control": "no-cache"
]
let postData = NSData(data: "{"contact":{"firstName":"Jon”,”lastName”:”Doe”,”email”:”jon.doe@gmail.com","phone”:”123457890","country":"Australia"},"payment":{"type":"CREDITCARD","currency":"AUD"},"products":[{"productId":578,"bookingCode":"RZ:578","bookingDate":"2018-07-25 09:00:00","paymentMethod":"FULL_AGENT","option":[{"id":"11801","label":"Bronze Ticket","quantity":2,"price":20}],"pickUp":{"id":"To Be Advised"},"participants":[[{"label":"First Name","value":"Jon”},{“label":"Last Name","value”:”Doe”},{“label":"Country","value":"Australia"}],[{"label":"First Name","value”:”Jane”},{“label":"Last Name","value”:”Doe”},{“label":"Country","value":"Australia"}]],"bookingForm":[{"label":"Special Requirements","value":"None"},{"label":"Mobile","value":"0412194550"}]}]}".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/booking/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"data": {
"request": {
"booking": [
{
"reservationProvider": "Rezdy",
"confirmed": true,
"reservationCode": "DU000103",
"productId": 578,
"productBookingCode": "RZ:578",
"bookingDate": "2018-07-26 09:00:00",
"reservationProductName": null,
"reservationPaymentOption": "FULL_AGENT"
}
],
"success": true,
"bookingCount": 1,
"queryTime": "2674.86ms"
}
},
"queryTime": "3050.35ms"
}
HTTP Request
POST https://apis.narnoo.com/api/v1/booking/create
Query Parameters
Parameter | Required | Description |
---|---|---|
[contact] | true | Booking contact information. |
[contact][‘firstName’] | true | A booking contact first name. |
[contact]['lastName’] | true | A booking contact last name. |
[contact]['email’] | true | A booking contact email. |
[contact]['phone’] | true | A booking contact phone number. |
[contact]['country’] | true | A booking contact country name. Full name ie. Australia |
[payment] | true | Booking payment type. |
[payment]['type’] | true | Payment method - at this stage creditCard is the only method used. |
[payment]['currency’] | true | Which currency was used to charge the credit card. |
[reference] | false | Your voucher or reference ID which can be passed over to the booking. |
[reference]['id’] | false | You voucher or refernce id. |
[products] | true | Each bookable product information to be booked. |
[products][n]['productId’] | true | The product booking id. |
[products][n]['bookingCode’] | true | The product booking code used to return bookable data. |
[products][n]['bookingDate’] | true | The booking date - found in the availability call. |
[products][n]['paymentMethod’] | true | The product payment method - at this stage it is always 'FULL_AGENT’. Meaning agent takes full payment for the product booking. |
[products][n]['option’][n]['id’] | true | The payment option ID. |
[products][n]['option’][n]['label’] | true | The payment option label. |
[products][n]['option’][n]['quantity’] | true | The payment option quantity. |
[products][n]['option’][n]['price’] | true | The payment option price. |
[products][n]['option’][n]['group’] | false | Is this option for a group. |
[products][n]['extra’] | false | Product extras - this information is being updated based on reservation system access. |
[products][n]['extra’][n]['id’] | true | Product extra id - found from product bookable data. |
[products][n]['extra’][n]['label’] | true | Product extra label - found from product bookable data. |
[products][n]['extra’][n]['quantity’] | true | The extra quantity - charged per pack number or per booking - found from product bookable data. |
[products][n]['extra’][n]['price’] | true | The extra price - price of extra which is a mulitplier of the quantity. |
[products][n]['extra’][n]['type’] | true | The extra type - this determines the type and price of the extra - more details |
[products][n]['pickUp’] | false | Pick up is required if the pickUp data in product booking data is not NULL. If pickUp data is included in the reservation call then all pickUp data is required. |
[products][n]['pickUp’]['id’] | true | The pick up id - found from product bookable data. |
[products][n]['pickUp’]['label’] | true | The pick up label - found from product bookable data. |
[products][n]['pickUp’]['quantity’] | true | The pick up quantity - charged per pack number or per booking - found from product bookable data. |
[products][n]['pickUp’]['price’] | true | The pick up price - price of pick up which is a mulitplier of the quantity. |
[products][n]['participants’] | true | Product booking participant details. |
[products][n]['participants’][n]['label’] | true | Participant label - found from product bookable data. |
[products][n]['participants’][n]['value’] | true | Participant value - The value for that entry. |
[products][n]['bookingForm’] | true | Product booking data - this is information required by the supplier for a booking. |
[products][n]['bookingForm’][n]['label’] | true | Booking form label - found from product bookable data. |
[products][n]['bookingForm’][n]['value’] | true | Booking form value - The value for that entry. |
There are three different extra types, with each effecting the total cart price differently.
totalPaxs This extra is assigned to all the participants. A checkbox is the appropriate method for the UI. To calculate the price the formula is ( total.quantity * extra.price ). When sending to the API we require a quantity of 1 and the extra.type = totalPaxs.
perPax This extra is selectable per participant. An select option is the appropriate method for this UI. To calculate the price the formula is ( extra.quantity * extra.price). When sending to the API we require the quantity of the extra and the extra.type = perPax.
perOrder This extra is assigned once to the total product order. A checkbox is the appropriate method for the UI. To calculate the price the formula is ( 1 * extra.price). When sending to the API we require a quantity of 1 and the extra.type = perOrder.
Sample Response
{
"success": true,
"uniqueId": "G4rccI1MWdQkx1F",
"data": {
"request": {
"booking": [
{
"confirmed": true,
"bookingDate": "2018-07-30T07:30:00+1000",
"productBookingCode": "FH:580",
"reservationCode": "82848811-1e2d-4e5d-8e3f-dd50a662551f",
"productId": 580,
"reservationProductName": null,
"reservationPaymentOption": "FULL_AGENT",
"reservationProvider": "Fareharbor"
}
],
"success": true,
"bookingCount": 1,
"queryTime": "5686.69ms"
}
},
"queryTime": "6083.44ms"
}
The response returns the confirmation for each product booked and the booking code created by the reservation system. This is sometimes referred to as the voucher code. A unique ID is returned which you will be able to search for orders created via your Narnoo admin console.
Parameter | Type | Description |
---|---|---|
[success] | Boolean | Was the call successful. |
[uniqueId] | String | Unique ID generated via Narnoo. |
[data]['request’]['booking’][n][confirmed] | Boolean | Was the product successfull booked. |
[data]['request’]['booking’][n][bookingDate] | Date Time | Booking date for the product. |
[data]['request’]['booking’][n][productBookingCode] | string | The Narnoo booking code for the product. |
[data]['request’]['booking’][n][reservationCode] | string | The voucher number for the booking based on it’s reservation system. |
[data]['request’]['booking’][n][productId] | Integer | The booking id used by Narnoo to call bookable data. |
[data]['request’]['booking’][n][reservationProductName] | String | Product name - can be sent via the reservation system if it exists. |
[data]['request’]['booking’][n][reservationPaymentOption] | String | Payment option - currently FULL_AGENT is the only payment option. |
[data]['request’]['booking’][n][reservationProvider] | String | Which resevation provider was used to book this product. |
Error Response
Working hard to update the error response details. The testing endpoints checks the various reservation “check” or “quote” methods. If there are errors with the booking it will be present in the endpoint. We will be adding some different examples here in the next few days.
Report
These endpoints will allow you to see orders both in test and live modes. In test mode you can see the order raw data for testing and debugging purposes.
Order details are processed in the background once an order has been received. There can be a delay of up to a minute for the order to appear in the orders list
Get bookings list
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/report/agent_booking_list/",
"method": "GET",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxx"
"Accept": "*/*",
"Cache-Control": "no-cache",
"Host": "apis.narnoo.com",
"accept-encoding": "gzip, deflate",
"Connection": "keep-alive",
"cache-control": "no-cache"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/report/agent_booking_list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => array(
"Accept: */*",
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache",
"Connection: keep-alive",
"Host: apis.narnoo.com",
"accept-encoding: gzip, deflate",
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/report/agent_booking_list"
payload = ""
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxxxx",
'Accept': "*/*",
'Cache-Control': "no-cache",
'accept-encoding': "gzip, deflate",
'Connection': "keep-alive",
'cache-control': "no-cache"
}
response = requests.request("GET", url, data=payload, headers=headers)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxxx",
"Accept": "*/*",
"Cache-Control": "no-cache",
"Host": "apis.narnoo.com",
"accept-encoding": "gzip, deflate",
"Connection": "keep-alive",
"cache-control": "no-cache"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/report/agent_booking_list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"data": {
"count": 2,
"currentPage": 1,
"totalPages": 1,
"responseLimit": 50,
"orders": [
{
"dateCreated": "2019-05-02 10:05:02",
"type": "test",
"status": "complete",
"orderId": "AzO70OzCWvV14UZ",
"orderTotal": "135.00",
"orderDate": "2019-05-02 10:04:43",
"customerFirstName": "Jon",
"customerLastName": "Doe",
"customerEmail": "jon@gmail.com"
},
{
"dateCreated": "2019-05-01 16:26:02",
"type": "test",
"status": "complete",
"orderId": "B5xJp2aWYfnz9Jd",
"orderTotal": "135.00",
"orderDate": "2019-05-01 16:25:50",
"customerFirstName": "Jane",
"customerLastName": "Doe",
"customerEmail": "jane@gmail.com"
}
]
},
"queryTime": "367.99ms"
}
This endpoint retrieves the list of orders for the agent.
HTTP Request
GET https://apis.narnoo.com/api/v1/report/agent_booking_list/{order_type}
Query Parameters
{order_type} - is optional and can either be live or test. By defualt it will always return ‘live’ bookings. But for your testing purposes you can pass 'test’ as the order_type and then return test bookings done via our testing endpoint.
Parameter | Required | Description |
---|---|---|
page | false | paging |
total | false | total number of responses request |
Response Parameters
Parameter | Type | Description |
---|---|---|
[success] | boolean | Was the call successful. |
[count] | integer | Total number of orders. |
[currentPage] | integer | The page of results. |
[totalPages] | integer | The total number of pages available. |
[responseLimit] | integer | The total number or results per call. |
[data] | array | order information. |
[data][n]['dateCreated’] | datetime | Date or record creation. |
[data][n]['type’] | string | Type of order - live or test. |
[data][n]['status’] | string | Status of the order. |
[data][n]['orderId’] | string | A unique ID for the order. |
[data][n]['orderTotal’] | decimal | Total cost of the order. |
[data][n]['orderDate’] | datetime | Date order was created. |
[data][n]['customerFirstName’] | string | Booking contact first name. |
[data][n]['customerLastName’] | string | Booking contact last name. |
[data][n]['customerEmail’] | string | Customer email address. |
Get bookings details
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/report/agent_booking_details/AzO70OzCWvV14UZ",
"method": "GET",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxx",
"Accept": "*/*",
"Cache-Control": "no-cache",
"Host": "apis.narnoo.com",
"accept-encoding": "gzip, deflate",
"Connection": "keep-alive",
"cache-control": "no-cache"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/report/agent_booking_details/AzO70OzCWvV14UZ",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => array(
"Accept: */*",
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache",
"Connection: keep-alive",
"Host: apis.narnoo.com",
"accept-encoding: gzip, deflate",
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/report/agent_booking_details/AzO70OzCWvV14UZ"
payload = ""
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxxxxx",
'Accept': "*/*",
'Cache-Control': "no-cache",
'Host': "apis.narnoo.com",
'accept-encoding': "gzip, deflate",
'Connection': "keep-alive",
'cache-control': "no-cache"
}
response = requests.request("GET", url, data=payload, headers=headers)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxx",
"Accept": "*/*",
"Cache-Control": "no-cache",
"Host": "apis.narnoo.com",
"accept-encoding": "gzip, deflate",
"Connection": "keep-alive",
"cache-control": "no-cache"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/report/agent_booking_details/AzO70OzCWvV14UZ")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"data": {
"type": "test",
"status": "complete",
"orderId": "AzO70OzCWvV14UZ",
"dateCreated": "2019-05-02 10:04:43",
"orderTotal": "135.00",
"firstName": "Jon",
"lastName": "Doe",
"email": "jon@gmail.com",
"bookingData": {
"contact": {
"firstName": "Jon",
"lastName": "Doe",
"email": "jon@gmail.com",
"phone": "+61234394585",
"country": "Australia"
},
"product": [
{
"confirmed": true,
"reservationCode": 356324,
"bookingDate": "14-05-2019",
"productBookingCode": "RP:3:2:139",
"bookingId": 497,
"reservationPaymentOption": "full-agent",
"reservationProvider": "Respax",
"operatorDetails": {
"id": "93",
"business": "Supplier Name",
"contact": "Supplier Contact",
"phone": "Supplier phone",
"email": "Supplier email",
"url": "Supplier URL"
},
"productName": "Morning 09:15 Horse Riding",
"productId": "386382934",
"option": [
{
"label": "Adult",
"quantity": 1,
"price": 135
}
],
"participants": [
[
{
"label": "First Name",
"value": "Jon"
},
{
"label": "Last Name",
"value": "Doe"
},
{
"label": "Country",
"value": "Australia"
}
]
]
}
]
},
"reservationData": {
"contact": {
"firstName": "Jon",
"lastName": "Doe",
"email": "jon@gmail.com",
"phone": "+611234323",
"country": "Australia"
},
"booking": [
{
"confirmed": true,
"reservationCode": 356324,
"bookingDate": "14-05-2019",
"productBookingCode": "RP:3:2:139",
"productId": 497,
"reservationProductName": null,
"reservationPaymentOption": "full-agent",
"reservationProvider": "Respax"
}
],
"bookingCount": 1,
"reservationQueryTime": "1024.17ms",
"success": true,
"timestamp": "2019-05-02T11:04:42+11:00",
"cacheTime": null
},
"orderData": {
"contact": {
"firstName": "Jon",
"lastName": "Doe",
"email": "jon@gmail.com",
"phone": "+6112312312",
"country": "Australia"
},
"payment": {
"type": "CREDITCARD",
"currency": "AUD"
},
"products": [
{
"productId": 497,
"bookingCode": "RP:3:2:139",
"bookingDate": "14-05-2019",
"paymentMethod": "FULL_AGENT",
"option": [
{
"id": "43245",
"label": "Adult",
"quantity": 1,
"price": 135
}
],
"pickUp": null,
"participants": [
[
{
"label": "First Name",
"value": "Jon"
},
{
"label": "Last Name",
"value": "Doe"
},
{
"label": "Country",
"value": "Australia"
}
]
],
"bookingForm": [
{
"label": "First Name",
"value": "Jon"
},
{
"label": "Last Name",
"value": "Doe"
},
{
"label": "Phone/Mobile",
"value": "+61231203o4"
},
{
"label": "Email",
"value": "jon@gmail.com"
},
{
"label": "State",
"value": "QLD"
},
{
"label": "Postcode/Zip",
"value": "4878"
},
{
"label": "Country",
"value": "Australia"
},
{
"label": "I agree to the terms and conditions of travel",
"value": "on"
}
]
}
]
},
"paymentData": null,
"failureData": null
},
"queryTime": "658.42ms"
}
This endpoint retrieves the details of the order.
This endpoint also returns the raw data for both the reservation and order requests.
HTTP Request
GET https://apis.narnoo.com/api/v1/report/agent_booking_details/{order_id}
Query Parameters
{order_id} - required
Response Parameters
Parameter | Type | Not Null | Description |
---|---|---|---|
[success] | boolean | True | Was the call successful. |
[data] | array | True | order information. |
[data]['type’] | string | True | Type of order - live or test. |
[data]['status’] | string | True | Status of the order. |
[data]['orderId’] | string | True | A unique ID for the order. |
[data]['orderDate’] | datetime | True | Date of record creation. |
[data]['orderTotal’] | decimal | True | Total cost of the order. |
[data]['customerFirstName’] | string | True | Booking contact first name. |
[data]['customerLastName’] | string | True | Booking contact last name. |
[data]['customerEmail’] | string | True | Customer email address. |
[data]['bookingData’] | array | False | order detailed information. |
[data]['bookingData’]['contact’] | array | True | Booking contact information. |
[data]['bookingData’]['contact’]['firstName’] | string | True | Booking contact first name. |
[data]['bookingData’]['contact’]['lastName’] | string | True | Booking contact last name. |
[data]['bookingData’]['contact’]['email’] | string | True | Customer email address. |
[data]['bookingData’]['contact’]['phone’] | string | True | Customer phone. |
[data]['bookingData’]['contact’]['country’] | string | True | Customer country. |
[data]['bookingData’]['product’] | array | True | Order product details. |
[data]['bookingData’]['product’][n]['confirmed’] | boolean | True | Product Order confirmation. |
[data]['bookingData’]['product’][n]['reservationCode’] | string | True | Product reservation/voucher code. |
[data]['bookingData’]['product’][n]['bookingDate’] | array | True | Product booking date. |
[data]['bookingData’]['product’][n]['productBookingCode’] | string | True | Product booking ID reference. |
[data]['bookingData’]['product’][n]['bookingId’] | array | True | Narnoo booking ID reference. |
[data]['bookingData’]['product’][n]['reservationPaymentOption’] | string | True | Platform payment option. |
[data]['bookingData’]['product’][n]['reservationProvider’] | string | True | Reservation platform. |
[data]['bookingData’]['product’][n]['operatorDetails’] | array | True | Product owner’s Information. |
[data]['bookingData’]['product’][n]['operatorDetails’]['id’] | integer | True | Product operator ID. |
[data]['bookingData’]['product’][n]['operatorDetails’]['business’] | string | True | Operator’s name. |
[data]['bookingData’]['product’][n]['operatorDetails’]['contact’] | string | True | Operator’s contact person. |
[data]['bookingData’]['product’][n]['operatorDetails’]['phone’] | array | True | Operator’s contact phone. |
[data]['bookingData’]['product’][n]['operatorDetails’]['email’] | string | True | Operator’s contact email. |
[data]['bookingData’]['product’][n]['operatorDetails’]['url’] | string | True | Operator’s contact url. |
[data]['bookingData’]['product’][n]['productName’] | string | True | Product Name. |
[data]['bookingData’]['product’][n]['productId’] | array | True | Narnoo product ID - returns product information from Narnoo. |
[data]['bookingData’]['product’][n]['option’] | array | True | Product price options. |
[data]['bookingData’]['product’][n]['option’][n]['label’] | string | True | Option label. |
[data]['bookingData’]['product’][n]['option’][n]['quantity’] | decimal | True | Option quantity. |
[data]['bookingData’]['product’][n]['option’][n]['price’] | array | True | Option price. |
[data]['bookingData’]['product’][n]['participants’] | array | True | Product booking participants. |
[data]['bookingData’]['product’][n]['participants’][n]['label’] | string | True | Participant form label. |
[data]['bookingData’]['product’][n]['participants’][n]['value’] | string | True | Participant form value. |
[data]['reservationData’] | array | False | See create product reservation |
[data]['orderData’] | array | False | See create product reservation. |
[data]['paymentData’] | array | False | Payment data - used via Narnoo payment gateways. |
[data]['failureData’] | array | False | Order failure reference |
[data]['queryTime’] | string | True | Time to return request |
Utilities
A colleciton of api endpoints that perform utility functions.
Get categories
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/utilities/category",
"method": "GET",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Accept": "*/*",
"Cache-Control": "no-cache",
"Host": "apis.narnoo.com",
"accept-encoding": "gzip, deflate",
"content-length": "70",
"Connection": "keep-alive",
"cache-control": "no-cache"
},
"processData": false,
"data": ""
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/utilities/category",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => array(
"Accept: */*",
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache",
"Connection: keep-alive",
"Content-Type: application/json",
"Host: apis.narnoo.com",
"accept-encoding: gzip, deflate",
"cache-control: no-cache",
"content-length: 70"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/utilities/category"
payload = ""
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxx",
'Content-Type': "application/json",
'Accept': "*/*",
'Cache-Control': "no-cache",
'Host': "apis.narnoo.com",
'accept-encoding': "gzip, deflate",
'content-length': "70",
'Connection': "keep-alive",
'cache-control': "no-cache"
}
response = requests.request("GET", url, data=payload, headers=headers)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Accept": "*/*",
"Cache-Control": "no-cache",
"Host": "apis.narnoo.com",
"accept-encoding": "gzip, deflate",
"content-length": "70",
"Connection": "keep-alive",
"cache-control": "no-cache"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/utilities/category")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"data": [
{
"id": "1",
"title": "Accommodation"
},
{
"id": "3",
"title": "Attraction"
},
{
"id": "5",
"title": "Dining"
},
{
"id": "6",
"title": "Entertainment"
},
{
"id": "8",
"title": "Retail"
},
{
"id": "7",
"title": "Service"
}
],
"queryTime": "1.22ms"
}
This endpoint returns our list of categories
HTTP Request
GET https://apis.narnoo.com/api/v1/utilities/category
Get sub categories
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/utilities/subcategory/3",
"method": "GET",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Accept": "*/*",
"Cache-Control": "no-cache",
"Host": "apis.narnoo.com",
"accept-encoding": "gzip, deflate",
"Connection": "keep-alive",
"cache-control": "no-cache"
},
"processData": false,
"data": ""
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/utilities/subcategory/3",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => array(
"Accept: */*",
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache",
"Connection: keep-alive",
"Content-Type: application/json",
"Host: apis.narnoo.com",
"accept-encoding: gzip, deflate",
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/utilities/subcategory/3"
payload = ""
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxx",
'Content-Type': "application/json",
'Accept': "*/*",
'Cache-Control': "no-cache",
'Host': "apis.narnoo.com",
'accept-encoding': "gzip, deflate",
'Connection': "keep-alive",
'cache-control': "no-cache"
}
response = requests.request("GET", url, data=payload, headers=headers)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Accept": "*/*",
"Cache-Control": "no-cache",
"Host": "apis.narnoo.com",
"accept-encoding": "gzip, deflate",
"Connection": "keep-alive",
"cache-control": "no-cache"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/utilities/subcategory/3")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"data": [
{
"id": "135",
"title": "4WD Tours"
},
{
"id": "17",
"title": "Adventure"
},
{
"id": "37",
"title": "Aeroplane"
},
{
"id": "38",
"title": "ATV Quad Bike"
},
{
"id": "157",
"title": "Beach"
},
{
"id": "40",
"title": "Bicycle Hire"
},
{
"id": "41",
"title": "Birdwatching"
},
{
"id": "42",
"title": "Boat Hire"
},
{
"id": "19",
"title": "Botanical"
},
.....
],
"queryTime": "1.52ms"
}
This endpoint returns our list of sub categories for that category id
GET https://apis.narnoo.com/api/v1/utilities/subcategory/{category id}
Query Parameters
{category id} | Required
Webhooks
These endpoints will allow you manage webhooks within Narnoo.
Narnoo webhooks allows our system to talk to your system via HTTP requests. This process allows you to automate some basic functions - such as being notified when a new product has been created or deleted.
Get webhook list
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/webhook/list",
"method": "GET",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxxx",
"Accept": "*/*",
"Cache-Control": "no-cache",
"Host": "apis.narnoo.com",
"Connection": "keep-alive",
"cache-control": "no-cache"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/webhook/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Accept: */*",
"Authorization: bearer xxxxx",
"Cache-Control: no-cache",
"Connection: keep-alive",
"Host: apis.narnoo.com",
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/webhook/list"
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxxx",
'Accept': "*/*",
'Cache-Control': "no-cache",
'Host': "apis.narnoo.com",
'Connection': "keep-alive",
'cache-control': "no-cache"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxx",
"Accept": "*/*",
"Cache-Control": "no-cache",
"Host": "apis.narnoo.com",
"Connection": "keep-alive",
"cache-control": "no-cache"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/webhook/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"count": 1,
"data": [
{
"id": "15",
"dateCreated": "2018-09-17 13:26:31",
"url": "https://www.yourdomain.com/action/webhook",
"status": "live"
}
],
"queryTime": "681.75ms"
}
This endpoint retrieves the list of created webhooks within Narnoo for the agent.
HTTP Request
GET https://apis.narnoo.com/api/v1/webhook/list
Response Parameters
Parameter | Type | Description |
---|---|---|
[success] | boolean | Was the call successful. |
[count] | integer | Total number of orders. |
[data] | array | webhook information. |
[data][n][‘id’] | integer | Webhook ID. |
[data][n]['dateCreated’] | datetime | Date of record creation. |
[data][n]['url’] | string | Url of endpoint on your system. |
[data][n]['status’] | string | Status of the webhook - live - hold |
Get webhook details
var settings = {
"async": true,
"crossDomain": true,
"url": "https://apis.narnoo.com/api/v1/webhook/details/15",
"method": "GET",
"headers": {
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxxx",
"Accept": "*/*",
"Cache-Control": "no-cache",
"Host": "apis.narnoo.com",
"Connection": "keep-alive",
"cache-control": "no-cache"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apis.narnoo.com/api/v1/webhook/details/15",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Accept: */*",
"Authorization: bearer xxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache",
"Connection: keep-alive",
"Host: apis.narnoo.com",
"accept-encoding: gzip, deflate",
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://apis.narnoo.com/api/v1/webhook/details/15"
headers = {
'Authorization': "bearer xxxxxxxxxxxxxxxxxxxxxxxxx",
'Accept': "*/*",
'Cache-Control': "no-cache",
'Host': "apis.narnoo.com",
'accept-encoding': "gzip, deflate",
'Connection': "keep-alive",
'cache-control': "no-cache"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
import Foundation
let headers = [
"Authorization": "bearer xxxxxxxxxxxxxxxxxxxxxxx",
"Accept": "*/*",
"Cache-Control": "no-cache",
"Host": "apis.narnoo.com",
"accept-encoding": "gzip, deflate",
"Connection": "keep-alive",
"cache-control": "no-cache"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://apis.narnoo.com/api/v1/webhook/details/15")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
The above command returns JSON structured like this:
{
"success": true,
"data": {
"id": "15",
"dateCreated": "2018-09-17 13:26:31",
"url": "https://www.yourdomain.com/action/webhook",
"key": "noowhsec_g7Eslc6pgxgC",
"status": "live",
"dateModified": null,
"action": [
"create.product",
"update.product",
"delete.product"
]
},
"queryTime": "693.8ms"
}
This endpoint retrieves further details of the webhook.
HTTP Request
GET https://apis.narnoo.com/api/v1/webhook/details/{webhook_id}
Query Parameters
{webhook_id} - required
Response Parameters
Parameter | Type | Description |
---|---|---|
[success] | boolean | Was the call successful. |
[data]['id’] | integer | Webhook ID. |
[data]['dateCreated’] | datetime | Date of record creation. |
[data]['url’] | string | Url of endpoint on your system. |
[data]['key’] | string | A security key to check webhook responses for authenticity - contained in the header. |
[data]['status’] | string | Status of the webhook - live - hold |
[data]['dateModified’] | datetime | Date of record creation. |
[data]['action’] | array | An array containing the actions set for this endpoint. |
Webhook Payload
When a webhook has been set up within Narnoo, the following JSON paylay is sent to it via a POST request.
{
"action": "create.product",
"businessId": "39",
"businessType": "1",
"timestamp": "2019-07-29 03:05:03",
"id": "On8bjEdEz5dp",
"data": [
"138726791"
]
}
Response Parameters
Parameter | Type | Description |
---|---|---|
[action] | string | The Narnoo action. |
[businessId] | integer | Narnoo business ID. |
[businessType] | integer | Narnoo business type - 1 = operator or 2 = distributor |
[timestamp] | datetime | Date time for when the action took place. |
[id] | string | The webhook action ID. |
[data] | array | Array of the ID’s related to the action - in this case “A new product was created for business ID 39 which has the product ID of 138726791” |
Narnoo returns the security key created with the webhook into the request header. This is contained within the “Narno-Signature” header item. You can store this key locally and then check against it for future authentication.
“Narnoo-Signature”:“noowhsec_g7Eslc6pgxgC”
Definitions
Payment Methods
Many reservation systems provide a payment method between the agent and the operator. We have summarised these and provide the following payment options.
Payment Option | Description |
---|---|
FULL_AGENT | Agent takes full payment for product, including any levies |
DOWNPAYMENT_LEVY | Agent takes full payment for product, minus any levies. Customer will pay levy to operator on day of travel. |
DOWNPAYMENT_BALANCE | Agent takes a deposit for the product, this is generally the agents commission. Customer will pay remainder to operator on day of travel. |
FULL_SUPPLIER | Customer will pay total balance to operator on day of travel. Commission will need to be arranged with Operator outside of this API. |
Example
How we perform a booking via the Narnoo portal
We have implemented direct bookings via a business’s account on Narnoo.com. This implementation is the same process as how we are producing our mobile/desktop applications.
Get Supplier Bookable Products List
First we request all supplier products that are bookable via that agent’s account.
API call: GET https://apis.narnoo.com/api/v1/booking/products/{operatorId}
For more information refer to: get bookable products
Check product availability based on the product booking code
Next we select the product we want to check availability for and perform an availability date range check.
API call: GET https://apis.narnoo.com/api/v1/booking/products/{operatorId}/{productBookingId}?id={productBookingCode}&startDate={d-m-Y}&endDate={d-m-Y}
For more information refer to: get product availability
Show results based on availability call
When there is a + next to the number this means there are more spots available however the supplier has nominated only 10 in their results.
Show product booking form data
This page shows the information required via that product for booking. Items include:
- Participant names
- Booking form requirements
- Any Extras
- Pick up data
These can all have NULL results if nothing is available for that supplier in the relevant field.
API call: GET https://apis.narnoo.com/api/v1/booking/details/{operator_id}/{product_booking_id}?id={bookingCode}
For more information refer to: get bookable product data
In our application we update the total cost based on the following information.
- The selected option, multiplied by quantity.
- Where appliciable the pick up price multiplied by quantity added to total price.
Check out products
This page shows the generic checkout form information. This information includes:
- Generic booking contact information
- Where possible we take the information stored in the shopping cart to populate this form. This reduces double entry.
- Product summary
- A summary of each product that has been placed in the cart.
- Ability to edit these products.
- Payment method - in our portal we currently use credit card transactions via Stripe.
Our portal currently uses Stripe as the payment gateway.
Charge card and create reservation
API Call POST: https://apis.narnoo.com/api/v1/booking/create
For more information refer to: create product reservation
Show booking confirmation
This page shows the information related to the booking. If all products are confirmed then we have a successful booking. If there are issues with a product then a warning will be displayed. If we have payment or other issues then the error will also be displayed.
For our purposes the transaction data provided from Stripe is displayed for the agents records.