API Reference
Welcome
Welcome to the documentation for the latest features added to the Wired API.
The Wired APIs are constantly evolving, both in terms of functionality and the technologies adopted. In order to accelerate this process, we have chosen to open a second endpoint that you can use simultaneously with the first one Wired API. The goal is to provide you a modern API documentation with code snippets, precise I/O description (JSON schema) and best practices descriptions.
Going forward, more and more calls will be added to cover all WooDoo features.
Stay tuned.
Help
For any doubt or suggestion you can contact us at help-wired AT wubook DOT net
Standards used
The Wubook Wired API is built using the JSON-RPC specification (https://www.jsonrpc.org/specification).
Thanks to this, we get some interesting points that make it easy to develop a client:
- A single endpoint is used for every call: https://wired-json.wubook.net/api
- The HTTP POST method MUST be used for any API call.
- A standard JSON format is used both for input and output data.
To annotate our JSON-based HTTP API we use the JSON Schema declarative language (http://json-schema.org/).
Authentication (API keys)
curl -X 'POST' 'https://wired-json.wubook.net/api/' \
-H 'X-API-KEY: wr_104492da-test-test-test-904a1211414a' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{}'
import requests
from jsonrpcclient import request_uuid, parse
headers = {'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a'}
method = ''
params = {}
response = requests.post('https://wired-json.wubook.net/api/',
json=request_uuid(method, params=params),
headers=headers)
parsed = parse(response.json())
import fetch from 'node-fetch';
fetch('https://wired-json.wubook.net/api/', {
method: 'POST',
headers: {
'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a',
'accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
});
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://wired-json.wubook.net/api/")
request = Net::HTTP::Post.new(uri)
request["X-Api-Key"] = "wr_104492da-test-test-test-904a1211414a"
request.content_type = "application/json"
request["Accept"] = "application/json"
request.body = JSON.dump({})
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://wired-json.wubook.net/api/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-KEY' => 'wr_104492da-test-test-test-904a1211414a',
'accept' => 'application/json',
'Content-Type' => 'application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{}');
$response = curl_exec($ch);
curl_close($ch);
?>
You can create, remove and configure your API keys on this section of your WuBook Account: https://wubook.net/wauth/wauth/dash/wired/
You MUST include your API key in every request as an header X-API-KEY.
API Development
# check how to validate JSON Schema in your language
# http://json-schema.org/implementations.html#validators
from jsonrpcclient import request_uuid
from jsonschema import validate, FormatChecker
document = '...' # cached JSON read from https://wired-json.wubook.net/schema.json
schema = json.loads(document)
method = 'METHOD_TO_BE_TESTED'
params = {}
message=request_uuid(method, params=params)
try:
validate(message, schema[method], format_checker=FormatChecker())
except Exception as exc:
print("FAIL, reason:")
print(str(exc))
// check how to validate JSON Schema in your language
// http://json-schema.org/implementations.html#validators
# check how to validate JSON Schema in your language
# http://json-schema.org/implementations.html#validators
// check how to validate JSON Schema in your language
// http://json-schema.org/implementations.html#validators
During the early stages of development, most errors are due to incorrect format inputs. Consider using a JSON Schema Validator to debug and solve them easily.
Wired JSON-RPC schema: https://wired-json.wubook.net/partner_to_wired_schema.json
Anyway, you can rely on our collaboration. This is obviously the moment when we provide more support to our partners. Keep in mind that it’s important to send us the JSON you’re sending to our servers.
Webhooks
{
"method": "communication:notify",
"params": {},
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}
Wired uses webhooks to send you notifications when an event occurs in your account. Use them to perform actions in your backend systems.
Notifications sent to your app consist of a JSON payload over HTTPS. Just like the messages you send to our systems, the webhooks follow the JSON-RPC specification (https://www.jsonrpc.org/specification).
Wired Webhooks schema: https://wired-json.wubook.net/wired_to_partner_schema.json
Setup
In order to use webhooks you have to configure an endpoint here: https://wubook.net/wauth/wauth/dash/wired/.
The endpoint is linked to your API key settings.
Error Handling
{
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "Parse error",
"data": "Invalid JSON was received by the server"
},
"id": "6d50f8f8-f36e-45ef-bc1e-a1f02baa9900"
}
Each response is a JSON object and contain JUST ONE of these keys: error
, result
.
If the error
member is included, an error has occurred, you have to look for details on it.
Otherwise, the call was successful, you can look for the result
member.
The error
member value is a object with the following:
code
: A Number that indicates the error type that occurred.message
: A String providing a short description of the error.data
: A Primitive or Structured value that contains additional information about the error. This may be omitted.
Error codes
When a response object includes the error
key, something wrong happened.
Here is the list of the errors with the meaning:
code | message | meaning |
---|---|---|
-32700 | Parse error | Invalid JSON was received by the server. |
-32600 | Invalid Request | The JSON sent is not a valid Request object. |
-32601 | Method not found | The method does not exist / is not available. |
-32602 | Invalid params | Invalid method parameter(s). |
-32603 | Internal error | Internal JSON-RPC error. |
-30000 | Authentication error | Wrong apy-key provided. See Authentication |
-30001 | Missing endpoint | You need to set an endpoint. See Webhooks |
Best Practices
Define a unique identifier for each request
Following the JSON-RPC protocol, the client MUST establish a string to identify every request.
We REQUIRE UUID format for identifiers. You should send it when asking for help so we can easily look for it.
Always checks for errors
Make sure to get 200 as the HTTP status code in the response.
Each response is a JSON object and contain JUST ONE of these keys: error
, result
.
When a response comes, check at first if the error
key is included.
If so, an error has occurred.
See Error Handling for more.
Guest useful URLs
A guest URL is a link to a WooDoo webpage dedicated to the traveler. Using those resources the guest will be able to perform actions on his reservation: confirm, cancel, leave feedback, and so on.
Retrieve Guest useful URLs
curl -X 'POST' 'https://wired-json.wubook.net/api/' \
-H 'X-API-KEY: wr_104492da-test-test-test-904a1211414a' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"params": {
"property_id": "1213394817",
"reservation_ids": [
"1661263944"
]
},
"method": "guest_urls:retrieve",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}'
import requests
from jsonrpcclient import request_uuid, parse
headers = {'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a'}
method = 'guest_urls:retrieve'
params = {'property_id': '1213394817', 'reservation_ids': ['1661263944']}
response = requests.post('https://wired-json.wubook.net/api/',
json=request_uuid(method, params=params),
headers=headers)
parsed = parse(response.json())
import fetch from 'node-fetch';
fetch('https://wired-json.wubook.net/api/', {
method: 'POST',
headers: {
'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a',
'accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"params": {
"property_id": "1213394817",
"reservation_ids": [
"1661263944"
]
},
"method": "guest_urls:retrieve",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
})
});
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://wired-json.wubook.net/api/")
request = Net::HTTP::Post.new(uri)
request["X-Api-Key"] = "wr_104492da-test-test-test-904a1211414a"
request.content_type = "application/json"
request["Accept"] = "application/json"
request.body = JSON.dump({
"params": {
"property_id": "1213394817",
"reservation_ids": [
"1661263944"
]
},
"method": "guest_urls:retrieve",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
})
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://wired-json.wubook.net/api/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-KEY' => 'wr_104492da-test-test-test-904a1211414a',
'accept' => 'application/json',
'Content-Type' => 'application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{
"params": {
"property_id": "1213394817",
"reservation_ids": [
"1661263944"
]
},
"method": "guest_urls:retrieve",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}');
$response = curl_exec($ch);
curl_close($ch);
?>
{
"result": {
"data": [
{
"id": "1661263944",
"value": {
"credit_card_guarantee_url": "https://wubook.net/wbkd/cc/ad5e606b85caa7875674de9fb15db3c0_1661263944/",
"voucher_url": "https://wubook.net/wbkd/cc/ad5e606b85caa7875674de9fb15db3c0_1661263944/?showvoucher=true",
"cancel_url": "https://wubook.net/wbkd/del/1661263944/",
"feedback_url": "https://wubook.net/wbkd/feedback/?feedhash=cb20e79d913d9cc8b38ae59846ea7753_1661263944"
}
}
]
},
"id": "942f13f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}
The guest_urls:retrieve
method lets you retrieve a list of URls to be sent to the guest.
Properties
params
(required) (object): The params.property_id
(required) (string): Property id.reservation_ids
(required) (array)- Items (string): Reservation id.
method
(required) (string): The method.id
(required) (string): An identifier established by the Client.jsonrpc
(required) (string): The verson of the JSON-RPC protocol. MUST be exactly 2.0.
OTA Messages
Airbnb Message handling
Setup
Open the Airbnb connection settings in WooDoo: https://wubook.net/woodoo/channels/
Click on: Message handling
/ Enable messages handling
.
You will be redirected to an Airbnb webpage where to allow WuBook to handle messages.
After then, the API will be ready.
Search for OTA Messages Threads identifiers
curl -X 'POST' 'https://wired-json.wubook.net/api/' \
-H 'X-API-KEY: wr_104492da-test-test-test-904a1211414a' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"params": {
"property_id": "1213394817",
"channel_id": "197773",
"reservation_id": "1661263944"
},
"method": "messages_thread:search",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}'
import requests
from jsonrpcclient import request_uuid, parse
headers = {'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a'}
method = 'messages_thread:search'
params = {'channel_id': '197773',
'property_id': '1213394817',
'reservation_id': '1661263944'}
response = requests.post('https://wired-json.wubook.net/api/',
json=request_uuid(method, params=params),
headers=headers)
parsed = parse(response.json())
import fetch from 'node-fetch';
fetch('https://wired-json.wubook.net/api/', {
method: 'POST',
headers: {
'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a',
'accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"params": {
"property_id": "1213394817",
"channel_id": "197773",
"reservation_id": "1661263944"
},
"method": "messages_thread:search",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
})
});
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://wired-json.wubook.net/api/")
request = Net::HTTP::Post.new(uri)
request["X-Api-Key"] = "wr_104492da-test-test-test-904a1211414a"
request.content_type = "application/json"
request["Accept"] = "application/json"
request.body = JSON.dump({
"params": {
"property_id": "1213394817",
"channel_id": "197773",
"reservation_id": "1661263944"
},
"method": "messages_thread:search",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
})
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://wired-json.wubook.net/api/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-KEY' => 'wr_104492da-test-test-test-904a1211414a',
'accept' => 'application/json',
'Content-Type' => 'application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{
"params": {
"property_id": "1213394817",
"channel_id": "197773",
"reservation_id": "1661263944"
},
"method": "messages_thread:search",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}');
$response = curl_exec($ch);
curl_close($ch);
?>
{
"result": {
"data": [
{
"id": "00000000-0000-0000-0000-0000538c126f"
}
]
},
"id": "942f13f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}
The messages_thread:search
method lets you retrieve a list of OTA Messages Threads identifiers.
Properties
params
(required) (object): The params.property_id
(required) (string): Property id.channel_id
(required) (string): Channel id.reservation_id
(string): Reservation id.
method
(required) (string): The method.id
(required) (string): An identifier established by the Client.jsonrpc
(required) (string): The verson of the JSON-RPC protocol. MUST be exactly 2.0.
Retrieve OTA Messages Threads by identifiers
curl -X 'POST' 'https://wired-json.wubook.net/api/' \
-H 'X-API-KEY: wr_104492da-test-test-test-904a1211414a' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"params": {
"property_id": "1213394817",
"channel_id": "197773",
"thread_ids": [
"00000000-0000-0000-0000-0000538c126f"
]
},
"method": "messages_thread:retrieve",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}'
import requests
from jsonrpcclient import request_uuid, parse
headers = {'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a'}
method = 'messages_thread:retrieve'
params = {'channel_id': '197773',
'property_id': '1213394817',
'thread_ids': ['00000000-0000-0000-0000-0000538c126f']}
response = requests.post('https://wired-json.wubook.net/api/',
json=request_uuid(method, params=params),
headers=headers)
parsed = parse(response.json())
import fetch from 'node-fetch';
fetch('https://wired-json.wubook.net/api/', {
method: 'POST',
headers: {
'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a',
'accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"params": {
"property_id": "1213394817",
"channel_id": "197773",
"thread_ids": [
"00000000-0000-0000-0000-0000538c126f"
]
},
"method": "messages_thread:retrieve",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
})
});
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://wired-json.wubook.net/api/")
request = Net::HTTP::Post.new(uri)
request["X-Api-Key"] = "wr_104492da-test-test-test-904a1211414a"
request.content_type = "application/json"
request["Accept"] = "application/json"
request.body = JSON.dump({
"params": {
"property_id": "1213394817",
"channel_id": "197773",
"thread_ids": [
"00000000-0000-0000-0000-0000538c126f"
]
},
"method": "messages_thread:retrieve",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
})
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://wired-json.wubook.net/api/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-KEY' => 'wr_104492da-test-test-test-904a1211414a',
'accept' => 'application/json',
'Content-Type' => 'application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{
"params": {
"property_id": "1213394817",
"channel_id": "197773",
"thread_ids": [
"00000000-0000-0000-0000-0000538c126f"
]
},
"method": "messages_thread:retrieve",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}');
$response = curl_exec($ch);
curl_close($ch);
?>
{
"result": {
"data": [
{
"id": "00000000-0000-0000-0000-0000538c126f",
"value": {
"title": "Alpaca",
"messages": [
{
"message_id": "00000000-0000-0000-0000-00036352ee53",
"message_text": "Dear Alpaca Toth, Today is your check-out day. It was a privilege hosting you! ",
"sender": "property",
"created_at": "2023-03-09T06:24:57Z"
}
],
"updated_at": "2023-03-17T11:23:46Z",
"reservation_id": "1661263944"
}
}
]
},
"id": "942f13f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}
The messages_thread:retrieve
method lets you retrieve a list of OTA Messages Threads details.
This call usually follows the thread_updated webhook.
Properties
params
(required) (object): The params.property_id
(required) (string): Property id.channel_id
(required) (string): Channel id.thread_ids
(required) (array)- Items (string): Message thread id.
method
(required) (string): The method.id
(required) (string): An identifier established by the Client.jsonrpc
(required) (string): The verson of the JSON-RPC protocol. MUST be exactly 2.0.
Send OTA Message
curl -X 'POST' 'https://wired-json.wubook.net/api/' \
-H 'X-API-KEY: wr_104492da-test-test-test-904a1211414a' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"params": {
"property_id": "1213394817",
"channel_id": "197773",
"thread_id": "00000000-0000-0000-0000-0000538c126f",
"message_text": "Dear Alpaca Toth, Today is your check-out day. It was a privilege hosting you! "
},
"method": "messages_thread:send",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}'
import requests
from jsonrpcclient import request_uuid, parse
headers = {'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a'}
method = 'messages_thread:send'
params = {'channel_id': '197773',
'message_text': 'Dear Alpaca Toth, Today is your check-out day. It was a '
'privilege hosting you! ',
'property_id': '1213394817',
'thread_id': '00000000-0000-0000-0000-0000538c126f'}
response = requests.post('https://wired-json.wubook.net/api/',
json=request_uuid(method, params=params),
headers=headers)
parsed = parse(response.json())
import fetch from 'node-fetch';
fetch('https://wired-json.wubook.net/api/', {
method: 'POST',
headers: {
'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a',
'accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"params": {
"property_id": "1213394817",
"channel_id": "197773",
"thread_id": "00000000-0000-0000-0000-0000538c126f",
"message_text": "Dear Alpaca Toth, Today is your check-out day. It was a privilege hosting you! "
},
"method": "messages_thread:send",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
})
});
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://wired-json.wubook.net/api/")
request = Net::HTTP::Post.new(uri)
request["X-Api-Key"] = "wr_104492da-test-test-test-904a1211414a"
request.content_type = "application/json"
request["Accept"] = "application/json"
request.body = JSON.dump({
"params": {
"property_id": "1213394817",
"channel_id": "197773",
"thread_id": "00000000-0000-0000-0000-0000538c126f",
"message_text": "Dear Alpaca Toth, Today is your check-out day. It was a privilege hosting you! "
},
"method": "messages_thread:send",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
})
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://wired-json.wubook.net/api/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-KEY' => 'wr_104492da-test-test-test-904a1211414a',
'accept' => 'application/json',
'Content-Type' => 'application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{
"params": {
"property_id": "1213394817",
"channel_id": "197773",
"thread_id": "00000000-0000-0000-0000-0000538c126f",
"message_text": "Dear Alpaca Toth, Today is your check-out day. It was a privilege hosting you! "
},
"method": "messages_thread:send",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}');
$response = curl_exec($ch);
curl_close($ch);
?>
{
"result": {
"data": {
"id": "432947c8-a864-4ba5-a55d-7a76b208bf4c"
}
},
"id": "942f13f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}
The messages_thread:send
method lets you send a message to the guest.
The method is asyncronous. In the response you get an identifier, use it to track the success or not.
Wired will try the send to the OTA as soon as possible, notifying your endpoint ONLY IF the attempts fail. Take a look of the related webhook: send_message_failed.
Properties
params
(required) (object): The params.property_id
(required) (string): Property id.channel_id
(required) (string): Channel id.thread_id
(string): Message thread id.message_text
(string): Message text.
method
(required) (string): The method.id
(required) (string): An identifier established by the Client.jsonrpc
(required) (string): The verson of the JSON-RPC protocol. MUST be exactly 2.0.
OTA Messages - Webhooks
{
"method": "messages_thread:notify",
"params": {
"type": "thread_updated",
"data": {}
},
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}
Webhooks under the messages_thread:notify
method are those that notify you about some update in the messaging system.
Activating the OTA messaging for a property, WooDoo will contact your endpoint.
Once you detect the method messages_thread:notify
, your app should read the type and then take actions.
See the existing types below.
Thread updated
{
"type": "thread_updated",
"data": {
"thread_id": "00000000-0000-0000-0000-0000538c126f"
}
}
A webhook under the type thread_updated
follows an update in the specified thread.
Properties
type
(string)data
(object)thread_id
(string): Message thread id.
Send message failed
{
"type": "send_message_failed",
"data": {
"thread_id": "00000000-0000-0000-0000-0000538c126f",
"message_text": "Dear Alpaca Toth, Today is your check-out day. It was a privilege hosting you! "
}
}
A webhooks under the type send_message_failed
follows the inability to send a message.
WooDoo will not retry anymore to send the message to the OTA.
Properties
type
(string)data
(object)thread_id
(string): Message thread id.message_text
(string): Message text.
Chain Widget
If you manage a number of hotels, maybe located in different areas, the Chain Widget is what you need to centralize direct sales.
Follow these two steps to set-up your Chain Widget:
-
Create a Chain Widget: https://wired-json.wubook.net/reference/#create-a-chain-widget You will get a unique identifier
chain_widget_id
of 37 characters what will be usefull on step 2 -
The webmaster (or you if you are also the webmaster) has to put the widget on the html page using the unique identifier obtained on step 1: https://wubook.net/wbkd/demo/#chain-widget
Create a Chain Widget
curl -X 'POST' 'https://wired-json.wubook.net/api/' \
-H 'X-API-KEY: wr_104492da-test-test-test-904a1211414a' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"params": {
"account_id": "WB001"
},
"method": "chain_widget:create",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}'
import requests
from jsonrpcclient import request_uuid, parse
headers = {'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a'}
method = 'chain_widget:create'
params = {'account_id': 'WB001'}
response = requests.post('https://wired-json.wubook.net/api/',
json=request_uuid(method, params=params),
headers=headers)
parsed = parse(response.json())
import fetch from 'node-fetch';
fetch('https://wired-json.wubook.net/api/', {
method: 'POST',
headers: {
'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a',
'accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"params": {
"account_id": "WB001"
},
"method": "chain_widget:create",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
})
});
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://wired-json.wubook.net/api/")
request = Net::HTTP::Post.new(uri)
request["X-Api-Key"] = "wr_104492da-test-test-test-904a1211414a"
request.content_type = "application/json"
request["Accept"] = "application/json"
request.body = JSON.dump({
"params": {
"account_id": "WB001"
},
"method": "chain_widget:create",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
})
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://wired-json.wubook.net/api/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-KEY' => 'wr_104492da-test-test-test-904a1211414a',
'accept' => 'application/json',
'Content-Type' => 'application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{
"params": {
"account_id": "WB001"
},
"method": "chain_widget:create",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}');
$response = curl_exec($ch);
curl_close($ch);
?>
{
"result": {
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
]
},
"id": "942f13f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}
The chain_widget:create
method lets you create a new Chain Widget.
Properties
params
(required) (object): The params.account_id
(required) (string): Account (or subaccount) id.
method
(required) (string): The method.id
(required) (string): An identifier established by the Client.jsonrpc
(required) (string): The verson of the JSON-RPC protocol. MUST be exactly 2.0.
Search for Chain Widget identifiers
curl -X 'POST' 'https://wired-json.wubook.net/api/' \
-H 'X-API-KEY: wr_104492da-test-test-test-904a1211414a' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"params": {
"account_id": "WB001"
},
"method": "chain_widget:search",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}'
import requests
from jsonrpcclient import request_uuid, parse
headers = {'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a'}
method = 'chain_widget:search'
params = {'account_id': 'WB001'}
response = requests.post('https://wired-json.wubook.net/api/',
json=request_uuid(method, params=params),
headers=headers)
parsed = parse(response.json())
import fetch from 'node-fetch';
fetch('https://wired-json.wubook.net/api/', {
method: 'POST',
headers: {
'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a',
'accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"params": {
"account_id": "WB001"
},
"method": "chain_widget:search",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
})
});
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://wired-json.wubook.net/api/")
request = Net::HTTP::Post.new(uri)
request["X-Api-Key"] = "wr_104492da-test-test-test-904a1211414a"
request.content_type = "application/json"
request["Accept"] = "application/json"
request.body = JSON.dump({
"params": {
"account_id": "WB001"
},
"method": "chain_widget:search",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
})
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://wired-json.wubook.net/api/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-KEY' => 'wr_104492da-test-test-test-904a1211414a',
'accept' => 'application/json',
'Content-Type' => 'application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{
"params": {
"account_id": "WB001"
},
"method": "chain_widget:search",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}');
$response = curl_exec($ch);
curl_close($ch);
?>
{
"result": {
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
]
},
"id": "942f13f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}
The chain_widget:search
method lets you retrieve a list of Chain Widget identifiers.
Properties
params
(required) (object): The params.account_id
(required) (string): Account (or subaccount) id.
method
(required) (string): The method.id
(required) (string): An identifier established by the Client.jsonrpc
(required) (string): The verson of the JSON-RPC protocol. MUST be exactly 2.0.
Retrieve Chain Widgets
curl -X 'POST' 'https://wired-json.wubook.net/api/' \
-H 'X-API-KEY: wr_104492da-test-test-test-904a1211414a' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"params": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"method": "chain_widget:retrieve",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}'
import requests
from jsonrpcclient import request_uuid, parse
headers = {'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a'}
method = 'chain_widget:retrieve'
params = ['497f6eca-6276-4993-bfeb-53cbbbba6f08']
response = requests.post('https://wired-json.wubook.net/api/',
json=request_uuid(method, params=params),
headers=headers)
parsed = parse(response.json())
import fetch from 'node-fetch';
fetch('https://wired-json.wubook.net/api/', {
method: 'POST',
headers: {
'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a',
'accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"params": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"method": "chain_widget:retrieve",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
})
});
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://wired-json.wubook.net/api/")
request = Net::HTTP::Post.new(uri)
request["X-Api-Key"] = "wr_104492da-test-test-test-904a1211414a"
request.content_type = "application/json"
request["Accept"] = "application/json"
request.body = JSON.dump({
"params": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"method": "chain_widget:retrieve",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
})
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://wired-json.wubook.net/api/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-KEY' => 'wr_104492da-test-test-test-904a1211414a',
'accept' => 'application/json',
'Content-Type' => 'application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{
"params": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"method": "chain_widget:retrieve",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}');
$response = curl_exec($ch);
curl_close($ch);
?>
{
"result": {
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"value": {
"account_id": "WB001",
"properties": [
"1213394817"
],
"show_logo": false,
"autosearch": true,
"enabled_filters": {
"zones_menu": [
"states"
],
"types": false,
"amenities": false,
"scores": true,
"distances": true,
"guests": true,
"properties": true,
"subzones": false
},
"themes": {
"bar_background": "#CBc84D",
"button_background": "#6c6",
"button_text": "#4f5",
"button_border": "#fb4bf5",
"calendar_between_background": "#6C6",
"calendar_endpoint_background": "#1Ee",
"price_background": "#f2a698",
"price_text": "#c5f",
"select_menu_text": "#205d97",
"select_menu_background": "#274",
"map_tooltip_text": "#CFEda0",
"map_tooltip_background": "#1FBfe8"
}
}
}
]
},
"id": "942f13f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}
The chain_widget:retrieve
method lets you retrieve a list of Chain Widgets.
Properties
params
(required) (array): The params.- Items (string): chain widget id.
method
(required) (string): The method.id
(required) (string): An identifier established by the Client.jsonrpc
(required) (string): The verson of the JSON-RPC protocol. MUST be exactly 2.0.
Update a Chain Widget
curl -X 'POST' 'https://wired-json.wubook.net/api/' \
-H 'X-API-KEY: wr_104492da-test-test-test-904a1211414a' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"params": {
"chain_widget_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"preferences": {
"account_id": "WB001",
"properties": [
"1213394817"
],
"show_logo": false,
"autosearch": true,
"enabled_filters": {
"zones_menu": [
"states"
],
"types": false,
"amenities": false,
"scores": true,
"distances": true,
"guests": true,
"properties": true,
"subzones": false
},
"themes": {
"bar_background": "#C57",
"button_background": "#8bBFD3",
"button_text": "#CFeFBc",
"button_border": "#41B",
"calendar_between_background": "#cdDDAB",
"calendar_endpoint_background": "#3DC6DB",
"price_background": "#70E80A",
"price_text": "#5f5",
"select_menu_text": "#b31",
"select_menu_background": "#244C8d",
"map_tooltip_text": "#Bce5Dd",
"map_tooltip_background": "#27e"
}
}
},
"method": "chain_widget:update",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}'
import requests
from jsonrpcclient import request_uuid, parse
headers = {'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a'}
method = 'chain_widget:update'
params = {'chain_widget_id': '497f6eca-6276-4993-bfeb-53cbbbba6f08',
'preferences': {'account_id': 'WB001',
'autosearch': True,
'enabled_filters': {'amenities': False,
'distances': True,
'guests': True,
'properties': True,
'scores': True,
'subzones': False,
'types': False,
'zones_menu': ['states']},
'properties': ['1213394817'],
'show_logo': False,
'themes': {'bar_background': '#C57',
'button_background': '#8bBFD3',
'button_border': '#41B',
'button_text': '#CFeFBc',
'calendar_between_background': '#cdDDAB',
'calendar_endpoint_background': '#3DC6DB',
'map_tooltip_background': '#27e',
'map_tooltip_text': '#Bce5Dd',
'price_background': '#70E80A',
'price_text': '#5f5',
'select_menu_background': '#244C8d',
'select_menu_text': '#b31'}}}
response = requests.post('https://wired-json.wubook.net/api/',
json=request_uuid(method, params=params),
headers=headers)
parsed = parse(response.json())
import fetch from 'node-fetch';
fetch('https://wired-json.wubook.net/api/', {
method: 'POST',
headers: {
'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a',
'accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"params": {
"chain_widget_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"preferences": {
"account_id": "WB001",
"properties": [
"1213394817"
],
"show_logo": false,
"autosearch": true,
"enabled_filters": {
"zones_menu": [
"states"
],
"types": false,
"amenities": false,
"scores": true,
"distances": true,
"guests": true,
"properties": true,
"subzones": false
},
"themes": {
"bar_background": "#C57",
"button_background": "#8bBFD3",
"button_text": "#CFeFBc",
"button_border": "#41B",
"calendar_between_background": "#cdDDAB",
"calendar_endpoint_background": "#3DC6DB",
"price_background": "#70E80A",
"price_text": "#5f5",
"select_menu_text": "#b31",
"select_menu_background": "#244C8d",
"map_tooltip_text": "#Bce5Dd",
"map_tooltip_background": "#27e"
}
}
},
"method": "chain_widget:update",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
})
});
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://wired-json.wubook.net/api/")
request = Net::HTTP::Post.new(uri)
request["X-Api-Key"] = "wr_104492da-test-test-test-904a1211414a"
request.content_type = "application/json"
request["Accept"] = "application/json"
request.body = JSON.dump({
"params": {
"chain_widget_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"preferences": {
"account_id": "WB001",
"properties": [
"1213394817"
],
"show_logo": false,
"autosearch": true,
"enabled_filters": {
"zones_menu": [
"states"
],
"types": false,
"amenities": false,
"scores": true,
"distances": true,
"guests": true,
"properties": true,
"subzones": false
},
"themes": {
"bar_background": "#C57",
"button_background": "#8bBFD3",
"button_text": "#CFeFBc",
"button_border": "#41B",
"calendar_between_background": "#cdDDAB",
"calendar_endpoint_background": "#3DC6DB",
"price_background": "#70E80A",
"price_text": "#5f5",
"select_menu_text": "#b31",
"select_menu_background": "#244C8d",
"map_tooltip_text": "#Bce5Dd",
"map_tooltip_background": "#27e"
}
}
},
"method": "chain_widget:update",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
})
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://wired-json.wubook.net/api/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-KEY' => 'wr_104492da-test-test-test-904a1211414a',
'accept' => 'application/json',
'Content-Type' => 'application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{
"params": {
"chain_widget_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"preferences": {
"account_id": "WB001",
"properties": [
"1213394817"
],
"show_logo": false,
"autosearch": true,
"enabled_filters": {
"zones_menu": [
"states"
],
"types": false,
"amenities": false,
"scores": true,
"distances": true,
"guests": true,
"properties": true,
"subzones": false
},
"themes": {
"bar_background": "#C57",
"button_background": "#8bBFD3",
"button_text": "#CFeFBc",
"button_border": "#41B",
"calendar_between_background": "#cdDDAB",
"calendar_endpoint_background": "#3DC6DB",
"price_background": "#70E80A",
"price_text": "#5f5",
"select_menu_text": "#b31",
"select_menu_background": "#244C8d",
"map_tooltip_text": "#Bce5Dd",
"map_tooltip_background": "#27e"
}
}
},
"method": "chain_widget:update",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}');
$response = curl_exec($ch);
curl_close($ch);
?>
{
"result": {
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
]
},
"id": "942f13f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}
The chain_widget:update
method lets you update a Chain Widget.
Properties
params
(required) (object): The params. Cannot contain additional properties.chain_widget_id
(required) (string): chain widget id.preferences
(required) (object): chain widget preferences. Cannot contain additional properties.account_id
(string): Account (or subaccount) id.properties
(array)- Items (string): Property id.
show_logo
(boolean)autosearch
(boolean)enabled_filters
(object): Cannot contain additional properties.zones_menu
(array)- Items (string): Must be one of:
['provinces', 'regions', 'states']
.
- Items (string): Must be one of:
types
(boolean)amenities
(boolean)scores
(boolean)distances
(boolean)guests
(boolean)properties
(boolean)subzones
(boolean)
themes
(object): Cannot contain additional properties.bar_background
(string)button_background
(string)button_text
(string)button_border
(string)calendar_between_background
(string)calendar_endpoint_background
(string)price_background
(string)price_text
(string)select_menu_text
(string)select_menu_background
(string)map_tooltip_text
(string)map_tooltip_background
(string)
method
(required) (string): The method.id
(required) (string): An identifier established by the Client.jsonrpc
(required) (string): The verson of the JSON-RPC protocol. MUST be exactly 2.0.
Remove a Chain Widget
curl -X 'POST' 'https://wired-json.wubook.net/api/' \
-H 'X-API-KEY: wr_104492da-test-test-test-904a1211414a' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"params": {
"chain_widget_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
},
"method": "chain_widget:remove",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}'
import requests
from jsonrpcclient import request_uuid, parse
headers = {'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a'}
method = 'chain_widget:remove'
params = {'chain_widget_id': '497f6eca-6276-4993-bfeb-53cbbbba6f08'}
response = requests.post('https://wired-json.wubook.net/api/',
json=request_uuid(method, params=params),
headers=headers)
parsed = parse(response.json())
import fetch from 'node-fetch';
fetch('https://wired-json.wubook.net/api/', {
method: 'POST',
headers: {
'X-API-KEY': 'wr_104492da-test-test-test-904a1211414a',
'accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"params": {
"chain_widget_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
},
"method": "chain_widget:remove",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
})
});
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://wired-json.wubook.net/api/")
request = Net::HTTP::Post.new(uri)
request["X-Api-Key"] = "wr_104492da-test-test-test-904a1211414a"
request.content_type = "application/json"
request["Accept"] = "application/json"
request.body = JSON.dump({
"params": {
"chain_widget_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
},
"method": "chain_widget:remove",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
})
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://wired-json.wubook.net/api/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-KEY' => 'wr_104492da-test-test-test-904a1211414a',
'accept' => 'application/json',
'Content-Type' => 'application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{
"params": {
"chain_widget_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
},
"method": "chain_widget:remove",
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}');
$response = curl_exec($ch);
curl_close($ch);
?>
{
"result": {
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
]
},
"id": "942f13f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}
The chain_widget:remove
method lets you remove a Chain Widget.
Properties
params
(required) (object): The params.chain_widget_id
(required) (string): chain widget id.
method
(required) (string): The method.id
(required) (string): An identifier established by the Client.jsonrpc
(required) (string): The verson of the JSON-RPC protocol. MUST be exactly 2.0.
Communication - Webhooks
{
"method": "communication:notify",
"params": {
"communication": {
"type": "reservation_new",
"target": "guest",
"emails_to": ["doejohn@example.net"],
"emails_reply_to": ["yourproperty@example.net"]
}
...
},
"id": "123453f4-f579-4d42-afb2-f86d78816c0f",
"jsonrpc": "2.0"
}
Events under the communication:notify
method are those that notify the need to send an email.
Activating the Whitelabel Standard subscription for a property, and setting the webhook preference to ON, WooDoo will not send emails for it anymore, but Wired will notify your endpoint.
Doing so you will able to send mails using your templates and your mail server.
Once you detect the method communication:notify
, your app should read the type and the target of the communication and then take actions.
The possible targets are:
- guest
- property
- corporate
The possible types are many and evolving. See entries below.
New Reservation
{
"communication": {
"type": "reservation_new",
"target": "corporate",
"emails_to": [
"raymond00@example.com"
],
"emails_reply_to": [
"sparksdawn@example.net"
]
},
"reservation": {
"reservation_id": "1661263944",
"created_at": "2023-03-10T15:55:57+00:00",
"guest": {
"first_name": "John",
"last_name": "Doe",
"language": "en",
"email": "carsonedgar@example.com",
"phone_numbers": [
"+442912345678"
],
"emails": [
"guest@example.net"
]
},
"arrival_date": "2023-10-01",
"departure_date": "2023-10-02",
"source": {
"name": "WooDoo Online Reception",
"source_reservation_id": "ABC1234567"
},
"bookable_places": [
{
"how_many": 1,
"name": "Double Room"
}
],
"additional_occupancy_info": {
"persons": {
"not_distributed_total": 4
}
}
},
"property": {
"property_id": "1213394817",
"language": "en",
"name": "Your Hotel",
"phone_numbers": [
"+442912345678"
],
"reservation_emails": [
"yourhotel@example.net"
]
},
"type_specific_data": {
"notes": "Approximate time of arrival between 18:00 and 19:00"
}
}
Communication under the type reservation_new
follows the integration of a reservation in the WooDoo systems.
Properties
communication
(required) (object)type
(required) (string)target
(required) (string): Must be one of:['guest', 'property', 'corporate']
.emails_to
(required) (array)- Items (string)
emails_reply_to
(required) (array)- Items (string)
reservation
(required) (object)reservation_id
(required) (string): Reservation id.created_at
(required) (string)guest
(required) (object)first_name
(required) (string)last_name
(required) (string)language
(required) (string): ISO 639-1.email
(string)phone_numbers
(required) (array)- Items (string)
emails
(required) (array)- Items (string)
arrival_date
(required) (string)departure_date
(required) (string)source
(object)name
(required) (string)source_reservation_id
(required) (string)
bookable_places
(array)- Items (object)
how_many
(required) (integer)name
(required) (string)occupancy
(object): Missing if the info is not precise.persons
(required) (object)total
(required) (integer): adults + children.restrictions
(array): A subset of the total are children.- Items (object)
how_many
(required) (number)age
(number)
- Items (object)
- Items (object)
additional_occupancy_info
(object): Info about occupacy that can’t be distributed clearly.persons
(required) (object)not_distributed_total
(required) (integer)
property
(required) (object)property_id
(required) (string): Property id.language
(required) (string): ISO 639-1.name
(required) (string)phone_numbers
(array)- Items (string)
reservation_emails
(array)- Items (string)
type_specific_data
(required) (object)notes
(string)
Hello {property.name},
You received a new reservation!
Reservation Id: {reservation.reservation_id}
Arrival Date: {reservation.arrival_date}
Regards,
Acme Corporation
Reservation confirmed by property
{
"communication": {
"type": "reservation_confirmed_property",
"target": "corporate",
"emails_to": [
"marklynch@example.org"
],
"emails_reply_to": [
"sparksdawn@example.net"
]
},
"reservation": {
"reservation_id": "1661263944",
"created_at": "2023-03-10T15:55:57+00:00",
"guest": {
"first_name": "John",
"last_name": "Doe",
"language": "en",
"email": "colonsherry@example.net",
"phone_numbers": [
"+442912345678"
],
"emails": [
"guest@example.net"
]
},
"arrival_date": "2023-10-01",
"departure_date": "2023-10-02",
"source": {
"name": "WooDoo Online Reception",
"source_reservation_id": "ABC1234567"
},
"bookable_places": [
{
"how_many": 1,
"name": "Double Room"
}
],
"additional_occupancy_info": {
"persons": {
"not_distributed_total": 4
}
}
},
"property": {
"property_id": "1213394817",
"language": "en",
"name": "Your Hotel",
"phone_numbers": [
"+442912345678"
],
"reservation_emails": [
"yourhotel@example.net"
]
},
"type_specific_data": {
"updated_at": "2010-01-07T19:28:45+00:00",
"reason": "exercitationem"
}
}
Communication under the type reservation_confirmed_property
follows the confirm of a reservation in the WooDoo systems.
The property has performed the confirmation.
reservation_confirmed_property
Properties
communication
(required) (object)type
(required) (string)target
(required) (string): Must be one of:['guest', 'property', 'corporate']
.emails_to
(required) (array)- Items (string)
emails_reply_to
(required) (array)- Items (string)
reservation
(required) (object)reservation_id
(required) (string): Reservation id.created_at
(required) (string)guest
(required) (object)first_name
(required) (string)last_name
(required) (string)language
(required) (string): ISO 639-1.email
(string)phone_numbers
(required) (array)- Items (string)
emails
(required) (array)- Items (string)
arrival_date
(required) (string)departure_date
(required) (string)source
(object)name
(required) (string)source_reservation_id
(required) (string)
bookable_places
(array)- Items (object)
how_many
(required) (integer)name
(required) (string)occupancy
(object): Missing if the info is not precise.persons
(required) (object)total
(required) (integer): adults + children.restrictions
(array): A subset of the total are children.- Items (object)
how_many
(required) (number)age
(number)
- Items (object)
- Items (object)
additional_occupancy_info
(object): Info about occupacy that can’t be distributed clearly.persons
(required) (object)not_distributed_total
(required) (integer)
property
(required) (object)property_id
(required) (string): Property id.language
(required) (string): ISO 639-1.name
(required) (string)phone_numbers
(array)- Items (string)
reservation_emails
(array)- Items (string)
type_specific_data
(required) (object)updated_at
(required) (string)reason
(required) (string): The reason for the reservation update.
Reservation confirmed by guest - credit card
{
"communication": {
"type": "reservation_confirmed_guest_credit_card",
"target": "guest",
"emails_to": [
"emilygreen@example.org"
],
"emails_reply_to": [
"sparksdawn@example.net"
]
},
"reservation": {
"reservation_id": "1661263944",
"created_at": "2023-03-10T15:55:57+00:00",
"guest": {
"first_name": "John",
"last_name": "Doe",
"language": "en",
"email": "christinadecker@example.org",
"phone_numbers": [
"+442912345678"
],
"emails": [
"guest@example.net"
]
},
"arrival_date": "2023-10-01",
"departure_date": "2023-10-02",
"source": {
"name": "WooDoo Online Reception",
"source_reservation_id": "ABC1234567"
},
"bookable_places": [
{
"how_many": 1,
"name": "Double Room"
}
],
"additional_occupancy_info": {
"persons": {
"not_distributed_total": 4
}
}
},
"property": {
"property_id": "1213394817",
"language": "en",
"name": "Your Hotel",
"phone_numbers": [
"+442912345678"
],
"reservation_emails": [
"yourhotel@example.net"
]
},
"type_specific_data": {
"updated_at": "2000-06-12T15:28:35+00:00",
"reason": "dolor magnam, reiciendis architecto amet culpa!"
}
}
Communication under the type reservation_confirmed_guest_credit_card
follows the confirm of a reservation in the WooDoo systems.
The guest has performed the confirmation using a credit card as guarantee.
reservation_confirmed_guest_credit_card
Properties
communication
(required) (object)type
(required) (string)target
(required) (string): Must be one of:['guest', 'property', 'corporate']
.emails_to
(required) (array)- Items (string)
emails_reply_to
(required) (array)- Items (string)
reservation
(required) (object)reservation_id
(required) (string): Reservation id.created_at
(required) (string)guest
(required) (object)first_name
(required) (string)last_name
(required) (string)language
(required) (string): ISO 639-1.email
(string)phone_numbers
(required) (array)- Items (string)
emails
(required) (array)- Items (string)
arrival_date
(required) (string)departure_date
(required) (string)source
(object)name
(required) (string)source_reservation_id
(required) (string)
bookable_places
(array)- Items (object)
how_many
(required) (integer)name
(required) (string)occupancy
(object): Missing if the info is not precise.persons
(required) (object)total
(required) (integer): adults + children.restrictions
(array): A subset of the total are children.- Items (object)
how_many
(required) (number)age
(number)
- Items (object)
- Items (object)
additional_occupancy_info
(object): Info about occupacy that can’t be distributed clearly.persons
(required) (object)not_distributed_total
(required) (integer)
property
(required) (object)property_id
(required) (string): Property id.language
(required) (string): ISO 639-1.name
(required) (string)phone_numbers
(array)- Items (string)
reservation_emails
(array)- Items (string)
type_specific_data
(required) (object)updated_at
(required) (string)reason
(required) (string): The reason for the reservation update.
Reservation confirmed by guest - payment
{
"communication": {
"type": "reservation_confirmed_guest_paid",
"target": "corporate",
"emails_to": [
"susan40@example.net"
],
"emails_reply_to": [
"sparksdawn@example.net"
]
},
"reservation": {
"reservation_id": "1661263944",
"created_at": "2023-03-10T15:55:57+00:00",
"guest": {
"first_name": "John",
"last_name": "Doe",
"language": "en",
"email": "lisalong@example.org",
"phone_numbers": [
"+442912345678"
],
"emails": [
"guest@example.net"
]
},
"arrival_date": "2023-10-01",
"departure_date": "2023-10-02",
"source": {
"name": "WooDoo Online Reception",
"source_reservation_id": "ABC1234567"
},
"bookable_places": [
{
"how_many": 1,
"name": "Double Room"
}
],
"additional_occupancy_info": {
"persons": {
"not_distributed_total": 4
}
}
},
"property": {
"property_id": "1213394817",
"language": "en",
"name": "Your Hotel",
"phone_numbers": [
"+442912345678"
],
"reservation_emails": [
"yourhotel@example.net"
]
},
"type_specific_data": {
"updated_at": "1988-07-13T01:44:41+00:00",
"reason": "reprehenderit nobis officiis ipsum nobis officiis",
"payment": {
"amount": 8648.0,
"currency": "EUR"
}
}
}
Communication under the type reservation_confirmed_guest_paid
follows the confirm of a reservation in the WooDoo systems.
The guest has performed the confirmation paying the property.
reservation_confirmed_guest_paid
Properties
communication
(required) (object)type
(required) (string)target
(required) (string): Must be one of:['guest', 'property', 'corporate']
.emails_to
(required) (array)- Items (string)
emails_reply_to
(required) (array)- Items (string)
reservation
(required) (object)reservation_id
(required) (string): Reservation id.created_at
(required) (string)guest
(required) (object)first_name
(required) (string)last_name
(required) (string)language
(required) (string): ISO 639-1.email
(string)phone_numbers
(required) (array)- Items (string)
emails
(required) (array)- Items (string)
arrival_date
(required) (string)departure_date
(required) (string)source
(object)name
(required) (string)source_reservation_id
(required) (string)
bookable_places
(array)- Items (object)
how_many
(required) (integer)name
(required) (string)occupancy
(object): Missing if the info is not precise.persons
(required) (object)total
(required) (integer): adults + children.restrictions
(array): A subset of the total are children.- Items (object)
how_many
(required) (number)age
(number)
- Items (object)
- Items (object)
additional_occupancy_info
(object): Info about occupacy that can’t be distributed clearly.persons
(required) (object)not_distributed_total
(required) (integer)
property
(required) (object)property_id
(required) (string): Property id.language
(required) (string): ISO 639-1.name
(required) (string)phone_numbers
(array)- Items (string)
reservation_emails
(array)- Items (string)
type_specific_data
(required) (object)updated_at
(required) (string)reason
(required) (string): The reason for the reservation update.payment
(required) (object)amount
(required) (number)currency
(required) (string): ISO 4217.
Reservation cancelled by property
{
"communication": {
"type": "reservation_canceled_property",
"target": "guest",
"emails_to": [
"bowmanjamie@example.com"
],
"emails_reply_to": [
"sparksdawn@example.net"
]
},
"reservation": {
"reservation_id": "1661263944",
"created_at": "2023-03-10T15:55:57+00:00",
"guest": {
"first_name": "John",
"last_name": "Doe",
"language": "en",
"email": "steven23@example.net",
"phone_numbers": [
"+442912345678"
],
"emails": [
"guest@example.net"
]
},
"arrival_date": "2023-10-01",
"departure_date": "2023-10-02",
"source": {
"name": "WooDoo Online Reception",
"source_reservation_id": "ABC1234567"
},
"bookable_places": [
{
"how_many": 1,
"name": "Double Room"
}
],
"additional_occupancy_info": {
"persons": {
"not_distributed_total": 4
}
}
},
"property": {
"property_id": "1213394817",
"language": "en",
"name": "Your Hotel",
"phone_numbers": [
"+442912345678"
],
"reservation_emails": [
"yourhotel@example.net"
]
},
"type_specific_data": {
"updated_at": "2016-03-29T11:52:13+00:00",
"reason": "Lorem molestias, molestias, dolor"
}
}
Communication under the type reservation_canceled_property
follows the cancellation of a reservation in the WooDoo systems.
The property has performed the cancellation.
reservation_canceled_property
Properties
communication
(required) (object)type
(required) (string)target
(required) (string): Must be one of:['guest', 'property', 'corporate']
.emails_to
(required) (array)- Items (string)
emails_reply_to
(required) (array)- Items (string)
reservation
(required) (object)reservation_id
(required) (string): Reservation id.created_at
(required) (string)guest
(required) (object)first_name
(required) (string)last_name
(required) (string)language
(required) (string): ISO 639-1.email
(string)phone_numbers
(required) (array)- Items (string)
emails
(required) (array)- Items (string)
arrival_date
(required) (string)departure_date
(required) (string)source
(object)name
(required) (string)source_reservation_id
(required) (string)
bookable_places
(array)- Items (object)
how_many
(required) (integer)name
(required) (string)occupancy
(object): Missing if the info is not precise.persons
(required) (object)total
(required) (integer): adults + children.restrictions
(array): A subset of the total are children.- Items (object)
how_many
(required) (number)age
(number)
- Items (object)
- Items (object)
additional_occupancy_info
(object): Info about occupacy that can’t be distributed clearly.persons
(required) (object)not_distributed_total
(required) (integer)
property
(required) (object)property_id
(required) (string): Property id.language
(required) (string): ISO 639-1.name
(required) (string)phone_numbers
(array)- Items (string)
reservation_emails
(array)- Items (string)
type_specific_data
(required) (object)updated_at
(required) (string)reason
(required) (string): The reason for the reservation update.
Reservation cancelled by guest
{
"communication": {
"type": "reservation_canceled_guest",
"target": "guest",
"emails_to": [
"timothy15@example.org"
],
"emails_reply_to": [
"sparksdawn@example.net"
]
},
"reservation": {
"reservation_id": "1661263944",
"created_at": "2023-03-10T15:55:57+00:00",
"guest": {
"first_name": "John",
"last_name": "Doe",
"language": "en",
"email": "thomasbarron@example.com",
"phone_numbers": [
"+442912345678"
],
"emails": [
"guest@example.net"
]
},
"arrival_date": "2023-10-01",
"departure_date": "2023-10-02",
"source": {
"name": "WooDoo Online Reception",
"source_reservation_id": "ABC1234567"
},
"bookable_places": [
{
"how_many": 1,
"name": "Double Room"
}
],
"additional_occupancy_info": {
"persons": {
"not_distributed_total": 4
}
}
},
"property": {
"property_id": "1213394817",
"language": "en",
"name": "Your Hotel",
"phone_numbers": [
"+442912345678"
],
"reservation_emails": [
"yourhotel@example.net"
]
},
"type_specific_data": {
"updated_at": "1984-03-26T20:27:21+00:00",
"reason": "culpa! amet"
}
}
Communication under the type reservation_canceled_guest
follows the cancellation of a reservation in the WooDoo systems.
The guest has performed the cancellation.
reservation_canceled_guest
Properties
communication
(required) (object)type
(required) (string)target
(required) (string): Must be one of:['guest', 'property', 'corporate']
.emails_to
(required) (array)- Items (string)
emails_reply_to
(required) (array)- Items (string)
reservation
(required) (object)reservation_id
(required) (string): Reservation id.created_at
(required) (string)guest
(required) (object)first_name
(required) (string)last_name
(required) (string)language
(required) (string): ISO 639-1.email
(string)phone_numbers
(required) (array)- Items (string)
emails
(required) (array)- Items (string)
arrival_date
(required) (string)departure_date
(required) (string)source
(object)name
(required) (string)source_reservation_id
(required) (string)
bookable_places
(array)- Items (object)
how_many
(required) (integer)name
(required) (string)occupancy
(object): Missing if the info is not precise.persons
(required) (object)total
(required) (integer): adults + children.restrictions
(array): A subset of the total are children.- Items (object)
how_many
(required) (number)age
(number)
- Items (object)
- Items (object)
additional_occupancy_info
(object): Info about occupacy that can’t be distributed clearly.persons
(required) (object)not_distributed_total
(required) (integer)
property
(required) (object)property_id
(required) (string): Property id.language
(required) (string): ISO 639-1.name
(required) (string)phone_numbers
(array)- Items (string)
reservation_emails
(array)- Items (string)
type_specific_data
(required) (object)updated_at
(required) (string)reason
(required) (string): The reason for the reservation update.
Reservation cancelled by OTA
{
"communication": {
"type": "reservation_canceled_ota",
"target": "guest",
"emails_to": [
"quinntodd@example.net"
],
"emails_reply_to": [
"sparksdawn@example.net"
]
},
"reservation": {
"reservation_id": "1661263944",
"created_at": "2023-03-10T15:55:57+00:00",
"guest": {
"first_name": "John",
"last_name": "Doe",
"language": "en",
"email": "scott25@example.com",
"phone_numbers": [
"+442912345678"
],
"emails": [
"guest@example.net"
]
},
"arrival_date": "2023-10-01",
"departure_date": "2023-10-02",
"source": {
"name": "WooDoo Online Reception",
"source_reservation_id": "ABC1234567"
},
"bookable_places": [
{
"how_many": 1,
"name": "Double Room"
}
],
"additional_occupancy_info": {
"persons": {
"not_distributed_total": 4
}
}
},
"property": {
"property_id": "1213394817",
"language": "en",
"name": "Your Hotel",
"phone_numbers": [
"+442912345678"
],
"reservation_emails": [
"yourhotel@example.net"
]
},
"type_specific_data": {
"updated_at": "2014-09-11T02:42:12+00:00",
"reason": "esse possimus ipsum esse reiciendis architecto"
}
}
Communication under the type reservation_canceled_ota
follows the cancellation of a reservation in the WooDoo systems.
The cancellation comes from an OTA.
reservation_canceled_ota
Properties
communication
(required) (object)type
(required) (string)target
(required) (string): Must be one of:['guest', 'property', 'corporate']
.emails_to
(required) (array)- Items (string)
emails_reply_to
(required) (array)- Items (string)
reservation
(required) (object)reservation_id
(required) (string): Reservation id.created_at
(required) (string)guest
(required) (object)first_name
(required) (string)last_name
(required) (string)language
(required) (string): ISO 639-1.email
(string)phone_numbers
(required) (array)- Items (string)
emails
(required) (array)- Items (string)
arrival_date
(required) (string)departure_date
(required) (string)source
(object)name
(required) (string)source_reservation_id
(required) (string)
bookable_places
(array)- Items (object)
how_many
(required) (integer)name
(required) (string)occupancy
(object): Missing if the info is not precise.persons
(required) (object)total
(required) (integer): adults + children.restrictions
(array): A subset of the total are children.- Items (object)
how_many
(required) (number)age
(number)
- Items (object)
- Items (object)
additional_occupancy_info
(object): Info about occupacy that can’t be distributed clearly.persons
(required) (object)not_distributed_total
(required) (integer)
property
(required) (object)property_id
(required) (string): Property id.language
(required) (string): ISO 639-1.name
(required) (string)phone_numbers
(array)- Items (string)
reservation_emails
(array)- Items (string)
type_specific_data
(required) (object)updated_at
(required) (string)reason
(required) (string): The reason for the reservation update.