Personalization API (1.0.0)
Download OpenAPI specification:Download
API powering the Personalization feature of Algolia.
Get a user profile
Get the user profile built from Personalization strategy.
The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.
Authorizations:
path Parameters
userToken required | string userToken representing the user for which to fetch the Personalization profile. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "userToken": "string",
- "lastEventAt": "string",
- "scores": { }
}
Delete a user profile
Delete the user profile and all its associated data.
Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile.
It might take a couple hours for the deletion request to be fully processed.
Authorizations:
path Parameters
userToken required | string userToken representing the user for which to fetch the Personalization profile. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "userToken": "string",
- "deletedUntil": "string"
}
Get the current strategy
The strategy contains information on the events and facets that impact user profiles and personalized search results.
Authorizations:
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "eventScoring": [
- {
- "score": 0,
- "eventName": "string",
- "eventType": "string"
}
], - "facetScoring": [
- {
- "score": 0,
- "facetName": "string"
}
], - "personalizationImpact": 0
}
Set a new strategy
A strategy defines the events and facets that impact user profiles and personalized search results.
Authorizations:
Request Body schema: application/json
required | Array of objects (eventScoring) Scores associated with the events. |
required | Array of objects (facetScoring) Scores associated with the facets. |
personalizationImpact required | integer The impact that personalization has on search results: a number between 0 (personalization disabled) and 100 (personalization fully enabled). |
Responses
Request samples
- Payload
{- "eventScoring": [
- {
- "score": 0,
- "eventName": "string",
- "eventType": "string"
}
], - "facetScoring": [
- {
- "score": 0,
- "facetName": "string"
}
], - "personalizationImpact": 0
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "message": "string"
}