[TRANSLATION ERROR] There are no messages for this key

Profiling

The profiling system offers the necessary endpoints to feed the user's profile interests and measure how much they like/dislike a presented item.

Interests

Interest Types

These are the currently available interest types, but more will be added in the future. As for the interest values, users can input whatever value occurs to them; said value will then be homogenized and given a proper, global meaning.


IDTypeDescription
1generalGeneral topics like "International", "Science", "Finance", etc. and more specific topics like "Barack Obama", "Rihanna", "China", etc.
2sportsSports, like "Tennis", "Golf", etc.
3sport_teamsSpecific sports teams, like "Athletic Club", "New York Giants", etc.
4tvTV program categories like "Movies", "Series", etc. or favorite TV channels and/or programs
5moviesMovie genres, themes, or titles like "Action", "Drama", "Horror", etc.
6foodFavorites type of food, restaurants, cuisine, like "Pizza", "Spanish", "Mexican", "Chinese", etc.
7placesCountries, cities, etc. of interest
8peopleCelebrities, athletes, actors, etc.
9companiesCompanies of interest
10musicMusic genres, song titles, artists, etc.

GET /profile/interest-types
Get the available interest types from the server, programatically.

Response

CodeName
200OK
401Unauthorized
500Internal Server Error

List of possible interest type values.

curl -X GET "https://api.sherpa.ai/v2/profile/interest-types" \
-H  "Authorization: Basic XXXX-SHERPA-TOKEN-XXXX" \
-H  "Accept-Language: es-ES" \
-H  "Time-Zone: Europe/Madrid"
["general","sports","sports_teams","tv","movies","food","places","people","companies","music"]

List

GET /profile/interests
Fetch a user's interests.

Response

CodeName
200OK
401Unauthorized
500Internal Server Error

List of interest types, with a list of interests within each.

curl -X GET "https://api.sherpa.ai/v2/profile/interests" \
-H  "Authorization: Basic XXXX-SHERPA-TOKEN-XXXX" \
-H  "Accept-Language: es-ES" \
-H  "Time-Zone: Europe/Madrid"
{
    "general": ["science", "movies"],
    "sports": ["tennis", "golf"],
    "sport_teams": ["Athletic Club Bilbao", "FC Barcelona"]
}

GET /profile/interest-types/{type}/interests
Fetch a user's interests, filtered by type.

curl -X GET "https://api.sherpa.ai/v2/profile/interest-types/general/interests" \
-H  "Authorization: Basic XXXX-SHERPA-TOKEN-XXXX" \
-H  "Accept-Language: es-ES" \
-H  "Time-Zone: Europe/Madrid"
{
  "general": [
    "science",
    "movies",
    "finance"
  ]
}

Parameters

FieldSourceMandatoryTypeDescription
typeQueryStringInterest group. See Interest Types.

Response

CodeName
200OK
401Unauthorized
404Not Found
500Internal Server Error

List of interests for the requested type.

Add

POST /profile/interest-types/{type}/interests/{interest}
Add an interest item to the interest type.

curl -X POST "https://api.sherpa.ai/v2/profile/interest-types/general/interests/technology" \
-H  "Authorization: Basic XXXX-SHERPA-TOKEN-XXXX" \
-H  "content-type: application/json" \
-H  "Accept-Language: es-ES" \
-H  "Time-Zone: Europe/Madrid" \

Parameters

FieldSourceMandatoryTypeDescription
typeQueryStringInterest group. See Interest Types.
interestQueryStringInterest.

Response

CodeName
201Created
400Bad Request
401Unauthorized
500Internal Server Error

Delete

DELETE /profile/interest-types/{type}/interests/{interest}
Delete an interest item from the interest type.

curl -X DELETE "https://api.sherpa.ai/v2/profile/interest-types/general/interests/technology" \
-H  "Authorization: Basic XXXX-SHERPA-TOKEN-XXXX" \
-H  "content-type: application/json" \
-H  "Accept-Language: es-ES" \
-H  "Time-Zone: Europe/Madrid" \

Parameters

FieldSourceMandatoryTypeDescription
interestQueryStringInterest.
typeQueryStringInterest type. See Interest Types.

Response

CodeName
204No Content
400Bad Request
401Unauthorized
500Internal Server Error

Feedback

POST /profile/items/{id_sherpa}/like
POST /profile/items/{id_sherpa}/dislike

Register how much a user likes/dislikes an item.

curl -X POST "https://api.sherpa.ai/v2/profile/items/91f462ac-8fd4-44ea-8a5c-5d0aa62fa3c9/like" \
-H  "Authorization: Basic XXXX-SHERPA-TOKEN-XXXX"
curl -X POST "https://api.sherpa.ai/v2/profile/items/91f462ac-8fd4-44ea-8a5c-5d0aa62fa3c9/dislike" \
-H  "Authorization: Basic XXXX-SHERPA-TOKEN-XXXX"

Parameters

FieldSourceMandatoryTypeDescription
id_sherpaQueryStringID of a previously returned item (response, data item, etc.)

Response

CodeName
204No Content
400Bad Request
401Unauthorized
404Not Found
500Internal Server Error

DELETE /profile/items/{id_sherpa}/like
DELETE /profile/items/{id_sherpa}/dislike

Unregister how much a user likes/dislikes an item.

curl -X DELETE "https://api.sherpa.ai/v2/profile/items/91f462ac-8fd4-44ea-8a5c-5d0aa62fa3c9/like" \
-H  "Authorization: Basic XXXX-SHERPA-TOKEN-XXXX"
curl -X DELETE "https://api.sherpa.ai/v2/profile/items/91f462ac-8fd4-44ea-8a5c-5d0aa62fa3c9/dislike" \
-H  "Authorization: Basic XXXX-SHERPA-TOKEN-XXXX"

Parameters

FieldSourceMandatoryTypeDescription
id_sherpaQueryStringID of a previously returned item (response, data item, etc.)

Response

CodeName
204No Content
400Bad Request
401Unauthorized
404Not Found
500Internal Server Error