Next Place
Get a user's next destination
based on their routine and the data provided. Determine the length, duration, estimated time of arrival, and traffic-related information for said destination. The priorities taken into account are:
- Destination provided in the destination data
- Route based on the user's daily routine
headers
Request Header | Mandatory | Description |
---|---|---|
Authorization | ✓ | An authentication type followed by an access token. ex: Basic 73dbb14a-50d9-4277-897e-6cb48258d258 See Authentication section. |
Sherpa-Request-Info | ✓ | Specific Sherpa.ai header where parameters are grouped in the form of a RequestInfo JSON object. |
curl -X GET "https://api.sherpa.ai/v2/items/routes" \
-H "Authorization: Basic XXXX-SHERPA-TOKEN-XXXX" \
-H "Accept-Language: en-US" \
-H "Time-Zone: America/Los_Angeles" \
-H "Sherpa-Request-Info:{\"lat\":37.4418800, \"lon\":-122.1430200}"
Response
Code | Name |
---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
429 | Too Many Requests |
500 | Internal Server Error |
503 | Service Unavailable |
{
"uuid": "be28948a-a008-4371-a618-cf233d93478d",
"type": "ROUTES",
"itemTitle": "home",
"itemSubtitle": "Regular traffic on US-101 N; 1625 Middlefield Road, Palo Alto <br> ETA: 8:13 AM",
"itemText": "Here is a predicted route for you from work to home. Right now, the trafic is regular.",
"name": "US-101 N; 1625 Middlefield Road, Palo Alto",
"defaultName": true,
"nameChanged": false,
"source": {
"name": "work",
"latitude": 37.44188,
"longitude": -122.14302
},
"target": {
"name": "home",
"label": "home",
"address": "636 Hyde Street, San Francisco",
"completeAddress": "636 Hyde Street, San Francisco, CA 94109. California, United States",
"latitude": 37.78685278337589,
"longitude": -122.41623591398218
},
"startTime": 1586874600634,
"modeOfTransportation": "CAR",
"duration": 43,
"durationUnit": "min",
"durationIncrease": false,
"length": 48.38384715588363,
"lengthUnit": "km",
"trafficStatus": "FLUID",
"trafficColor": "green",
"validTrafficData": true,
"trafficStatusChanged": false,
"images": [
{
"url": "https://xxxxxx.jpg",
"copyright": "",
"contentType": "image/jpeg"
},
{
"url": "https://xxxx.jpg",
"copyright": "",
"contentType": "image/jpeg"
},
{
"url": "https://xxxxxx.jpg",
"copyright": "",
"contentType": "image/jpeg"
}
]
}