This website uses cookies to improve your experience. By continuing to browse, you accept our cookie policy.

Cookie Settings

We use cookies to personalize content, provide social media features and analyze our traffic. We also share information about your use of our site with our web analytics partners.

Necessary Cookies

These cookies are essential for the website to function and cannot be disabled.

Analytics Cookies

These cookies help us understand how visitors interact with the website.

Marketing Cookies

These cookies are used to track visitors across websites for advertising purposes.

Pleasepoint API: Personalize real-time one-to-one interactions in eCommerce (Part 4).

How to use the Pleasepoint API for real-time product recommendations in your eCommerce.


In this post, we will teach you how to use the Pleasepoint API for one-to-one product recommendations in any eCommerce, website, or application. This way, you can use the API functions in any environment and at any user interaction point.

These are the contents of the post:

  1. API: Enhance your customers' experience.
  2. One-to-one product recommendations.
  3. Product recommendations based on another product (item-item).
  4. Product recommendations based on ranking (ranking one-to-one).
  5. Recommendations based on bestsellers.
  6. Recording interaction events.
  7. Why should you personalize your eCommerce one-to-one with the Pleasepoint API?

This post is the fourth in a series of four posts on how to use the Pleasepoint SDK. In this article, we will cover the use of the SDK in JavaScript. We share the links to the other three posts:

Pleasepoint API: Hyper-personalize user experiences in real-time.

In this article, we are going to dive into the world of the Pleasepoint API, a versatile tool that allows you to recommend products and record interaction events from virtually any application and programming language. Why would you want to use the API? Well, there are times when you need total control over how you interact with a service, and that’s where the API comes in. The Pleasepoint API gives you the flexibility to tailor customer experience personalization to your specific needs.

Remember that in your access to Pleasepoint, you will find the API call examples you need to perform in each section:

But what can you achieve with this API? The answer is: a lot. You can access highly effective recommendation models and at the same time register all your users’ interaction events. This means that you can tailor the shopping experience based on your customers' behavior, which can lead to higher conversion rates and overall customer satisfaction.

The API includes access to one-to-one, item-item, ranking one-to-one, and bestseller models. Each of these models has its own set of advantages and specific use cases that can significantly enhance your customers' shopping experience. We’re here to guide you in making the most out of these models through the Pleasepoint API.

1. Display one-to-one recommendations.

Here are the links on how to use the one-to-one product recommendation:

  1. Using the default parameters of the one-to-one product recommendation widget.
  2. Using the specific parameters of the one-to-one product recommendation widget.

This is the API call URL:

https://api.pleasepoint.com/api/onetoone/recommendation/getRecommendation

These are the parameters for the API call:

{
    "account_id":"XXXXXXXXXX",
    "ssid":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "deploy_slug": "onetoone-v4_deploy",
    "model_type": "one-to-one",
    "user_reference_id": "4000140388",
    "num_items": 3 ,
    "rule_slug": "rule-home-01"
}

Remember to adjust the parameters according to your Pleasepoint account, the widget configuration you desire, and the user and session identification.

This is the API response:

{
    "status": "ok",
    "data": [
        {
            "reference_id": 1411872.41,
            "name": "Lunar 2023",
            "price": "€ 8.90",
            "url": "https://www.url.com/9788494871986/1411872.41.html",
            "image_url": "https://www.url.com/dw/image/25deae81/images/large/1411872.41.jpg",
            "recommendationId": "RID-be-408a-8af2-d4d362284793-CID-2005b6"
        },
        {
            "reference_id": 583753.4,
            "name": "La asertividad: expresión de una sana autoestima",
            "price": "€ 7.00",
            "url": "https://www.url.com/9788433011411/583753.40.html",
            "image_url": "https://www.url.com/dw/image/98c54e98/images/large/583753.40.jpg",
            "recommendationId": "RID-be-408a-8af2-d4d362284793-CID-2005b6"
        },
        {
            "reference_id": 1402625.38,
            "name": "Skeleton Keys",
            "price": "€ 7.95",
            "url": "https://www.url.com/9788424672911/1402625.38.html",
            "image_url": "https://www.url.com/dw/image/5b49d15e/images/large/1402625.38.jpg",
            "recommendationId": "RID-be-408a-8af2-d4d362284793-CID-2005b6"
        }
    ]
}

