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

Tripian Recommendation Engine v0.2.2

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

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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/cities \
  -H 'Accept: application/json' \
  -H 'x-api-key: string'

GET https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/cities HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-1.amazonaws.com
Accept: application/json
x-api-key: string

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

};

$.ajax({
  url: 'https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/cities',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/cities', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/cities");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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
limit query integer false Record limit (Default: 20)

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": [
    {
      "id": 44,
      "name": "Berlin",
      "featured": "https://www.tripian.com/planner/Uploads/Media/2017/Cities/berlin.jpg",
      "coordinate": {
        "lat": 52.5200066,
        "lng": 13.404953999999975
      },
      "position": 0,
      "country": {
        "code": "deu",
        "name": "Germany",
        "continent": {
          "name": "Europe"
        }
      }
    },
    {
      "id": 111,
      "name": "Toronto",
      "featured": "https://www.tripian.com/planner/Uploads/Media/2017/Cities/59ea903d6f20f-toronto.jpg",
      "coordinate": {
        "lat": 43.653226,
        "lng": -79.38318429999998,
      },
      "position": 0,
      "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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/cities/{id} \
  -H 'Accept: application/json' \
  -H 'x-api-key: string'

GET https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/cities/{id} HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-1.amazonaws.com
Accept: application/json
x-api-key: string

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

};

$.ajax({
  url: 'https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/cities/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/cities/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/cities/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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": 111,
      "name": "Toronto",
      "featured": "https://www.tripian.com/planner/Uploads/Media/2017/Cities/59ea903d6f20f-toronto.jpg",
      "coordinate": {
        "lat": 43.653226,
        "lng": -79.38318429999998,
      },
      "position": 0,
      "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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/getcitybycoordinate?coordinate=string \
  -H 'Accept: application/json' \
  -H 'x-api-key: string'

GET https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/getcitybycoordinate?coordinate=string HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-1.amazonaws.com
Accept: application/json
x-api-key: string

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

};

$.ajax({
  url: 'https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/getcitybycoordinate',
  params: {
  'coordinate' => 'string'
}, headers: headers

p JSON.parse(result)

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

r = requests.get('https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/getcitybycoordinate', params={
  'coordinate': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/getcitybycoordinate?coordinate=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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": 111,
      "name": "Toronto",
      "featured": "https://www.tripian.com/planner/Uploads/Media/2017/Cities/59ea903d6f20f-toronto.jpg",
      "coordinate": {
        "lat": 43.653226,
        "lng": -79.38318429999998,
      },
      "position": 0,
      "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

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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/poi-categories \
  -H 'Accept: application/json' \
  -H 'x-api-key: string'

GET https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/poi-categories HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-1.amazonaws.com
Accept: application/json
x-api-key: string

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

};

$.ajax({
  url: 'https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/poi-categories',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/poi-categories', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/poi-categories");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/poi \
  -H 'Accept: application/json' \
  -H 'x-api-key: string'

GET https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/poi HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-1.amazonaws.com
Accept: application/json
x-api-key: string

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

};

$.ajax({
  url: 'https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/poi',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/poi', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/poi");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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, this parameter required if you are not sending coordinate parameter
q query string false Search terms (for example "name:park
coordinate query string true/false Coordinate, this parameter required if you are not sending city_id parameter (Format: latitude,longitude)
distance query number false Distance, usable if do not use city_id (Default value: 50km)
poi_categories query string false Poi categories id, usable if using coordinate parameter. Use "," for multiple category. For example: 1,2,3
limit query integer false Record limit (Default: 20)

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": [
    {
      "id": 196,
      "city_id": 9,
      "name": "Club Bonafide",
      "price": "$$",
      "favorite": true,
      "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,
      },
      "category": [
        {
          "id": 4,
          "name": "NightLife",
          "description": ""
        },
        {
          "id": 31,
          "name": "Bar",
          "description": ""
        }
      ],
      "tag": [
        {
          "id": 1,
          "name": "accepts credit cards"
        },
        {
          "id": 2,
          "name": "parking street"
        }
      ]
    }
  ],
  "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

POI Info

Code samples

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

GET https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/poi/{id} HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-1.amazonaws.com
Accept: application/json
x-api-key: string

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

};

$.ajax({
  url: 'https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/poi/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/poi/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/poi/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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,
      "city_id": 9,
      "name": "Club Bonafide",
      "price": "$$",
      "favorite": true,
      "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,
      },
      "category": [
        {
          "id": 4,
          "name": "NightLife",
          "description": ""
        },
        {
          "id": 31,
          "name": "Bar",
          "description": ""
        }
      ],
      "tag": [
        {
          "id": 1,
          "name": "accepts credit cards"
        },
        {
          "id": 2,
          "name": "parking street"
        }
      ]
    }
}

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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/login \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'x-api-key: string'

POST https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/login HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/login',
  method: 'post',

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

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

};

fetch('https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/login', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/login");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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.

Body parameter

{
  "username": "test@tripian.com",
  "password": "pass"
}

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

Register

Code samples

# You can also use wget
curl -X POST https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/register?first_name=string&last_name=string&email=string&password=string \
  -H 'Accept: application/json' \
  -H 'x-api-key: string'

POST https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/register?first_name=string&last_name=string&email=string&password=string HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-1.amazonaws.com
Accept: application/json
x-api-key: string

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

};

$.ajax({
  url: 'https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/register',
  method: 'post',
  data: '?first_name=string&last_name=string&email=string&password=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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/register?first_name=string&last_name=string&email=string&password=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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/register',
  params: {
  'first_name' => 'string',
'last_name' => 'string',
'email' => 'string',
'password' => 'string'
}, headers: headers

p JSON.parse(result)

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

r = requests.post('https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/register', params={
  'first_name': 'string',  'last_name': 'string',  'email': 'string',  'password': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/register?first_name=string&last_name=string&email=string&password=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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
first_name query string true First name
last_name query string true Last name
email query string true Email
password query string true User password

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 1,
    "first_name": "Test",
    "last_name": "User",
    "email": "test@tripian.com",
    "info": []
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation RegisterUser

User Info

Code samples

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

GET https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/user HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/user', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/user");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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 user id, first name, last name, email 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": {
    "id": 1,
    "first_name": "Test",
    "last_name": "User",
    "email": "test@tripian.com",
    "info": [
      {
        "id": 1,
        "key": "answer_1",
        "value": "1,2,3"
      },
      {
        "id": 2,
        "key": "answer_2",
        "value": "3,4,5"
      }
    ]
  }
}

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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/user?first_name=string&last_name=string&email=string&password=string&answers=string \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

PUT https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/user?first_name=string&last_name=string&email=string&password=string&answers=string HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/user',
  method: 'put',
  data: '?first_name=string&last_name=string&email=string&password=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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/user?first_name=string&last_name=string&email=string&password=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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/user',
  params: {
  'first_name' => 'string',
'last_name' => 'string',
'email' => 'string',
'password' => '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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/user', params={
  'first_name': 'string',  'last_name': 'string',  'email': 'string',  'password': 'string',  'answers': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/user?first_name=string&last_name=string&email=string&password=string&answers=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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 user id, first name, last name, email and 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}"
first_name query string false First name
last_name query string false Last name
password query string false User new password
answers query string false User's answers to trip questions

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 1,
    "first_name": "Test",
    "last_name": "User",
    "email": "test@tripian.com",
    "info": [
      {
        "id": 1,
        "key": "answer_1",
        "value": "1,2,3"
      },
      {
        "id": 2,
        "key": "answer_2",
        "value": "3,4,5"
      }
    ]
  }
}

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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/user/trips \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

GET https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/user/trips HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/user/trips', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/user/trips");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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}"
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": 111,
      "name": "Toronto",
      "featured": "https://www.tripian.com/planner/Uploads/Media/2017/Cities/59ea903d6f20f-toronto.jpg",
      "position": 0,
      "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

Trip Planner

Trip Questions

Code samples

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

GET https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/trip-questions?city_id=string HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-1.amazonaws.com
Accept: application/json
x-api-key: string

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

};

$.ajax({
  url: 'https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/trip-questions', params={
  'city_id': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/trip-questions?city_id=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/trip-questions", data)
    req.Header = headers

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

GET /trip-questions

Obtain the list of the questions related to trip planning and recommendations (see below). City id parameter is required. Returned results include question id, multiple selections and skipping option.

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
city_id query string true City id

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": [
    {
      "id": 1,
      "skippable": false,
      "select_multiple": true,
      "name": "Meal Preference",
      "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

Create A Trip

Code samples

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

POST https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/trip?city_id=0&arrival_date=string&arrival_time=string&departure_date=string&departure_time=string&adults=0 HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/trip',
  method: 'post',
  data: '?city_id=0&arrival_date=string&arrival_time=string&departure_date=string&departure_time=string&adults=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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/trip?city_id=0&arrival_date=string&arrival_time=string&departure_date=string&departure_time=string&adults=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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/trip', params={
  'city_id': '0',  'arrival_date': 'string',  'arrival_time': 'string',  'departure_date': 'string',  'departure_time': 'string',  'adults': '0'
}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/trip?city_id=0&arrival_date=string&arrival_time=string&departure_date=string&departure_time=string&adults=0");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/trip", data)
    req.Header = headers

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

POST /trip

To create a trip, you must post city id, arrival and departure dates/times, personal preferences and number of travelers. Our API will instantly create the requested trip along with recommendations and daily plans. If you don’t wish to generate daily plans, use “do_not_generate” prameter as “1”.

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_range query string false Adult travellers age range (Example: 26)
children query integer false Count of children travellers
children_age_range query string false Children travellers age range (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)
hotel_address query string false Hotel address
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": 111,
      "arrival_date": "2019-06-15",
      "arrival_time": "10:30",
      "departure_date": "2019-06-17",
      "departure_time": "17:30",
      "adults": 2,
      "adult_age_range": "26",
      "children": 1,
      "children_age_range": "1",
      "coordinate": "43.653226,-79.38318429999998",
      "answers": "1,2,3,4,5,6,7,8,9,10",
      "hotel_address": ""
    },
    "city": {
      "id": 111,
      "name": "Toronto",
      "featured": "https://www.tripian.com/planner/Uploads/Media/2017/Cities/59ea903d6f20f-toronto.jpg",
      "position": 0,
      "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",
        "date": "2019-06-15",
        "start_time": "10:30",
        "end_time": "21:00",
        "dailyplanpoi": []
      },
      {
        "id": 136,
        "hash": "70d7fbbe513c2d0227507ad404c27c45",
        "date": "2019-06-16",
        "start_time": "09:00",
        "end_time": "21:00",
        "dailyplanpoi": []
      },
      {
        "id": 137,
        "hash": "70d7fbbe513c2d0227507ad404c27c45",
        "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

Trip Info

Code samples

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

GET https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/trip/{hash} HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/trip/{hash}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/trip/{hash}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/trip/{hash}", data)
    req.Header = headers

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

GET /trip/{hash}

After creating a trip, results will include a “hash (/trip/hash)” which you can use to see the trip details. Hash returned results include: trip id, hash, params, city, arrival/departure details and POIs used in daily plans.

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": 111,
      "arrival_date": "2019-06-15",
      "arrival_time": "10:30",
      "departure_date": "2019-06-17",
      "departure_time": "17:30",
      "adults": 2,
      "adult_age_range": "26",
      "children": 1,
      "children_age_range": "1",
      "coordinate": "43.653226,-79.38318429999998",
      "answers": "1,2,3,4,5,6,7,8,9,10",
      "hotel_address": ""
    },
    "city": {
      "id": 111,
      "name": "Toronto",
      "featured": "https://www.tripian.com/planner/Uploads/Media/2017/Cities/59ea903d6f20f-toronto.jpg",
      "position": 0,
      "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",
        "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",
        "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",
        "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

Delete A Trip

Code samples

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

DELETE https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/trip/{hash} HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/trip/{hash}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/trip/{hash}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/trip/{hash}", data)
    req.Header = headers

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

DELETE /trip/{hash}

You can request to delete an existing trip. All recommended POIs and daily plans will also be deleted.

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": {}
}

Responses

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

Daily Plans

Code samples

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

GET https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplan/{id} HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplan/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplan/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplan/{id}", data)
    req.Header = headers

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

GET /dailyplan/{id}

Obtain the plan details of a specific day by using DailyPlan id. Returned results include: hash, date, start/end times and POIs of the plan.

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",
    "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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplanpoi?hash=string&dayplan_id=0&poi_id=0&order=0 HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplanpoi', params={
  'hash': 'string',  'dayplan_id': '0',  'poi_id': '0',  'order': '0'
}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplanpoi?hash=string&dayplan_id=0&poi_id=0&order=0");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplanpoi", data)
    req.Header = headers

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

POST /dailyplanpoi

Add a new POI to an existing daily plan by using hash, dailyplan_id, poi_id and order(sequence number within the plan) parameters.

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 true Plan poi sort number

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 1,
    "hash": "70d7fbbe513c2d0227507ad404c27c45",
    "dailyplan_id": 1,
    "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

Replace POI from Daily Plan

Code samples

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

PUT https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplanpoi/{id} HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplanpoi/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplanpoi/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplanpoi/{id}", data)
    req.Header = headers

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

PUT /dailyplanpoi/{id}

Replace an existing POI from a daily plan by using poi_id and order(sequence number within the plan) parameters.

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",
    "dailyplan_id": 1,
    "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

Delete POI from Daily Plan

Code samples

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

DELETE https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplanpoi/{id} HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplanpoi/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplanpoi/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplanpoi/{id}", data)
    req.Header = headers

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

DELETE /dailyplanpoi/{id}

Delete an existing POI from a daily plan. Once deleted, the POI will be moved to trash.

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": {}
}

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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplanpoi-alternatives \
  -H 'Accept: application/json' \
  -H 'x-api-key: string' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkZTkyZDFlMDVjYWVkYWZmZWI2ODQwMjhlZTUzYmE0NjY0OTA4MmY0YzMyMWFhYj...'

GET https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplanpoi-alternatives HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplanpoi-alternatives', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplanpoi-alternatives");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/dailyplanpoi-alternatives", data)
    req.Header = headers

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

GET /dailyplanpoi-alternatives

Obtain alternative POI recommendations for an existing daily plan. You can use PUT method with /dailyplanpoi/{id} address to replace the existing POI with an alternative one.

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 dailyplanpoi_id required)
dailyplanpoi_id query integer false Daily plan poi id (this parameter or hash required)

Example responses

200 Response

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

Responses

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

Quick Recommendations

Quick Recommendations

Code samples

# You can also use wget
curl -X GET https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/recommendation \
  -H 'Accept: application/json' \
  -H 'x-api-key: string'

GET https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/recommendation HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-1.amazonaws.com
Accept: application/json
x-api-key: string

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

};

$.ajax({
  url: 'https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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'

};

fetch('https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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'
}

result = RestClient.get 'https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/recommendation',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.get('https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/recommendation', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/recommendation");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/recommendation", data)
    req.Header = headers

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

GET /recommendation

You can generate quick recommendations without having to create a trip. You can either use hash (for a specific plan) or city_id. However, to get more personalized recommendations, you must use other use parameters as well.

Parameters

Parameter In Type Required Description
x-api-key header string true Your api key
hash query string false Trip hash (Use only this parameter or next parameters. Other parameters getting automatically from this trip if use only this parameter)
city_id query integer false City id (This parameter not required if use only hash parameter)
adults query integer false Adults number
adult_age_range query string false Adults age range
children query integer false Children number
children_age_range query string false Childrens age_range
coordinate query string false Coordinate Example: 43.653226,-79.38318429
answers query string false Answers of the city questions Example: 1,2,3,4
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

Report a Problem

Let your customers report a problem regarding a POI.

Problem Categories

Code samples

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

GET https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/problem-categories HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/problem-categories', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/problem-categories");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/problem-categories", data)
    req.Header = headers

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

GET /problem-categories

Obtain the list of 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 Address"
    },
    {
      "id": 2,
      "name": "Incorrect Name"
    },
    {
      "id": 3,
      "name": "Incorrect Phone"
    },
    {
      "id": 4,
      "name": "Incorrect Hours"
    },
    {
      "id": 5,
      "name": "Permanently Closed"
    },
    {
      "id": 6,
      "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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/reportaproblem?problem_category=string&message=string \
  -H 'Accept: application/json' \
  -H 'x-api-key: string'

POST https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/reportaproblem?problem_category=string&message=string HTTP/1.1
Host: ybesi12ydk.execute-api.us-east-1.amazonaws.com
Accept: application/json
x-api-key: string

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

};

$.ajax({
  url: 'https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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'

};

fetch('https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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'
}

result = RestClient.post 'https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/reportaproblem',
  params: {
  'problem_category' => 'string',
'message' => 'string'
}, headers: headers

p JSON.parse(result)

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

r = requests.post('https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/reportaproblem', params={
  'problem_category': 'string',  'message': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/reportaproblem?problem_category=string&message=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
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://ybesi12ydk.execute-api.us-east-1.amazonaws.com/v02/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
problem_category query string true Problem type
message query string true Message text
poi_id query integer false Place id (If problem type place review)

Example responses

200 Response

{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "id": 1,
    "problem_category": "System Error",
    "message": "test report a problem",
    "poi_id": 1
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation Reportaproblem