MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by visiting your dashboard and clicking Generate API token.

Endpoints

POST api/hotels/filter

requires authentication

Example request:
const url = new URL(
    "https://docs.alltophotels.io/api/hotels/filter"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
curl --request POST \
    "https://docs.alltophotels.io/api/hotels/filter" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \

Request      

POST api/hotels/filter

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

limit   integer  optional  

Number of requested hotels - e.g. 100

segmentation   string  optional  

Type - e.g. Hotels

company1   string  optional  

Hotel name - e.g. Hilton Alexander Platz

city   string  optional  

City - e.g. Berlin

iso_code_alpha3   string  optional  

Country - e.g. DEU

continent   string  optional  

Continent - e.g. Europe

stars_min   integer  optional  

Minimum nr. of stars - e.g. 1

stars_max   integer  optional  

Maximum nr. of stars - e.g. 5

min_rooms   integer  optional  

Minimum nr. of rooms - e.g. 10

max_rooms   integer  optional  

Maximum nr. of rooms - e.g. 100

min_adr   integer  optional  

Minimum average daily rate - e.g. 50

max_adr   integer  optional  

Maximum average daily rate - e.g. 100

min_score   integer  optional  

Minimum review score - e.g. 1

max_score   integer  optional  

Maximum review score - e.g. 10

min_cleanliness   integer  optional  

Minimum cleanliness score - e.g. 1

max_cleanliness   integer  optional  

Maximum cleanliness score - e.g. 10

min_location   integer  optional  

Minimum location score - e.g. 1

max_location   integer  optional  

Maximum location score - e.g. 10

min_staff   integer  optional  

Minimum staff score - e.g. 1

max_staff   integer  optional  

Maximum staff score - e.g. 10

min_comfort   integer  optional  

Minimum comfort score - e.g. 1

max_comfort   integer  optional  

Maximum comfort score - e.g. 10

min_facilities   integer  optional  

Minimum facilities score - e.g. 1

max_facilities   integer  optional  

Maximum facilities score - e.g. 10

min_value_for_money   integer  optional  

Minimum value for money score - e.g. 1

max_value_for_money   integer  optional  

Maximum value for money score - e.g. 10

min_wifi   integer  optional  

Minimum WiFi score - e.g. 1

max_wifi   integer  optional  

Maximum WiFi score - e.g. 10

date_modified   string  optional  

Recently updated - e.g. 2023-08-25

created_at   string  optional  

Created At - e.g. 2023-08-25

recently_added   string  optional  

Recently added - e.g. Recently Added

GET api/hotels/{id}

requires authentication

Example request:
const url = new URL(
    "https://docs.alltophotels.io/api/hotels/48E7E3CF-056F-074D-8A55-14EF2D58CA51"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://docs.alltophotels.io/api/hotels/48E7E3CF-056F-074D-8A55-14EF2D58CA51" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/hotels/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

Hotel's PrimaryKey - Example: 48E7E3CF-056F-074D-8A55-14EF2D58CA51

POST api/persons/filter

requires authentication

Example request:
const url = new URL(
    "https://docs.alltophotels.io/api/persons/filter"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
curl --request POST \
    "https://docs.alltophotels.io/api/persons/filter" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \

Request      

POST api/persons/filter

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

limit   integer  optional  

Number of requested persons - e.g. 100

name   string  optional  

Person's name - e.g. Jon Snow

title   string  optional  

Person's job title - e.g. [{"value": "Manager"},{"value": "Director"}]

city   string  optional  

Person's city - e.g. Berlin

iso_code_alpha3   string  optional  

Person's country - e.g. DEU

email_status   string  optional  

Email status - e.g. [Verified, Extrapolated]

company   string  optional  

Company name - e.g. Hilton

industry   string  optional  

Company's industry - e.g. [{"value": "Leisure"},{"value": "Hospitality"}]

min_employees   integer  optional  

Minimum nr. of employees - e.g. 10

max_employees   integer  optional  

Maximum nr. of employees - e.g. 500

account_id   string  optional  

Account Id - e.g. com5f9b1e3ee748710001f193e1id

GET api/persons/{id}

requires authentication

Example request:
const url = new URL(
    "https://docs.alltophotels.io/api/persons/531BE64E-D765-064C-9452-EC3BFAB6453D"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://docs.alltophotels.io/api/persons/531BE64E-D765-064C-9452-EC3BFAB6453D" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/persons/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

Person's PrimaryKey - Example: 531BE64E-D765-064C-9452-EC3BFAB6453D