NAV Navigation
Shell HTTP JavaScript Node.JS Ruby Python Java Go

Tripian Recommendation Engine v0.2.40

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Tripian Recommendation Engine API Documentation

Welcome to Tripian. Our API allows you to generate personalized recommendations of places of interest and daily itineraries based on user preferences and trip details. From top attractions to trendy restaurants, hidden local gems to cool finds, explore over 1M POIs in 200 cities world-wide.

Base URLs:

Email: Support Web: Support

Getting Started

Requirements

API Requests:

Authenticate your account by including your private key in API requests. Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

Creating A New Trip:

  1. First, you need to register a user (customer).
  2. Login as a user and obtain an access token to be able to create a trip on behalf of the user.

Standart request and response structure

Successful response: {"status": 200,"success": true,"message": "Success","data": {returned objects}}

Error: {"status": "Error Code","success": false,"message": {error messages}}

Call with pagination: {"status": 200,"success": true,"message": "Success","data": {returned objects},"pagination": {"count":{returned record count},"total": {total record number},"per_age": {record count per page},"current_page": {active page number},"total_page": {total page number},"links": {"previous": {previous page url},"next": {next page url}}}}

Other Useful Tips

Authentication

You can use your API key in x-api-key header to authenticate. All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

City List

Tripian features over 200 cities world-wide. Each city has a unique id (city_id) that you will need to create trips, trip related questions and get quick recommendations.

Available Cities

Code samples

# You can also use wget
curl -X GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/cities \
  -H 'Accept: application/json' \
  -H 'x-api-key: string'

GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/cities HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string

var headers = {
  'Accept':'application/json',
  'x-api-key':'string'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/cities',
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/cities',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string'
}

result = RestClient.get 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/cities',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string'
}

r = requests.get('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/cities', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/cities");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/cities", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /cities

Obtain the list of all available cities and city_ids.

*This call supports "pagination" and "q" parameters.

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
q query string false Search term (for example: "id:9,44|name:new") Columns: id, name
search query string false Search term for in city name
limit query integer false Record limit (Default: 20)

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": [
    {
      "id": 160,
      "name": "Berlin",
      "featured": "https://www.tripian.com/planner/Uploads/Media/2017/Cities/berlin.jpg",
      "boundary": [
        52.33187,
        52.68702,
        13.16157,
        13.75623,
      ],
      "coordinate": {
        "lat": 52.5200066,
        "lng": 13.404953999999975
      },
      "country": {
        "code": "deu",
        "name": "Germany",
        "continent": {
          "name": "Europe"
        }
      }
    },
    {
      "id": 144,
      "name": "Toronto",
      "featured": "https://www.tripian.com/planner/Uploads/Media/2017/Cities/59ea903d6f20f-toronto.jpg",
      "boundary": [
        43.48499,
        43.86745,
        -79.56781,
        -79.17502,
      ],
      "coordinate": {
        "lat": 43.653226,
        "lng": -79.38318429999998,
      },
      "country": {
        "code": "ca",
        "name": "Canada",
        "continent": {
          "name": "North America"
        }
      }
    }
  ],
  "pagination": {
    "count": 2,
    "total": 2,
    "per_page": 20,
    "current_page": 1,
    "total_pages": 1,
    "links": {
      "previous": "previous page link",
      "next": "next page link"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation Cities
403 Forbidden Forbidden Forbidden
404 Not Found Not found Notfound

City Info

Code samples

# You can also use wget
curl -X GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/cities/{id} \
  -H 'Accept: application/json' \
  -H 'x-api-key: string'

GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/cities/{id} HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string

var headers = {
  'Accept':'application/json',
  'x-api-key':'string'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/cities/{id}',
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/cities/{id}',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string'
}

result = RestClient.get 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/cities/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string'
}

r = requests.get('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/cities/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/cities/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/cities/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /cities/{id}

Obtain information (such as ) on a specific city. Returned results include city_id, featured image, coordinates, country and continent.

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
id path integer true city_id retuned from id field of cities calls

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
      "id": 144,
      "name": "Toronto",
      "featured": "https://www.tripian.com/planner/Uploads/Media/2017/Cities/59ea903d6f20f-toronto.jpg",
      "boundary": [
        43.48499,
        43.86745,
        -79.56781,
        -79.17502,
      ],
      "coordinate": {
        "lat": 43.653226,
        "lng": -79.38318429999998,
      },
      "country": {
        "code": "ca",
        "name": "Canada",
        "continent": {
          "name": "North America"
        }
      }
    }
}

Responses

Status Meaning Description Schema
200 OK Successful operation City
403 Forbidden Forbidden Forbidden
404 Not Found Not found Notfound

Find by Coordinates

Code samples

# You can also use wget
curl -X GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/getcitybycoordinate?coordinate=string \
  -H 'Accept: application/json' \
  -H 'x-api-key: string'

GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/getcitybycoordinate?coordinate=string HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string

var headers = {
  'Accept':'application/json',
  'x-api-key':'string'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/getcitybycoordinate',
  method: 'get',
  data: '?coordinate=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/getcitybycoordinate?coordinate=string',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string'
}

result = RestClient.get 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/getcitybycoordinate',
  params: {
  'coordinate' => 'string'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string'
}

r = requests.get('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/getcitybycoordinate', params={
  'coordinate': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/getcitybycoordinate?coordinate=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/getcitybycoordinate", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /getcitybycoordinate

Find a close by city by submitting coordinates. Returned results include city_id, featured image, coordinates, country and continent.

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
coordinate query string true Coordinate (Format: latitude,longitude)

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
      "id": 144,
      "name": "Toronto",
      "featured": "https://www.tripian.com/planner/Uploads/Media/2017/Cities/59ea903d6f20f-toronto.jpg",
      "boundary": [
        43.48499,
        43.86745,
        -79.56781,
        -79.17502,
      ],
      "coordinate": {
        "lat": 43.653226,
        "lng": -79.38318429999998,
      },
      "country": {
        "code": "ca",
        "name": "Canada",
        "continent": {
          "name": "North America"
        }
      }
    }
}

