Docx - Menu
×

DOCUMENTATION

API Reference

Welcome to the CombiTrip Web Services API documentation page!

This documentation is applicable for customers who want use our public API on own applications.

Getting started

Register and Get the API key, or purchase the suitable plan here.

You need include the files below to work properly. Our javascript plugin have jQuery dependency, if you already use the jQuery on your website, ignore the line of loading of jQuery framework.

Maps API
Everything you need to build an amazing map experience for your web or mobile application.
Examples
Autocomplete API
Search for an address, business or place. Geocode to validate and structure addresses globally.
Examples
Directions API
The Directions API is a service that calculates directions between locations.
Examples
Places API
Search for an address, business or place.
Examples

Maps API

Basic Usage

Simple example of map initialization.

                    
    new ABOSM("osm-map", {
        center: [4.669728,52.248624],
        zoom: 10
    });
                    
                
Map Options
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Map with shapes

Simple example of drawing polyline on map.

                    
    new ABOSM("osm-map", {
        center: [52.248624, 4.669728],
        zoom: 10
    }).ready(function (inst) {
        var point_a = [52.248624, 4.669728], point_b = [52.338871, 4.825088];

        var line = inst.polyline(point_a, point_b, {color: '#85a9dd', weight: 4});

        var dashed_line = inst.polyline([52.287063,4.753504], [52.293782,4.857877], {
            color: '#b700ea',
            weight: 4,
            dashLength: 10,
            textOptions: {
                text: 'dashed example!'
            }
        });

        var circle = inst.circle(point_a, {
            unique: 'mycircle',
            color: 'red',
            fillColor: '#f03',
            fillOpacity: 0.5,
            radius: 500
        });

        var rectangle = inst.rectangle([[52.338871, 4.825088], [52.308871, 4.805088]], {
            unique: 'myrectangle',
            weight: 1,
            color: 'blue',
            fillColor: '#0004ff',
            fillOpacity: 0.5
        });

        var polygon = inst.polygon([[52.311627, 4.684182], [52.303231, 4.678341], [52.297562, 4.695176], [52.312887, 4.703077], [52.311627, 4.684182]], {
            unique: 'mypolygon',
            weight: 1,
            color: 'yellow',
            fillColor: '#fcb601',
            fillOpacity: 0.3
        });

        // create the group
        var group = new L.featureGroup([line, dashed_line, circle, rectangle, polygon]);

        inst.fitBounds(group);
    });
                    
                
Map Options | Polyline Options
Save Example Page Show Full Code
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Map with shapes - Polyline - Encode & Load

This example show how to draw encoded polyline on map.

                    
    new ABOSM("osm-map", {
        center: [52.248624, 4.669728],
        zoom: 10
    }).ready(function(inst){
        var point_a = [52.248624, 4.669728],
            point_b = [52.338871, 4.825088],
            arr = [point_a, point_b];
            encoded = ABOSMUtils.encodePath(arr);
        var line = inst.polylineEncoded(encoded);
        inst.fitBounds(line);
    });
                    
                
Map Options | Polyline Options
Save Example Page Show Full Code
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Map with shapes - Polyline - Load from encoded string

This example show how to draw encoded polyline on map.

You can use this to draw a line using the output of a routing API

                    
        new ABOSM("osm-map", {
            center: [52.248624, 4.669728],
            zoom: 10
        }).ready(function(inst){
            var encoded = '}lm~Hykm\\\\JvQBnEBlDBrADfLNbHPvDf@fGn@jFn@xDhAhFhA`EtB|F`ChFxDnH`GbLhDtG`BfDnBxDxEdJzC~GjDxJh@dBd@`Bx@`Df@tB^`BVtA`@~B`@nCZvBZ`C|@hIb@~Dz@|In@~Fd@fFrAfRdBlTnC|c@f@vH`@jEPbBl@dFT`BZrBj@lDt@nDfC~Jd@fBvAbEfApCdChGxAjCfE~GbCdDpB|BtArAjFvEhDvBbIpEdHzDtDfBzInDzDhBfExBxKfGtGhDjHdE~Av@xAx@pHfEbAt@xDbDhBhBnBzBfB~B|A~BfFhIzAdCvBnDdN|TdXjc@`AxAnB`DhTp]rAvBnDvFpK`Q~DpGfk@p~@fJbOfDhFlJhOr^rl@na@`p@d\\\\|h@hZhf@dCzDjFjItGlKxFbJdE`Hj\\\\vh@@';
            var line = inst.polylineEncoded(encoded);
            inst.fitBounds(line);
        });
                    
                
