[TRANSLATION ERROR] There are no messages for this key

Next Place Prediction API Reference

The Sherpa.ai Next Place Prediction API is a REST API that provides developers with a framework and toolbox to formulate any request for Sherpa.ai, by using standard syntax technologies like HTTP Rest Services with a predefined set of URLs.

API Endpoints

All Sherpa.ai Next Place Prediction API endpoints will be served on https://api.sherpa.ai/v2

NamePathDescription
Next Place/items/routesNext place
Traking position/tracking/positionsTracking position
Datasets/tracking/uploadDatasetUpload dataset

Header Parameters

All the API calls have common parameters in the header.

Request HeaderMandatoryDescription
AuthorizationAn authentication type followed by an access token.
ex: Basic 73dbb14a-50d9-4277-897e-6cb48258d258
See Authentication section.
Accept-Language{lang}-{country}
• lang: The ISO 639-1 language code in lowercase.
• country: The country/region code as an uppercase ISO-3166 2-letter code.
ex: en-GB, en-US, es-ES, es-MX
Time-ZoneUser’s time zone, in GMT +/- time or long format.
ex: GMT+1:00, Europe/Berlin
AcceptThe response format of the body.
If required, the response will be in application/json format by default.
In some cases, we will require other formats, which will be specified in each method description.
Content-TypeThe request format of the body.
In most cases, it will be application/json. Otherwise, it will be specified in each method description.

The specific header parameters will be defined in each API call.

Sherpa Request Info

Besides the specific information to be sent to each endpoint, Sherpa Request Info will gather the request context as a request header field.
The fields in RequestInfo are optional. However, each additional piece of data helps Sherpa.ai fetch a more tailored response and profile the user better, so including as many fields as possible is recommended.

For example, by setting the lat and lon fields to specify user location, Sherpa.ai can use that information to respond to queries related to restaurants or movies nearby.

FieldTypeDescription
latDoubleLatitude
lonDoubleLongitude
country_codeStringThe country/region code as an uppercase ISO-3166 2-letter code
destinationObjectThe location where the user is headed

Destination

NamePathDescription
latDoubleLatitude
lonDoubleLongitude
labelStringex: Home

Parameters

Each endpoint method will have a parameter table with explanatory information, along with an example. In this table, information will be provided for each field, like 'source', 'mandatory', 'type', and 'description'.

  • Field
    Parameter field
  • Source
    Where the parameter has to be placed

    • Query
      Parameter is part of the URL
    • Body
      The parameter is set inside the body payloads part of a POST/PUT type method request. These parameters will be in JSON format and will require the corresponding header to be set:

      -H  "content-type: application/json"
  • Mandatory
    Whether parameter is mandatory or not
  • Type
    Value type [String, Integer, etc.]
  • Description
    Additional information