Build with BasketBooster
Add AI recommendations, search, and Shop the Look to a WooCommerce or custom store. The docs below are written for people and for AI coding assistants: read them yourself, or connect your assistant and let it write the integration.
On Shopify? You don’t need any of this. Install the BasketBooster app from the Shopify App Store and it sets everything up inside your theme.
Docs for your AI assistant (MCP)
Claude Code, Cursor, and other MCP-capable assistants can connect directly to our documentation server. A connected assistant can list, read, and search every integration guide, so a prompt like "add BasketBooster recommendations to my product page" gets answered from the current docs rather than the model’s memory.
Claude Code, one command:
claude mcp add --transport http basketbooster-docs https://api.basketbooster.eu/mcpCursor, add to ~/.cursor/mcp.json:
{
"mcpServers": {
"basketbooster-docs": { "url": "https://api.basketbooster.eu/mcp" }
}
}Any other MCP client, in a project-scoped .mcp.json:
{
"mcpServers": {
"basketbooster-docs": {
"type": "http",
"url": "https://api.basketbooster.eu/mcp"
}
}
}The server exposes three tools: list_docs, read_doc, and search_docs. The guides cover getting started, widget embedding, the full API reference, the WooCommerce plugin, keys and CORS, and plans and billing. You don’t need an account or an API key to connect.
Try asking your assistant
- "Connect to the BasketBooster docs and add a 'You may also like' widget to my product template."
- "How do I send purchase events to BasketBooster from my checkout page?"
- "Sync my product catalog to BasketBooster from my Node backend."
- "Send every new order to BasketBooster from my order webhook."
- "Why does my Impact dashboard show zero attributed revenue?"
Plain-text docs (llms.txt)
No MCP? Every guide is also published as raw markdown, indexed at https://api.basketbooster.eu/llms.txt. Each file is plain markdown, so you can paste a URL into ChatGPT, Claude, or your editor and work from it directly.
Interactive API reference (Swagger)
Explore and try the public API in the browser at https://api.basketbooster.eu/docs. It covers the complete integration surface:
Widget API
/v1/recommendations · /v1/trending · /v1/events · /v1/search · /v1/looks
Called from the shopper’s browser with your publishable pk_ key.
Catalog API
POST /v1/items · DELETE /v1/items/{id}
Push products from your server with a secret API key.
Order sync
POST /v1/orders
Send each new order from your store’s webhook so the recommender learns from every sale. The endpoint is idempotent, so retries are safe.
Integration API
/integration/*
Plugin status, engine sync, training, and widget settings.
Order history
POST /orders/upload
CSV import that seeds Frequently Bought Together.
The raw OpenAPI spec lives at https://api.basketbooster.eu/openapi.json. Feed it to a code generator or to your AI assistant.
Conversion tracking and attribution
The <product-recs> widgets report product views (detail-page-view), recommendation impressions (rec-impression), and recommendation clicks (rec-click) automatically. No site code is needed for those. They cannot see your cart button or your checkout, though, so add-to-cart and purchase events have to come from your storefront. The WooCommerce plugin sends both for you; on a custom storefront you wire them up once.
Add-to-cart, called from your add-to-cart handler after the add succeeds:
<script>
ProductRecs.track('add-to-cart', {
item_id: '123',
user_id: 'CUSTOMER_ID', // logged-in customer id, omit for guests
value: 49.9, // line value (unit price x quantity)
currency: 'EUR'
});
</script>Purchases: fire ProductRecs.track('buy', ...) once per line item from the order confirmation page, or sync the whole order server-side in one call (recommended):
curl -X POST "https://api.basketbooster.eu/v1/orders" \
-H "X-API-Key: YOUR_SECRET_KEY" -H "Content-Type: application/json" \
-d '{
"order_id": "ORDER_1234",
"user_id": "cust_9",
"session_id": "s_...",
"currency": "EUR",
"items": [{"item_id": "123", "quantity": 2, "price": 19.9}]
}'The endpoint is idempotent per order_id, so retries are safe, and order sync is never counted against your quota.
Keep the shopper id consistent
The Impact dashboard credits an add-to-cart or a sale to the recommender only when the commerce event and an earlier recommendation click or impression carry the same shopper identity and product id, within a 30-day window. Identity is user_id when present, otherwise the widget’s automatic session id. When both are sent, user_id wins.
For logged-in shoppers, pass the customer id everywhere: data-user-id on every widget embed, user_id on your add-to-cart and buy calls, and user_id on POST /v1/orders. If the widgets run anonymous while your orders carry a customer id, nothing matches and attribution stays at zero.
For anonymous shoppers the widget keeps its session id in localStorage["pr_sid"], and browser-side ProductRecs.track calls pick it up automatically. For server-side order sync, mirror the id into a first-party cookie and forward it as session_id:
<script>
try {
var sid = localStorage.getItem('pr_sid');
if (sid) document.cookie = 'pr_sid=' + encodeURIComponent(sid) +
'; path=/; max-age=15552000; SameSite=Lax';
} catch (e) {}
</script>Then read the cookie on your server (PHP shown here):
$sid = $_COOKIE['pr_sid'] ?? '';
if (preg_match('/^s_[A-Za-z0-9]+$/', $sid)) {
$payload['session_id'] = $sid;
}Sending orders from checkout? Fire-and-forget HTTP over a raw TLS socket does not work. If you write the request and close the socket without reading the response, the request is aborted before the server processes it: nothing arrives, and you see no error on your side. Read at least the response status line before closing (adds roughly 100 ms), or use a normal HTTP client with a short timeout. POST /v1/orders answers in well under a second.
Get your keys
Everything above works against your own store data as soon as you start a free trial. Trials run 14 days and don’t ask for a credit card. Your publishable key and API keys are on the dashboard.