Map Options
Save Example Page Show Full Code
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Map with shapes - Polyline - Polyline with markers

                    
        new ABOSM("osm-map", {
            center: [52.248624, 4.669728],
            zoom: 10
        }).ready(function(inst){
            var point_a = [52.248624, 4.669728], point_b = [52.338871, 4.825088];
            // create line
            var line = inst.polyline(point_a, point_b, { color: '#85a9dd', weight: 4 });

            // create markers
            var marker1 = inst.marker(point_a), marker2 = inst.marker(point_b);

            // create the group
            var group = new L.featureGroup([marker1, marker2, line]);

            // fit bounds
            inst.fitBounds(group.getBounds());
        });
                    
                
Map Options
Save Example Page Show Full Code
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Map with shapes - programmatically

                    
        var point_a = [52.248624, 4.669728], point_b = [52.338871, 4.825088];
        var UNIQUE_MARKER = 'mymarker', UNIQUE_CIRCLE = 'mycircle', UNIQUE_POLYLINE = 'mypolyline', UNIQUE_POLYLINE_ENCODED = 'mypolylineEncoded';
        var MAPTEST;

        new ABOSM("osm-map", {
            center: point_a,
            zoom: 14
        }).ready(function(inst){
            MAPTEST = inst;
        });

        function addMarker(){
            MAPTEST.marker(point_a, { unique: UNIQUE_MARKER });
        }

        function removeMarker(){
            MAPTEST.findObj(UNIQUE_MARKER).removeObj();
        }

        function addCircle(){
            MAPTEST.circle(point_a, {
                unique: UNIQUE_CIRCLE,
                color: 'red',
                fillColor: '#f03',
                fillOpacity: 0.5,
                radius: 500
            });
        }

        function removeCircle(){
            MAPTEST.findObj(UNIQUE_CIRCLE).removeObj();
        }

        function addPolyline(){
            MAPTEST.polyline(point_a, point_b, { unique: UNIQUE_POLYLINE });
        }

        function removePolyline(){
            MAPTEST.findObj(UNIQUE_POLYLINE).removeObj();
        }

        function addPolylineEncoded(){
            var arr = [point_a, point_b];
            var encoded = ABOSMUtils.encodePath(arr);
            MAPTEST.polylineEncoded(encoded, { unique: UNIQUE_POLYLINE_ENCODED });
        }

        function removePolylineEncoded(){
            MAPTEST.findObj(UNIQUE_POLYLINE_ENCODED).removeObj();
        }
                    
                
Map Options
Save Example Page Show Full Code
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Map with markers

Create the single marker on map.

                    
        new ABOSM("osm-map", {
            center: [52.248624, 4.669728],
            zoom: 10
        }).ready(function(inst){
            var marker = inst.marker([40.641113, -8.654473]);
            inst.fitBounds(marker);
        });
                    
                
Map Options | Marker Options
Save Example Page Show Full Code
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Map with markers - Popup on marker

Create the single marker on map.

                    
        new ABOSM("osm-map", {
            center: [52.248624, 4.669728],
            zoom: 10
        }).ready(function(inst){
            var marker = inst.marker([40.641113, -8.654473]);
            marker.attachPopup('Popup Content');
            marker.attachPopup('<h3>Popup Content!</h3><p><strong>This</strong> is <span style="color:red">html</span> example</p>');
            inst.fitBounds(marker);
        });
                    
                
Map Options | Marker Options
Save Example Page Show Full Code
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Map with markers - Custom Marker

                    
        new ABOSM("osm-map", {
            center: [52.248624, 4.669728],
            zoom: 10
        }).ready(function(inst){
            marker = inst.iconMarker([40.641113, -8.654473], '../images/fromA.png',  { iconSize: [35, 45], iconAnchor: [17, 45] });
            inst.fitBounds(marker);
        });
                    
                
Map Options | Marker Options
Save Example Page Show Full Code
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Map with markers - Marker Animation

Javascript

                    
        new ABOSM("osm-map", {
            center: [52.248624, 4.669728],
            zoom: 10
        }).ready(function(inst){
            marker = inst.iconMarker([40.641113, -8.654473], '../images/fromA.png',  { iconSize: [35, 45], iconAnchor: [17, 45], className: 'blinking' });
            inst.fitBounds(marker);
        });
                    
                

