Public recommendations API
In case you don't want our widget but need to gather our recommendations to use them for your own purposes, you can do it via API through the following endpoint:
https://cdn.codeblackbelt.com/public/api/v1/also-bought?productIds=<productIds>&shop=<shop_domain> Example: https://cdn.codeblackbelt.com/public/api/v1/also-bought?productIds=2288305471584,2288316350560&shop=my-store.myshopify.com
where productIds is a comma separated list of the Shopify product numeric IDs for which you need to gather the recommendations, and shop_domain is your shop myshopify.com domain.
The response includes information about the product recommendations (such as ID, handle, title, description, featured image...), their variants and collections.
Some considerations you may need to take into account to use this API:
- An active subscription is required.
- The recommendations are gathered according to your configured settings. In other words, it takes into account your global recommendations, manual recommendations, recommendations tuning, etc.
- Recently viewed product recommendations are not taken into account.
- We offer a considerable maximum quota per minute per shop. In case it is exceeded, a 429 Too many requests error response is sent.
- Please note that the public API only returns recommendations for other tools to read and manage. It cannot perform widget-specific actions, such as registering analytics.