Learn how to use the one-to-one product recommendation and its use cases during eCommerce navigation.

2. Display product recommendations based on another product (item-item).

Here are the links on how to use the item-item product recommendation:

  1. Using the default parameters of the item-item product recommendation widget.
  2. Using the specific parameters of the item-item product recommendation widget.

This is the API call URL:

https://api.pleasepoint.com/api/onetoone/recommendation/getRecommendation

These are the parameters for the API call:

{
    "account_id":"XXXXXXXXXX",
    "ssid":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "deploy_slug": "itemitem-v4_deploy",
    "model_type": "item-item",
    "product_reference_id": "0904219.66",
    "user_reference_id": "4000140388",
    "num_items": 3 ,
    "rule_slug": "pdp-item-recommendations"
}

Remember to adjust the parameters according to your Pleasepoint account, the widget configuration you desire, and the product, user, and session identification.

This is the API response:

{
    "status": "ok",
    "data": [
        {
            "reference_id": 1357816.84,
            "name": "Los Compas perdidos en el espacio",
            "price": "€ 19.90",
            "url": "https://www.url.com/9788427048348/1357816.84.html",
            "image_url": "https://www.url.com/dw/image/2b7c8379/images/large/1357816.84.jpg",
            "recommendationId": "RID-f5-45d4-99e8-3c7b1ad35de4-CID-49a0f9"
        },
        {
            "reference_id": 1299455.03,
            "name": "El corazón del pirata",
            "price": "€ 18.90",
            "url": "https://www.url.com/9788414023488/1299455.03.html",
            "image_url": "https://www.url.com/dw/image/35cfc573/images/large/1299455.03.jpg",
            "recommendationId": "RID-f5-45d4-99e8-3c7b1ad35de4-CID-49a0f9"
        },
        {
            "reference_id": 1336752.48,
            "name": "Las Ratitas 2. Súper Alma en acción",
            "price": "€ 14.95",
            "url": "https://www.url.com/9788408227977/1336752.48.html",
            "image_url": "https://www.url.com/dw/image/1a6d0de/images/large/1336752.48.jpg",
            "recommendationId": "RID-f5-45d4-99e8-3c7b1ad35de4-CID-49a0f9"
        }
    ]
}

Learn how to use the product recommendation based on the item-item model and its use cases during eCommerce navigation.

3. Display the one-to-one ranking.

Here are the links on how to use the one-to-one product ranking recommendation:

  1. Using the default parameters of the one-to-one product ranking recommendation widget.
  2. Using the specific parameters of the one-to-one product ranking recommendation widget.

This is the API call URL:

https://api.pleasepoint.com/api/onetoone/recommendation/getRecommendation

These are the parameters for the API call:

{
    "account_id":"XXXXXXXXXX",
    "ssid":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "deploy_slug": "ranking-v4_deploy",
    "model_type": "ranking",
    "user_reference_id": "6000131413",
    "ranking_product_ids": "811832.01, 325867.43, 1420406.04, 1209029.16, 787689.20, 1434900.18, 1048194.41, 1349627.15",
    "rule_slug": "plp-ranking-recommendations"
    "num_items": 8
}

Remember to adjust the parameters according to your Pleasepoint account, the widget configuration you desire, and the product, user, and session identification.

This is the API response:

