Favorites

Favorites in AIKI is a way for users to save their favorite products, it can be used with your existing favorites system, or implement the AIKI soloution directly to let your users save favorites and at the same time make more accurate product recommendations.


Add Favorite

curl --location --request POST 'https://api.aikey.io/v1/favorites/add' \
--header 'X-CLIENTID: ClientId' \
--header 'X-SECRET: ClientSecret' \
--data-raw '{
	"userId": "User Id",
	"sessionId": "Session Id",
	"sku" : "sku-123"
}'

Remove

curl --location --request DELETE 'https://api.aikey.io/v1/favorites/delete' \
--header 'X-CLIENTID: ClientId' \
--header 'X-SECRET: ClientSecret' \
--data-raw '{
	"userId": "User Id",
	"sessionId": "Session Id",
	"sku" : "sku-123"
}'

Get All

Gets all the products the user has saved as their favorites as a array of product ids.

curl --location --request GET 'https://api.aikey.io/v1/favorites/all' \
--header 'X-CLIENTID: ClientId' \
--header 'X-SECRET: ClientSecret' \
--data-raw '{
	"userId": "User Id",
}'

Exists In

This function checks if the product exists in the favorites list

curl --location --request GET 'https://api.aikey.io/v1/favorites/in' \
--header 'X-CLIENTID: ClientSecret' \
--header 'X-SECRET: ClientSecret' \
--data-raw '{
	"userId": "User Id",
	"sku" : "sku-123"
}'