Responses

Status Meaning Description Schema
200 OK Successful operation City
403 Forbidden Forbidden Forbidden
404 Not Found Not found Notfound
400 Bad Request Validation errors Badrequest

Places of Interest

Our database has over 1M places of interest. Each POI belongs to a category and has a unique id.

POI Categories

Code samples

# You can also use wget
curl -X GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi-categories \
  -H 'Accept: application/json' \
  -H 'x-api-key: string'

GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi-categories HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string

var headers = {
  'Accept':'application/json',
  'x-api-key':'string'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi-categories',
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi-categories',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string'
}

result = RestClient.get 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi-categories',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string'
}

r = requests.get('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi-categories', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi-categories");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi-categories", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /poi-categories

Obtain the list of all categories, such as attractions, restaurants, cafes, bars, religious places, cool finds, shopping centers, museums, bakeries and art galleries. Returned results include category ids.

*This call supports "pagination" and "q" parameters.

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
limit query integer false Record limit (Default: 20)

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": [
    {
      "id": 1,
      "name": "Attractions",
      "description": "Art gallery, museum, etc."
    },
    {
      "id": 2,
      "name": "Restaurants",
      "description": "Restaurants etc."
    },
  ],
  "pagination": {
    "count": 2,
    "total": 2,
    "per_page": 20,
    "current_page": 1,
    "total_pages": 1,
    "links": {
      "previous": "previous page link",
      "next": "next page link"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation Placetypes
403 Forbidden Forbidden Forbidden
404 Not Found Not found Notfound

All POI

Code samples

# You can also use wget
curl -X GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi \
  -H 'Accept: application/json' \
  -H 'x-api-key: string'

GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string

var headers = {
  'Accept':'application/json',
  'x-api-key':'string'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi',
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string'
}

result = RestClient.get 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string'
}

r = requests.get('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /poi

Obtain the list of all POIs in our database. Returned results include, POI id, city id, category id, name, address, coordinates, phone number, website, opening/closing times, tags, icon, description (if available), price range and images.

*This call supports "pagination" and "q" parameters.

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
city_id query integer true/false City id is required if you are not using the coordinate parameter
coordinate query string true/false Coordinate is required if you are not using the city_id parameter (Format: latitude,longitude)
search query string false Search terms for in poi names or tags (for example "restaurant", "museum", "bar" etc.)
q query string false Search terms (for example "name:park|city_id:159,144,160") Columns: id, city_id, name, description, address, icon(restaurant, museum etc.)
poi_categories query string false Poi categories parameter cannot be used without using the coordinate parameter. Use "," for multiple category. For example: 1,2,3
distance query number false Distance parameter value is in km. This parameter cannot be used without the coordinate parameter. Default value: 50(km)
fields query string false Poi field list. For example: name,address,city
limit query integer false Record limit (Default: 20)

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": [
    {
      "id": 196,
      "status": 1,
      "city_id": 159,
      "name": "Club Bonafide",
      "image": "https://poi-pics.s3-eu-west-1.amazonaws.com/Place/9/15660/870f54045cfd2d9e98b6f3e4bdb6170e.jpg",
      "image_owner": {
        "title": "Club Bonafide",
        "url": "https://maps.google.com/maps/contrib/104538731567189732596/photos",
      },
      "price": 2,
      "rating": 4.15,
      "rating_count": 52,
      "description": "Club Bonafide",
      "web": "http://clubbonafide.com/",
      "phone": "+1 646-918-6189",
      "address": "212 E 52nd St, New York, NY 10022, USA",
      "icon": "Bar",
      "coordinate": {
        "lat": 40.756595,
        "lng": -73.969299,
      },
      "features": "bar food",
      "cuisines": "american, bar",
      "category": [
        {
          "id": 4,
          "name": "NightLife",
          "description": ""
        },
        {
          "id": 31,
          "name": "Bar",
          "description": ""
        }
      ],
      "narrative_tags": "Reservation required. Dressy attire. Accepts cash only.",
      "hours": "Mon-Fri: 08:00/23:00 Sat-Sun: 11:00/23:00",
      "closed": [
        0,
        6
      ],
      "distance": 0.169,
    }
  ],
  "pagination": {
    "count": 1,
    "total": 1,
    "per_page": 20,
    "current_page": 1,
    "total_pages": 1,
    "links": {
      "previous": "previous page link",
      "next": "next page link"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation Places
403 Forbidden Forbidden Forbidden
404 Not Found Not found Notfound
400 Bad Request Validation errors Badrequest

POI Info

Code samples

# You can also use wget
curl -X GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi/{id} \
  -H 'Accept: application/json' \
  -H 'x-api-key: string'

GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi/{id} HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string

var headers = {
  'Accept':'application/json',
  'x-api-key':'string'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi/{id}',
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi/{id}',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string'
}

result = RestClient.get 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string'
}

r = requests.get('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/poi/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /poi/{id}

Obtain information on a specific POI by using POI id. Returned results include, POI id, city id, category id, name, address, coordinates, phone number, website, opening/closing times, tags, icon, description (if available), price range and images.

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
id path integer true Place id

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
      "id": 196,
      "status": 1,
      "city_id": 159,
      "name": "Club Bonafide",
      "image": "https://poi-pics.s3-eu-west-1.amazonaws.com/Place/9/15660/870f54045cfd2d9e98b6f3e4bdb6170e.jpg",
      "image_owner": {
        "title": "Club Bonafide",
        "url": "https://maps.google.com/maps/contrib/104538731567189732596/photos",
      },
      "price": 2,
      "rating": 4.15,
      "rating_count": 52,
      "description": "Club Bonafide",
      "web": "http://clubbonafide.com/",
      "phone": "+1 646-918-6189",
      "address": "212 E 52nd St, New York, NY 10022, USA",
      "icon": "Bar",
      "coordinate": {
        "lat": 40.756595,
        "lng": -73.969299,
      },
      "features": "bar food",
      "cuisines": "american, bar",
      "category": [
        {
          "id": 4,
          "name": "NightLife",
          "description": ""
        },
        {
          "id": 31,
          "name": "Bar",
          "description": ""
        }
      ],
      "narrative_tags": "Reservation required. Dressy attire. Accepts cash only.",
      "hours": "Mon-Fri: 08:00/23:00 Sat-Sun: 11:00/23:00",
      "closed": [
        0,
        6
      ],
      "distance": 0.169,
    }
}

Responses

Status Meaning Description Schema
200 OK Successful operation Place
403 Forbidden Forbidden Forbidden
404 Not Found Not found Notfound

User Management

Login

Code samples

# You can also use wget
curl -X POST https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/login \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'x-api-key: string'

POST https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/login HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Content-Type: application/json
Accept: application/json
x-api-key: string

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'x-api-key':'string'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/login',
  method: 'post',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "username": "tripian-test-user"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'x-api-key':'string'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/login',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'x-api-key' => 'string'
}

