Server-side API
The ScentBot API allows you to integrate conversational fragrance recommendations into your own chat interface. Instead of embedding the widget, your backend communicates directly with ScentBot, giving you full control over the UI while ScentBot handles the AI conversation. The API is stateful — each conversation is tracked through a session ID that you generate and manage.Authentication
All requests require a Bearer token in theAuthorization header:
The API key is provided by the ScentXP team. Contact your account manager to obtain one.
Base URL
All endpoints are relative to the ScentBot API base URL provided during onboarding.Endpoints
Initialize a session
Creates a new conversation session. Call this before sending any user messages.| Field | Type | Description |
|---|---|---|
session_id | string | Alphanumeric session ID. Generated and stored by your application. |
language | string | ISO 639-1 language code (e.g., en, fr, es). |
public_key | string | Public key provided by ScentXP. Scopes recommendations to your catalog. |
message field contains the welcome text to display to the user. The session is now active and ready to receive messages.
Send a user message
Sends the user’s input to ScentBot and returns the assistant’s response with optional perfume recommendations and interactive elements.| Field | Type | Description |
|---|---|---|
session_id | string | The same session ID used in /v1/bootstrap. |
language | string | ISO 639-1 language code. |
user_input | string | The user’s message text. |
message and an optional metadata array with interactive elements and perfume data.
session_id. Each subsequent call builds on previous messages, allowing follow-up questions and refinements.
Parsing the response
Perfume recommendations in the message
When ScentBot recommends fragrances, it embeds<parfum /> XML tags inline in the message string. This allows you to render perfume cards at the correct position within the conversation text.
Each <parfum /> tag contains:
| Attribute | Description |
|---|---|
id | WikiParfum fragrance ID |
why | Explanation for the recommendation |
use_case | Context of the recommendation (e.g., default) |
Product mapping via metadata
To map recommended fragrances to products in your catalog, look for metadata entries withtype: "tool_response" and a result of type OutputParfumSearch. This contains the EAN codes for each fragrance:
items provides:
| Field | Type | Description |
|---|---|---|
properties.id | string | WikiParfum fragrance ID (matches the id in <parfum /> tags) |
properties.name | string | Fragrance name |
properties.gender | string | Gender code: M (masculine), F (feminine), U (unisex) |
properties.eans | string[] | EAN (barcode) codes associated with the fragrance |
pagination | object | Pagination info (page, per_page, total, total_pages) |
eans array to look up the product in your own catalog and link to the corresponding product page.
Interactive elements
Themetadata array may contain interactive elements that ScentBot uses to guide the conversation. These have type: "tool_interactable" and contain a content array of action items.
Buttons
Displayed when ScentBot needs the user to make a choice (e.g., gender preference):Family selection
Displayed when ScentBot asks the user to pick a fragrance family:Ending options
Displayed at the end of a recommendation flow:label text as the user_input in the next /v1/recommend call to continue the conversation.
Interactive element fields
| Field | Type | Description |
|---|---|---|
action_id | string | Unique identifier for the action |
label | string | Display text for the button |
type | string | Element type: button, family, or ending |
id | string | Optional identifier (present on family and ending types) |
Integration flow
A typical integration follows this sequence:Generate a session ID
Create a unique alphanumeric session ID for each user conversation. Store it on your server.
Initialize the session
Call
POST /v1/bootstrap with the session ID, language, and public key. Display the returned welcome message.Send user messages
Each time the user types a message or selects an interactive element, call
POST /v1/recommend with the same session ID.Render the response
Parse the
message for <parfum /> tags and render product cards inline. Display any interactive elements from metadata as buttons.Next steps
Capabilities
What ScentBot can do — search types, image search, multi-language.
Catalog Integration
Set up the Product Feed that scopes ScentBot recommendations.