{
    "status": "ok",
    "data": [
        {
            "reference_id": 787689.2,
            "name": "IQ Puzzler",
            "price": "€ 12.99",
            "url": "https://www.url.com/54652655262/787689.20.html",
            "image_url": "https://www.url.com/30a9a2a5/images/large/787689.20.jpg",
            "recommendationId": "RID-2a-4eac-9f74-9016e08e41fd-CID-2b8bc0"
        },
        {
            "reference_id": 811832.01,
            "name": "1000 stickers of monsters and vampires",
            "price": "€ 4.95",
            "url": "https://www.url.com/654651651651/811832.01.html",
            "image_url": "https://www.url.com/dw/image/80485db6/images/large/811832.01.jpg",
            "recommendationId": "RID-2a-4eac-9f74-9016e08e41fd-CID-2b8bc0"
        },
        {
            "reference_id": 1048194.41,
            "name": "Sharpen the Pencil: a Writing Guide",
            "price": "€ 10.90",
            "url": "https://www.url.com/9788433977236/1048194.41.html",
            "image_url": "https://www.url.com/dw/image/2faad56e/images/large/1048194.41.jpg",
            "recommendationId": "RID-2a-4eac-9f74-9016e08e41fd-CID-2b8bc0"
        },
        {
            "reference_id": 1349627.15,
            "name": "The Austrian Backpack",
            "price": "€ 10.00",
            "url": "https://www.url.com/9788498889789/1349627.15.html",
            "image_url": "https://www.url.com/dw/image/6ed797db/images/large/1349627.15.jpg",
            "recommendationId": "RID-2a-4eac-9f74-9016e08e41fd-CID-2b8bc0"
        },
        {
            "reference_id": 1209029.16,
            "name": "Create your toys",
            "price": "€ 1.95",
            "url": "https://www.url.com/9843517328438954/1209029.16.html",
            "image_url": "https://www.url.com/dw/image/543aa66/images/large/1209029.16.jpg",
            "recommendationId": "RID-2a-4eac-9f74-9016e08e41fd-CID-2b8bc0"
        },
        {
            "reference_id": 1434900.18,
            "name": "The Scissors Craft Book +3",
            "price": "€ 9.95",
            "url": "https://www.url.com/1278246998573/1434900.18.html",
            "image_url": "https://www.url.com/dw/image/313785ec/images/large/1434900.18.jpg",
            "recommendationId": "RID-2a-4eac-9f74-9016e08e41fd-CID-2b8bc0"
        },
        {
            "reference_id": 1420406.04,
            "name": "100% Marvel Wolverine. Patch",
            "price": "€ 14.00",
            "url": "https://www.url.com/8847326694120/1420406.04.html",
            "image_url": "https://www.url.com/dw/image/4d18313/images/large/1420406.04.jpg",
            "recommendationId": "RID-2a-4eac-9f74-9016e08e41fd-CID-2b8bc0"
        }
    ]
}

Learn how to use product ranking recommendations and their use cases during eCommerce navigation.

4. Display bestseller recommendations.

Here are the links on how to use product recommendations based on bestsellers:

  1. Using the default parameters of the bestseller product recommendation widget.
  2. Using the specific parameters of the bestseller product recommendation widget.

This is the API call URL:

https://api.pleasepoint.com/api/onetoone/recommendation/getRecommendation

These are the parameters for the API call:

{
    "account_id":"XXXXXXXXXX",
    "ssid":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "deploy_slug": "bestsellers-v4_deploy",
    "model_type": "best-sellers",
    "num_items": 3 ,
    "rule_slug": "home-bestsellers"
}

Remember to adjust the parameters according to your Pleasepoint account, the widget configuration you desire, and the product, user, and session identification.

This is the API response:

