Introduction
Welcome to the Booking Experts API v3 reference documentation. API calls are made by a Booking Experts App. For more information on Booking Experts Apps, please see our App Guide.
Basics
Standards
The Booking Experts API is organized around REST and it follows the JSON API specification. The API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors.
Documentation is standardized by using the Open API 3 (OAS3) specification, this allows you to inspect the API using other clients like for example Swagger UI and Postman.
The specification is hosted here: https://api.bookingexperts.nl/v3/oas3.json
Responses
curl --request GET \
--url https://api.bookingexperts.nl/v3/administrations \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY'
Might produce the following output
{
"errors": [
{
"status": 401,
"code": "RESOURCE_NOT_FOUND",
"title": "Unauthorized error",
"detail": "Please make sure to set the Authorization HTTP header"
}
]
}
The Booking Experts API will always respond with a HTTP status code. The API can return the following codes:
Code | Semantic | Meaning |
---|---|---|
200 |
OK | Request was successful |
400 |
Bad Request | Parameters for the request are missing or malformed. Body contains the errors. |
401 |
Unauthorized | Your API key is wrong |
403 |
Forbidden | IP is blacklisted for API usage, see Throttling information |
404 |
Not Found | Entity not found |
422 |
Unprocessable entity | Saving the entity in the database failed due to validation errors. Body contains the errors. |
429 |
Too Many Requests | You're requesting too many kittens! Slow down! |
5XX |
Server Errors | Something went wrong on Booking Experts's end. We are probably already busy solving the issue. It's your responsibility to retry the request at a later point. |
Accept Language
You can always pass an Accept-Language header containing a comma separated list of locales. This will limit the result of 'localized' attributes to the locales specified.
X_BE_ENV header
When your application receives a request from Booking Experts, for example when a webhook or command is called, the X_BE_ENV
header is passed. Usually, the value of this header will be 'production', denoting that the request originated from our production environment.
For testing purposes however, it might be possible that your app will receive requests from a different environment, for example 'staging'. You can check
this header if you want to handle these requests differently.
X_BE_SIGNATURE header
When your application receives a request from Booking Experts, for example when a webhook or command is called, the X_BE_SIGNATURE
header is passed to allow you to verify that the request was sent by our systems. It uses a HMAC hexdigest to compute the hash based on your Client Secret.
To verify a request, your code should look something like this:
def verify_signature(payload_body)
signature = 'sha256=' + OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), ENV['OAUTH_CLIENT_SECRET'], payload_body)
return halt 500, "Signatures didn't match!" unless Rack::Utils.secure_compare(signature, request.env['HTTP_X_BE_SIGNATURE'])
end
import os
secret = os.environ['OAUTH_CLIENT_SECRET']
header_signature = request.headers.get('X_BE_SIGNATURE')
# HMAC requires the key to be bytes, but data is string
mac = hmac.new(str(secret), msg=request.data, digestmod='sha256')
# Python prior to 2.7.7 does not have hmac.compare_digest
if hexversion >= 0x020707F0:
if not hmac.compare_digest(str(mac.hexdigest()), str(signature)):
abort(403)
else:
# What compare_digest provides is protection against timing
# attacks; we can live without this protection for a web-based
# application
if not str(mac.hexdigest()) == str(signature):
abort(403)
$sig_check = 'sha256=' . hash_hmac('sha256', Request::getContent(), $_ENV['OAUTH_CLIENT_SECRET']);
if ($sig_check === Request::header('HTTP_X_BE_SIGNATURE')) { // php >=5.6 and above should use hash_equals() for comparison
// sigs match, do stuff
}
- No matter which implementation you use, the hash signature starts with sha256=, using the key of your Client Secret and your payload body.
- Using a plain == operator is not advised. A method like secure_compare performs a "constant time" string comparison, which renders it safe from certain timing attacks against regular equality operators.
- Note that this approach has been taken from the Github webhook docs. There might be more examples on the web for this solution that can be used as inspiration.
Throttling
Usage of the Booking Experts API is virtually unlimited. However, to prevent fraud and abuse, requests to the API are throttled. By default you are allowed to call the API 500 times within a moving window of 15 minutes. Additionally, bursts of 100 calls per minute are allowed within this window.
While within the limit, each response contains a X-RateLimit-Limit
and a X-RateLimit-Remaining
header containing the set limit & the remaining allowance in the window.
If you exceed the limit, the API will respond with a 429 Too many requests response. This response contains a header Retry-After containing the time after which a new calls are allowed.
If your use case requires more lenient rate limits, please contact us at api@bookingexperts.nl to request a higher limit.
Pagination
{
"links": {
"self": "https://api.bookingexperts.nl/v3/administrations/1/reservations?page%5Bnumber%5D=2",
"first": "https://api.bookingexperts.nl/v3/administrations/1/reservations?page%5Bnumber%5D=1",
"last": "https://api.bookingexperts.nl/v3/administrations/1/reservations?page%5Bnumber%5D=14",
"prev": "https://api.bookingexperts.nl/v3/administrations/1/reservations?page%5Bnumber%5D=1",
"next": "https://api.bookingexperts.nl/v3/administrations/1/reservations?page%5Bnumber%5D=3"
}
"data": [...]
}
All collection responses include pagination. In the response body you will find a links
node that contains links to first
, self
, next
, prev
, last
pages.
Most responses have 30 records per page.
Sparse field sets
By default every request returns a quite complete set of fields (attributes and relationships). You can limit or expand this default set however. Per record type you can specify which fields to include.
curl --request GET \
--url 'http://api.lvh.me:3000/v3/administrations?fields[administration]=name,description' \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY' | jsonpp
Will return only the name and description fields of every administration. Note that this will also omit defined relationships of the resource.
Filters
The following attribute filters are available on GET API calls:
attr=term
: attr = 'term'attr=~term
: attr LIKE '%term%'attr=term,term
: attr IN ('term', 'term')attr=a..b
: BETWEEN 'a' AND 'b'
All expressions can be inverted by prefixing a !
, this holds for the entire expression.
Security
{
"errors": [{
"status": "403",
"code": "NO_VALID_SCOPE",
"title": "Forbidden",
"detail": "The scopes for your application do not grant you permission to perform this action. One of the following scopes is required: payment|write."
}]
}
To be able to fetch resources, either directly or through including related resources, you need the appropriate permissions. Permissions can be defined in you App's settings and they translate into OAuth2 scopes that the user needs to explicitly approve. When you are missing permissions for the call you are executing, an error will be returned like the one on the right.
Note: When you update your App's permissions, these will apply directly when using API keys. When using OAuth2 however, subscribers will need to grant permission again in order for the new permissions to be applied.
Example permissions (scopes):
availability|read
reservation|read
category|read
payment|write
There are also some channel specific permissions. This functionality is meant for tour operators who don't need to access all reservations, but only reservations and related resources that have been created through their own channel:
channel::reservation|read
channel::order|read
channel::customer|read
Authorization scopes
Scope | Scope Description |
---|---|
accommodation_subtype | read |
administration | read |
agenda_period | read |
area_type | read |
arrival_checkout_date | read |
availability | read |
category_group | read |
category | read |
channel::customer | read |
channel::order | read |
channel::reservation | read |
channel | read |
channel | write |
city | read |
contact | read |
cost | read |
currency_conversion | read |
customer | read |
discount_action | read |
discount_card | read |
extra_order_item | write |
extra | read |
internal_message | write |
invoice | read |
label | read |
message | write |
order | read |
organization | read |
owner | read |
package_entry | read |
package | read |
payment_method | read |
payment | read |
payment | write |
period | read |
region | read |
rentable_identity | read |
rentable | read |
reservation | read |
reservation | write |
review | read |
room_type | read |
room | read |
subscription | read |
terms | read |
Administrations
GET administrations
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/administrations \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY'
GET /v3/administrations HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/administrations");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/administrations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/administrations", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/administrations",
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: application/vnd.api+json",
"accept-language: en,nl",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/administrations")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/administrations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/administrations
Returns all administrations accessible for the current subscription
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
page[number] | query | string | false | string | Page number |
page[size] | query | string | false | string | Page size |
sort | query | string | false | string | Sort. Specify a comma separated list of attributes to sort on. Prefix attribute with a - to sort in descending order |
fields[administration] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
filter[id] | query | string | false | string | Filter on id |
filter[name] | query | string | false | string | Filter on name |
filter[phone] | query | string | false | string | Filter on phone |
filter[website] | query | string | false | string | Filter on website |
filter[description] | query | string | false | string | Filter on description |
filter[surroundings_description] | query | string | false | string | Filter on surroundings_description |
filter[available_locales] | query | string | false | string | Filter on available_locales |
filter[timezone] | query | string | false | string | Filter on timezone |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
Example responses
200 Response
{
"data": [
{
"id": "1",
"type": "administration",
"attributes": {
"name": "string",
"phone": "string",
"website": "string",
"description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"surroundings_description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"available_locales": [
"string"
],
"timezone": "string"
},
"links": {
"self": "string"
},
"meta": {
"temp_id": "string"
}
}
],
"meta": {
"pagination": {
"total_records": 0,
"page": 0,
"size": 0
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | AdministrationCollectionResponse | Inline |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | [Administration] | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— name | string | false | none | none |
——— phone | string | false | none | none |
——— website | string | false | none | none |
——— description | object | false | none | A description of the administration |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— surroundings_description | object | false | none | A description of the surroundings |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— available_locales | [string] | false | none | Enabled locales |
——— timezone | string | false | none | The timezone of the administration, for example: Europe/Amsterdam |
—— links | object | false | none | Links |
——— self | string | false | none | Link to self |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
— meta | object | false | none | none |
—— pagination | object | false | none | none |
——— total_records | integer | false | none | none |
——— page | integer | false | none | none |
——— size | integer | false | none | none |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
GET administration
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/administrations/string \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY'
GET /v3/administrations/string HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/administrations/string");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/administrations/string")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/administrations/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/administrations/string",
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: application/vnd.api+json",
"accept-language: en,nl",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/administrations/string")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/administrations/string"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/administrations/{id}
Returns an administration of the current organization
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
id | path | string | true | string | Resource ID |
fields[administration] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
filter[id] | query | string | false | string | Filter on id |
filter[name] | query | string | false | string | Filter on name |
filter[phone] | query | string | false | string | Filter on phone |
filter[website] | query | string | false | string | Filter on website |
filter[description] | query | string | false | string | Filter on description |
filter[surroundings_description] | query | string | false | string | Filter on surroundings_description |
filter[available_locales] | query | string | false | string | Filter on available_locales |
filter[timezone] | query | string | false | string | Filter on timezone |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
Example responses
200 Response
{
"data": {
"id": "1",
"type": "administration",
"attributes": {
"name": "string",
"phone": "string",
"website": "string",
"description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"surroundings_description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"available_locales": [
"string"
],
"timezone": "string"
},
"links": {
"self": "string"
},
"meta": {
"temp_id": "string"
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | AdministrationResponse | Inline |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | Administration | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— name | string | false | none | none |
——— phone | string | false | none | none |
——— website | string | false | none | none |
——— description | object | false | none | A description of the administration |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— surroundings_description | object | false | none | A description of the surroundings |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— available_locales | [string] | false | none | Enabled locales |
——— timezone | string | false | none | The timezone of the administration, for example: Europe/Amsterdam |
—— links | object | false | none | Links |
——— self | string | false | none | Link to self |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
Availabilities
GET availabilities
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/availabilities \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY'
GET /v3/availabilities HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/availabilities");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/availabilities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/availabilities", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/availabilities",
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: application/vnd.api+json",
"accept-language: en,nl",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/availabilities")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/availabilities"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/availabilities
Returns availability & prices
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
fields[availability] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
include_rentable_type_counts | query | boolean | false | true | When true, the amount of results per rentable type will be added to the metadata |
include_tag_counts | query | boolean | false | true | When true, the amount of results per tag will be added to the metadata |
referrer | query | string | false | string | Referrer name |
filter[start_date] | query | string | false | 2010-01-01..2040-01-01 | Filter on start date. Expects a date range. Note: date ranges have an exclusive end date. |
filter[overlaps_date] | query | string | false | 2010-01-01..2040-01-01 | Filter availabilities that (partially) overlap these dates. |
filter[includes_date] | query | string | false | string | Filter availabilities that contain the specified date range. |
filter[arrangement] | query | string | false | string | Filter on availabilities that exactly match the supplied date range. |
filter[los] | query | string | false | 1..21 | Filter on length of stay. |
filter[wday] | query | integer | false | 0 | Filter on a particular week day. 0 = sunday. |
filter[administration_ids] | query | string | false | string | Filter on administrations. Specify a comma separated list. |
filter[category_ids] | query | string | false | string | Filter on categories. Specify a comma separated list. |
filter[-category_ids] | query | string | false | string | Exclude categories. Specify a comma separated list. |
filter[region_ids] | query | string | false | string | Filter on regions. Specify a comma separated list. |
filter[-region_ids] | query | string | false | string | Exclude regions. Specify a comma separated list. |
filter[accommodation_subtype_ids] | query | string | false | string | Filter on accommodation subtypes. Specify a comma separated list. |
filter[-accommodation_subtype_ids] | query | string | false | string | Exclude accommodation subtypes. Specify a comma separated list. |
filter[tag_ids] | query | string | false | string | Filter on tags. Specify a comma separated list. |
filter[package_id] | query | string | false | string | Filter on package ID. |
filter[discount_campaign_id] | query | string | false | string | Filter on discount campaign ID. |
filter[country_codes] | query | string | false | string | Filter on country codes. Specify a comma separated list of ISO 3166-1 alpha-2 country codes. For example: NL,EN,DE. |
filter[-country_codes] | query | string | false | string | Exclude country codes. Specify a comma separated list of ISO 3166-1 alpha-2 country codes. |
filter[rentable_types] | query | string | false | bungalow,camping | Filter on rentable_types. Specify a comma separated list. Available rentable types: bungalow, camping, hotelroom, berth, apartment, accommodation, year_site. |
filter[-rentable_types] | query | string | false | string | Exclude rentable types. Specify a comma separated list. Available rentable types: bungalow, camping, hotelroom, berth, apartment, accommodation, year_site. |
filter[guest_group][seniors] | query | integer | false | 0 | Filter on number of seniors. |
filter[guest_group][adults] | query | integer | false | 2 | Filter on number of adults. |
filter[guest_group][adolescents] | query | integer | false | 0 | Filter on number of adolescents. |
filter[guest_group][children] | query | integer | false | 0 | Filter on number of children. |
filter[guest_group][babies] | query | integer | false | 0 | Filter on number of babies. |
filter[guest_group][pets] | query | integer | false | 0 | Filter on number of pets. |
filter[price] | query | string | false | 0.0..5000.00 | Filter on a price range |
filter[currency] | query | string | false | EUR | Filter on a specific ISO 4217 currency code. By default the prices are returned in the administration's native currency. Results can differ per currency. |
filter[number_of_bedrooms] | query | integer | false | 0 | Filter on category number of bedrooms |
filter[number_of_beds] | query | integer | false | 0 | Filter on category number of beds |
filter[number_of_showers] | query | integer | false | 0 | Filter on category number of showers |
filter[number_of_toilets] | query | integer | false | 0 | Filter on category number of toilets |
filter[number_of_bathrooms] | query | integer | false | 0 | Filter on category number of bathrooms |
filter[number_of_parking_spots] | query | integer | false | 0 | Filter on category number of parking spots |
filter[number_of_child_beds] | query | integer | false | 0 | Filter on category number of child beds |
filter[number_of_child_chairs] | query | integer | false | 0 | Filter on category number of child chairs |
sorters | query | string | false | all_in_amount | Specify a comma separated list of sorters to apply. There are 10 possible sorters: |
sorter[los][desc] | query | boolean | false | true | Boolean specifying the sort direction for the los sorter. When unspecified, ascending order is implied. |
sorter[los_distance][desc] | query | boolean | false | true | Boolean specifying the sort direction for the los_distance sorter. When unspecified, ascending order is implied. |
sorter[los_distance][los] | query | integer | false | 7 | Length of stay for the los_distance sorter |
sorter[start_date][desc] | query | boolean | false | true | Boolean specifying the sort direction for the start_date sorter. When unspecified, ascending order is implied. |
sorter[start_date_distance][desc] | query | boolean | false | true | Boolean specifying the sort direction for the start_date_distance sorter. When unspecified, ascending order is implied. |
sorter[start_date_distance][start_date] | query | string | false | 2017-07-01 | Start date for the start_date_distance sorter |
sorter[arrangement_distance][desc] | query | boolean | false | true | Boolean specifying the sort direction for the arrangement_distance sorter. When unspecified, ascending order is implied. |
sorter[arrangement_distance][arrangement] | query | string | false | 2017-07-01..2017-07-08 | Arrangement for the arrangement_distance sorter |
sorter[max_guests][desc] | query | boolean | false | true | Boolean specifying the sort direction for the max_guests sorter. When unspecified, ascending order is implied. |
sorter[highlighted][desc] | query | boolean | false | true | Boolean specifying the sort direction for the highlighted sorter. When unspecified, ascending order is implied. |
sorter[all_in_amount][desc] | query | boolean | false | true | Boolean specifying the sort direction for the all_in_amount sorter. When unspecified, ascending order is implied. |
sorter[tag_ids_match_score][desc] | query | boolean | false | true | Boolean specifying the sort direction for the tag_ids_match_score sorter. When unspecified, ascending order is implied. |
sorter[tag_ids_match_score][tag_ids] | query | string | false | 1,2 | Tag IDs for the tag_ids_match_score sorter |
sorter[avg_score][desc] | query | boolean | false | true | Boolean specifying the sort direction for the avg_score sorter. When unspecified, ascending order is implied. |
limit | query | string | false | availabilities | Specify a limiter here. There are 4 different limiters: |
limiter[availabilities][limit] | query | integer | false | 10 | Return limit availabilities |
limiter[start_dates][limit] | query | integer | false | 10 | Limit to the limit best arrival dates |
limiter[start_dates][availabilities] | query | integer | false | 10 | Number of availabilities to return |
limiter[categories][limit] | query | integer | false | 10 | Limit to the limit best categories |
limiter[categories][offset] | query | integer | false | 0 | Result offset for the categories limiter, useful for pagination |
limiter[categories][availabilities] | query | integer | false | 10 | Number of availabilities to return |
limiter[administrations][limit] | query | integer | false | 10 | Limit to the limit best administrations |
limiter[administrations][categories] | query | integer | false | 3 | Limit to the limit best categories |
limiter[administrations][availabilities] | query | integer | false | 10 | Number of availabilities to return |
Detailed descriptions
sorters: Specify a comma separated list of sorters to apply. There are 10 possible sorters:
los
Order by length of staylos_distance
Order by the distance of a particular length of staystart_date
Order by start datesstart_date_distance
Order by the distance of a particular start datearrangement_distance
Order by the distance of a particular arrangementmax_guests
Order by maximum guests of the categoryhighlighted
Order by availabilities that have a category that is highlightedall_in_amount
Order by pricetag_ids_match_score
Order by whether the tags matchavg_score
Order by average review score of the category
Configuration for each applied sorter (for example descending order) must be passed separately, see the options below.
limit: Specify a limiter here. There are 4 different limiters:
availabilities
Returnlimit
availabilitiesstart_dates
Limit to thelimit
best arrival datescategories
Limit to thelimit
best categoriesadministrations
Limit to thelimit
best administrations
Configuration for the chosen limiter (for example the number of availabilities to return) must be passed separately, see the options below.
Example responses
200 Response
{
"data": {
"id": "1",
"type": "availability",
"attributes": {
"start_date": "2021-03-03",
"los": 7,
"checkin_time": "14:00",
"checkout_time": "10:00",
"price": {
"currency": "string",
"value": "string"
},
"original_price": {
"currency": "string",
"value": "string"
},
"rent_price": {
"currency": "string",
"value": "string"
},
"original_rent_price": {
"currency": "string",
"value": "string"
},
"stock": 2
},
"relationships": {
"administration": {
"data": {
"id": "string",
"type": "administration",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"category": {
"data": {
"id": "string",
"type": "category",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"discount_campaign": {
"data": {
"id": "string",
"type": "discount_campaign",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"missing_tags": {
"data": [
{
"id": "string",
"type": "tag",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"available_rentables": {
"data": [
{
"id": "string",
"type": "rentable",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
}
},
"meta": {
"temp_id": "string"
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | AvailabilityResponse | Inline |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | Availability | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— start_date | string(date) | false | none | Date of arrival |
——— los | integer | false | none | Length of stay in nights |
——— checkin_time | string(time) | false | none | none |
——— checkout_time | string(time) | false | none | none |
——— price | object | false | none | All-in price considering rent, extras and discounts. Will be null when no guest group supplied |
———— currency | string | false | none | none |
———— value | string | false | none | none |
——— original_price | object | false | none | Price considering rent, extras but without discounts. Will be null when no guest group supplied |
———— currency | string | false | none | none |
———— value | string | false | none | none |
——— rent_price | object | false | none | Rent-only price. Does not include extra costs. Includes applicable discount |
———— currency | string | false | none | none |
———— value | string | false | none | none |
——— original_rent_price | object | false | none | Rent-only price without applicable discount |
———— currency | string | false | none | none |
———— value | string | false | none | none |
——— stock | integer | false | none | The number of units of this category available in this period. Takes filters and allotments into account |
—— relationships | object | false | none | Relationships |
——— administration | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | administration ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— category | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | category ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— discount_campaign | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | discount_campaign ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— missing_tags | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | missing_tags ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— available_rentables | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | available_rentables ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
Categories
GET categories
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/administrations/string/categories \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY'
GET /v3/administrations/string/categories HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/administrations/string/categories");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/administrations/string/categories")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/administrations/string/categories", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/administrations/string/categories",
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: application/vnd.api+json",
"accept-language: en,nl",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/administrations/string/categories")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/administrations/string/categories"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/administrations/{administration_id}/categories
Returns categories of the administration
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
administration_id | path | string | true | string | Administration ID |
page[number] | query | string | false | string | Page number |
page[size] | query | string | false | string | Page size |
sort | query | string | false | string | Sort. Specify a comma separated list of attributes to sort on. Prefix attribute with a - to sort in descending order |
fields[category] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
filter[id] | query | string | false | string | Filter on id |
filter[name] | query | string | false | string | Filter on name |
filter[description] | query | string | false | string | Filter on description |
filter[short_description] | query | string | false | string | Filter on short_description |
filter[usps] | query | string | false | string | Filter on usps |
filter[archived] | query | string | false | string | Filter on archived |
filter[highlighted] | query | string | false | string | Filter on highlighted |
filter[reference] | query | string | false | string | Filter on reference |
filter[minimum_number_of_nights] | query | string | false | string | Filter on minimum_number_of_nights |
filter[max_number_of_people] | query | string | false | string | Filter on max_number_of_people |
filter[max_number_of_babies] | query | string | false | string | Filter on max_number_of_babies |
filter[max_number_of_pets] | query | string | false | string | Filter on max_number_of_pets |
filter[prices_updated_at] | query | string | false | string | Filter on prices_updated_at |
filter[prices_indexed_at] | query | string | false | string | Filter on prices_indexed_at |
filter[stock_updated_at] | query | string | false | string | Filter on stock_updated_at |
filter[stock_indexed_at] | query | string | false | string | Filter on stock_indexed_at |
filter[costs_updated_at] | query | string | false | string | Filter on costs_updated_at |
filter[extras_updated_at] | query | string | false | string | Filter on extras_updated_at |
filter[bookable_discounts_changed_at] | query | string | false | string | Filter on bookable_discounts_changed_at |
filter[number_of_bedrooms] | query | string | false | string | Filter on number_of_bedrooms |
filter[number_of_beds] | query | string | false | string | Filter on number_of_beds |
filter[number_of_showers] | query | string | false | string | Filter on number_of_showers |
filter[number_of_toilets] | query | string | false | string | Filter on number_of_toilets |
filter[number_of_bathrooms] | query | string | false | string | Filter on number_of_bathrooms |
filter[number_of_parking_spots] | query | string | false | string | Filter on number_of_parking_spots |
filter[number_of_child_beds] | query | string | false | string | Filter on number_of_child_beds |
filter[number_of_child_chairs] | query | string | false | string | Filter on number_of_child_chairs |
filter[last_date_with_price] | query | string | false | string | Filter on last_date_with_price |
filter[latitude] | query | string | false | string | Filter on latitude |
filter[longitude] | query | string | false | string | Filter on longitude |
filter[address] | query | string | false | string | Filter on address |
filter[summer_video_id] | query | string | false | string | Filter on summer_video_id |
filter[winter_video_id] | query | string | false | string | Filter on winter_video_id |
filter[whole_year_video_id] | query | string | false | string | Filter on whole_year_video_id |
filter[administration] | query | string | false | string | Filter on administration. Specify a comma separated list of IDs to filter on. |
filter[city] | query | string | false | string | Filter on city. Specify a comma separated list of IDs to filter on. |
filter[terms] | query | string | false | string | Filter on terms. Specify a comma separated list of IDs to filter on. |
filter[accommodation_subtype] | query | string | false | string | Filter on accommodation_subtype. Specify a comma separated list of IDs to filter on. |
filter[images] | query | string | false | string | Filter on images. Specify a comma separated list of IDs to filter on. |
filter[guest_group_limits] | query | string | false | string | Filter on guest_group_limits. Specify a comma separated list of IDs to filter on. |
filter[rooms] | query | string | false | string | Filter on rooms. Specify a comma separated list of IDs to filter on. |
filter[custom_attributes] | query | string | false | string | Filter on custom_attributes. Specify a comma separated list of IDs to filter on. |
filter[tags] | query | string | false | string | Filter on tags. Specify a comma separated list of IDs to filter on. |
include | query | string | false | string | Includes list. Specify a comma separated list of resources to include. |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
Example responses
200 Response
{
"data": [
{
"id": "1",
"type": "category",
"attributes": {
"name": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"short_description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"usps": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"archived": true,
"highlighted": true,
"reference": "string",
"rentable_type": "string",
"minimum_number_of_nights": 0,
"max_number_of_people": 0,
"max_number_of_seniors": 0,
"max_number_of_adults": 0,
"max_number_of_adolescents": 0,
"max_number_of_children": 0,
"max_number_of_babies": 0,
"max_number_of_pets": 0,
"prices_updated_at": "2021-03-03T08:31:26Z",
"prices_indexed_at": "2021-03-03T08:31:26Z",
"stock_updated_at": "2021-03-03T08:31:26Z",
"stock_indexed_at": "2021-03-03T08:31:26Z",
"costs_updated_at": "2021-03-03T08:31:26Z",
"extras_updated_at": "2021-03-03T08:31:26Z",
"bookable_discounts_changed_at": "2021-03-03T08:31:26Z",
"number_of_bedrooms": 0,
"number_of_beds": 0,
"number_of_showers": 0,
"number_of_toilets": 0,
"number_of_bathrooms": 0,
"number_of_parking_spots": 0,
"number_of_child_beds": 0,
"number_of_child_chairs": 0,
"max_baby_age": 0,
"max_child_age": 0,
"max_adolescent_age": 0,
"min_senior_age": 0,
"pets_allowed": true,
"host_image_url": "string",
"same_day_bookings_allowed": true,
"same_day_booking_closing_time": "string",
"last_date_with_price": "2021-03-03",
"latitude": 0,
"longitude": 0,
"address": "string",
"summer_video_id": "string",
"winter_video_id": "string",
"whole_year_video_id": "string"
},
"relationships": {
"administration": {
"data": {
"id": "string",
"type": "administrations",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"city": {
"data": {
"id": "string",
"type": "",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"terms": {
"data": {
"id": "string",
"type": "",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"accommodation_subtype": {
"data": {
"id": "string",
"type": "accommodation_subtype",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"images": {
"data": [
{
"id": "string",
"type": "image",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"guest_group_limits": {
"data": [
{
"id": "string",
"type": "guest_group_limit",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"rooms": {
"data": [
{
"id": "string",
"type": "room",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"custom_attributes": {
"data": [
{
"id": "string",
"type": "custom_attribute",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"tags": {
"data": [
{
"id": "string",
"type": "",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"optional_tags": {
"data": [
{
"id": "string",
"type": "",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
}
},
"meta": {
"temp_id": "string"
}
}
],
"meta": {
"pagination": {
"total_records": 0,
"page": 0,
"size": 0
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | CategoryCollectionResponse | Inline |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | [Category] | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— name | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— description | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— short_description | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— usps | object | false | none | Translated unique selling points |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— archived | boolean | false | none | none |
——— highlighted | boolean | false | none | Whether this category should be highlighted on the website |
——— reference | string | false | none | none |
——— rentable_type | string | false | none | none |
——— minimum_number_of_nights | integer | false | none | none |
——— max_number_of_people | integer | false | none | none |
——— max_number_of_seniors | integer | false | none | none |
——— max_number_of_adults | integer | false | none | none |
——— max_number_of_adolescents | integer | false | none | none |
——— max_number_of_children | integer | false | none | none |
——— max_number_of_babies | integer | false | none | none |
——— max_number_of_pets | integer | false | none | none |
——— prices_updated_at | string(date-time) | false | none | none |
——— prices_indexed_at | string(date-time) | false | none | none |
——— stock_updated_at | string(date-time) | false | none | none |
——— stock_indexed_at | string(date-time) | false | none | none |
——— costs_updated_at | string(date-time) | false | none | none |
——— extras_updated_at | string(date-time) | false | none | none |
——— bookable_discounts_changed_at | string(date-time) | false | none | none |
——— number_of_bedrooms | integer | false | none | none |
——— number_of_beds | integer | false | none | none |
——— number_of_showers | integer | false | none | none |
——— number_of_toilets | integer | false | none | none |
——— number_of_bathrooms | integer | false | none | none |
——— number_of_parking_spots | integer | false | none | none |
——— number_of_child_beds | integer | false | none | none |
——— number_of_child_chairs | integer | false | none | none |
——— max_baby_age | integer | false | none | none |
——— max_child_age | integer | false | none | none |
——— max_adolescent_age | integer | false | none | none |
——— min_senior_age | integer | false | none | none |
——— pets_allowed | boolean | false | none | none |
——— host_image_url | string | false | none | none |
——— same_day_bookings_allowed | boolean | false | none | none |
——— same_day_booking_closing_time | string(time) | false | none | none |
——— last_date_with_price | string(date) | false | none | none |
——— latitude | number(float) | false | none | none |
——— longitude | number(float) | false | none | none |
——— address | string | false | none | none |
——— summer_video_id | string | false | none | none |
——— winter_video_id | string | false | none | none |
——— whole_year_video_id | string | false | none | none |
—— relationships | object | false | none | Relationships |
——— administration | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | administration ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— city | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | city ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— terms | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | terms ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— accommodation_subtype | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | accommodation_subtype ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— images | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | images ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— guest_group_limits | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | guest_group_limits ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— rooms | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | rooms ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— custom_attributes | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | custom_attributes ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— tags | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | tags ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— optional_tags | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | optional_tags ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
— meta | object | false | none | none |
—— pagination | object | false | none | none |
——— total_records | integer | false | none | none |
——— page | integer | false | none | none |
——— size | integer | false | none | none |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
GET category
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/administrations/string/categories/string \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY'
GET /v3/administrations/string/categories/string HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/administrations/string/categories/string");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/administrations/string/categories/string")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/administrations/string/categories/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/administrations/string/categories/string",
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: application/vnd.api+json",
"accept-language: en,nl",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/administrations/string/categories/string")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/administrations/string/categories/string"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/administrations/{administration_id}/categories/{id}
Returns the category for the given ID
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
administration_id | path | string | true | string | Administration ID |
id | path | string | true | string | Resource ID |
fields[category] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
filter[id] | query | string | false | string | Filter on id |
filter[name] | query | string | false | string | Filter on name |
filter[description] | query | string | false | string | Filter on description |
filter[short_description] | query | string | false | string | Filter on short_description |
filter[usps] | query | string | false | string | Filter on usps |
filter[archived] | query | string | false | string | Filter on archived |
filter[highlighted] | query | string | false | string | Filter on highlighted |
filter[reference] | query | string | false | string | Filter on reference |
filter[minimum_number_of_nights] | query | string | false | string | Filter on minimum_number_of_nights |
filter[max_number_of_people] | query | string | false | string | Filter on max_number_of_people |
filter[max_number_of_babies] | query | string | false | string | Filter on max_number_of_babies |
filter[max_number_of_pets] | query | string | false | string | Filter on max_number_of_pets |
filter[prices_updated_at] | query | string | false | string | Filter on prices_updated_at |
filter[prices_indexed_at] | query | string | false | string | Filter on prices_indexed_at |
filter[stock_updated_at] | query | string | false | string | Filter on stock_updated_at |
filter[stock_indexed_at] | query | string | false | string | Filter on stock_indexed_at |
filter[costs_updated_at] | query | string | false | string | Filter on costs_updated_at |
filter[extras_updated_at] | query | string | false | string | Filter on extras_updated_at |
filter[bookable_discounts_changed_at] | query | string | false | string | Filter on bookable_discounts_changed_at |
filter[number_of_bedrooms] | query | string | false | string | Filter on number_of_bedrooms |
filter[number_of_beds] | query | string | false | string | Filter on number_of_beds |
filter[number_of_showers] | query | string | false | string | Filter on number_of_showers |
filter[number_of_toilets] | query | string | false | string | Filter on number_of_toilets |
filter[number_of_bathrooms] | query | string | false | string | Filter on number_of_bathrooms |
filter[number_of_parking_spots] | query | string | false | string | Filter on number_of_parking_spots |
filter[number_of_child_beds] | query | string | false | string | Filter on number_of_child_beds |
filter[number_of_child_chairs] | query | string | false | string | Filter on number_of_child_chairs |
filter[last_date_with_price] | query | string | false | string | Filter on last_date_with_price |
filter[latitude] | query | string | false | string | Filter on latitude |
filter[longitude] | query | string | false | string | Filter on longitude |
filter[address] | query | string | false | string | Filter on address |
filter[summer_video_id] | query | string | false | string | Filter on summer_video_id |
filter[winter_video_id] | query | string | false | string | Filter on winter_video_id |
filter[whole_year_video_id] | query | string | false | string | Filter on whole_year_video_id |
filter[administration] | query | string | false | string | Filter on administration. Specify a comma separated list of IDs to filter on. |
filter[city] | query | string | false | string | Filter on city. Specify a comma separated list of IDs to filter on. |
filter[terms] | query | string | false | string | Filter on terms. Specify a comma separated list of IDs to filter on. |
filter[accommodation_subtype] | query | string | false | string | Filter on accommodation_subtype. Specify a comma separated list of IDs to filter on. |
filter[images] | query | string | false | string | Filter on images. Specify a comma separated list of IDs to filter on. |
filter[guest_group_limits] | query | string | false | string | Filter on guest_group_limits. Specify a comma separated list of IDs to filter on. |
filter[rooms] | query | string | false | string | Filter on rooms. Specify a comma separated list of IDs to filter on. |
filter[custom_attributes] | query | string | false | string | Filter on custom_attributes. Specify a comma separated list of IDs to filter on. |
filter[tags] | query | string | false | string | Filter on tags. Specify a comma separated list of IDs to filter on. |
include | query | string | false | string | Includes list. Specify a comma separated list of resources to include. |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
Example responses
200 Response
{
"data": {
"id": "1",
"type": "category",
"attributes": {
"name": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"short_description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"usps": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"archived": true,
"highlighted": true,
"reference": "string",
"rentable_type": "string",
"minimum_number_of_nights": 0,
"max_number_of_people": 0,
"max_number_of_seniors": 0,
"max_number_of_adults": 0,
"max_number_of_adolescents": 0,
"max_number_of_children": 0,
"max_number_of_babies": 0,
"max_number_of_pets": 0,
"prices_updated_at": "2021-03-03T08:31:26Z",
"prices_indexed_at": "2021-03-03T08:31:26Z",
"stock_updated_at": "2021-03-03T08:31:26Z",
"stock_indexed_at": "2021-03-03T08:31:26Z",
"costs_updated_at": "2021-03-03T08:31:26Z",
"extras_updated_at": "2021-03-03T08:31:26Z",
"bookable_discounts_changed_at": "2021-03-03T08:31:26Z",
"number_of_bedrooms": 0,
"number_of_beds": 0,
"number_of_showers": 0,
"number_of_toilets": 0,
"number_of_bathrooms": 0,
"number_of_parking_spots": 0,
"number_of_child_beds": 0,
"number_of_child_chairs": 0,
"max_baby_age": 0,
"max_child_age": 0,
"max_adolescent_age": 0,
"min_senior_age": 0,
"pets_allowed": true,
"host_image_url": "string",
"same_day_bookings_allowed": true,
"same_day_booking_closing_time": "string",
"last_date_with_price": "2021-03-03",
"latitude": 0,
"longitude": 0,
"address": "string",
"summer_video_id": "string",
"winter_video_id": "string",
"whole_year_video_id": "string"
},
"relationships": {
"administration": {
"data": {
"id": "string",
"type": "administrations",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"city": {
"data": {
"id": "string",
"type": "",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"terms": {
"data": {
"id": "string",
"type": "",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"accommodation_subtype": {
"data": {
"id": "string",
"type": "accommodation_subtype",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"images": {
"data": [
{
"id": "string",
"type": "image",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"guest_group_limits": {
"data": [
{
"id": "string",
"type": "guest_group_limit",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"rooms": {
"data": [
{
"id": "string",
"type": "room",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"custom_attributes": {
"data": [
{
"id": "string",
"type": "custom_attribute",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"tags": {
"data": [
{
"id": "string",
"type": "",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"optional_tags": {
"data": [
{
"id": "string",
"type": "",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
}
},
"meta": {
"temp_id": "string"
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | CategoryResponse | Inline |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | Category | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— name | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— description | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— short_description | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— usps | object | false | none | Translated unique selling points |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— archived | boolean | false | none | none |
——— highlighted | boolean | false | none | Whether this category should be highlighted on the website |
——— reference | string | false | none | none |
——— rentable_type | string | false | none | none |
——— minimum_number_of_nights | integer | false | none | none |
——— max_number_of_people | integer | false | none | none |
——— max_number_of_seniors | integer | false | none | none |
——— max_number_of_adults | integer | false | none | none |
——— max_number_of_adolescents | integer | false | none | none |
——— max_number_of_children | integer | false | none | none |
——— max_number_of_babies | integer | false | none | none |
——— max_number_of_pets | integer | false | none | none |
——— prices_updated_at | string(date-time) | false | none | none |
——— prices_indexed_at | string(date-time) | false | none | none |
——— stock_updated_at | string(date-time) | false | none | none |
——— stock_indexed_at | string(date-time) | false | none | none |
——— costs_updated_at | string(date-time) | false | none | none |
——— extras_updated_at | string(date-time) | false | none | none |
——— bookable_discounts_changed_at | string(date-time) | false | none | none |
——— number_of_bedrooms | integer | false | none | none |
——— number_of_beds | integer | false | none | none |
——— number_of_showers | integer | false | none | none |
——— number_of_toilets | integer | false | none | none |
——— number_of_bathrooms | integer | false | none | none |
——— number_of_parking_spots | integer | false | none | none |
——— number_of_child_beds | integer | false | none | none |
——— number_of_child_chairs | integer | false | none | none |
——— max_baby_age | integer | false | none | none |
——— max_child_age | integer | false | none | none |
——— max_adolescent_age | integer | false | none | none |
——— min_senior_age | integer | false | none | none |
——— pets_allowed | boolean | false | none | none |
——— host_image_url | string | false | none | none |
——— same_day_bookings_allowed | boolean | false | none | none |
——— same_day_booking_closing_time | string(time) | false | none | none |
——— last_date_with_price | string(date) | false | none | none |
——— latitude | number(float) | false | none | none |
——— longitude | number(float) | false | none | none |
——— address | string | false | none | none |
——— summer_video_id | string | false | none | none |
——— winter_video_id | string | false | none | none |
——— whole_year_video_id | string | false | none | none |
—— relationships | object | false | none | Relationships |
——— administration | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | administration ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— city | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | city ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— terms | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | terms ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— accommodation_subtype | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | accommodation_subtype ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— images | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | images ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— guest_group_limits | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | guest_group_limits ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— rooms | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | rooms ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— custom_attributes | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | custom_attributes ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— tags | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | tags ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— optional_tags | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | optional_tags ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
Channel Categories
List categories for the channels that are linked to your subscription
GET categories
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/channels/string/categories \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY'
GET /v3/channels/string/categories HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/channels/string/categories");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/channels/string/categories")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/channels/string/categories", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/channels/string/categories",
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: application/vnd.api+json",
"accept-language: en,nl",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/channels/string/categories")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/channels/string/categories"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/channels/{channel_id}/categories
Returns the categories that are available to the current channel
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
channel_id | path | string | true | string | Channel ID |
page[number] | query | string | false | string | Page number |
page[size] | query | string | false | string | Page size |
sort | query | string | false | string | Sort. Specify a comma separated list of attributes to sort on. Prefix attribute with a - to sort in descending order |
fields[category] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
filter[id] | query | string | false | string | Filter on id |
filter[name] | query | string | false | string | Filter on name |
filter[description] | query | string | false | string | Filter on description |
filter[short_description] | query | string | false | string | Filter on short_description |
filter[usps] | query | string | false | string | Filter on usps |
filter[archived] | query | string | false | string | Filter on archived |
filter[highlighted] | query | string | false | string | Filter on highlighted |
filter[reference] | query | string | false | string | Filter on reference |
filter[minimum_number_of_nights] | query | string | false | string | Filter on minimum_number_of_nights |
filter[max_number_of_people] | query | string | false | string | Filter on max_number_of_people |
filter[max_number_of_babies] | query | string | false | string | Filter on max_number_of_babies |
filter[max_number_of_pets] | query | string | false | string | Filter on max_number_of_pets |
filter[prices_updated_at] | query | string | false | string | Filter on prices_updated_at |
filter[prices_indexed_at] | query | string | false | string | Filter on prices_indexed_at |
filter[stock_updated_at] | query | string | false | string | Filter on stock_updated_at |
filter[stock_indexed_at] | query | string | false | string | Filter on stock_indexed_at |
filter[costs_updated_at] | query | string | false | string | Filter on costs_updated_at |
filter[extras_updated_at] | query | string | false | string | Filter on extras_updated_at |
filter[bookable_discounts_changed_at] | query | string | false | string | Filter on bookable_discounts_changed_at |
filter[number_of_bedrooms] | query | string | false | string | Filter on number_of_bedrooms |
filter[number_of_beds] | query | string | false | string | Filter on number_of_beds |
filter[number_of_showers] | query | string | false | string | Filter on number_of_showers |
filter[number_of_toilets] | query | string | false | string | Filter on number_of_toilets |
filter[number_of_bathrooms] | query | string | false | string | Filter on number_of_bathrooms |
filter[number_of_parking_spots] | query | string | false | string | Filter on number_of_parking_spots |
filter[number_of_child_beds] | query | string | false | string | Filter on number_of_child_beds |
filter[number_of_child_chairs] | query | string | false | string | Filter on number_of_child_chairs |
filter[last_date_with_price] | query | string | false | string | Filter on last_date_with_price |
filter[latitude] | query | string | false | string | Filter on latitude |
filter[longitude] | query | string | false | string | Filter on longitude |
filter[address] | query | string | false | string | Filter on address |
filter[summer_video_id] | query | string | false | string | Filter on summer_video_id |
filter[winter_video_id] | query | string | false | string | Filter on winter_video_id |
filter[whole_year_video_id] | query | string | false | string | Filter on whole_year_video_id |
filter[administration] | query | string | false | string | Filter on administration. Specify a comma separated list of IDs to filter on. |
filter[city] | query | string | false | string | Filter on city. Specify a comma separated list of IDs to filter on. |
filter[terms] | query | string | false | string | Filter on terms. Specify a comma separated list of IDs to filter on. |
filter[accommodation_subtype] | query | string | false | string | Filter on accommodation_subtype. Specify a comma separated list of IDs to filter on. |
filter[images] | query | string | false | string | Filter on images. Specify a comma separated list of IDs to filter on. |
filter[guest_group_limits] | query | string | false | string | Filter on guest_group_limits. Specify a comma separated list of IDs to filter on. |
filter[rooms] | query | string | false | string | Filter on rooms. Specify a comma separated list of IDs to filter on. |
filter[custom_attributes] | query | string | false | string | Filter on custom_attributes. Specify a comma separated list of IDs to filter on. |
filter[tags] | query | string | false | string | Filter on tags. Specify a comma separated list of IDs to filter on. |
include | query | string | false | string | Includes list. Specify a comma separated list of resources to include. |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
Example responses
200 Response
{
"data": [
{
"id": "1",
"type": "category",
"attributes": {
"name": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"short_description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"usps": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"archived": true,
"highlighted": true,
"reference": "string",
"rentable_type": "string",
"minimum_number_of_nights": 0,
"max_number_of_people": 0,
"max_number_of_seniors": 0,
"max_number_of_adults": 0,
"max_number_of_adolescents": 0,
"max_number_of_children": 0,
"max_number_of_babies": 0,
"max_number_of_pets": 0,
"prices_updated_at": "2021-03-03T08:31:26Z",
"prices_indexed_at": "2021-03-03T08:31:26Z",
"stock_updated_at": "2021-03-03T08:31:26Z",
"stock_indexed_at": "2021-03-03T08:31:26Z",
"costs_updated_at": "2021-03-03T08:31:26Z",
"extras_updated_at": "2021-03-03T08:31:26Z",
"bookable_discounts_changed_at": "2021-03-03T08:31:26Z",
"number_of_bedrooms": 0,
"number_of_beds": 0,
"number_of_showers": 0,
"number_of_toilets": 0,
"number_of_bathrooms": 0,
"number_of_parking_spots": 0,
"number_of_child_beds": 0,
"number_of_child_chairs": 0,
"max_baby_age": 0,
"max_child_age": 0,
"max_adolescent_age": 0,
"min_senior_age": 0,
"pets_allowed": true,
"host_image_url": "string",
"same_day_bookings_allowed": true,
"same_day_booking_closing_time": "string",
"last_date_with_price": "2021-03-03",
"latitude": 0,
"longitude": 0,
"address": "string",
"summer_video_id": "string",
"winter_video_id": "string",
"whole_year_video_id": "string"
},
"relationships": {
"administration": {
"data": {
"id": "string",
"type": "administrations",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"city": {
"data": {
"id": "string",
"type": "",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"terms": {
"data": {
"id": "string",
"type": "",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"accommodation_subtype": {
"data": {
"id": "string",
"type": "accommodation_subtype",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"images": {
"data": [
{
"id": "string",
"type": "image",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"guest_group_limits": {
"data": [
{
"id": "string",
"type": "guest_group_limit",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"rooms": {
"data": [
{
"id": "string",
"type": "room",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"custom_attributes": {
"data": [
{
"id": "string",
"type": "custom_attribute",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"tags": {
"data": [
{
"id": "string",
"type": "",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"optional_tags": {
"data": [
{
"id": "string",
"type": "",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
}
},
"meta": {
"temp_id": "string"
}
}
],
"meta": {
"pagination": {
"total_records": 0,
"page": 0,
"size": 0
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | CategoryCollectionResponse | Inline |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | [Category] | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— name | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— description | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— short_description | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— usps | object | false | none | Translated unique selling points |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— archived | boolean | false | none | none |
——— highlighted | boolean | false | none | Whether this category should be highlighted on the website |
——— reference | string | false | none | none |
——— rentable_type | string | false | none | none |
——— minimum_number_of_nights | integer | false | none | none |
——— max_number_of_people | integer | false | none | none |
——— max_number_of_seniors | integer | false | none | none |
——— max_number_of_adults | integer | false | none | none |
——— max_number_of_adolescents | integer | false | none | none |
——— max_number_of_children | integer | false | none | none |
——— max_number_of_babies | integer | false | none | none |
——— max_number_of_pets | integer | false | none | none |
——— prices_updated_at | string(date-time) | false | none | none |
——— prices_indexed_at | string(date-time) | false | none | none |
——— stock_updated_at | string(date-time) | false | none | none |
——— stock_indexed_at | string(date-time) | false | none | none |
——— costs_updated_at | string(date-time) | false | none | none |
——— extras_updated_at | string(date-time) | false | none | none |
——— bookable_discounts_changed_at | string(date-time) | false | none | none |
——— number_of_bedrooms | integer | false | none | none |
——— number_of_beds | integer | false | none | none |
——— number_of_showers | integer | false | none | none |
——— number_of_toilets | integer | false | none | none |
——— number_of_bathrooms | integer | false | none | none |
——— number_of_parking_spots | integer | false | none | none |
——— number_of_child_beds | integer | false | none | none |
——— number_of_child_chairs | integer | false | none | none |
——— max_baby_age | integer | false | none | none |
——— max_child_age | integer | false | none | none |
——— max_adolescent_age | integer | false | none | none |
——— min_senior_age | integer | false | none | none |
——— pets_allowed | boolean | false | none | none |
——— host_image_url | string | false | none | none |
——— same_day_bookings_allowed | boolean | false | none | none |
——— same_day_booking_closing_time | string(time) | false | none | none |
——— last_date_with_price | string(date) | false | none | none |
——— latitude | number(float) | false | none | none |
——— longitude | number(float) | false | none | none |
——— address | string | false | none | none |
——— summer_video_id | string | false | none | none |
——— winter_video_id | string | false | none | none |
——— whole_year_video_id | string | false | none | none |
—— relationships | object | false | none | Relationships |
——— administration | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | administration ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— city | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | city ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— terms | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | terms ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— accommodation_subtype | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | accommodation_subtype ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— images | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | images ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— guest_group_limits | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | guest_group_limits ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— rooms | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | rooms ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— custom_attributes | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | custom_attributes ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— tags | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | tags ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— optional_tags | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | optional_tags ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
— meta | object | false | none | none |
—— pagination | object | false | none | none |
——— total_records | integer | false | none | none |
——— page | integer | false | none | none |
——— size | integer | false | none | none |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
GET category
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/channels/string/categories/string \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY'
GET /v3/channels/string/categories/string HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/channels/string/categories/string");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/channels/string/categories/string")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/channels/string/categories/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/channels/string/categories/string",
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: application/vnd.api+json",
"accept-language: en,nl",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/channels/string/categories/string")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/channels/string/categories/string"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/channels/{channel_id}/categories/{id}
Returns the category for the given ID
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
channel_id | path | string | true | string | Channel ID |
id | path | string | true | string | Resource ID |
fields[category] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
filter[id] | query | string | false | string | Filter on id |
filter[name] | query | string | false | string | Filter on name |
filter[description] | query | string | false | string | Filter on description |
filter[short_description] | query | string | false | string | Filter on short_description |
filter[usps] | query | string | false | string | Filter on usps |
filter[archived] | query | string | false | string | Filter on archived |
filter[highlighted] | query | string | false | string | Filter on highlighted |
filter[reference] | query | string | false | string | Filter on reference |
filter[minimum_number_of_nights] | query | string | false | string | Filter on minimum_number_of_nights |
filter[max_number_of_people] | query | string | false | string | Filter on max_number_of_people |
filter[max_number_of_babies] | query | string | false | string | Filter on max_number_of_babies |
filter[max_number_of_pets] | query | string | false | string | Filter on max_number_of_pets |
filter[prices_updated_at] | query | string | false | string | Filter on prices_updated_at |
filter[prices_indexed_at] | query | string | false | string | Filter on prices_indexed_at |
filter[stock_updated_at] | query | string | false | string | Filter on stock_updated_at |
filter[stock_indexed_at] | query | string | false | string | Filter on stock_indexed_at |
filter[costs_updated_at] | query | string | false | string | Filter on costs_updated_at |
filter[extras_updated_at] | query | string | false | string | Filter on extras_updated_at |
filter[bookable_discounts_changed_at] | query | string | false | string | Filter on bookable_discounts_changed_at |
filter[number_of_bedrooms] | query | string | false | string | Filter on number_of_bedrooms |
filter[number_of_beds] | query | string | false | string | Filter on number_of_beds |
filter[number_of_showers] | query | string | false | string | Filter on number_of_showers |
filter[number_of_toilets] | query | string | false | string | Filter on number_of_toilets |
filter[number_of_bathrooms] | query | string | false | string | Filter on number_of_bathrooms |
filter[number_of_parking_spots] | query | string | false | string | Filter on number_of_parking_spots |
filter[number_of_child_beds] | query | string | false | string | Filter on number_of_child_beds |
filter[number_of_child_chairs] | query | string | false | string | Filter on number_of_child_chairs |
filter[last_date_with_price] | query | string | false | string | Filter on last_date_with_price |
filter[latitude] | query | string | false | string | Filter on latitude |
filter[longitude] | query | string | false | string | Filter on longitude |
filter[address] | query | string | false | string | Filter on address |
filter[summer_video_id] | query | string | false | string | Filter on summer_video_id |
filter[winter_video_id] | query | string | false | string | Filter on winter_video_id |
filter[whole_year_video_id] | query | string | false | string | Filter on whole_year_video_id |
filter[administration] | query | string | false | string | Filter on administration. Specify a comma separated list of IDs to filter on. |
filter[city] | query | string | false | string | Filter on city. Specify a comma separated list of IDs to filter on. |
filter[terms] | query | string | false | string | Filter on terms. Specify a comma separated list of IDs to filter on. |
filter[accommodation_subtype] | query | string | false | string | Filter on accommodation_subtype. Specify a comma separated list of IDs to filter on. |
filter[images] | query | string | false | string | Filter on images. Specify a comma separated list of IDs to filter on. |
filter[guest_group_limits] | query | string | false | string | Filter on guest_group_limits. Specify a comma separated list of IDs to filter on. |
filter[rooms] | query | string | false | string | Filter on rooms. Specify a comma separated list of IDs to filter on. |
filter[custom_attributes] | query | string | false | string | Filter on custom_attributes. Specify a comma separated list of IDs to filter on. |
filter[tags] | query | string | false | string | Filter on tags. Specify a comma separated list of IDs to filter on. |
include | query | string | false | string | Includes list. Specify a comma separated list of resources to include. |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
Example responses
200 Response
{
"data": {
"id": "1",
"type": "category",
"attributes": {
"name": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"short_description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"usps": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"archived": true,
"highlighted": true,
"reference": "string",
"rentable_type": "string",
"minimum_number_of_nights": 0,
"max_number_of_people": 0,
"max_number_of_seniors": 0,
"max_number_of_adults": 0,
"max_number_of_adolescents": 0,
"max_number_of_children": 0,
"max_number_of_babies": 0,
"max_number_of_pets": 0,
"prices_updated_at": "2021-03-03T08:31:26Z",
"prices_indexed_at": "2021-03-03T08:31:26Z",
"stock_updated_at": "2021-03-03T08:31:26Z",
"stock_indexed_at": "2021-03-03T08:31:26Z",
"costs_updated_at": "2021-03-03T08:31:26Z",
"extras_updated_at": "2021-03-03T08:31:26Z",
"bookable_discounts_changed_at": "2021-03-03T08:31:26Z",
"number_of_bedrooms": 0,
"number_of_beds": 0,
"number_of_showers": 0,
"number_of_toilets": 0,
"number_of_bathrooms": 0,
"number_of_parking_spots": 0,
"number_of_child_beds": 0,
"number_of_child_chairs": 0,
"max_baby_age": 0,
"max_child_age": 0,
"max_adolescent_age": 0,
"min_senior_age": 0,
"pets_allowed": true,
"host_image_url": "string",
"same_day_bookings_allowed": true,
"same_day_booking_closing_time": "string",
"last_date_with_price": "2021-03-03",
"latitude": 0,
"longitude": 0,
"address": "string",
"summer_video_id": "string",
"winter_video_id": "string",
"whole_year_video_id": "string"
},
"relationships": {
"administration": {
"data": {
"id": "string",
"type": "administrations",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"city": {
"data": {
"id": "string",
"type": "",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"terms": {
"data": {
"id": "string",
"type": "",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"accommodation_subtype": {
"data": {
"id": "string",
"type": "accommodation_subtype",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"images": {
"data": [
{
"id": "string",
"type": "image",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"guest_group_limits": {
"data": [
{
"id": "string",
"type": "guest_group_limit",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"rooms": {
"data": [
{
"id": "string",
"type": "room",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"custom_attributes": {
"data": [
{
"id": "string",
"type": "custom_attribute",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"tags": {
"data": [
{
"id": "string",
"type": "",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"optional_tags": {
"data": [
{
"id": "string",
"type": "",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
}
},
"meta": {
"temp_id": "string"
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | CategoryResponse | Inline |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | Category | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— name | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— description | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— short_description | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— usps | object | false | none | Translated unique selling points |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— archived | boolean | false | none | none |
——— highlighted | boolean | false | none | Whether this category should be highlighted on the website |
——— reference | string | false | none | none |
——— rentable_type | string | false | none | none |
——— minimum_number_of_nights | integer | false | none | none |
——— max_number_of_people | integer | false | none | none |
——— max_number_of_seniors | integer | false | none | none |
——— max_number_of_adults | integer | false | none | none |
——— max_number_of_adolescents | integer | false | none | none |
——— max_number_of_children | integer | false | none | none |
——— max_number_of_babies | integer | false | none | none |
——— max_number_of_pets | integer | false | none | none |
——— prices_updated_at | string(date-time) | false | none | none |
——— prices_indexed_at | string(date-time) | false | none | none |
——— stock_updated_at | string(date-time) | false | none | none |
——— stock_indexed_at | string(date-time) | false | none | none |
——— costs_updated_at | string(date-time) | false | none | none |
——— extras_updated_at | string(date-time) | false | none | none |
——— bookable_discounts_changed_at | string(date-time) | false | none | none |
——— number_of_bedrooms | integer | false | none | none |
——— number_of_beds | integer | false | none | none |
——— number_of_showers | integer | false | none | none |
——— number_of_toilets | integer | false | none | none |
——— number_of_bathrooms | integer | false | none | none |
——— number_of_parking_spots | integer | false | none | none |
——— number_of_child_beds | integer | false | none | none |
——— number_of_child_chairs | integer | false | none | none |
——— max_baby_age | integer | false | none | none |
——— max_child_age | integer | false | none | none |
——— max_adolescent_age | integer | false | none | none |
——— min_senior_age | integer | false | none | none |
——— pets_allowed | boolean | false | none | none |
——— host_image_url | string | false | none | none |
——— same_day_bookings_allowed | boolean | false | none | none |
——— same_day_booking_closing_time | string(time) | false | none | none |
——— last_date_with_price | string(date) | false | none | none |
——— latitude | number(float) | false | none | none |
——— longitude | number(float) | false | none | none |
——— address | string | false | none | none |
——— summer_video_id | string | false | none | none |
——— winter_video_id | string | false | none | none |
——— whole_year_video_id | string | false | none | none |
—— relationships | object | false | none | Relationships |
——— administration | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | administration ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— city | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | city ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— terms | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | terms ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— accommodation_subtype | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | accommodation_subtype ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— images | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | images ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— guest_group_limits | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | guest_group_limits ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— rooms | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | rooms ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— custom_attributes | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | custom_attributes ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— tags | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | tags ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— optional_tags | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | optional_tags ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
Channel Category Availability
GET category availability
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/channels/string/categories//availabilities \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY'
GET /v3/channels/string/categories//availabilities HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/channels/string/categories//availabilities");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/channels/string/categories//availabilities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/channels/string/categories//availabilities", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/channels/string/categories//availabilities",
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: application/vnd.api+json",
"accept-language: en,nl",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/channels/string/categories//availabilities")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/channels/string/categories//availabilities"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/channels/{channel_id}/categories/{category_id}/availabilities
List availability of a category you have access to
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
channel_id | path | string | true | string | Channel ID |
fields[category_availability] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
date_range | query | string | false | 2010-01-01..2040-01-01 | Yield availability for the given date range. Will be capped to 2 years in the future. |
Example responses
200 Response
{
"data": [
{
"id": "1",
"type": "category_availability",
"attributes": {
"date": "2014-01-01",
"stock": 10,
"capacity": 10,
"min_length_of_stay": 1,
"max_length_of_stay": 30,
"closed_to_departure": true,
"closed_to_arrival": false
},
"meta": {
"temp_id": "string"
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | CategoryAvailabilityCollectionResponse | Inline |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | [CategoryAvailability] | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— date | string(date) | false | none | none |
——— stock | integer | false | none | none |
——— capacity | integer | false | none | none |
——— min_length_of_stay | integer | false | none | none |
——— max_length_of_stay | integer | false | none | none |
——— closed_to_departure | boolean | false | none | none |
——— closed_to_arrival | boolean | false | none | none |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
Channel Category LOS Prices
GET LOS prices
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/channels/string/categories//los_prices \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'if-modified-since: Wed, 01 Jan 2014 11:00:02 GMT' \
--header 'x-api-key: API_KEY'
GET /v3/channels/string/categories//los_prices HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
If-Modified-Since: Wed, 01 Jan 2014 11:00:02 GMT
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/channels/string/categories//los_prices");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("if-modified-since", "Wed, 01 Jan 2014 11:00:02 GMT");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/channels/string/categories//los_prices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["if-modified-since"] = 'Wed, 01 Jan 2014 11:00:02 GMT'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'if-modified-since': "Wed, 01 Jan 2014 11:00:02 GMT",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/channels/string/categories//los_prices", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/channels/string/categories//los_prices",
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: application/vnd.api+json",
"accept-language: en,nl",
"if-modified-since: Wed, 01 Jan 2014 11:00:02 GMT",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/channels/string/categories//los_prices")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("if-modified-since", "Wed, 01 Jan 2014 11:00:02 GMT")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/channels/string/categories//los_prices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("if-modified-since", "Wed, 01 Jan 2014 11:00:02 GMT")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/channels/{channel_id}/categories/{category_id}/los_prices
List LOS prices of a category you have access to.
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
channel_id | path | string | true | string | Channel ID |
fields[los_price] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
If-Modified-Since | header | string | false | Wed, 01 Jan 2014 11:00:02 GMT | The API will send back the requested resource, with a 200 status, only if it has been last modified after the given datetime. If the request has not been modified since, the response will be a 304 without any body. The Last-Modified response header of a previous request will contain the date of last modification. |
date_range | query | string | false | 2010-01-01..2040-01-01 | Yield LOS prices for the given date range. Will be capped to 2 years in the future. |
currency | query | string | false | EUR | Set a custom currency for price calculation |
max_los | query | string | false | 21 | Specify the max LOS to return. By default, any available LOS will be returned. |
guest_group[seniors] | query | integer | false | 0 | Sets the number of seniors for price calculation. |
guest_group[adults] | query | integer | false | 2 | Sets the number of adults for price calculation. |
guest_group[adolescents] | query | integer | false | 0 | Sets the number of adolescents for price calculation. |
guest_group[children] | query | integer | false | 0 | Sets the number of children for price calculation. |
guest_group[babies] | query | integer | false | 0 | Sets the number of babies for price calculation. |
guest_group[pets] | query | integer | false | 0 | Sets the number of pets for price calculation. |
Example responses
200 Response
{
"data": [
{
"id": "1",
"type": "los_price",
"attributes": {
"arrival_date": "2014-01-01",
"length_of_stay": 7,
"rent_price": {
"currency": "EUR",
"value": "15.00"
},
"price": {
"currency": "EUR",
"value": "10.00"
}
},
"meta": {
"temp_id": "string"
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | LosPriceCollectionResponse | Inline |
304 | Not Modified | Not modified | None |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | [LosPrice] | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— arrival_date | string(date) | false | none | none |
——— length_of_stay | integer | false | none | none |
——— rent_price | object | false | none | none |
———— currency | string | false | none | none |
———— value | string | false | none | none |
——— price | object | false | none | none |
———— currency | string | false | none | none |
———— value | string | false | none | none |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
Channel Category Night Prices
GET night prices
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/channels/string/categories//night_prices \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'if-modified-since: Wed, 01 Jan 2014 11:00:02 GMT' \
--header 'x-api-key: API_KEY'
GET /v3/channels/string/categories//night_prices HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
If-Modified-Since: Wed, 01 Jan 2014 11:00:02 GMT
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/channels/string/categories//night_prices");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("if-modified-since", "Wed, 01 Jan 2014 11:00:02 GMT");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/channels/string/categories//night_prices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["if-modified-since"] = 'Wed, 01 Jan 2014 11:00:02 GMT'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'if-modified-since': "Wed, 01 Jan 2014 11:00:02 GMT",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/channels/string/categories//night_prices", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/channels/string/categories//night_prices",
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: application/vnd.api+json",
"accept-language: en,nl",
"if-modified-since: Wed, 01 Jan 2014 11:00:02 GMT",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/channels/string/categories//night_prices")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("if-modified-since", "Wed, 01 Jan 2014 11:00:02 GMT")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/channels/string/categories//night_prices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("if-modified-since", "Wed, 01 Jan 2014 11:00:02 GMT")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/channels/{channel_id}/categories/{category_id}/night_prices
List night prices of a category you have access to.
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
channel_id | path | string | true | string | Channel ID |
fields[night_price] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
If-Modified-Since | header | string | false | Wed, 01 Jan 2014 11:00:02 GMT | The API will send back the requested resource, with a 200 status, only if it has been last modified after the given datetime. If the request has not been modified since, the response will be a 304 without any body. The Last-Modified response header of a previous request will contain the date of last modification. |
date_range | query | string | false | 2010-01-01..2040-01-01 | Yield night prices for the given date range. Will be capped to 2 years in the future. |
Example responses
200 Response
{
"data": [
{
"id": "1",
"type": "night_price",
"attributes": {
"date": "2014-01-01",
"stock": 10,
"price": {
"currency": "EUR",
"value": "10.00"
}
},
"meta": {
"temp_id": "string"
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | NightPriceCollectionResponse | Inline |
304 | Not Modified | Not modified | None |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | [NightPrice] | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— date | string(date) | false | none | none |
——— stock | integer | false | none | DEPRECATED. Returns stock for the given date |
——— price | object | false | none | none |
———— currency | string | false | none | none |
———— value | string | false | none | none |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
Channel Discount Cards
List discount cards available for the channels that are linked to your subscription
GET discount cards
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/channels/string/discount_cards \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY'
GET /v3/channels/string/discount_cards HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/channels/string/discount_cards");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/channels/string/discount_cards")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/channels/string/discount_cards", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/channels/string/discount_cards",
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: application/vnd.api+json",
"accept-language: en,nl",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/channels/string/discount_cards")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/channels/string/discount_cards"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/channels/{channel_id}/discount_cards
Returns the discount cards that are available to the current channel
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
channel_id | path | string | true | string | Channel ID |
page[number] | query | string | false | string | Page number |
page[size] | query | string | false | string | Page size |
sort | query | string | false | string | Sort. Specify a comma separated list of attributes to sort on. Prefix attribute with a - to sort in descending order |
fields[discount_card] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
filter[id] | query | string | false | string | Filter on id |
filter[name] | query | string | false | string | Filter on name |
filter[description] | query | string | false | string | Filter on description |
filter[logo] | query | string | false | string | Filter on logo |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
Example responses
200 Response
{
"data": [
{
"id": "1",
"type": "discount_card",
"attributes": {
"name": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"logo": {
"original": "string",
"banner": "string",
"thumb": "string"
}
},
"meta": {
"temp_id": "string"
}
}
],
"meta": {
"pagination": {
"total_records": 0,
"page": 0,
"size": 0
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | DiscountCardCollectionResponse | Inline |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | [DiscountCard] | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— name | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— description | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— logo | object | false | none | none |
———— original | string | false | none | none |
———— banner | string | false | none | none |
———— thumb | string | false | none | none |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
— meta | object | false | none | none |
—— pagination | object | false | none | none |
——— total_records | integer | false | none | none |
——— page | integer | false | none | none |
——— size | integer | false | none | none |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
GET discount card
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/channels/string/discount_cards/string \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY'
GET /v3/channels/string/discount_cards/string HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/channels/string/discount_cards/string");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/channels/string/discount_cards/string")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/channels/string/discount_cards/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/channels/string/discount_cards/string",
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: application/vnd.api+json",
"accept-language: en,nl",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/channels/string/discount_cards/string")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/channels/string/discount_cards/string"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/channels/{channel_id}/discount_cards/{id}
Returns the discount card for the given ID
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
channel_id | path | string | true | string | Channel ID |
id | path | string | true | string | Resource ID |
fields[discount_card] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
filter[id] | query | string | false | string | Filter on id |
filter[name] | query | string | false | string | Filter on name |
filter[description] | query | string | false | string | Filter on description |
filter[logo] | query | string | false | string | Filter on logo |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
Example responses
200 Response
{
"data": {
"id": "1",
"type": "discount_card",
"attributes": {
"name": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"logo": {
"original": "string",
"banner": "string",
"thumb": "string"
}
},
"meta": {
"temp_id": "string"
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | DiscountCardResponse | Inline |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | DiscountCard | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— name | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— description | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— logo | object | false | none | none |
———— original | string | false | none | none |
———— banner | string | false | none | none |
———— thumb | string | false | none | none |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
Channel Extra Packages
List extra packages available for the channels that are linked to your subscription
GET extra packages
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/channels/string/extra_packages \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY'
GET /v3/channels/string/extra_packages HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/channels/string/extra_packages");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/channels/string/extra_packages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/channels/string/extra_packages", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/channels/string/extra_packages",
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: application/vnd.api+json",
"accept-language: en,nl",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/channels/string/extra_packages")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/channels/string/extra_packages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/channels/{channel_id}/extra_packages
Returns the extra packages that are available to the current channel
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
channel_id | path | string | true | string | Channel ID |
page[number] | query | string | false | string | Page number |
page[size] | query | string | false | string | Page size |
sort | query | string | false | string | Sort. Specify a comma separated list of attributes to sort on. Prefix attribute with a - to sort in descending order |
fields[extra_package] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
filter[id] | query | string | false | string | Filter on id |
filter[name] | query | string | false | string | Filter on name |
filter[description] | query | string | false | string | Filter on description |
filter[confirm_by_guest] | query | string | false | string | Filter on confirm_by_guest |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
Example responses
200 Response
{
"data": [
{
"id": "1",
"type": "extra_package",
"attributes": {
"name": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"confirm_by_guest": true,
"price": {
"currency": "string",
"value": "string"
}
},
"meta": {
"temp_id": "string"
}
}
],
"meta": {
"pagination": {
"total_records": 0,
"page": 0,
"size": 0
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | ExtraPackageCollectionResponse | Inline |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | [ExtraPackage] | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— name | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— description | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— confirm_by_guest | boolean | false | none | When set, guests should explicitly confirm the terms mentioned in the description |
——— price | object | false | none | When returned as an include of the reservation#available_extras relationship, this will yield the (unit) price of the extra package |
———— currency | string | false | none | none |
———— value | string | false | none | none |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
— meta | object | false | none | none |
—— pagination | object | false | none | none |
——— total_records | integer | false | none | none |
——— page | integer | false | none | none |
——— size | integer | false | none | none |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
GET extra package
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/channels/string/extra_packages/string \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY'
GET /v3/channels/string/extra_packages/string HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/channels/string/extra_packages/string");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/channels/string/extra_packages/string")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/channels/string/extra_packages/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/channels/string/extra_packages/string",
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: application/vnd.api+json",
"accept-language: en,nl",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/channels/string/extra_packages/string")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/channels/string/extra_packages/string"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/channels/{channel_id}/extra_packages/{id}
Returns the extra package for the given ID
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
channel_id | path | string | true | string | Channel ID |
id | path | string | true | string | Resource ID |
fields[extra_package] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
filter[id] | query | string | false | string | Filter on id |
filter[name] | query | string | false | string | Filter on name |
filter[description] | query | string | false | string | Filter on description |
filter[confirm_by_guest] | query | string | false | string | Filter on confirm_by_guest |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
Example responses
200 Response
{
"data": {
"id": "1",
"type": "extra_package",
"attributes": {
"name": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"confirm_by_guest": true,
"price": {
"currency": "string",
"value": "string"
}
},
"meta": {
"temp_id": "string"
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | ExtraPackageResponse | Inline |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | ExtraPackage | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— name | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— description | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— confirm_by_guest | boolean | false | none | When set, guests should explicitly confirm the terms mentioned in the description |
——— price | object | false | none | When returned as an include of the reservation#available_extras relationship, this will yield the (unit) price of the extra package |
———— currency | string | false | none | none |
———— value | string | false | none | none |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
Channel Extras
List extras available for the channels that are linked to your subscription
GET extras
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/channels/string/extras \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY'
GET /v3/channels/string/extras HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/channels/string/extras");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/channels/string/extras")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/channels/string/extras", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/channels/string/extras",
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: application/vnd.api+json",
"accept-language: en,nl",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/channels/string/extras")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/channels/string/extras"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/channels/{channel_id}/extras
Returns the extras that are available to the current channel
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
channel_id | path | string | true | string | Channel ID |
page[number] | query | string | false | string | Page number |
page[size] | query | string | false | string | Page size |
sort | query | string | false | string | Sort. Specify a comma separated list of attributes to sort on. Prefix attribute with a - to sort in descending order |
fields[extra] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
filter[id] | query | string | false | string | Filter on id |
filter[name] | query | string | false | string | Filter on name |
filter[description] | query | string | false | string | Filter on description |
filter[question_for_guest] | query | string | false | string | Filter on question_for_guest |
filter[selectable] | query | string | false | string | Filter on selectable |
filter[confirm_by_guest] | query | string | false | string | Filter on confirm_by_guest |
filter[extra_type] | query | string | false | string | Filter on extra_type |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
Example responses
200 Response
{
"data": [
{
"id": "1",
"type": "extra",
"attributes": {
"name": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"question_for_guest": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"invoiced_as": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"selectable": "string",
"confirm_by_guest": true,
"extra_type": "string",
"quantity_required": true,
"guest_answer_required": true,
"maximum_quantity": 0,
"price": {
"currency": "string",
"value": "string"
}
},
"meta": {
"temp_id": "string"
}
}
],
"meta": {
"pagination": {
"total_records": 0,
"page": 0,
"size": 0
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | ExtraCollectionResponse | Inline |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | [Extra] | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— name | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— description | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— question_for_guest | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— invoiced_as | object | false | none | Translated name under which this extra is invoiced |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— selectable | string | false | none | One of: important, customer. Important extras are opt-out extras while customer extras are opt-in extras. |
——— confirm_by_guest | boolean | false | none | When set, guests should explicitly confirm the terms mentioned in the description |
——— extra_type | string | false | none | One of: ["other", "tourist_taxes", "environmental_charges", "energy", "deposit", "bath_linen", "bed_linen", "cleaning", "childs_bed", "childs_chair", "sauna", "pets", "preference_costs", "provision", "cancellation_insurance", "parking", "early_checkin", "late_checkout", "food", "labour", "heating", "internet", "gas", "water", "drinking_water", "electricity", "wood", "toiletries", "transportation", "laundry", "additional_bed", "airco"] |
——— quantity_required | boolean | false | none | none |
——— guest_answer_required | boolean | false | none | none |
——— maximum_quantity | integer | false | none | Maximum amount per reservation, will be blank when unlimited |
——— price | object | false | none | When returned as an include of the reservation#available_extras relationship, this will yield the (unit) price of the extra |
———— currency | string | false | none | none |
———— value | string | false | none | none |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
— meta | object | false | none | none |
—— pagination | object | false | none | none |
——— total_records | integer | false | none | none |
——— page | integer | false | none | none |
——— size | integer | false | none | none |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
GET extra
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/channels/string/extras/string \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY'
GET /v3/channels/string/extras/string HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/channels/string/extras/string");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/channels/string/extras/string")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/channels/string/extras/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/channels/string/extras/string",
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: application/vnd.api+json",
"accept-language: en,nl",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/channels/string/extras/string")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/channels/string/extras/string"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/channels/{channel_id}/extras/{id}
Returns the extra for the given ID
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
channel_id | path | string | true | string | Channel ID |
id | path | string | true | string | Resource ID |
fields[extra] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
filter[id] | query | string | false | string | Filter on id |
filter[name] | query | string | false | string | Filter on name |
filter[description] | query | string | false | string | Filter on description |
filter[question_for_guest] | query | string | false | string | Filter on question_for_guest |
filter[selectable] | query | string | false | string | Filter on selectable |
filter[confirm_by_guest] | query | string | false | string | Filter on confirm_by_guest |
filter[extra_type] | query | string | false | string | Filter on extra_type |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
Example responses
200 Response
{
"data": {
"id": "1",
"type": "extra",
"attributes": {
"name": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"question_for_guest": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"invoiced_as": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"selectable": "string",
"confirm_by_guest": true,
"extra_type": "string",
"quantity_required": true,
"guest_answer_required": true,
"maximum_quantity": 0,
"price": {
"currency": "string",
"value": "string"
}
},
"meta": {
"temp_id": "string"
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | ExtraResponse | Inline |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | Extra | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— name | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— description | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— question_for_guest | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— invoiced_as | object | false | none | Translated name under which this extra is invoiced |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— selectable | string | false | none | One of: important, customer. Important extras are opt-out extras while customer extras are opt-in extras. |
——— confirm_by_guest | boolean | false | none | When set, guests should explicitly confirm the terms mentioned in the description |
——— extra_type | string | false | none | One of: ["other", "tourist_taxes", "environmental_charges", "energy", "deposit", "bath_linen", "bed_linen", "cleaning", "childs_bed", "childs_chair", "sauna", "pets", "preference_costs", "provision", "cancellation_insurance", "parking", "early_checkin", "late_checkout", "food", "labour", "heating", "internet", "gas", "water", "drinking_water", "electricity", "wood", "toiletries", "transportation", "laundry", "additional_bed", "airco"] |
——— quantity_required | boolean | false | none | none |
——— guest_answer_required | boolean | false | none | none |
——— maximum_quantity | integer | false | none | Maximum amount per reservation, will be blank when unlimited |
——— price | object | false | none | When returned as an include of the reservation#available_extras relationship, this will yield the (unit) price of the extra |
———— currency | string | false | none | none |
———— value | string | false | none | none |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
Channel Primary Packages
List primary packages available for the channels that are linked to your subscription
GET primary packages
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/channels/string/primary_packages \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY'
GET /v3/channels/string/primary_packages HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/channels/string/primary_packages");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/channels/string/primary_packages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/channels/string/primary_packages", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/channels/string/primary_packages",
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: application/vnd.api+json",
"accept-language: en,nl",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/channels/string/primary_packages")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/channels/string/primary_packages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/channels/{channel_id}/primary_packages
Returns the primary packages that are available to the current channel
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
channel_id | path | string | true | string | Channel ID |
page[number] | query | string | false | string | Page number |
page[size] | query | string | false | string | Page size |
sort | query | string | false | string | Sort. Specify a comma separated list of attributes to sort on. Prefix attribute with a - to sort in descending order |
fields[primary_package] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
filter[id] | query | string | false | string | Filter on id |
filter[name] | query | string | false | string | Filter on name |
filter[short_description] | query | string | false | string | Filter on short_description |
filter[description] | query | string | false | string | Filter on description |
filter[confirm_by_guest] | query | string | false | string | Filter on confirm_by_guest |
filter[start_date] | query | string | false | string | Filter on start_date |
filter[end_date] | query | string | false | string | Filter on end_date |
filter[position] | query | string | false | string | Filter on position |
filter[images] | query | string | false | string | Filter on images. Specify a comma separated list of IDs to filter on. |
filter[package_entries] | query | string | false | string | Filter on package_entries. Specify a comma separated list of IDs to filter on. |
include | query | string | false | string | Includes list. Specify a comma separated list of resources to include. |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
Example responses
200 Response
{
"data": [
{
"id": "1",
"type": "primary_package",
"attributes": {
"name": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"short_description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"confirm_by_guest": true,
"searchable": true,
"fixed_period": true,
"start_date": "2021-03-03",
"end_date": "2021-03-03",
"fixed_number_of_nights": "string",
"position": 0
},
"relationships": {
"images": {
"data": [
{
"id": "string",
"type": "image",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"package_entries": {
"data": [
{
"id": "string",
"type": "package_entry",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
}
},
"meta": {
"temp_id": "string"
}
}
],
"meta": {
"pagination": {
"total_records": 0,
"page": 0,
"size": 0
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | PrimaryPackageCollectionResponse | Inline |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | [PrimaryPackage] | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— name | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— short_description | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— description | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— confirm_by_guest | boolean | false | none | none |
——— searchable | boolean | false | none | none |
——— fixed_period | boolean | false | none | none |
——— start_date | string(date) | false | none | none |
——— end_date | string(date) | false | none | none |
——— fixed_number_of_nights | string | false | none | none |
——— position | integer | false | none | none |
—— relationships | object | false | none | Relationships |
——— images | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | images ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— package_entries | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | package_entries ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
— meta | object | false | none | none |
—— pagination | object | false | none | none |
——— total_records | integer | false | none | none |
——— page | integer | false | none | none |
——— size | integer | false | none | none |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
GET primary package
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/channels/string/primary_packages/string \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY'
GET /v3/channels/string/primary_packages/string HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/channels/string/primary_packages/string");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/channels/string/primary_packages/string")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/channels/string/primary_packages/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/channels/string/primary_packages/string",
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: application/vnd.api+json",
"accept-language: en,nl",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/channels/string/primary_packages/string")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/channels/string/primary_packages/string"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/channels/{channel_id}/primary_packages/{id}
Returns the primary package for the given ID
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
channel_id | path | string | true | string | Channel ID |
id | path | string | true | string | Resource ID |
fields[primary_package] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
filter[id] | query | string | false | string | Filter on id |
filter[name] | query | string | false | string | Filter on name |
filter[short_description] | query | string | false | string | Filter on short_description |
filter[description] | query | string | false | string | Filter on description |
filter[confirm_by_guest] | query | string | false | string | Filter on confirm_by_guest |
filter[start_date] | query | string | false | string | Filter on start_date |
filter[end_date] | query | string | false | string | Filter on end_date |
filter[position] | query | string | false | string | Filter on position |
filter[images] | query | string | false | string | Filter on images. Specify a comma separated list of IDs to filter on. |
filter[package_entries] | query | string | false | string | Filter on package_entries. Specify a comma separated list of IDs to filter on. |
include | query | string | false | string | Includes list. Specify a comma separated list of resources to include. |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
Example responses
200 Response
{
"data": {
"id": "1",
"type": "primary_package",
"attributes": {
"name": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"short_description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"description": {
"nl": "string",
"en": "string",
"de": "string",
"fr": "string",
"da": "string",
"cs": "string",
"es": "string",
"tr": "string",
"pt": "string",
"it": "string"
},
"confirm_by_guest": true,
"searchable": true,
"fixed_period": true,
"start_date": "2021-03-03",
"end_date": "2021-03-03",
"fixed_number_of_nights": "string",
"position": 0
},
"relationships": {
"images": {
"data": [
{
"id": "string",
"type": "image",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"package_entries": {
"data": [
{
"id": "string",
"type": "package_entry",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
}
},
"meta": {
"temp_id": "string"
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | PrimaryPackageResponse | Inline |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | PrimaryPackage | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— name | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— short_description | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— description | object | false | none | none |
———— nl | string | false | none | none |
———— en | string | false | none | none |
———— de | string | false | none | none |
———— fr | string | false | none | none |
———— da | string | false | none | none |
———— cs | string | false | none | none |
———— es | string | false | none | none |
———— tr | string | false | none | none |
———— pt | string | false | none | none |
———— it | string | false | none | none |
——— confirm_by_guest | boolean | false | none | none |
——— searchable | boolean | false | none | none |
——— fixed_period | boolean | false | none | none |
——— start_date | string(date) | false | none | none |
——— end_date | string(date) | false | none | none |
——— fixed_number_of_nights | string | false | none | none |
——— position | integer | false | none | none |
—— relationships | object | false | none | Relationships |
——— images | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | images ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— package_entries | object | false | none | none |
———— data | [object] | false | none | none |
————— id | string | false | none | package_entries ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
Channel Reservation Change Requests
Manage change requests for the reservations linked with your subscription
GET change requests
Code samples
curl --request GET \
--url https://api.bookingexperts.nl/v3/channels/string/reservations//change_requests \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'x-api-key: API_KEY'
GET /v3/channels/string/reservations//change_requests HTTP/1.1
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bookingexperts.nl/v3/channels/string/reservations//change_requests");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/channels/string/reservations//change_requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
headers = {
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/channels/string/reservations//change_requests", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/channels/string/reservations//change_requests",
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: application/vnd.api+json",
"accept-language: en,nl",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.bookingexperts.nl/v3/channels/string/reservations//change_requests")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.asString();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/channels/string/reservations//change_requests"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /v3/channels/{channel_id}/reservations/{reservation_id}/change_requests
Returns the change requests that are created for the current reservation
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
channel_id | path | string | true | string | Channel ID |
page[number] | query | string | false | string | Page number |
page[size] | query | string | false | string | Page size |
sort | query | string | false | string | Sort. Specify a comma separated list of attributes to sort on. Prefix attribute with a - to sort in descending order |
fields[change_request] | query | string | false | string | Fieldset. Specify a comma separated list of attributes to return |
filter[id] | query | string | false | string | Filter on id |
filter[created_at] | query | string | false | string | Filter on created_at |
include | query | string | false | string | Includes list. Specify a comma separated list of resources to include. |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
Example responses
200 Response
{
"data": [
{
"id": "1",
"type": "change_request",
"attributes": {
"start_date": "2021-03-03",
"end_date": "2021-03-03",
"memo": "string",
"address": "string",
"city": "string",
"first_name": "string",
"last_name": "string",
"phone": "string",
"postalcode": "string",
"guest_name": "string",
"country_code": "NL",
"price_according_to_channel": {
"currency": "string",
"value": "string"
},
"created_at": "2021-03-03T08:31:26Z"
},
"relationships": {
"category": {
"data": {
"id": "string",
"type": "category",
"meta": {
"temp_id": "string",
"method": "string"
}
}
}
},
"meta": {
"temp_id": "string"
}
}
],
"meta": {
"pagination": {
"total_records": 0,
"page": 0,
"size": 0
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | ChangeRequestCollectionResponse | Inline |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | [ChangeRequest] | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— start_date | string(date) | false | none | none |
——— end_date | string(date) | false | none | none |
——— memo | string | false | none | none |
——— address | string | false | none | none |
——— city | string | false | none | none |
——— first_name | string | false | none | none |
——— last_name | string | false | none | none |
——— phone | string | false | none | none |
——— postalcode | string | false | none | none |
——— guest_name | string | false | none | none |
——— country_code | string | false | none | none |
——— price_according_to_channel | object | false | none | Updates the price according to the channel. This may only be specified when the category or period has been changed as well |
———— currency | string | false | none | none |
———— value | string | false | none | none |
——— created_at | string(date-time) | false | read-only | none |
—— relationships | object | false | none | Relationships |
——— category | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | category ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
— meta | object | false | none | none |
—— pagination | object | false | none | none |
——— total_records | integer | false | none | none |
——— page | integer | false | none | none |
——— size | integer | false | none | none |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
POST change request
Code samples
curl --request POST \
--url https://api.bookingexperts.nl/v3/channels/string/reservations//change_requests \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'content-type: application/vnd.api+json' \
--header 'x-api-key: API_KEY' \
--data '{"data":{"type":"change_request","attributes":{"start_date":"2021-03-03","end_date":"2021-03-03","memo":"string","address":"string","city":"string","first_name":"string","last_name":"string","phone":"string","postalcode":"string","guest_name":"string","country_code":"NL","price_according_to_channel":{"currency":"string","value":"string"}},"relationships":{"category":{"data":{"id":"string","type":"category","meta":{"temp_id":"string","method":"string"}}}},"meta":{"temp_id":"string"}}}'
POST /v3/channels/string/reservations//change_requests HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
Content-Length: 488
{"data":{"type":"change_request","attributes":{"start_date":"2021-03-03","end_date":"2021-03-03","memo":"string","address":"string","city":"string","first_name":"string","last_name":"string","phone":"string","postalcode":"string","guest_name":"string","country_code":"NL","price_according_to_channel":{"currency":"string","value":"string"}},"relationships":{"category":{"data":{"id":"string","type":"category","meta":{"temp_id":"string","method":"string"}}}},"meta":{"temp_id":"string"}}}
var data = "{\"data\":{\"type\":\"change_request\",\"attributes\":{\"start_date\":\"2021-03-03\",\"end_date\":\"2021-03-03\",\"memo\":\"string\",\"address\":\"string\",\"city\":\"string\",\"first_name\":\"string\",\"last_name\":\"string\",\"phone\":\"string\",\"postalcode\":\"string\",\"guest_name\":\"string\",\"country_code\":\"NL\",\"price_according_to_channel\":{\"currency\":\"string\",\"value\":\"string\"}},\"relationships\":{\"category\":{\"data\":{\"id\":\"string\",\"type\":\"category\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}}},\"meta\":{\"temp_id\":\"string\"}}}";
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api.bookingexperts.nl/v3/channels/string/reservations//change_requests");
xhr.setRequestHeader("content-type", "application/vnd.api+json");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/channels/string/reservations//change_requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/vnd.api+json'
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
request.body = "{\"data\":{\"type\":\"change_request\",\"attributes\":{\"start_date\":\"2021-03-03\",\"end_date\":\"2021-03-03\",\"memo\":\"string\",\"address\":\"string\",\"city\":\"string\",\"first_name\":\"string\",\"last_name\":\"string\",\"phone\":\"string\",\"postalcode\":\"string\",\"guest_name\":\"string\",\"country_code\":\"NL\",\"price_according_to_channel\":{\"currency\":\"string\",\"value\":\"string\"}},\"relationships\":{\"category\":{\"data\":{\"id\":\"string\",\"type\":\"category\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}}},\"meta\":{\"temp_id\":\"string\"}}}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
payload = "{\"data\":{\"type\":\"change_request\",\"attributes\":{\"start_date\":\"2021-03-03\",\"end_date\":\"2021-03-03\",\"memo\":\"string\",\"address\":\"string\",\"city\":\"string\",\"first_name\":\"string\",\"last_name\":\"string\",\"phone\":\"string\",\"postalcode\":\"string\",\"guest_name\":\"string\",\"country_code\":\"NL\",\"price_according_to_channel\":{\"currency\":\"string\",\"value\":\"string\"}},\"relationships\":{\"category\":{\"data\":{\"id\":\"string\",\"type\":\"category\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}}},\"meta\":{\"temp_id\":\"string\"}}}"
headers = {
'content-type': "application/vnd.api+json",
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("POST", "/v3/channels/string/reservations//change_requests", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/channels/string/reservations//change_requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"data\":{\"type\":\"change_request\",\"attributes\":{\"start_date\":\"2021-03-03\",\"end_date\":\"2021-03-03\",\"memo\":\"string\",\"address\":\"string\",\"city\":\"string\",\"first_name\":\"string\",\"last_name\":\"string\",\"phone\":\"string\",\"postalcode\":\"string\",\"guest_name\":\"string\",\"country_code\":\"NL\",\"price_according_to_channel\":{\"currency\":\"string\",\"value\":\"string\"}},\"relationships\":{\"category\":{\"data\":{\"id\":\"string\",\"type\":\"category\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}}},\"meta\":{\"temp_id\":\"string\"}}}",
CURLOPT_HTTPHEADER => array(
"accept: application/vnd.api+json",
"accept-language: en,nl",
"content-type: application/vnd.api+json",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.post("https://api.bookingexperts.nl/v3/channels/string/reservations//change_requests")
.header("content-type", "application/vnd.api+json")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.body("{\"data\":{\"type\":\"change_request\",\"attributes\":{\"start_date\":\"2021-03-03\",\"end_date\":\"2021-03-03\",\"memo\":\"string\",\"address\":\"string\",\"city\":\"string\",\"first_name\":\"string\",\"last_name\":\"string\",\"phone\":\"string\",\"postalcode\":\"string\",\"guest_name\":\"string\",\"country_code\":\"NL\",\"price_according_to_channel\":{\"currency\":\"string\",\"value\":\"string\"}},\"relationships\":{\"category\":{\"data\":{\"id\":\"string\",\"type\":\"category\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}}},\"meta\":{\"temp_id\":\"string\"}}}")
.asString();
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/channels/string/reservations//change_requests"
payload := strings.NewReader("{\"data\":{\"type\":\"change_request\",\"attributes\":{\"start_date\":\"2021-03-03\",\"end_date\":\"2021-03-03\",\"memo\":\"string\",\"address\":\"string\",\"city\":\"string\",\"first_name\":\"string\",\"last_name\":\"string\",\"phone\":\"string\",\"postalcode\":\"string\",\"guest_name\":\"string\",\"country_code\":\"NL\",\"price_according_to_channel\":{\"currency\":\"string\",\"value\":\"string\"}},\"relationships\":{\"category\":{\"data\":{\"id\":\"string\",\"type\":\"category\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}}},\"meta\":{\"temp_id\":\"string\"}}}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/vnd.api+json")
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /v3/channels/{channel_id}/reservations/{reservation_id}/change_requests
Create a new reservation change request
Body parameter
{
"data": {
"type": "change_request",
"attributes": {
"start_date": "2021-03-03",
"end_date": "2021-03-03",
"memo": "string",
"address": "string",
"city": "string",
"first_name": "string",
"last_name": "string",
"phone": "string",
"postalcode": "string",
"guest_name": "string",
"country_code": "NL",
"price_according_to_channel": {
"currency": "string",
"value": "string"
}
},
"relationships": {
"category": {
"data": {
"id": "string",
"type": "category",
"meta": {
"temp_id": "string",
"method": "string"
}
}
}
},
"meta": {
"temp_id": "string"
}
}
}
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
channel_id | path | string | true | string | Channel ID |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
body | body | object | true | [object Object] | none |
— data | body | object | false | [object Object] | none |
—— type | body | string | false | change_request | Type |
—— attributes | body | object | false | [object Object] | Attributes |
——— start_date | body | string(date) | false | 2021-03-03 | none |
——— end_date | body | string(date) | false | 2021-03-03 | none |
——— memo | body | string | false | string | none |
——— address | body | string | false | string | none |
——— city | body | string | false | string | none |
——— first_name | body | string | false | string | none |
——— last_name | body | string | false | string | none |
——— phone | body | string | false | string | none |
——— postalcode | body | string | false | string | none |
——— guest_name | body | string | false | string | none |
——— country_code | body | string | false | NL | none |
——— price_according_to_channel | body | object | false | [object Object] | Updates the price according to the channel. This may only be specified when the category or period has been changed as well |
———— currency | body | string | false | string | none |
———— value | body | string | false | string | none |
—— relationships | body | object | false | [object Object] | Relationships |
——— category | body | object | false | [object Object] | none |
———— data | body | object | false | [object Object] | none |
————— id | body | string | false | string | category ID |
————— type | body | string | false | category | none |
————— meta | body | object | false | [object Object] | none |
—————— temp_id | body | string | false | string | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | body | string | false | string | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
—— meta | body | object | false | [object Object] | Metadata |
——— temp_id | body | string | false | string | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
Example responses
200 Response
{
"data": {
"id": "1",
"type": "change_request",
"attributes": {
"start_date": "2021-03-03",
"end_date": "2021-03-03",
"memo": "string",
"address": "string",
"city": "string",
"first_name": "string",
"last_name": "string",
"phone": "string",
"postalcode": "string",
"guest_name": "string",
"country_code": "NL",
"price_according_to_channel": {
"currency": "string",
"value": "string"
},
"created_at": "2021-03-03T08:31:26Z"
},
"relationships": {
"category": {
"data": {
"id": "string",
"type": "category",
"meta": {
"temp_id": "string",
"method": "string"
}
}
}
},
"meta": {
"temp_id": "string"
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | ChangeRequestResponse | Inline |
default | Default | Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— data | ChangeRequest | false | none | none |
—— id | string | false | none | ID |
—— type | string | false | none | Type |
—— attributes | object | false | none | Attributes |
——— start_date | string(date) | false | none | none |
——— end_date | string(date) | false | none | none |
——— memo | string | false | none | none |
——— address | string | false | none | none |
——— city | string | false | none | none |
——— first_name | string | false | none | none |
——— last_name | string | false | none | none |
——— phone | string | false | none | none |
——— postalcode | string | false | none | none |
——— guest_name | string | false | none | none |
——— country_code | string | false | none | none |
——— price_according_to_channel | object | false | none | Updates the price according to the channel. This may only be specified when the category or period has been changed as well |
———— currency | string | false | none | none |
———— value | string | false | none | none |
——— created_at | string(date-time) | false | read-only | none |
—— relationships | object | false | none | Relationships |
——— category | object | false | none | none |
———— data | object | false | none | none |
————— id | string | false | none | category ID |
————— type | string | false | none | none |
————— meta | object | false | none | none |
—————— temp_id | string | false | none | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | string | false | none | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
—— meta | object | false | none | Metadata |
——— temp_id | string | false | none | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
— errors | [object] | false | none | none |
—— status | string | false | none | HTTP response code |
—— code | string | false | none | Internal error code |
—— title | string | false | none | Error title |
—— detail | string | false | none | Error details |
—— source | object | false | none | none |
——— pointer | string | false | none | Pointer to error in resource |
Channel Reservation Previews
Preview a reservation
POST reservation preview
Code samples
curl --request POST \
--url https://api.bookingexperts.nl/v3/channels/string/reservation_previews \
--header 'accept: application/vnd.api+json' \
--header 'accept-language: en,nl' \
--header 'content-type: application/vnd.api+json' \
--header 'x-api-key: API_KEY' \
--data '{"data":{"type":"reservation","attributes":{"start_date":"2021-03-03","end_date":"2021-03-03","late_checkout":true,"option_validity":3,"remote_booking_nr":"string","remote_reservation_key":"string","guest_name":"string","locale":"nl","note":"string","promotion_token":"string","currency":"EUR","guest_group":{"seniors":0,"adults":0,"adolescents":0,"children":0,"babies":0,"pets":0},"price_according_to_channel":{"currency":"string","value":"string"},"creditcard_number":"string","checked_in_on":"2021-03-03T08:31:26Z","checked_out_on":"2021-03-03T08:31:26Z","cancel_date":"2021-03-03","cancel_reason":"string","license_plates":["string"],"group_composition":"string","group_type":"string","group_age":{"age_18_till_20":0,"age_21_till_25":0,"age_26_till_30":0,"age_31_till_35":0,"age_36_till_40":0,"age_41_till_54":0,"age_55_plus":0}},"relationships":{"category":{"data":{"id":"string","type":"category","meta":{"temp_id":"string","method":"string"}}},"rentable_identity":{"data":{"id":"string","type":"rentable_identity","meta":{"temp_id":"string","method":"string"}}},"order":{"data":{"id":"string","type":"order","meta":{"temp_id":"string","method":"string"}},"links":{"related":"string"}},"discount_card":{"data":{"id":"string","type":"discount_card","meta":{"temp_id":"string","method":"string"}}},"primary_package":{"data":{"id":"string","type":"primary_package","meta":{"temp_id":"string","method":"string"}}},"extra_order_items":{"data":[{"id":"string","type":"extra_order_item","meta":{"temp_id":"string","method":"string"}}]},"cancellation_rules":{"data":[{"id":"string","type":"cancellation_rule","meta":{"temp_id":"string","method":"string"}}]},"tags":{"data":[{"id":"string","type":"tag","meta":{"temp_id":"string","method":"string"}}]}},"meta":{"temp_id":"string"}}}'
POST /v3/channels/string/reservation_previews HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Accept-Language: en,nl
X-Api-Key: API_KEY
Host: api.bookingexperts.nl
Content-Length: 1779
{"data":{"type":"reservation","attributes":{"start_date":"2021-03-03","end_date":"2021-03-03","late_checkout":true,"option_validity":3,"remote_booking_nr":"string","remote_reservation_key":"string","guest_name":"string","locale":"nl","note":"string","promotion_token":"string","currency":"EUR","guest_group":{"seniors":0,"adults":0,"adolescents":0,"children":0,"babies":0,"pets":0},"price_according_to_channel":{"currency":"string","value":"string"},"creditcard_number":"string","checked_in_on":"2021-03-03T08:31:26Z","checked_out_on":"2021-03-03T08:31:26Z","cancel_date":"2021-03-03","cancel_reason":"string","license_plates":["string"],"group_composition":"string","group_type":"string","group_age":{"age_18_till_20":0,"age_21_till_25":0,"age_26_till_30":0,"age_31_till_35":0,"age_36_till_40":0,"age_41_till_54":0,"age_55_plus":0}},"relationships":{"category":{"data":{"id":"string","type":"category","meta":{"temp_id":"string","method":"string"}}},"rentable_identity":{"data":{"id":"string","type":"rentable_identity","meta":{"temp_id":"string","method":"string"}}},"order":{"data":{"id":"string","type":"order","meta":{"temp_id":"string","method":"string"}},"links":{"related":"string"}},"discount_card":{"data":{"id":"string","type":"discount_card","meta":{"temp_id":"string","method":"string"}}},"primary_package":{"data":{"id":"string","type":"primary_package","meta":{"temp_id":"string","method":"string"}}},"extra_order_items":{"data":[{"id":"string","type":"extra_order_item","meta":{"temp_id":"string","method":"string"}}]},"cancellation_rules":{"data":[{"id":"string","type":"cancellation_rule","meta":{"temp_id":"string","method":"string"}}]},"tags":{"data":[{"id":"string","type":"tag","meta":{"temp_id":"string","method":"string"}}]}},"meta":{"temp_id":"string"}}}
var data = "{\"data\":{\"type\":\"reservation\",\"attributes\":{\"start_date\":\"2021-03-03\",\"end_date\":\"2021-03-03\",\"late_checkout\":true,\"option_validity\":3,\"remote_booking_nr\":\"string\",\"remote_reservation_key\":\"string\",\"guest_name\":\"string\",\"locale\":\"nl\",\"note\":\"string\",\"promotion_token\":\"string\",\"currency\":\"EUR\",\"guest_group\":{\"seniors\":0,\"adults\":0,\"adolescents\":0,\"children\":0,\"babies\":0,\"pets\":0},\"price_according_to_channel\":{\"currency\":\"string\",\"value\":\"string\"},\"creditcard_number\":\"string\",\"checked_in_on\":\"2021-03-03T08:31:26Z\",\"checked_out_on\":\"2021-03-03T08:31:26Z\",\"cancel_date\":\"2021-03-03\",\"cancel_reason\":\"string\",\"license_plates\":[\"string\"],\"group_composition\":\"string\",\"group_type\":\"string\",\"group_age\":{\"age_18_till_20\":0,\"age_21_till_25\":0,\"age_26_till_30\":0,\"age_31_till_35\":0,\"age_36_till_40\":0,\"age_41_till_54\":0,\"age_55_plus\":0}},\"relationships\":{\"category\":{\"data\":{\"id\":\"string\",\"type\":\"category\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"rentable_identity\":{\"data\":{\"id\":\"string\",\"type\":\"rentable_identity\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"order\":{\"data\":{\"id\":\"string\",\"type\":\"order\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}},\"links\":{\"related\":\"string\"}},\"discount_card\":{\"data\":{\"id\":\"string\",\"type\":\"discount_card\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"primary_package\":{\"data\":{\"id\":\"string\",\"type\":\"primary_package\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"extra_order_items\":{\"data\":[{\"id\":\"string\",\"type\":\"extra_order_item\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}]},\"cancellation_rules\":{\"data\":[{\"id\":\"string\",\"type\":\"cancellation_rule\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}]},\"tags\":{\"data\":[{\"id\":\"string\",\"type\":\"tag\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}]}},\"meta\":{\"temp_id\":\"string\"}}}";
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api.bookingexperts.nl/v3/channels/string/reservation_previews");
xhr.setRequestHeader("content-type", "application/vnd.api+json");
xhr.setRequestHeader("accept", "application/vnd.api+json");
xhr.setRequestHeader("accept-language", "en,nl");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bookingexperts.nl/v3/channels/string/reservation_previews")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/vnd.api+json'
request["accept"] = 'application/vnd.api+json'
request["accept-language"] = 'en,nl'
request["x-api-key"] = 'API_KEY'
request.body = "{\"data\":{\"type\":\"reservation\",\"attributes\":{\"start_date\":\"2021-03-03\",\"end_date\":\"2021-03-03\",\"late_checkout\":true,\"option_validity\":3,\"remote_booking_nr\":\"string\",\"remote_reservation_key\":\"string\",\"guest_name\":\"string\",\"locale\":\"nl\",\"note\":\"string\",\"promotion_token\":\"string\",\"currency\":\"EUR\",\"guest_group\":{\"seniors\":0,\"adults\":0,\"adolescents\":0,\"children\":0,\"babies\":0,\"pets\":0},\"price_according_to_channel\":{\"currency\":\"string\",\"value\":\"string\"},\"creditcard_number\":\"string\",\"checked_in_on\":\"2021-03-03T08:31:26Z\",\"checked_out_on\":\"2021-03-03T08:31:26Z\",\"cancel_date\":\"2021-03-03\",\"cancel_reason\":\"string\",\"license_plates\":[\"string\"],\"group_composition\":\"string\",\"group_type\":\"string\",\"group_age\":{\"age_18_till_20\":0,\"age_21_till_25\":0,\"age_26_till_30\":0,\"age_31_till_35\":0,\"age_36_till_40\":0,\"age_41_till_54\":0,\"age_55_plus\":0}},\"relationships\":{\"category\":{\"data\":{\"id\":\"string\",\"type\":\"category\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"rentable_identity\":{\"data\":{\"id\":\"string\",\"type\":\"rentable_identity\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"order\":{\"data\":{\"id\":\"string\",\"type\":\"order\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}},\"links\":{\"related\":\"string\"}},\"discount_card\":{\"data\":{\"id\":\"string\",\"type\":\"discount_card\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"primary_package\":{\"data\":{\"id\":\"string\",\"type\":\"primary_package\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"extra_order_items\":{\"data\":[{\"id\":\"string\",\"type\":\"extra_order_item\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}]},\"cancellation_rules\":{\"data\":[{\"id\":\"string\",\"type\":\"cancellation_rule\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}]},\"tags\":{\"data\":[{\"id\":\"string\",\"type\":\"tag\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}]}},\"meta\":{\"temp_id\":\"string\"}}}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bookingexperts.nl")
payload = "{\"data\":{\"type\":\"reservation\",\"attributes\":{\"start_date\":\"2021-03-03\",\"end_date\":\"2021-03-03\",\"late_checkout\":true,\"option_validity\":3,\"remote_booking_nr\":\"string\",\"remote_reservation_key\":\"string\",\"guest_name\":\"string\",\"locale\":\"nl\",\"note\":\"string\",\"promotion_token\":\"string\",\"currency\":\"EUR\",\"guest_group\":{\"seniors\":0,\"adults\":0,\"adolescents\":0,\"children\":0,\"babies\":0,\"pets\":0},\"price_according_to_channel\":{\"currency\":\"string\",\"value\":\"string\"},\"creditcard_number\":\"string\",\"checked_in_on\":\"2021-03-03T08:31:26Z\",\"checked_out_on\":\"2021-03-03T08:31:26Z\",\"cancel_date\":\"2021-03-03\",\"cancel_reason\":\"string\",\"license_plates\":[\"string\"],\"group_composition\":\"string\",\"group_type\":\"string\",\"group_age\":{\"age_18_till_20\":0,\"age_21_till_25\":0,\"age_26_till_30\":0,\"age_31_till_35\":0,\"age_36_till_40\":0,\"age_41_till_54\":0,\"age_55_plus\":0}},\"relationships\":{\"category\":{\"data\":{\"id\":\"string\",\"type\":\"category\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"rentable_identity\":{\"data\":{\"id\":\"string\",\"type\":\"rentable_identity\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"order\":{\"data\":{\"id\":\"string\",\"type\":\"order\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}},\"links\":{\"related\":\"string\"}},\"discount_card\":{\"data\":{\"id\":\"string\",\"type\":\"discount_card\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"primary_package\":{\"data\":{\"id\":\"string\",\"type\":\"primary_package\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"extra_order_items\":{\"data\":[{\"id\":\"string\",\"type\":\"extra_order_item\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}]},\"cancellation_rules\":{\"data\":[{\"id\":\"string\",\"type\":\"cancellation_rule\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}]},\"tags\":{\"data\":[{\"id\":\"string\",\"type\":\"tag\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}]}},\"meta\":{\"temp_id\":\"string\"}}}"
headers = {
'content-type': "application/vnd.api+json",
'accept': "application/vnd.api+json",
'accept-language': "en,nl",
'x-api-key': "API_KEY"
}
conn.request("POST", "/v3/channels/string/reservation_previews", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bookingexperts.nl/v3/channels/string/reservation_previews",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"data\":{\"type\":\"reservation\",\"attributes\":{\"start_date\":\"2021-03-03\",\"end_date\":\"2021-03-03\",\"late_checkout\":true,\"option_validity\":3,\"remote_booking_nr\":\"string\",\"remote_reservation_key\":\"string\",\"guest_name\":\"string\",\"locale\":\"nl\",\"note\":\"string\",\"promotion_token\":\"string\",\"currency\":\"EUR\",\"guest_group\":{\"seniors\":0,\"adults\":0,\"adolescents\":0,\"children\":0,\"babies\":0,\"pets\":0},\"price_according_to_channel\":{\"currency\":\"string\",\"value\":\"string\"},\"creditcard_number\":\"string\",\"checked_in_on\":\"2021-03-03T08:31:26Z\",\"checked_out_on\":\"2021-03-03T08:31:26Z\",\"cancel_date\":\"2021-03-03\",\"cancel_reason\":\"string\",\"license_plates\":[\"string\"],\"group_composition\":\"string\",\"group_type\":\"string\",\"group_age\":{\"age_18_till_20\":0,\"age_21_till_25\":0,\"age_26_till_30\":0,\"age_31_till_35\":0,\"age_36_till_40\":0,\"age_41_till_54\":0,\"age_55_plus\":0}},\"relationships\":{\"category\":{\"data\":{\"id\":\"string\",\"type\":\"category\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"rentable_identity\":{\"data\":{\"id\":\"string\",\"type\":\"rentable_identity\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"order\":{\"data\":{\"id\":\"string\",\"type\":\"order\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}},\"links\":{\"related\":\"string\"}},\"discount_card\":{\"data\":{\"id\":\"string\",\"type\":\"discount_card\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"primary_package\":{\"data\":{\"id\":\"string\",\"type\":\"primary_package\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"extra_order_items\":{\"data\":[{\"id\":\"string\",\"type\":\"extra_order_item\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}]},\"cancellation_rules\":{\"data\":[{\"id\":\"string\",\"type\":\"cancellation_rule\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}]},\"tags\":{\"data\":[{\"id\":\"string\",\"type\":\"tag\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}]}},\"meta\":{\"temp_id\":\"string\"}}}",
CURLOPT_HTTPHEADER => array(
"accept: application/vnd.api+json",
"accept-language: en,nl",
"content-type: application/vnd.api+json",
"x-api-key: API_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.post("https://api.bookingexperts.nl/v3/channels/string/reservation_previews")
.header("content-type", "application/vnd.api+json")
.header("accept", "application/vnd.api+json")
.header("accept-language", "en,nl")
.header("x-api-key", "API_KEY")
.body("{\"data\":{\"type\":\"reservation\",\"attributes\":{\"start_date\":\"2021-03-03\",\"end_date\":\"2021-03-03\",\"late_checkout\":true,\"option_validity\":3,\"remote_booking_nr\":\"string\",\"remote_reservation_key\":\"string\",\"guest_name\":\"string\",\"locale\":\"nl\",\"note\":\"string\",\"promotion_token\":\"string\",\"currency\":\"EUR\",\"guest_group\":{\"seniors\":0,\"adults\":0,\"adolescents\":0,\"children\":0,\"babies\":0,\"pets\":0},\"price_according_to_channel\":{\"currency\":\"string\",\"value\":\"string\"},\"creditcard_number\":\"string\",\"checked_in_on\":\"2021-03-03T08:31:26Z\",\"checked_out_on\":\"2021-03-03T08:31:26Z\",\"cancel_date\":\"2021-03-03\",\"cancel_reason\":\"string\",\"license_plates\":[\"string\"],\"group_composition\":\"string\",\"group_type\":\"string\",\"group_age\":{\"age_18_till_20\":0,\"age_21_till_25\":0,\"age_26_till_30\":0,\"age_31_till_35\":0,\"age_36_till_40\":0,\"age_41_till_54\":0,\"age_55_plus\":0}},\"relationships\":{\"category\":{\"data\":{\"id\":\"string\",\"type\":\"category\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"rentable_identity\":{\"data\":{\"id\":\"string\",\"type\":\"rentable_identity\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"order\":{\"data\":{\"id\":\"string\",\"type\":\"order\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}},\"links\":{\"related\":\"string\"}},\"discount_card\":{\"data\":{\"id\":\"string\",\"type\":\"discount_card\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"primary_package\":{\"data\":{\"id\":\"string\",\"type\":\"primary_package\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"extra_order_items\":{\"data\":[{\"id\":\"string\",\"type\":\"extra_order_item\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}]},\"cancellation_rules\":{\"data\":[{\"id\":\"string\",\"type\":\"cancellation_rule\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}]},\"tags\":{\"data\":[{\"id\":\"string\",\"type\":\"tag\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}]}},\"meta\":{\"temp_id\":\"string\"}}}")
.asString();
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bookingexperts.nl/v3/channels/string/reservation_previews"
payload := strings.NewReader("{\"data\":{\"type\":\"reservation\",\"attributes\":{\"start_date\":\"2021-03-03\",\"end_date\":\"2021-03-03\",\"late_checkout\":true,\"option_validity\":3,\"remote_booking_nr\":\"string\",\"remote_reservation_key\":\"string\",\"guest_name\":\"string\",\"locale\":\"nl\",\"note\":\"string\",\"promotion_token\":\"string\",\"currency\":\"EUR\",\"guest_group\":{\"seniors\":0,\"adults\":0,\"adolescents\":0,\"children\":0,\"babies\":0,\"pets\":0},\"price_according_to_channel\":{\"currency\":\"string\",\"value\":\"string\"},\"creditcard_number\":\"string\",\"checked_in_on\":\"2021-03-03T08:31:26Z\",\"checked_out_on\":\"2021-03-03T08:31:26Z\",\"cancel_date\":\"2021-03-03\",\"cancel_reason\":\"string\",\"license_plates\":[\"string\"],\"group_composition\":\"string\",\"group_type\":\"string\",\"group_age\":{\"age_18_till_20\":0,\"age_21_till_25\":0,\"age_26_till_30\":0,\"age_31_till_35\":0,\"age_36_till_40\":0,\"age_41_till_54\":0,\"age_55_plus\":0}},\"relationships\":{\"category\":{\"data\":{\"id\":\"string\",\"type\":\"category\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"rentable_identity\":{\"data\":{\"id\":\"string\",\"type\":\"rentable_identity\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"order\":{\"data\":{\"id\":\"string\",\"type\":\"order\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}},\"links\":{\"related\":\"string\"}},\"discount_card\":{\"data\":{\"id\":\"string\",\"type\":\"discount_card\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"primary_package\":{\"data\":{\"id\":\"string\",\"type\":\"primary_package\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}},\"extra_order_items\":{\"data\":[{\"id\":\"string\",\"type\":\"extra_order_item\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}]},\"cancellation_rules\":{\"data\":[{\"id\":\"string\",\"type\":\"cancellation_rule\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}]},\"tags\":{\"data\":[{\"id\":\"string\",\"type\":\"tag\",\"meta\":{\"temp_id\":\"string\",\"method\":\"string\"}}]}},\"meta\":{\"temp_id\":\"string\"}}}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/vnd.api+json")
req.Header.Add("accept", "application/vnd.api+json")
req.Header.Add("accept-language", "en,nl")
req.Header.Add("x-api-key", "API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /v3/channels/{channel_id}/reservation_previews
Create a new reservation preview
Body parameter
{
"data": {
"type": "reservation",
"attributes": {
"start_date": "2021-03-03",
"end_date": "2021-03-03",
"late_checkout": true,
"option_validity": 3,
"remote_booking_nr": "string",
"remote_reservation_key": "string",
"guest_name": "string",
"locale": "nl",
"note": "string",
"promotion_token": "string",
"currency": "EUR",
"guest_group": {
"seniors": 0,
"adults": 0,
"adolescents": 0,
"children": 0,
"babies": 0,
"pets": 0
},
"price_according_to_channel": {
"currency": "string",
"value": "string"
},
"creditcard_number": "string",
"checked_in_on": "2021-03-03T08:31:26Z",
"checked_out_on": "2021-03-03T08:31:26Z",
"cancel_date": "2021-03-03",
"cancel_reason": "string",
"license_plates": [
"string"
],
"group_composition": "string",
"group_type": "string",
"group_age": {
"age_18_till_20": 0,
"age_21_till_25": 0,
"age_26_till_30": 0,
"age_31_till_35": 0,
"age_36_till_40": 0,
"age_41_till_54": 0,
"age_55_plus": 0
}
},
"relationships": {
"category": {
"data": {
"id": "string",
"type": "category",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"rentable_identity": {
"data": {
"id": "string",
"type": "rentable_identity",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"order": {
"data": {
"id": "string",
"type": "order",
"meta": {
"temp_id": "string",
"method": "string"
}
},
"links": {
"related": "string"
}
},
"discount_card": {
"data": {
"id": "string",
"type": "discount_card",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"primary_package": {
"data": {
"id": "string",
"type": "primary_package",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"extra_order_items": {
"data": [
{
"id": "string",
"type": "extra_order_item",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"cancellation_rules": {
"data": [
{
"id": "string",
"type": "cancellation_rule",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"tags": {
"data": [
{
"id": "string",
"type": "tag",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
}
},
"meta": {
"temp_id": "string"
}
}
}
Parameters
Name | In | Type | Required | Example | Description |
---|---|---|---|---|---|
channel_id | path | string | true | string | Channel ID |
Accept-Language | header | string | false | en,nl | Supported languages. A comma separated list with one or more of the following locales: nl, en, de, fr, da, cs, es, tr, pt, it. Default: 'en'. |
body | body | object | true | [object Object] | none |
— data | body | object | false | [object Object] | none |
—— type | body | string | false | reservation | Type |
—— attributes | body | object | false | [object Object] | Attributes |
——— start_date | body | string(date) | false | 2021-03-03 | none |
——— end_date | body | string(date) | false | 2021-03-03 | none |
——— late_checkout | body | boolean | false | true | none |
——— option_validity | body | integer | false | 3 | Returns the option validity in days when this is an option. Specify this attribute on create to make an option. |
——— remote_booking_nr | body | string | false | string | External booking number |
——— remote_reservation_key | body | string | false | string | Channel room booking ID |
——— guest_name | body | string | false | string | When having multiple reservations for an order, this can be used to store the guest name for this specific reservation. |
——— locale | body | string | false | nl | One of: ["nl", "en", "de", "fr", "da", "cs", "es", "tr", "pt", "it"] |
——— note | body | string | false | string | An optional note or remark of the customer. |
——— promotion_token | body | string | false | string | Optional, can be used for passing the promotion token of the owner of the accommodation. |
——— currency | body | string | false | EUR | none |
——— guest_group | body | object | false | [object Object] | none |
———— seniors | body | integer | false | 0 | none |
———— adults | body | integer | false | 0 | none |
———— adolescents | body | integer | false | 0 | none |
———— children | body | integer | false | 0 | none |
———— babies | body | integer | false | 0 | none |
———— pets | body | integer | false | 0 | none |
——— price_according_to_channel | body | object | false | [object Object] | Set the foreign total price according to the channel. Can only be specified on creation, a change request should be created otherwise. |
———— currency | body | string | false | string | none |
———— value | body | string | false | string | none |
——— creditcard_number | body | string | false | string | none |
——— checked_in_on | body | string(date-time) | false | 2021-03-03T08:31:26Z | Returns when this reservation was checked in when it is checked in. |
——— checked_out_on | body | string(date-time) | false | 2021-03-03T08:31:26Z | Returns when this reservation was checked out when it is checked out. |
——— cancel_date | body | string(date) | false | 2021-03-03 | none |
——— cancel_reason | body | string | false | string | none |
——— license_plates | body | [string] | false | string | none |
——— group_composition | body | string | false | string | none |
——— group_type | body | string | false | string | none |
——— group_age | body | object | false | [object Object] | none |
———— age_18_till_20 | body | integer | false | 0 | none |
———— age_21_till_25 | body | integer | false | 0 | none |
———— age_26_till_30 | body | integer | false | 0 | none |
———— age_31_till_35 | body | integer | false | 0 | none |
———— age_36_till_40 | body | integer | false | 0 | none |
———— age_41_till_54 | body | integer | false | 0 | none |
———— age_55_plus | body | integer | false | 0 | none |
—— relationships | body | object | false | [object Object] | Relationships |
——— category | body | object | false | [object Object] | none |
———— data | body | object | false | [object Object] | none |
————— id | body | string | false | string | category ID |
————— type | body | string | false | category | none |
————— meta | body | object | false | [object Object] | none |
—————— temp_id | body | string | false | string | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | body | string | false | string | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— rentable_identity | body | object | false | [object Object] | none |
———— data | body | object | false | [object Object] | none |
————— id | body | string | false | string | rentable_identity ID |
————— type | body | string | false | rentable_identity | none |
————— meta | body | object | false | [object Object] | none |
—————— temp_id | body | string | false | string | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | body | string | false | string | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— order | body | object | false | [object Object] | none |
———— data | body | object | false | [object Object] | none |
————— id | body | string | false | string | order ID |
————— type | body | string | false | order | none |
————— meta | body | object | false | [object Object] | none |
—————— temp_id | body | string | false | string | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | body | string | false | string | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
———— links | body | object | false | [object Object] | none |
————— related | body | string | false | string | none |
——— discount_card | body | object | false | [object Object] | none |
———— data | body | object | false | [object Object] | none |
————— id | body | string | false | string | discount_card ID |
————— type | body | string | false | discount_card | none |
————— meta | body | object | false | [object Object] | none |
—————— temp_id | body | string | false | string | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | body | string | false | string | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— primary_package | body | object | false | [object Object] | none |
———— data | body | object | false | [object Object] | none |
————— id | body | string | false | string | primary_package ID |
————— type | body | string | false | primary_package | none |
————— meta | body | object | false | [object Object] | none |
—————— temp_id | body | string | false | string | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | body | string | false | string | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— extra_order_items | body | object | false | [object Object] | none |
———— data | body | [object] | false | [object Object] | none |
————— id | body | string | false | string | extra_order_items ID |
————— type | body | string | false | extra_order_item | none |
————— meta | body | object | false | [object Object] | none |
—————— temp_id | body | string | false | string | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | body | string | false | string | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— cancellation_rules | body | object | false | [object Object] | none |
———— data | body | [object] | false | [object Object] | none |
————— id | body | string | false | string | cancellation_rules ID |
————— type | body | string | false | cancellation_rule | none |
————— meta | body | object | false | [object Object] | none |
—————— temp_id | body | string | false | string | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | body | string | false | string | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
——— tags | body | object | false | [object Object] | none |
———— data | body | [object] | false | [object Object] | none |
————— id | body | string | false | string | tags ID |
————— type | body | string | false | tag | none |
————— meta | body | object | false | [object Object] | none |
—————— temp_id | body | string | false | string | UUID for internal resource linking of included relationships. Should be omitted when the relationship ID is known. |
—————— method | body | string | false | string | Required when this relationship must be created or updated and is included in the request. Must be omitted when only an association needs to be made with the resource. One of: create, update. |
—— meta | body | object | false | [object Object] | Metadata |
——— temp_id | body | string | false | string | UUID for internal resource linking. Should be omitted when the relationship ID is known. |
Example responses
200 Response
{
"data": {
"id": "1",
"type": "reservation",
"attributes": {
"start_date": "2021-03-03",
"end_date": "2021-03-03",
"late_checkout": true,
"option_validity": 3,
"remote_booking_nr": "string",
"remote_reservation_key": "string",
"guest_name": "string",
"payment_guarantee": "string",
"locale": "nl",
"note": "string",
"promotion_token": "string",
"currency": "EUR",
"guest_group": {
"seniors": 0,
"adults": 0,
"adolescents": 0,
"children": 0,
"babies": 0,
"pets": 0
},
"price_according_to_channel": {
"currency": "string",
"value": "string"
},
"creditcard_number": "string",
"checked_in_on": "2021-03-03T08:31:26Z",
"checked_out_on": "2021-03-03T08:31:26Z",
"cancel_date": "2021-03-03",
"cancel_reason": "string",
"license_plates": [
"string"
],
"group_composition": "string",
"group_type": "string",
"group_age": {
"age_18_till_20": 0,
"age_21_till_25": 0,
"age_26_till_30": 0,
"age_31_till_35": 0,
"age_36_till_40": 0,
"age_41_till_54": 0,
"age_55_plus": 0
},
"state": "string",
"booking_nr": "string",
"token": "string",
"fixed_rentable": true,
"checkin_time": "2021-03-03T08:31:26Z",
"checkout_time": "2021-03-03T08:31:26Z",
"confirmed_at": "2021-03-03T08:31:26Z",
"paid_by_customer": true,
"owner_reservation": true,
"option_expires_at": "2021-03-03T08:31:26Z",
"available_parking_spots": 0,
"packaged_date_range": "2021-03-03",
"has_rentable_map": true,
"late_checkout_possible": "string",
"late_checkout_details": {
"description": null,
"price": null
},
"questions_completed": true,
"deposit_completed": true,
"guest_list_completed": true,
"license_plates_completed": true,
"group_details_required": true,
"labels": [
"string"
],
"created_at": "2021-03-03T08:31:26Z",
"updated_at": "2021-03-03T08:31:26Z"
},
"links": {
"self": "string"
},
"relationships": {
"category": {
"data": {
"id": "string",
"type": "category",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"rentable_identity": {
"data": {
"id": "string",
"type": "rentable_identity",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"order": {
"data": {
"id": "string",
"type": "order",
"meta": {
"temp_id": "string",
"method": "string"
}
},
"links": {
"related": "string"
}
},
"discount_card": {
"data": {
"id": "string",
"type": "discount_card",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"primary_package": {
"data": {
"id": "string",
"type": "primary_package",
"meta": {
"temp_id": "string",
"method": "string"
}
}
},
"extra_order_items": {
"data": [
{
"id": "string",
"type": "extra_order_item",
"meta": {
"temp_id": "string",
"method": "string"
}
}
]
},
"cancellation_rules": {
"data": [
{
"id": "string",
"type": "cancellation_rule",
"meta": {
"temp_id"