result = RestClient.post 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/login',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'x-api-key': 'string'
}

r = requests.post('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/login', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/login");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Content-Type","application/json");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/login", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /login

Obtain the access token for API calls that require user identification.

You can login with username. Also, you can login with trip hash. For login with trip hash use the "trip_hash" attribute in body of the request.

Body parameter

{
  "username": "tripian-test-user"
}
OR
{
  "trip_hash": "trip-hash"
}

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
body body AuthRequest true Created token

Example responses

200 Response

{
  "status": 200,
  "success": false,
  "message": "Success",
  "data": {
    "token_type": "Bearer",
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjEyYmNkZjcy..."
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation AuthResponse
401 Unauthorized Login errors Unauthorized

Register

Code samples

# You can also use wget
curl -X POST https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/register?username=string \
  -H 'Accept: application/json' \
  -H 'x-api-key: string'

POST https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/register?username=string HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string

var headers = {
  'Accept':'application/json',
  'x-api-key':'string'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/register',
  method: 'post',
  data: '?username=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/register?username=string',
{
  method: 'POST',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string'
}

result = RestClient.post 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/register',
  params: {
'username' => 'string'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string'
}

r = requests.post('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/register', params={
  'username': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/register?username=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/register", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /register

Create a new user (customer) by posting the required parameters indicated below. No extra step needed to active the new user.

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
username query string true User name

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "username": "tripian-test-user",
    "info": []
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation RegisterUser
400 Bad Request Validation errors Badrequest

User Info

Code samples

# You can also use wget
curl -X GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user',
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.get 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.get('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /user

Obtain personal user information (must be logged in with access token), such as username and preferences.

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "username": "tripian-test-user",
    "info": [
      {
        "id": 1,
        "key": "answers",
        "value": "1,2,3"
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation User
403 Forbidden Forbidden Forbidden

Update User Info

Code samples

# You can also use wget
curl -X PUT https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user?answers=string \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

PUT https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user?answers=string HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user',
  method: 'put',
  data: '?answers=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user?answers=string',
{
  method: 'PUT',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.put 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user',
  params: {
'answers' => 'string'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.put('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user', params={
  'answers': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user?answers=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /user

Update user information (must be logged in with access token), such as personal preferences.

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
answers query string false User's answers to trip questions

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "username": "tripian-test-user",
    "info": [
      {
        "id": 1,
        "key": "answers",
        "value": "1,2,3,4"
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation User
403 Forbidden Forbidden Forbidden

User Trips

Code samples

# You can also use wget
curl -X GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/trips \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/trips HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/trips',
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/trips',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.get 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/trips',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.get('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/trips', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/trips");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/trips", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /user/trips

Obtain list of user’s past and upcoming trips (must be logged in with access token). Returned result include, trip id, hash (secure version of trip id), city, arrival/departure details, trip creating time and pagination.

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
from query string false Trip filter start date (Format: yyyy-mm-dd)
to query string false Trip filter end date (Format: yyyy-mm-dd)
limit query integer false Record limit (default: 20)

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": [
    {
    "id": 1,
    "hash": "70d7fbbe513c2d0227507ad404c27c45",
    "city": {
      "id": 144,
      "name": "Toronto",
      "featured": "https://www.tripian.com/planner/Uploads/Media/2017/Cities/59ea903d6f20f-toronto.jpg",
      "boundary": [
        43.48499,
        43.86745,
        -79.56781,
        -79.17502,
      ],
      "coordinate": {
        "lat": 43.653226,
        "lng": -79.38318429999998
      }
    },
    "arrival_date": "2019-06-15",
    "arrival_time": "10:30",
    "departure_date": "2019-06-17",
    "departure_time": "17:30"
    "created_at": "2018-09-17 20:28"
  }
  ],
  "pagination": {
    "count": 1,
    "total": 1,
    "per_page": 20,
    "current_page": 1,
    "total_pages": 1,
    "links": {
      "previous": "previous page link",
      "next": "next page link"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation MyTrips
403 Forbidden Forbidden Forbidden

User Favorite POI

Code samples

# You can also use wget
curl -X GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/favorites \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/favorites HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/favorites',
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/favorites',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.get 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/favorites',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.get('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/favorites', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/favorites");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/favorites", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /user/favorites

Get user all favorite POI list

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
city_id query integer false POI city id
hash query string false Trip hash string

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": [
    {
    "poi_id": 1,
    "city_id": 159,
    "hash": "70d7fbbe513c2d0227507ad404c27c45",
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful operation UserFavorites
403 Forbidden Forbidden Forbidden

Add/Delete Favorite POI

Code samples

# You can also use wget
curl -X POST https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/favorites?poi_id=integer&city_id=integer&hash=string \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

POST https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/favorites?poi_id=integer&city_id=integer&hash=string HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/favorites',
  method: 'post',
  data: '?poi_id=integer&city_id=integer&hash=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/favorites?poi_id=integer&city_id=integer&hash=string',
{
  method: 'POST',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.post 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/favorites',
  params: {
  'poi_id' => 'integer',
  'city_id' => 'integer',
  'hash' => 'string'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.post('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/favorites', params={
  'poi_id': 'integer',
  'city_id': 'integer',
  'hash': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/favorites?poi_id=integer&city_id=integer&hash=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/favorites", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /user/favorites

Add or delete user favorite POI

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
poi_id query integer true POI id
city_id query integer true POI city id
hash query string false Trip hash string

Add Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "poi_id": 1,
    "city_id": 159,
    "hash": "70d7fbbe513c2d0227507ad404c27c45",
  }
}

Remove Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 1,
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation UserFavorite
400 Bad Request Validation errors Badrequest

All Companions

Code samples

# You can also use wget
curl -X GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion',
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.get 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.get('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/compaion", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /user/companion

Obtain user companions (must be logged in with access token), such as companion name answers.

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": [
    {
      "id": 1,
      "name": "Test companion",
      "answers": "1,2,3",
      "age": "23"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful operation User
403 Forbidden Forbidden Forbidden

Add A Companion

Code samples

# You can also use wget
curl -X POST https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion?name=string&answers=string \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

POST https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion?name=string&answers=string HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion',
  method: 'post',
  data: '?name=string&answers=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion?name=string&answers=string',
{
  method: 'POST',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.post 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion',
  params: {
  'name' => 'string',
  'answers' => 'string'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.post('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion', params={
  'name': 'string',
  'answers': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion?name=string&answers=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /user/companion

Add companion

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
name query string false Companion name
answers query string true Companion answers
age query integer false Companion age

Add Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 1,
    "name": "Companion name",
    "answers": "1,2,3",
    "age": "23"
  }
}

Remove Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {}
}

Responses

Status Meaning Description Schema
200 OK Successful operation UserCompanion
400 Bad Request Validation errors Badrequest

Update A Companion

Code samples

# You can also use wget
curl -X PUT https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion/{id}?name=string&answers=string \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

PUT https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion/{id}?name=string&answers=string HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion/{id}',
  method: 'put',
  data: '?name=string&answers=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion/{id}?name=string&answers=string',
{
  method: 'PUT',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.put 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion/{id}',
  params: {
'name' => 'string',
'answers' => 'string'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.put('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion/{id}', params={
  'name': 'string',
  'answers': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion/{id}?name=string&answers=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /user/companion/{id}

Update companion information (must be logged in with access token), such as name and answers

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
name query string false Companion name
answers query string false Companion answers
age query integer false Companion age

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 1,
    "name": "Companion name",
    "answers": "1,2,3",
    "age": "23"
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation User Companion
403 Forbidden Forbidden Forbidden

Delete A Companion

Code samples

# You can also use wget
curl -X DELETE https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion/{id} \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

DELETE https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion/{id} HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion/{id}',
  method: 'delete',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion/{id}',
{
  method: 'DELETE',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.delete 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.delete('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/user/companion/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /user/companion/{id}

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
id path string true Companion id

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 1
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation Delete
403 Forbidden Forbidden Forbidden
404 Not Found Not found Notfound

Trip Planner

Trip process with authentication

Trip Questions

Code samples

# You can also use wget
curl -X GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip-questions?city_id=string \
  -H 'Accept: application/json' \
  -H 'x-api-key: string'

GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip-questions?city_id=string HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string

var headers = {
  'Accept':'application/json',
  'x-api-key':'string'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip-questions',
  method: 'get',
  data: '?city_id=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip-questions?city_id=string',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string'
}

result = RestClient.get 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip-questions',
  params: {
  'city_id' => 'string'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string'
}

r = requests.get('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip-questions', params={
  'city_id': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip-questions?city_id=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip-questions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /trip-questions

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
city_id query string false City id, add "," for multiple cities
category query string false Question category (trip, profile or companion) Default: trip
language_code query string false Language code (Values: en,fr) Default: en

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": [
    {
      "id": 1,
      "skippable": false,
      "select_multiple": true,
      "name": "Meal Preference",
      "category": "trip",
      "order": 1,
      "options": [
        {
          "id": 1,
          "name": "Vegetarian"
        },
        {
          "id": 2,
          "name": "Vegan"
        }
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful operation Tripquestions
403 Forbidden Forbidden Forbidden
404 Not Found Not found Notfound
400 Bad Request Validation errors Badrequest

Create A Trip

Code samples

# You can also use wget
curl -X POST https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip?city_id=integer&arrival_date=string&arrival_time=string&departure_date=string&departure_time=string&adults=integer \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

POST https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip?city_id=integer&arrival_date=string&arrival_time=string&departure_date=string&departure_time=string&adults=integer HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip',
  method: 'post',
  data: '?city_id=integer&arrival_date=string&arrival_time=string&departure_date=string&departure_time=string&adults=integer',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip?city_id=integer&arrival_date=string&arrival_time=string&departure_date=string&departure_time=string&adults=integer',
{
  method: 'POST',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.post 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip',
  params: {
  'city_id' => 'integer',
'arrival_date' => 'string',
'arrival_time' => 'string',
'departure_date' => 'string',
'departure_time' => 'string',
'adults' => 'integer'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.post('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip', params={
  'city_id': 'integer',  'arrival_date': 'string',  'arrival_time': 'string',  'departure_date': 'string',  'departure_time': 'string',  'adults': 'integer'
}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip?city_id=integer&arrival_date=string&arrival_time=string&departure_date=string&departure_time=string&adults=integer");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /trip

*You can only generate trips for next two years.

Useful Tips

Values and meanings of generate attribute in of dayplans; 0=not generated yet, 1=generated and recommended, -1=generated but not recommended.

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
city_id query integer true Id of selected city
arrival_date query string true Arrival date (Format: yyyy-mm-dd)
arrival_time query string true Arrival date time (Format: hh:ii)
departure_date query string true Departure date (Format: yyyy-mm-dd)
departure_time query string true Departure date time (Format: hh:ii)
adults query integer true Count of adult travellers
adult_age_average query integer false Adult travellers age average (Example: 26)
children query integer false Count of children travellers
children_age_average query integer false Children travellers age average (Example: 14)
coordinate query string false Coordinate of start location (Format: 41.0165043,28.973586)
answers query string false Answers of the questions, add "," for multiple answers Example: 1,2,3 (If not use this parameter, inheriting from logged user answers)
hotel_address query string false Hotel address
owner query string false Trip owner name
companions query string false If you want using companion answers while generating trip, add "," for multiple companions id
do_not_generate query integer false If you do not want the trip to be create automatically, 1 or 0

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 1,
    "hash": "70d7fbbe513c2d0227507ad404c27c45",
    "params": {
      "city_id": 144,
      "arrival_date": "2019-06-15",
      "arrival_time": "10:30",
      "departure_date": "2019-06-17",
      "departure_time": "17:30",
      "adults": 2,
      "adult_age_average": "26",
      "children": 1,
      "children_age_average": "1",
      "coordinate": "43.653226,-79.38318429999998",
      "answers": "1,2,3,4,5,6,7,8,9,10",
      "hotel_address": "",
      "owner": "",
      "do_not_generate": "0",
      "companions": "1,2,3",
      "trip_answers": "1,2"
    },
    "city": {
      "id": 144,
      "name": "Toronto",
      "featured": "https://www.tripian.com/planner/Uploads/Media/2017/Cities/59ea903d6f20f-toronto.jpg",
      "boundary": [
        43.48499,
        43.86745,
        -79.56781,
        -79.17502,
      ],
      "coordinate": {
        "lat": 43.653226,
        "lng": -79.38318429999998
      }
    },
    "arrival_date": "2019-06-15",
    "arrival_time": "10:30",
    "departure_date": "2019-06-17",
    "departure_time": "17:30",
    "dailyplans": [
      {
        "id": 135,
        "hash": "70d7fbbe513c2d0227507ad404c27c45",
        "generate": 0,
        "date": "2019-06-15",
        "start_time": "10:30",
        "end_time": "21:00",
        "dailyplanpoi": []
      },
      {
        "id": 136,
        "hash": "70d7fbbe513c2d0227507ad404c27c45",
        "generate": 0,
        "date": "2019-06-16",
        "start_time": "09:00",
        "end_time": "21:00",
        "dailyplanpoi": []
      },
      {
        "id": 137,
        "hash": "70d7fbbe513c2d0227507ad404c27c45",
        "generate": 0,
        "date": "2019-06-17",
        "start_time": "09:00",
        "end_time": "17:30",
        "dailyplanpoi": []
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation TripCreate
403 Forbidden Forbidden Forbidden
404 Not Found Not found Notfound
400 Bad Request Validation errors Badrequest

Trip Info

Code samples

# You can also use wget
curl -X GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash} \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash} HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}',
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.get 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.get('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /trip/{hash}

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
hash path string true Trip hash

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 1,
    "hash": "70d7fbbe513c2d0227507ad404c27c45",
    "params": {
      "city_id": 144,
      "arrival_date": "2019-06-15",
      "arrival_time": "10:30",
      "departure_date": "2019-06-17",
      "departure_time": "17:30",
      "adults": 2,
      "adult_age_average": "26",
      "children": 1,
      "children_age_average": "1",
      "coordinate": "43.653226,-79.38318429999998",
      "answers": "1,2,3,4,5,6,7,8,9,10",
      "hotel_address": "",
      "owner": "",
      "do_not_generate": "1",
      "companions": "1,2,3",
      "trip_answers": "1,2"
    },
    "city": {
      "id": 144,
      "name": "Toronto",
      "featured": "https://www.tripian.com/planner/Uploads/Media/2017/Cities/59ea903d6f20f-toronto.jpg",
      "boundary": [
        43.48499,
        43.86745,
        -79.56781,
        -79.17502,
      ],
      "coordinate": {
        "lat": 43.653226,
        "lng": -79.38318429999998
      }
    },
    "arrival_date": "2019-06-15",
    "arrival_time": "10:30",
    "departure_date": "2019-06-17",
    "departure_time": "17:30",
    "dailyplans": [
      {
        "id": 135,
        "hash": "70d7fbbe513c2d0227507ad404c27c45",
        "generate": 1,
        "date": "2019-06-15",
        "start_time": "10:30",
        "end_time": "21:00",
        "dailyplanpoi": [
          {
            "id": 293,
            "poi_id": 1279,
            "order": 0
          },
          {
            "id": 294,
            "poi_id": 651,
            "order": 1
          },
          {
            "id": 295,
            "poi_id": 904,
            "order": 2
          },
          {
            "id": 296,
            "poi_id": 1003,
            "order": 3
          },
          {
            "id": 297,
            "poi_id": 1445,
            "order": 4
          }
        ]
      },
      {
        "id": 136,
        "hash": "70d7fbbe513c2d0227507ad404c27c45",
        "generate": 1,
        "date": "2019-06-16",
        "start_time": "09:00",
        "end_time": "21:00",
        "dailyplanpoi": [
          {
            "id": 298,
            "poi_id": 1279,
            "order": 0
          },
          {
            "id": 301,
            "poi_id": 651,
            "order": 1
          },
          {
            "id": 303,
            "poi_id": 904,
            "order": 2
          },
          {
            "id": 305,
            "poi_id": 1003,
            "order": 3
          },
          {
            "id": 307,
            "poi_id": 1445,
            "order": 4
          }
        ]
      },
      {
        "id": 137,
        "hash": "70d7fbbe513c2d0227507ad404c27c45",
        "generate": 1,
        "date": "2019-06-17",
        "start_time": "09:00",
        "end_time": "17:30",
        "dailyplanpoi": [
          {
            "id": 299,
            "poi_id": 1279,
            "order": 0
          },
          {
            "id": 300,
            "poi_id": 651,
            "order": 1
          },
          {
            "id": 302,
            "poi_id": 1369,
            "order": 2
          },
          {
            "id": 304,
            "poi_id": 1626,
            "order": 3
          },
          {
            "id": 306,
            "poi_id": 758,
            "order": 4
          }
         ]
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation Trip
403 Forbidden Forbidden Forbidden
404 Not Found Not found Notfound

Update A Trip

Code samples

# You can also use wget
curl -X PUT https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}?city_id=integer&arrival_date=string&arrival_time=string&departure_date=string&departure_time=string&adults=integer \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

PUT https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}?city_id=integer&arrival_date=string&arrival_time=string&departure_date=string&departure_time=string&adults=integer HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}',
  method: 'put',
  data: '?city_id=integer&arrival_date=string&arrival_time=string&departure_date=string&departure_time=string&adults=integer',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}?city_id=integer&arrival_date=string&arrival_time=string&departure_date=string&departure_time=string&adults=integer',
{
  method: 'PUT',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.put 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}',
  params: {
'city_id' => 'integer',
'arrival_date' => 'string',
'arrival_time' => 'string',
'departure_date' => 'string',
'departure_time' => 'string',
'adults' => 'integer'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.put('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}', params={
  'city_id': 'integer',  'arrival_date': 'string',  'arrival_time': 'string',  'departure_date': 'string',  'departure_time': 'string',  'adults': '0'
}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}?city_id=integer&arrival_date=string&arrival_time=string&departure_date=string&departure_time=string&adults=integer");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /trip/{hash}

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
hash path string true Trip hash
city_id query integer false Id of selected city
arrival_date query string false Arrival date (Format: yyyy-mm-dd)
arrival_time query string false Arrival date time (Format: hh:ii)
departure_date query string false Departure date (Format: yyyy-mm-dd)
departure_time query string false Departure date time (Format: hh:ii)
adults query integer false Count of adult travellers
adult_age_average query integer false Adult travellers age average (Example: 26)
*Can be send empty value
children query integer false Count of children travellers
*Can be send empty value
children_age_average query integer false Children travellers age average (Example: 14)
*Can be send empty value
coordinate query string false Coordinate of start location (Format: 41.0165043,28.973586)
*Can be send empty value
answers query string false Answers of the questions, add "," for multiple answers Example: 1,2,3 (If not use this parameter, inheriting from logged user answers)
*Can be send empty value
hotel_address query string false Hotel address
*Can be send empty value
owner query string false Trip owner name
companions query string false If you want using companion answers while generating trip, add "," for multiple companions
*Can be send empty value
do_not_generate query integer false If you do not want the trip to be regenerate automatically, 1 or 0
*Trip will not regenerate if you send hotel_address and/or coordinate parameter only, but automatically renegerate if you send other parameters without this parameter.

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 1,
    "hash": "70d7fbbe513c2d0227507ad404c27c45",
    "params": {
      "city_id": 144,
      "arrival_date": "2019-06-15",
      "arrival_time": "10:30",
      "departure_date": "2019-06-17",
      "departure_time": "17:30",
      "adults": 2,
      "adult_age_average": "26",
      "children": 1,
      "children_age_average": "1",
      "coordinate": "43.653226,-79.38318429999998",
      "answers": "1,2,3,4,5,6,7,8,9,10",
      "hotel_address": "",
      "owner": "",
      "do_not_generate": "0",
      "companions": "1,2,3",
      "trip_answers": "1,2"
    },
    "city": {
      "id": 144,
      "name": "Toronto",
      "featured": "https://www.tripian.com/planner/Uploads/Media/2017/Cities/59ea903d6f20f-toronto.jpg",
      "boundary": [
        43.48499,
        43.86745,
        -79.56781,
        -79.17502,
      ],
      "coordinate": {
        "lat": 43.653226,
        "lng": -79.38318429999998
      }
    },
    "arrival_date": "2019-06-15",
    "arrival_time": "10:30",
    "departure_date": "2019-06-17",
    "departure_time": "17:30",
    "dailyplans": [
      {
        "id": 135,
        "hash": "70d7fbbe513c2d0227507ad404c27c45",
        "generate": 0,
        "date": "2019-06-15",
        "start_time": "10:30",
        "end_time": "21:00",
        "dailyplanpoi": []
      },
      {
        "id": 136,
        "hash": "70d7fbbe513c2d0227507ad404c27c45",
        "generate": 0,
        "date": "2019-06-16",
        "start_time": "09:00",
        "end_time": "21:00",
        "dailyplanpoi": []
      },
      {
        "id": 137,
        "hash": "70d7fbbe513c2d0227507ad404c27c45",
        "generate": 0,
        "date": "2019-06-17",
        "start_time": "09:00",
        "end_time": "17:30",
        "dailyplanpoi": []
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation TripUpdate
403 Forbidden Forbidden Forbidden
404 Not Found Not found Notfound
400 Bad Request Validation errors Badrequest

Delete A Trip

Code samples

# You can also use wget
curl -X DELETE https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash} \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

DELETE https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash} HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}',
  method: 'delete',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}',
{
  method: 'DELETE',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.delete 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.delete('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/{hash}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /trip/{hash}

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
hash path string true Trip hash

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 1
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation Delete
403 Forbidden Forbidden Forbidden
404 Not Found Not found Notfound

Daily Plan Info

Code samples

# You can also use wget
curl -X GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplan/{id} \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplan/{id} HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplan/{id}',
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplan/{id}',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.get 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplan/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.get('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplan/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplan/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplan/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /dailyplan/{id}

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
id path integer true Day plan id for single day

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 135,
    "hash": "70d7fbbe513c2d0227507ad404c27c45",
    "generate": 1,
    "date": "2019-06-15",
    "start_time": "10:30",
    "end_time": "21:00",
    "dailyplanpoi": [
      {
        "id": 293,
        "poi_id": 1279,
        "order": 0
      },
      {
        "id": 294,
        "poi_id": 651,
        "order": 1
      },
      {
        "id": 295,
        "poi_id": 904,
        "order": 2
      },
      {
        "id": 296,
        "poi_id": 1003,
        "order": 3
      },
      {
        "id": 297,
        "poi_id": 1445,
        "order": 4
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation Dayplan
403 Forbidden Forbidden Forbidden
404 Not Found Not found Notfound

Update Daily Plan

Code samples

# You can also use wget
curl -X PUT https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplan/{id}?start_time=string&end_time=string \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

PUT https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplan/{id}?start_time=string&end_time=string HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplan/{id}',
  method: 'put',
  data: '?start_time=string&end_time=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplan/{id}?start_time=string&end_time=string',
{
  method: 'PUT',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.put 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplan/{id}',
  params: {
      'start_time' => 'string',
      'end_time' => 'string'
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.put('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplan/{id}?start_time=string&end_time=string', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplan/{id}?start_time=string&end_time=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplan/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /dailyplan/{id}

You can only update dayplan start and end time parameters. Day plan will be regenerate after update.

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
id path integer true Day plan id for single day
start_time query string false Day plan start time, must be before end time (Format: hh:ii)
*Dayplan will regenerate if you send this parameter
end_time query string false Day plan end time, must be after start time (Format: hh:ii)
*Dayplan will regenerate if you send this parameter
orders query string false Places multiple sorting in daily plan. Use "," for multiple dailyplan poi id. For example: 1,2,3
*Dayplan will not regenerate if you send this parameter only

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 135,
    "hash": "70d7fbbe513c2d0227507ad404c27c45",
    "generate": 1,
    "date": "2019-06-15",
    "start_time": "10:30",
    "end_time": "21:00",
    "dailyplanpoi": [
      {
        "id": 293,
        "poi_id": 1279,
        "order": 0
      },
      {
        "id": 294,
        "poi_id": 651,
        "order": 1
      },
      {
        "id": 295,
        "poi_id": 904,
        "order": 2
      },
      {
        "id": 296,
        "poi_id": 1003,
        "order": 3
      },
      {
        "id": 297,
        "poi_id": 1445,
        "order": 4
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation Dayplan
403 Forbidden Forbidden Forbidden
404 Not Found Not found Notfound

Add POI to Daily Plan

Code samples

# You can also use wget
curl -X POST https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi?hash=string&dayplan_id=0&poi_id=0&order=0 \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

POST https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi?hash=string&dayplan_id=0&poi_id=0&order=0 HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi',
  method: 'post',
  data: '?hash=string&dayplan_id=0&poi_id=0&order=0',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi?hash=string&dayplan_id=0&poi_id=0&order=0',
{
  method: 'POST',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.post 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi',
  params: {
  'hash' => 'string',
'dayplan_id' => 'integer',
'poi_id' => 'integer',
'order' => 'integer'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.post('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi', params={
  'hash': 'string',  'dayplan_id': '0',  'poi_id': '0',  'order': '0'
}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi?hash=string&dayplan_id=0&poi_id=0&order=0");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /dailyplanpoi

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
hash query string true Trip hash
dailyplan_id query integer true Daily plan id
poi_id query integer true POI id
order query integer false Plan poi sort number

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 1,
    "hash": "70d7fbbe513c2d0227507ad404c27c45",
    "poi_id": 1,
    "order": 1
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation Planpoint
403 Forbidden Forbidden Forbidden
404 Not Found Not found Notfound
400 Bad Request Validation errors Badrequest

Replace POI from Daily Plan

Code samples

# You can also use wget
curl -X PUT https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi/{id} \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

PUT https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi/{id} HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi/{id}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi/{id}',
{
  method: 'PUT',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.put 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.put('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /dailyplanpoi/{id}

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
id path integer true Daily plan poi id
poi_id query integer false POI id
order query integer false Daily plan poi sort number

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 1,
    "hash": "70d7fbbe513c2d0227507ad404c27c45",
    "poi_id": 1,
    "order": 1
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation Planpoint
403 Forbidden Forbidden Forbidden
404 Not Found Not found Notfound
400 Bad Request Validation errors Badrequest

Delete POI from Daily Plan

Code samples

# You can also use wget
curl -X DELETE https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi/{id} \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

DELETE https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi/{id} HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi/{id}',
  method: 'delete',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi/{id}',
{
  method: 'DELETE',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.delete 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.delete('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /dailyplanpoi/{id}

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
id path integer true Daily plan poi id

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 1
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation Delete
403 Forbidden Forbidden Forbidden
404 Not Found Not found Notfound

Alternative POI Suggestions

Code samples

# You can also use wget
curl -X GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi-alternatives \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi-alternatives HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi-alternatives',
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi-alternatives',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.get 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi-alternatives',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.get('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi-alternatives', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi-alternatives");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/dailyplanpoi-alternatives", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /dailyplanpoi-alternatives

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
hash query string false Trip hash id (this parameter or dailyplan_id or dailyplanpoi_id required)
dailyplan_id query integer false Daily plan id (this parameter or hash or dailyplanpoi_id required)
dailyplanpoi_id query integer false Daily plan poi id (this parameter or hash or dailyplan_id required)

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": [
    {
      "id": 1,
      "hash": "70d7fbbe513c2d0227507ad404c27c45",
      "poi_id": 1,
      "dailyplanpoi": {
        "id": 1,
        "order": 1,
        "poi_id": 1,
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful operation Planpointalternatives
403 Forbidden Forbidden Forbidden
404 Not Found Not found Notfound
400 Bad Request Validation errors Badrequest

Trip Feedback

Code samples

# You can also use wget
curl -X POST https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/feedback?hash=string&rating=integer&message=string \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj'

POST https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/feedback?hash=string&rating=integer&message=string HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/feedback',
  method: 'post',
  data: '?hash=string&rating=integer&message=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/feedback?hash=string&rating=integer&message=string',
{
  method: 'POST',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string'
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj'
}

result = RestClient.post 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/feedback',
  params: {
  'hash' => 'string',
  'rating' => 'integer',
'message' => 'string'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj'
}

r = requests.post('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/feedback', params={
  'hash': 'string',
  'rating': 'integer',
  'message': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/feedback?hash=string&rating=integer&message=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/trip/feedback", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /trip/feedback

Send your feedback and rating about the trip.

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
hash query string true Trip hash
rating query string true Trip rating score (Between 1-5)
message query string false Message text

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 1,
    "hash": "70d7fbbe513c2d0227507ad404c27c45",
    "rating": 5,
    "message": "Test trip feedback message"
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation TripFeedback

Quick Recommendations

Quick Recommendations

Quick Recommendations

Code samples

# You can also use wget
curl -X GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/recommendation \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj'

GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/recommendation HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj

var headers = {
  'Accept':'application/json',
  'x-api-key':'string'
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/recommendation',
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string'
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/recommendation',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string'
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj'
}

result = RestClient.get 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/recommendation',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string'
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj'
}

r = requests.get('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/recommendation', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/recommendation");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/recommendation", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /recommendation

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth false Authentication token for example: "Bearer {token}" (Required if using hash parameter)
hash query string false Trip hash (City_id or Hash parameter can be used. Any parameter which are not sent with Hash comes from parameters sent while generating the Trip.)
city_id query integer false City id (This parameter not required if use only hash parameter)
adults query integer false Adults number
adult_age_average query integer false Adult travellers age average (Example: 26)
children query integer false Children number
children_age_average query integer false Children travellers age average (Example: 14)
coordinate query string false Coordinate Example: 43.653226,-79.38318429
answers query string false Answers of the city questions Example: 1,2,3,4 (If not use this parameter, inheriting from logged user answers)
poi_categories query string false Get poi recommendations of given specific poi categories ID

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": [
    {
      "id": 1
    },
    {
      "id": 2
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful operation Recommendation
403 Forbidden Forbidden Forbidden
400 Bad Request Validation errors Badrequest

Report a Problem

Report a Problem

Problem Categories

Code samples

# You can also use wget
curl -X GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/problem-categories \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

GET https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/problem-categories HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/problem-categories',
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/problem-categories',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

result = RestClient.get 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/problem-categories',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'
}

r = requests.get('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/problem-categories', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/problem-categories");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj..."},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/problem-categories", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /problem-categories

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": [
    {
      "id": 1,
      "name": "Incorrect Name"
    },
    {
      "id": 2,
      "name": "Incorrect Phone"
    },
    {
      "id": 3,
      "name": "Incorrect Hours"
    },
    {
      "id": 4,
      "name": "Incorrect Address"
    },
    {
      "id": 5,
      "name": "Incorrect Location"
    },
    {
      "id": 6,
      "name": "Permanently Closed"
    },
    {
      "id": 7,
      "name": "Cash Payment"
    },
    {
      "id": 8,
      "name": "Reservation Required"
    },
    {
      "id": 9,
      "name": "Other"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful operation Problemtype
403 Forbidden Forbidden Forbidden

Report a Problem

Code samples

# You can also use wget
curl -X POST https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/reportaproblem?problem_category=string&message=string \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj'

POST https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/reportaproblem?problem_category=string&message=string HTTP/1.1
Host: uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com
Accept: application/json
x-api-key: string
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj

var headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj'
};

$.ajax({
  url: 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/reportaproblem',
  method: 'post',
  data: '?problem_category=string&message=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'string',
  'Authorization':'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj'
};

fetch('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/reportaproblem?problem_category=string&message=string',
{
  method: 'POST',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'string'
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj'
}

result = RestClient.post 'https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/reportaproblem',
  params: {
  'problem_category' => 'string',
'message' => 'string'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'string',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj'
}

r = requests.post('https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/reportaproblem', params={
  'problem_category': 'string',  'message': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/reportaproblem?problem_category=string&message=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Accept","application/json");
con.setRequestProperty("x-api-key","string");
con.setRequestProperty("Authorization","Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-api-key": []string{"string"},
        "Authorization": []string{"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://uqo7xnd7f9.execute-api.eu-west-1.amazonaws.com/v2/reportaproblem", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /reportaproblem

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
Authorization header Auth true Authentication token for example: "Bearer {token}"
problem_category query string true Problem category name
message query string false Message text
poi_id query integer false Place id (If the problem category is place review)

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 1,
    "problem_category": "Incorrect Address",
    "message": "Incorrect this poi address",
    "poi_id": 1
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation Reportaproblem