API Integration Requirements
Technical specification for the external product search API that Virbe calls via webhook during retail kiosk scenarios.
This page documents what the external product API must provide for the Virbe retail kiosk flows to work. Share this page with the API provider's engineering team.
Overview
Virbe calls the external API using the Call Webhook node, which sends an HTTP POST request. Two types of lookups are needed:
- Product search – natural language query with optional filters, returns multiple products
- Product lookup – EAN/SKU code lookup, returns a single product
What Virbe Sends
Depending on the flow, Virbe sends different data in the request body:
- User's natural language query – the customer's search phrase (e.g., "pink running shoes for women")
- Structured filters – extracted from conversation (gender, activity type, color, price range)
- EAN/SKU code – for direct product lookup via scan
- Conversation context (optional) – last N text messages for RAG-style processing
All values are injected using Virbe template variables (e.g., {{conv.search_query}}).
Input Options
Option A: Natural Language Query (Recommended)
The preferred input format. Virbe passes the customer's search phrase directly, as if typed into the website search bar.
{
"query": "pink running shoes for women for trail running",
"limit": 4
}Optional additional filter parameters:
{
"query": "running shoes",
"filters": {
"gender": "women",
"maxPrice": 100,
"discountedOnly": true
},
"limit": 4
}Option B: Structured Filters Only
For scenarios where preferences are collected step by step:
{
"gender": "women",
"category": "running-shoes",
"color": "pink",
"activity": "trail-running",
"maxPrice": 100,
"limit": 4
}Option C: EAN/SKU Lookup
For RFID, barcode, and QR code scanning:
{
"ean": "3608439415678"
}Or by SKU:
{
"sku": "SKU-12345"
}Expected Response Format
JSON Response (Recommended)
{
"products": [
{
"id": "5506776",
"title": "Trail Running Shoe XT6",
"description": "Lightweight trail shoe with aggressive grip sole, designed for technical terrain and fast descents.",
"price": 89.99,
"currency": "EUR",
"brand": "Kalenji",
"gender": "women",
"color": "pink",
"sizes": ["36", "37", "38", "39", "40", "41"],
"imageUrl": "https://cdn.example.com/products/5506776/main.jpg",
"productPageUrl": "https://www.example.com/products/trail-running-shoe-xt6",
"category": "running-shoes",
"discountRate": 0.15
}
]
}Field Reference
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique product identifier |
title | string | Yes | Product display name |
description | string | Yes | Short product description (1-3 sentences) |
price | number | Yes | Current price |
currency | string | Yes | Currency code (EUR, CZK, USD, etc.) |
brand | string | No | Brand name |
gender | string | No | Target gender (men, women, kids, unisex) |
color | string | No | Product color |
sizes | string[] | No | Available sizes |
imageUrl | string | Yes | URL to product image (used for card display) |
productPageUrl | string | Yes | URL to full product detail page |
category | string | No | Product category |
discountRate | number | No | Discount rate as decimal (0.15 = 15% off) |
The imageUrl and productPageUrl fields are required for product card display on the kiosk. Without them, only text-based recommendations through the avatar are possible.
Additional fields can be included (e.g., rating, stockStatus, specifications) and will be available to the LLM for conversational responses.
Plain Text Response (Alternative)
For simpler integrations, the API can return pre-formatted plain text:
id: 5506776
title: Trail Running Shoe XT6
description: Lightweight trail shoe with aggressive grip sole...
price: 89.99
brand: Kalenji
gender: women
color: pink
sizes: 36, 37, 38, 39, 40, 41Plain text responses can be passed directly to the LLM for conversational summaries but cannot be used for product card display, which requires structured imageUrl and productPageUrl fields.
Authentication
Configure authentication in the Call Webhook node's headers section:
Authorization: Bearer YOUR_API_KEYOr as a custom header:
X-Api-Key: YOUR_API_KEYError Handling
The API should return standard HTTP status codes:
| Status | Meaning | Virbe Handling |
|---|---|---|
200 | Success | Process results normally |
200 with empty products: [] | No results found | Avatar says "I couldn't find products matching your criteria" |
400 | Invalid request | Avatar offers to try a different search |
401 / 403 | Authentication error | Log error, avatar apologizes for technical issue |
408 / 504 | Timeout | Avatar suggests trying again |
500 | Server error | Avatar apologizes for technical issue |
Use an If-Else Router node after the Call Webhook to check the response status and route to appropriate error handling flows.
Retail - In-Store Kiosk
Build an AI shopping assistant kiosk that searches products, displays recommendations, and handles RFID / barcode / QR code product scanning.
Product Lookup by Scan
Set up RFID, barcode, or QR code scanning on a kiosk to trigger instant product information display through the virtual being.