Css

                    
        @keyframes fade {
            from { opacity: 0.3; }
        }

        .blinking {
            animation: fade 1s infinite alternate;
        }
                    
                
Map Options | Marker Options
Save Example Page Show Full Code
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Map with routing

You need include the files below to work properly. Our javascript plugin have jQuery dependency, if you already use the jQuery on your website, ignore the line of loading of jQuery framework.

Scripts

            
    <script src="https://code.jquery.com/jquery-2.1.3.min.js"></script> <!--  Any jQuery version v1.10.x or above -->
    <script src="https://www.combitrip.com/api/public/combitrip.maps.min.js?key=<your-api-key>"></script>
            
            

Html:

            
    <div id="osm-map" />
            
            

Javascript:

            
    $(function () {
        new ABOSM("osm-map", {
            center: [52.248624, 4.669728],
            zoom: 10
        }).ready(function(inst){
            var origin_latlng = [52.248624, 4.669728];
            var destination_latlng = [52.338871, 4.825088];

            var mkOrig = inst.iconMarker(origin_latlng, '/images/fromA.png',  { iconSize: [35, 45], iconAnchor: [17, 45], addToMap: false });
            mkOrig.attachPopup('START ROUTE!');

            var mkDest = inst.iconMarker(destination_latlng, '/images/toB.png',  { iconSize: [35, 45], iconAnchor: [17, 45] , addToMap: false });
            mkDest.attachPopup('END ROUTE!');

            inst.route( [ origin_latlng, destination_latlng], {
                showItinerary: false,
                originMarker: mkOrig,
                destinationMarker: mkDest,
                lineOptions: {
                    styles: [
                        {color: '#85a9dd', weight: 4 }
                    ]
                }
            });
        });
    }
            
            

Save Example Page Show Full Code
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Map with routing - Embed

            
    <iframe width="400" height="400" src="https://www.combitrip.com/api/public/embed_map.php?key=32a61ca69e22441db052df11ab8ba02b&origin=52.3745380,4.8979750&destination=52.3791400,4.9002700"></iframe>
            
            

Save Example Page Show Full Code
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Map with autocomplete

You can connect the autocomplete with map.

Html:

            
<div class="autocomplete-container">
    <input id="ac" style="width:100%" type="text" autocomplete="off"/>
</div>

<div id="osm-map" style="width: 100%; height: 100%;">
            

Javascript:

            
<script>
    var _map_inst = null,
        _marker = null;

    new ABOSM("osm-map", {
        center: [40.744190, -73.993200],
        zoom: 10
    }).ready(function (inst) {
        _map_inst = inst;
    });

    $(function () {
        $("#ac").abgeo().bind("abgeo:place_changed", function (event, result) {
            _from_latlng = [result.geometry.location.lat(), result.geometry.location.lng()];
            if (_marker) {
                debugger;
                _marker.removeObj();
            }
            _marker = _map_inst.marker(_from_latlng);
            _map_inst.fitBounds(_marker);
            _map_inst.map.setZoom(10);
        });
    });
</script>
            
            

Css:

            
    <style>
        body {
            font-family: Raleway, sans-serif;
        }

        .autocomplete-container {
            width: 400px;
            padding: 15px;
            background: rgba(255, 255, 255, 0.85);
            position: absolute;
            left: 100px;
            top: 20px;
            z-index: 1000;
            border: 1px solid #999999;
            border-radius: 4px;
        }

        .autocomplete-container input {
            padding: 5px 12px;
        }

    </style>
            
            

Save Example Page Show Full Code
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Autocomplete API

Basic usage

You need include the files below to work properly. Our javascript plugin have jQuery dependency, if you already use the jQuery on your website, ignore the line of loading of jQuery framework.


Scripts

            
    <script src="https://code.jquery.com/jquery-2.1.3.min.js"></script> <!--  Any jQuery version v1.10.x or above -->
    <script src="https://www.combitrip.com/api/public/combitrip.geocomplete.js"></script>
            
            

Html:

            
    <input type="text" placeholder="Anywhere..." id="location" />
            
            

Javascript:

            
    $(function () {
        $("#location").abgeo({
            resultRenderLimit: 5
        });
    }
            
            
Save Example Page Show Full Code
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Multiple Engines

You can change the engine type of autocomplet. In this example, autocomplete use the combitrip server for processing as primary server, if the combitrip server doesn't return matching results, will use the google autocomplete api.


Javascript:

            
    $(function () {
        $("#location").abgeo({
            resultRenderLimit: 5,
            engine: AC_ENGINE.COMBITRIP_MULTIPLE.NAME
        });
    }
            
            
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

External Sources

You can use our autocomplete UI component for rendering the data from external source, and can be configured for any source.

Here, you have the example how to use the external source for getting the addresses with custom parameters and headers, also how to configure the geocoder.

                    
        $("#autocomplete").abgeo({
            showCurrentLoc: false,
            api: 'https://www.example.com/autocomplete',
            apiParams: {
                mode: 'walking'
            },
            apiCustomHeaders: {
                'api-custom-header': '1234'
            },
            mapSource: function (source) {
                return [
                    {
                        display_name: 'Amsterdam, Netherlands',
                        country: 'Netherlands',
                        country_code: 'NL',
                        state: 'Amsterdam',
                        city: 'Amsterdam'
                    }];
            },
            geocoder: {
                api: 'https://www.example.com/geocode',
                engine: 'custom',
                apiCustomHeaders: {
                    'geocode-custom-header': 'value'
                },
                apiParams: {
                    geocode_param_1: 'value_1',
                    geocode_param_2: 'value_2'
                },
                customParser: function (data) {
                    return {parsed: 'value'};
                }
            }
        })
                    
                
Save Example Page Show Full Code
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Advanced usage

Our autocomplete component is flexible and can be configured for your needs.

Javascript:

                
        $(function () {
            $("#location").abgeo(<options>);
        }
                
                

You can bind the change event:

            
    $(function () {
        $("#location").abgeo(<options>).bind("abgeo:place_changed", function(event, result) {
            // code
        });
    }
            
            
Property Type Default Description
api string AC_ENGINE.COMBITRIP_SINGLE.API Enpoint url for getting/searching the results.
apiParams object {} Override the default api parameters.
apiCustomHeaders object {} Override the default request headers.
noResultText string "No results..." Text for no results label.
mapSource function undefined Function for mapping the results from api request into valid format for autocomplete. Useful, when use the external source for getting data.
searchDelay integer 250 Delay for the start request on typing.
showCurrentLoc boolean true Show/Hide the option for current location in popup autocompelte.
resultRenderLimit integer 8 The number of results to parse into popup autocomplete.
getDisplayText function internal The function to return the display text for the result item.
geocoder object The settings for geocoder
engine string AC_ENGINE.COMBITRIP_SINGLE.NAME Engine for use in autocomplete. Check the engine types here.


Settings for geocoder

Property Type Default Description
api string AC_ENGINE.COMBITRIP_SINGLE.API Endpoint url for geocode item.
apiParams object {} Override the default geocode api parameters.
apiCustomHeaders object {} Override the default geocode request headers.
customParser function undefined Custom function for parsing the result from response.
onBeforeDetection function Event trigger on before detect the user location (when showCurrentLoc: true)
onAfterInit function Events trigger after the internal geocoder init
onError function Event trigger on error
onGeocoderSuccess function Event trigger on success
engine string AC_ENGINE.COMBITRIP_SINGLE.NAME Engine for using in geocoder. Check the engine types here.


Engine types

Type Description
AC_ENGINE.COMBITRIP_SINGLE.NAME Use the combitrip server for processing.
AC_ENGINE.COMBITRIP_MULTIPLE.NAME Use the combitrip server for processing as primary server, if the combitrip server doesn't return matching results, will use the google autocomplete api. Note: require google api key.
AC_ENGINE.SINGLE.NAME Use the google autocomplete api for processing.
Save Example Page Show Full Code

Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Custom - made to your preferences

You can use the below tool to test the autocomplete functionality based on your preferences. Subsequently you can generate the code, custom made to your preferences, and use it for your own projects.

CombiTrip Autocomplete facilitates the Use of multiple Autocomplete API engines. You can use this functionality to add your own custom made autocomplete or provide a 3rd party autocomplete, which will be used in case when the combitrip autocomplete doesn’t give a match or is offline. It will then fully switch to the next autocomplete and use that autocomplete engine for the rest of the session. In the example below alt_1 engine is set to use the google autocomplete as an example, please enter your API key in the field and the code will be generated ready to use.

searchDelay
showCurrentLoc No Yes
resultRenderLimit
geocoder
  Include Api Key
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Directions API

Basic usage

The Directions API is a service that calculates directions between locations.

            
<script>
    var _origin, _destination, _mapInst;

    function route(){
        if (_origin && _destination){
            var origin_latlng = [_origin.lat(), _origin.lng()];
            var destination_latlng = [_destination.lat(), _destination.lng()];

            var mkOrig = _mapInst.iconMarker(origin_latlng, '/images/fromA.png', {iconSize: [35, 45], iconAnchor: [17, 45], addToMap: false});
            mkOrig.attachPopup('START ROUTE!');

            var mkDest = _mapInst.iconMarker(destination_latlng, '/images/toB.png', {iconSize: [35, 45], iconAnchor: [17, 45], addToMap: false});
            mkDest.attachPopup('END ROUTE!');

            _mapInst.route([origin_latlng, destination_latlng], {
                showItinerary: false,
                originMarker: mkOrig,
                destinationMarker: mkDest,
                lineOptions: {
                    styles: [
                        {color: '#85a9dd', weight: 4}
                    ]
                }
            });
        }
    }

    $("#ac-origin").abgeo({
        showCurrentLoc: true
    }).bind("abgeo:place_changed", function (event, result) {
        _origin = result.geometry.location;
        route();
    });

    $("#ac-destination").abgeo({
        showCurrentLoc: true
    }).bind("abgeo:place_changed", function (event, result) {
        _destination = result.geometry.location;
        route();
    });


    new ABOSM("osm-map", {
        center: [52.248624, 4.669728],
        zoom: 10
    }).ready(function (inst) {
        _mapInst = inst;
    });
                
            
            

Save Example Page Show Full Code
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Advanced usage

You can use the directions api endpoint in your application.


Endpoint Url

https://www.combitrip.com/api/public/directions?key=<api_key>&locs=<locations>&profile=<profile_type>

Endpoint Parameters

All parameters are required.


key Required. Your api key. Check your api key here.
locs Required. Comma separated string of coordinates/locations. Example: 4.669728,52.248624;4.825088,52.338871
profile Optional. The OSRM profile to use in requests. Default: driving

Example of response

                
{
  "code": "Ok",
  "routes": [
    {
      "geometry": "{x{}Hy`o[jg@t|@vDlY`HfMpN}[yHeLeN_B{U{ZyiIkxMosB{kAy^al@_Mcp@{TetCiOeg@eh@kdAyGi\\m@svB`FwbAwCgzATcI|Bv@U`N{IDq@wZxFrkBmDh[Kt}A",
      "legs": [
        {
          "steps": [
          ],
          "distance": 24466,
          "duration": 1118.7,
          "summary": "",
          "weight": 1118.7
        }
      ],
      "distance": 24466,
      "duration": 1118.7,
      "weight_name": "routability",
      "weight": 1118.7
    }
  ],
  "waypoints": [
    {
      "hint": "2OcLgP___3_gAAAA4AAAAPAAAAAAAAAAHvMhRAAAAADXdS1EAAAAAOAAAADgAAAA8AAAAAAAAACsFQEAIEFHADBAHQMgQUcAMEAdAwEA3w0TqnAk",
      "distance": 0,
      "name": "",
      "location": [
        4.669728,
        52.248624
      ]
    },
    {
      "hint": "W3yXlv___38_AAAAPwAAAPgBAAAAAAAAcfwLQwAAAADZrIxEAAAAAD8AAAA_AAAA-AEAAAAAAACsFQEAAKBJALegHgMAoEkAt6AeAwwA7xATqnAk",
      "distance": 0,
      "name": "Nieuwe Haagseweg",
      "location": [
        4.825088,
        52.338871
      ]
    }
  ]
}
                
                    
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Places API

Basic usage

Search for an address, business or place.

You can use our api endpoint in your applications.


Endpoint Url

https://www.combitrip.com/api/public/geocomplete?sToken=<session_token>&key==<api_key>&q=<query>

Endpoint Parameters


key Required. Your api key. Check your api key here.
sToken Required. Session token. All our apis use the session technology, and the lifetime for each session is 3 minutes. Generate the guid in format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
q Required. Your query string.
country Optional. Country code in ISO 3166 Alpha-2 format: "&country=nl"

Save Example Page Show Full Code
Sign up to Get API key! If you are signed in all the example code already contains your API key, your example code will be ready to use for your project.

Listing API

Overview

This API is used for creating and managing listings. It is organized around REST. The API endpoints were designed to be predictable and resource-oriented. This means a single resource or endpoint can and often does provide different functionality based on the HTTP verb used to access it. JSON must be used to send data to the API (except for GET and DELETE requests, which also accept URI parameters). JSON is returned in all responses from the API if there is content in the response.

Authentication

Combitrip API is served over HTTPS and all requests must be authenticated. You authenticate to the Listing API V1 by providing your API key as part of each request in header. You can manage your private API keys from your account.

Your API key

To view your API key, you need to log in.

REQUEST HEADERS

X-COMBITRIP-APIKEY :

Listing::List

Get a listing of all of the accommodations/listings.

Response

Successful requests will include a JSON object containing information about the list. The data property is a array of Listing Object

DEFINITION

GET https://www.combitrip.com/api/v1/listings

REQUEST HEADERS

X-COMBITRIP-APIKEY :

EXAMPLE RESPONSE
{
    data: [< listing_object>, <listing_object>...],
    success: true
}
                            

Listing::Create

Create a new listings.

Request Parameters

The parameters should be sent as content type application/json of request and must have Listing Object structure.

DEFINITION

POST https://www.combitrip.com/api/v1/listings

REQUEST HEADERS

X-COMBITRIP-APIKEY :

EXAMPLE REQUEST
{
   "name":"My Example Listing",
   "listing_type_id":"1",
   "description":"My Example Listing Description Text",
   "latitude":"52.358828590091186",
   "longitude":"4.894411233590668",
   "street":"Street Example",
   "street_number":"1",
   "postalcode":"123456",
   "city":"ExampleCity",
   "state":"",
   "country_id":"156",
   "total_guests":"1",
   "total_beds":"1",
   "checkin_time_from":"16:00",
   "checkin_time_until":"18:00",
   "checkout_time_from":"10:00",
   "checkout_time_until":"12:00",
   "house_rules_ids[]":[
      "1",
      "2"
   ],
   "amenity_ids[]":[
      "4",
      "60",
      "99"
   ],
   "cancel_policy_id":"7",
   "spaces":[
      {
         "space_type_id":"1",
         "space_description":"",
         "space_m2":"1",
         "private":0,
         "bedsize":"160x200",
         "bedtype":"1:0"
      },
      {
         "space_type_id":"4",
         "space_description":"",
         "space_m2":"1",
         "private":0,
         "bedsize":"",
         "bedtype":null
      },
      {
         "space_type_id":"5",
         "space_description":"",
         "space_m2":"1",
         "private":0,
         "bedsize":"",
         "bedtype":null
      }
   ]
}
                            
EXAMPLE RESPONSE
{
	data: {
		listing_id: 1
	},
	success: true
}
                            

Listing::Update

Update a listing's properties.

Request Parameters

The parameters should be sent as content type application/json of request and must have partial Listing Object structure.

DEFINITION

PUT https://www.combitrip.com/api/v1/listings/{LISTING_ID}

REQUEST HEADERS

X-COMBITRIP-APIKEY :

EXAMPLE REQUEST
{
   "description":"My Example Listing Description Text",
   "total_guests": 3
}
                            
EXAMPLE RESPONSE
{
	data: [],
	success: true
}
                            

Listing::Delete

Delete a listing. This is a destructive operation and cannot be undone.

DEFINITION

DELETE https://www.combitrip.com/api/v1/listings/{LISTING_ID}

REQUEST HEADERS

X-COMBITRIP-APIKEY :

EXAMPLE RESPONSE
{
	data: [],
	success: true
}
                            

Listing Pictures::Add

Add the picture to the listing.

Request Parameters

The picture should be sent as file.

DEFINITION

POST https://www.combitrip.com/api/v1/listings/{LISTING_ID}/pictures/add

REQUEST HEADERS

X-COMBITRIP-APIKEY :

EXAMPLE RESPONSE
{
	data: [],
	success: true
}
                            

Listing Pictures::Delete

Delete the picture from the listing.

DEFINITION

DELETE https://www.combitrip.com/api/v1/listings/{LISTING_ID}/pictures/{PICTURE_ID}

REQUEST HEADERS

X-COMBITRIP-APIKEY :

EXAMPLE RESPONSE
{
	data: [],
	success: true
}
                            

Listing Pictures::Update Description

Update the description of picture.

DEFINITION

PUT https://www.combitrip.com/api/v1/listings/{LISTING_ID}/pictures/{PICTURE_ID}/description

REQUEST HEADERS

X-COMBITRIP-APIKEY :

EXAMPLE REQUEST
Form Data
description: "My Description"
                            
EXAMPLE RESPONSE
{
	data: [],
	success: true
}
                            

Listing Pictures::Make Primary

Make the picture as primary of listing.

DEFINITION

PUT https://www.combitrip.com/api/v1/listings/{LISTING_ID}/pictures/{PICTURE_ID}/primary

REQUEST HEADERS

X-COMBITRIP-APIKEY :

Listing Calendar::List

Get the list of calendars.

Response

Successful requests will include a JSON object containing information about the calendar. The data.regular property is a array of Listing Calendar Object

DEFINITION

GET https://www.combitrip.com/api/v1/listings/{LISTING_ID}/calendar

REQUEST HEADERS

X-COMBITRIP-APIKEY :

EXAMPLE RESPONSE
{
	data: {
		regular: [<listing_calendar_object>, <listing_calendar_object>...]
	},
	success: true
}
                            

Listing Calendar::Create

Create the new calendar.

Request Parameters

The parameters should be sent as content type application/json of request and must have Listing Calendar Object structure.

DEFINITION

POST https://www.combitrip.com/api/v1/listings/{LISTING_ID}/calendar

EXAMPLE REQUEST
{
   "period_from":"01-02-2021",
   "period_to":"28-02-2021",
   "basic_price":"61",
   "checkin_days":["1","2","3","4","5","6","7"],
   "min_nights":"1",
   "cleaning_fee":"20",
   "week_discount_percentage":"5",
   "month_discount_percentage":"10",
   "additional_price_per_guest":"15",
   "deposit":"25",
   "minimum_reservation_days":"1",
   "weekends_price":"61"
}
                            
REQUEST HEADERS

X-COMBITRIP-APIKEY :

EXAMPLE RESPONSE
{
	data: null,
	success: true
}
                            

Listing Calendar::Update

Update the calendar.

Request Parameters

The parameters should be sent as content type application/json of request and must have partial Listing Calendar Object structure.

DEFINITION

PUT https://www.combitrip.com/api/v1/listings/{LISTING_ID}/calendar/{CALENDAR_ID}

EXAMPLE REQUEST
{
   "basic_price":"65",
   "min_nights":"2",
   "cleaning_fee":"25",
   "weekends_price":"80"
}
                            
REQUEST HEADERS

X-COMBITRIP-APIKEY :

EXAMPLE RESPONSE
{
	data: null,
	success: true
}
                            

Listing Calendar::Delete

Delete the calendar.

DEFINITION

DELETE https://www.combitrip.com/api/v1/listings/{LISTING_ID}/calendar/{CALENDAR_ID}

REQUEST HEADERS

X-COMBITRIP-APIKEY :

Listing Services::List

Get the list of services for listing.

Response

Successful requests will include a JSON object containing information about the service. The data property is a array of Listing Service Object

DEFINITION

GET https://www.combitrip.com/api/v1/listings/{LISTING_ID}/services

REQUEST HEADERS

X-COMBITRIP-APIKEY :

EXAMPLE RESPONSE
{
	data: [<listing_service_object>, <listing_service_object>...],
	success: true
}
                            

Listing Services::Create

Create the new service for listing.

Request Parameters

The parameters should be sent as content type application/json of request and must have Listing Service Object structure.

DEFINITION

POST https://www.combitrip.com/api/v1/listings/{LISTING_ID}/services

EXAMPLE REQUEST
{
   "title":"My Example of service",
   "description":"My description for service",
   "plan_type":"1",
   "reserv_type":"1",
   "price":"15",
   "unit":"1",
   "ical_link":"",
   "reserv_email":"reservations@domain.com",
   "radius":"0",
   "latitude":"52.36469901960148",
   "longitude":"4.899902343750001"
}
                            
REQUEST HEADERS

X-COMBITRIP-APIKEY :

EXAMPLE RESPONSE
{
	data: null,
	success: true
}
                            

Listing Services::Update

Update the service for listing.

Request Parameters

The parameters should be sent as content type application/json of request and must have partial Listing Service Object structure.

DEFINITION

PUT https://www.combitrip.com/api/v1/listings/{LISTING_ID}/services/{SERVICE_ID}

EXAMPLE REQUEST
{
   "title":"My Example of service #2",
   "price":"20"
}
                            
REQUEST HEADERS

X-COMBITRIP-APIKEY :

EXAMPLE RESPONSE
{
	data: null,
	success: true
}
                            

Listing Service::Delete

Delete the service.

DEFINITION

DELETE https://www.combitrip.com/api/v1/listings/{LISTING_ID}/services/{SERVICE_ID}

REQUEST HEADERS

X-COMBITRIP-APIKEY :

Listing Object

Property Description Required::Create Required:Update
name The title of listing Yes No
listing_type_id
The type of listing
ID Name
1 Apartment
2 House
3 Hotel
4 Cabin
5 Boat
6 Villa
7 Chalet
8 Campervan/Motorhome
9 Loft
10 Townhouse
11 Bungalow
12 Guest house
13 Boutique hotel
14 Nature lodge
15 Hostel
16 Serviced apartment
17 Guest suite
18 Casa particular (Cuba)
19 Campsite
20 Cottage
21 Resort
22 Barn
Yes No
description The description of listing Yes No
street The address street of listing Yes No
street_number The address street number of listing No Default: '' No
postalcode The postal code of address Yes No
city The city of listing Yes No
state The state of listing No Default: '' No
country_id The country code ID Yes No
latitude The latitude of listing Yes No
latitude The longitude of listing Yes No
total_guests Total guests Yes No
total_beds Total beds Yes No
checkin_time_from Check-in Time From Yes No
checkin_time_until Check-in Time Until Yes No
checkout_time_from Check-out Time From Yes No
checkout_time_until Check-out Time Until Yes No
house_rules_ids Array of house rules IDs No Default: [] No
amenity_ids Array of amentity IDs No Default: [] No
cancel_policy_id The cancel policy ID Yes No
spaces Array of Listing Space Object No Default: [] No

Listing Space Object

Property Description Required::Create Required:Update
space_type_id
The space type
ID Name
1 Bedroom
2 Bathroom
3 Livingroom
4 Kitchen
5 Toilet
6 Washroom
7 Backyard
8 Frontyard
Yes No
space_description The description of space No Default: '' No
space_m2 The space size in m2 No Default: '' No
private Is private No Default: '' No
bedsize The bed size. Required when space_type_id is 1 - Bedroom Yes* Default: '' No
bedtype
The bed type. Required when space_type_id is 1 - Bedroom
ID Name
1:0 1 Single Bed
2:0 2 Single Bed
0:1 1 Double Bed
0:2 2 Double Bed
1:1 1 Double Bed + 1 Single Bed
3:0 3 Single Bed
4:0 4 Single Bed
5:0 5 Single Bed
6:0 6 Single Bed
7:0 7 Single Bed
8:0 8 Single Bed
Yes* Default: '' No

Listing Calendar Object

Property Description Required::Create Required:Update
period_from The date when start the period. Format: DD-MM-YYYY Yes No
period_to The date when end the period. Format: DD-MM-YYYY Yes No
basic_price The basic/regular price for working days (MON - FRI) Yes No
checkin_days
Array of day ID's
ID Name
1 Monday
2 Tuesday
3 Wednesday
4 Thursday
5 Friday
6 Saturday
7 Sunday
Yes No
min_nights The min. nights No Default: 1 No
cleaning_fee The cleanig fee No Default: 0 No
week_discount_percentage The week discount in % No Default: 0 No
month_discount_percentage The month discount in % No Default: 0 No
additional_price_per_guest The additional price per guest. No Default: 0 No
deposit Deposit amount. No Default: 0 No
minimum_reservation_days The min. reservation days No Default: 1 No
weekends_price The weekend price (SAT-SUN) Yes No

Listing Service Object

Property Description Required::Create Required:Update
title Title of the service Yes No
description Description of the service No Default: '' No
plan_type
The plan type ID.
ID Name
1 Date picker for multiple days
2 Date picker for single day
3 Date picker with a fixed time window (guests can pick the date, not the exact time)
4 Date picker with a time picker (guests can pick the exact date and time)
Yes No
reserv_type
The reservation type ID.
ID Name
1 Pay on arrival
2 Direct booking (add to card)
3 Request reservation (by email)
Yes No
price The price of service Yes No
unit
The unit ID.
ID Name
1 Person
2 Session
3 Day
4 Hour
Yes No
ical_link The iCal link No Default: '' No
reserv_email The email that will be used for reservations Yes No
radius
The radius
ID Name
0 Only at location
5 5km
10 10km
15 15km
20 20km
25 25km
50 50km
Yes No