{
    "status": "ok",
    "data": [
        {
            "reference_id": 1333866.5,
            "name": "The Foundation",
            "price": "€ 10.95",
            "url": "https://www.url.com/9788467060003/1333866.50.html",
            "image_url": "https://www.url.com/dw/image/7a08d0c1/images/large/1333866.50.jpg",
            "recommendationId": "RID-8d-44e8-b8d0-448c73d82d3d-CID-3307e8"
        },
        {
            "reference_id": 1352985.2,
            "name": "The Soul Game",
            "price": "€ 18.90",
            "url": "https://www.url.com/9788491293545/1352985.20.html",
            "image_url": "https://www.url.com/dw/image/99db3c69/images/large/1352985.20.jpg",
            "recommendationId": "RID-ce-46bc-a7d1-30abaf20c6d7-CID-3307e8"
        },
        {
            "reference_id": 1290830.8,
            "name": "Nothing",
            "price": "€ 10.95",
            "url": "https://www.url.com/9788423355693/1290830.80.html",
            "image_url": "https://www.url.com//dw/image/fd03d8dc/images/large/1290830.80.jpg",
            "recommendationId": "RID-8d-44e8-b8d0-448c73d82d3d-CID-3307e8"
        }
    ]
}

Learn how to use product recommendations based on bestsellers and their use cases during eCommerce navigation.

5. Record interaction events.

Here is the link to see the description of the parameters for recording interaction events.

Next, we’ll see how to record interaction events using the API.

This is the API call URL:

https://api.pleasepoint.com/api/onetoone/recommendation/registerEvent

These are the parameters for the API call:

{
    "account_id":"XXXXXXXXXX",
    "ssid":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "api_id": "08a79f6e-72c8-4211-8f6f-949543fc41af",
    "products": ["0904219.66"],
    "user_reference_id": "6000045528",
    "session_id": "IDS123456789",
    "event_type": "impression"
}

Remember to adjust the parameters according to your Pleasepoint account, the widget configuration you desire, and the product, user, and session identification.

This is the API response:

{
    "status": "ok",
    "data": true
}

Learn how to record real-time interaction events during eCommerce navigation using the Pleasepoint API.

Why should you personalize your eCommerce one-to-one with the JS SDK?

Discover how one-to-one personalization will improve your eCommerce conversion rate using the Pleasepoint SDK.

The Pleasepoint JS SDK is very handy when you have logic on the client-side. To use the JS SDK, you need access to the following information:

  • User ID or email and session ID.
  • Product IDs viewed or interacted with by the user.

The Add to Cart event recording is one of the classic uses of this SDK.

Download our eBook Introduction to One-to-One Marketing and learn how to execute a hyper-personalized strategy based on the lifecycle and preferences of each of your customers. It has never been easier to start hyper-personalizing and increasing the performance of your marketing actions.

Real results from real companies

See how organizations across industries have transformed their operations with AI intelligence.

eCommerce PrestaShop Success Story: Real Sociedad.
#01 Success story

eCommerce PrestaShop Success Story: Real Sociedad.

The goal is to offer a unique experience to fans at every touchpoint.

Success Case: How Norauto personalizes their campaigns.
#02 Success story

Success Case: How Norauto personalizes their campaigns.

Norauto is clear: They need a data strategy for their campaigns.

Online supermarket success story: One-to-one for Condis.
#03 Success story

Online supermarket success story: One-to-one for Condis.

Condis’ challenge is achieving real-time one-to-one personalization in both its platform and CRM for each user.

Case Study: Flormar revolutionizes loyalty with AI
#04 Success story

Case Study: Flormar revolutionizes loyalty with AI

Flormar revolutionizes its loyalty with predictive AI and achieves a much higher average ticket.

Success Story: AI Agent for Atelier Libros.
#05 Success story

Success Story: AI Agent for Atelier Libros.

Success story of Atelier Libros: How to offer an efficient and personalized experience in its digital library.

Your competitors are already 6 months ahead, catch up in 48 hours

While they built custom solutions for months, you can have AI in production this week. No more falling behind. Choose your path: explore the tech or jump straight to a PoC with your real data.

Technical architecture walkthrough
Engineering team support included

Built on AWS. Validated by AWS.

ISV-Accelerate Partner with AI/ML and Retail competencies. The infrastructure you trust, the innovation you need.

AI/ML Competency
Validated expertise in machine learning and generative AI solutions
Retail Competency
Proven results in eCommerce and retail digital transformation
ISV-Accelerate
Technical validation passed. Co-selling enabled. Your success guaranteed.