Learn how to retrieve one or all recommendation configurations with the Graniitti API.
Retrieving a single recommendation configuration for a site
To retrieve a single recommendation configuration for a site, make a Graniitti API GET request to /sites/<site_id>/recommendations/<recommendation_id>
, where <recommendation_id>
is the ID of the recommendation configuration.
curl -X GET \ --header 'Authorization: Bearer <access_token>' \ 'https://<graniitti_api_base_url>/sites/<site_id>/recommendations/<recommendation_id>'
If the request is successful, the API returns a JSON object containing the requested recommendation configuration. For more information about the object, see the recommendation configuration reference.
Retrieving all recommendation configurations for a site
To retrieve all recommendation configurations for a site, make a Graniitti API GET request to /sites/<site_id>/recommendations
.
curl -X GET \ --header 'Authorization: Bearer <access_token>' \ 'https://<graniitti_api_base_url>/sites/<site_id>/recommendations'
If the request is successful, the API returns a JSON array of objects containing all recommendation configurations for the site. Each object contains a single recommendation configuration. For more information about the object, see the recommendation configuration reference.