Skip to main content

Accommodation search

Online Booking Engine for hotels and campings

The accommodation search API is used to search the basic price of all accommodations within your administration or even within your campsite group. You can add filters, aggregations to also filter the data so you only get the accommodations which are filtered.

The accommodation price will be calculated on the arrival and departure which is provided. The number of available places will also be available

info

This is an experimental API in BETA. Expected release is Q4 2024.

Prerequirements

Public key - Don't have one? Please require one via support@camping.care. Please also send us the host names that should be white listed. E.g. localhost:8000, www.my-awsome-booking-engine.com

Endpoint


GET https://api.camping.care/v3/accommodations/search

Send your public key over as a Bearer token.

Authorization: Bearer YOUR_PUBLIC_KEY

info

Important: Only use public keys for this endpoint and no secret API keys.

Headers

- X-Admin-Id (Optional).

The current admin ID is already attached to your API key. But if you work in a group / chain you can use this header to receive data from a specific administration only.

Parameters

This following parameters can be send. Be sure you encode the date using URL encode function.

- age_table_categories

If you want to specify the amount of persons comming for every age table category. The categories can be found here: https://app.camping.care/settings/contacts/age-tables

Possible values are: babies, young_children, children, young_adults, adults, seniors, eldern, pets


[
{
"id":"adults",
"count":"2"
},
{
"id":"childern",
"count":"0"
}
]

- persons

If you don't specify age_table_categories you can also specify the total number of traffelars. We will then take the administration's default age table category. (adults in most cases)

- arrival (Required)

Arrival date in YYYY-MM-DD format. E.g. 2024-12-25

- departure (Required)

Arrival date in YYYY-MM-DD format. E.g. 2024-12-29

- accommodation_id

If you only want to receive information from one accommodation. E.g. acc_g5c2e11a7d504f83b9fe0723f2f177bv

- tags

Tags to filter on. You can attach tags to accommodations wich we will use to filter out the accommodations.

Example filters

You can send over groups of tagIds and create multiple filters. In this case the filter works as following: (6KW OR 12KW) AND Bij het water


[
[
'tag_d5c2e11a7d504f83b9fe0723f2f177bb',
'tag_c991f976f46648548853a573366539fd'
],
[
'tag_da12832771b146968a32dc2cd92bf230'
]
]

- type

An easy solution is to filter on accommodation type. The value of the type below should be send.


{
type: 'bungalow',
operator: 'EQ'
}

Possible operators: EQ, NEQ, IN, NOT_IN, EMPTY, NOT_EMPTY

Possible types:


[
{
title: 'Other'
value: 'other'
},
{
title: 'Pitch'
value: 'campsite'
},
{
title: 'Apartment'
value: 'apartment'
},
{
title: 'Camping barrel'
value: 'camping_barrel'
},
{
title: 'Bungalow tent'
value: 'bungalow_tent'
},
{
title: 'Bungalow'
value: 'bungalow'
},
{
title: 'Caravan'
value: 'caravan'
},
{
title: 'Chalet'
value: 'chalet'
},
{
title: 'Hiker\'s cabin'
value: 'hiker_cabin'
},
{
title: 'Holiday home'
value: 'holiday_home'
},
{
title: 'Hotel Room'
value: 'hotelroom'
},
{
title: 'Lodge tent'
value: 'lodge_tent'
},
{
title: 'Mobile home'
value: 'mobilehome'
},
{
title: 'Studio'
value: 'studio'
},
{
title: 'Tipitent'
value: 'tipitent'
},
{
title: 'Treehouse'
value: 'treehouse'
},
{
title: 'Villa'
value: 'villa'
},
{
title: 'Gypsy wagon'
value: 'gipsywagon'
},
{
title: 'Safari Tent'
value: 'safari_tent'
},
{
title: 'POD'
value: 'pod'
},
]

- stock

An easy solution is to filter on accommodation type. The value of the type below should be send. With the following filter you only receive accommodations with a stock Equal or Greater Than (GTE) 1. So Accommodations that don't have stock during the selected period will not be returned.


{
stock: 1,
operator: 'GTE'
}

- offset

The pagination page you want to return. 1,2,3 etc..

- limit

The amount of results we should return, max is 20.

- count

Returns the total number of accommodations found with your specified filter. This can be used to determine your pagination. We advise you to do one request to receive the data and an other request to get the total count of all accommodations.

- sorts

Sorting of the accommodations can be done in various ways and columns. Most columns names speak for them selves: rank is default and this is the order they are ranked in the backoffice.

Possible columns: available_stock, rank, price_total, persons_max, persons_min, name, rating

Possible directions: asc, desc


[
{
column: 'price_total',
order: 'desc'
},
{
column: 'rank',
order: 'asc'
},
{
column: 'name',
order: 'asc'
}
]

Example Request

curl --location --request GET 'https://api.camping.care/v3/accommodations/search'
-H "Accept: application/json"
-H "Authorization: Bearer YOUR_PUBLIC_KEY"

Response

[

{
"id": "acc_1701b61a20ec4chd85b3b7323c055d83",
"numeric_id": 54,
"price": 400,
"price_fixed": 0,
"price_per_night": 0,
"price_total": 400,
"available_stock": 56,
"thumbnail": "https://lh3.googleusercontent.com/_rS020CQtMZDPuTEUGuAaSTFhGe7SfUpyKa2Bb2oM0__-UGpTohl4XmjKagWXGY8dTJeGT0-Keu7OlqfWqr1zwJ1=s250",
"rating": {
"amount": "542",
"avarage": "9"
},
"labels": [
{
"id": "be9b19e0-d856-4c85-854f-cd89a3g8dfee",
"icon": "mdi-account-multiple-outline",
"color": "blue",
"description": "6",
"translations": {
"de": {
"description": ""
},
"nl": {
"name": "6",
"description": ""
}
}
},
{
"id": "pets",
"icon": "mdi-paw",
"color": "green",
"description": "Pets allowed",
"translations": {
"de": {
"description": ""
},
"nl": {
"name": "Pets allowed",
"description": ""
}
}
},
{
"id": "wifi",
"icon": "mdi-wifi",
"color": "green",
"description": "Wifi",
"translations": {
"de": {
"description": ""
},
"nl": {
"name": "Wifi",
"description": ""
}
}
},
{
"id": "dishwasher",
"icon": "mdi-dishwasher",
"color": "green",
"description": "Dishwasher",
"translations": {
"de": {
"description": ""
},
"nl": {
"name": "Dishwasher",
"description": ""
},
}
}
],
"persons_max": 6,
"persons_min": 1,
"rank": 1,
"closed": true,
"name": "Standard plaats",
"name_translations": {
"de": {
"description": ""
},
"nl": {
"description": "Standard plaats"
}
},
"description": "Lekker terug naar de basis......",
"description_translations": {
"de": {
"description": ""
},
"nl": {
"description": "Lekker terug naar de basis......"
}
}
}
]

Groups and Chains

If your public key is created on group / chain level. you are able to search through all the accommodations and administrations in your chain.