Add capabilities to an experience.
Creates sessions for each capability and queues background processing. Returns immediately with PENDING status while processing happens async.
Body
Required
-
User context shared across all capabilities.
Contains cart contents, purchase history, and other signals used for personalization.
Hide context attributes Show context attributes object | null
-
Container for product selections.
Partners submit products they want to generate widgets for. Can include items from user's cart, browsing history, or curated selections.
Hide cart attributes Show cart attributes object | null
-
Values are
groceryorfashion. -
Product in a cart/selection.
Two modes supported:
- Catalog reference (minimal): Only product_id required. Backend hydrates details.
- Inline (legacy): Full product details provided directly.
For catalog-based products (e.g., fashion try-on), provide product_id. Product details are fetched from the catalog database. For inline products (e.g., grocery), provide name and details directly.
Hide products attributes Show products attributes object
-
-
Hide trip attributes Show trip attributes object | null
-
Hide flight attributes Show flight attributes object | null
-
-
User's purchase/browsing history for personalization.
Hide history attribute Show history attribute object | null
-
A past order from purchase history.
Two modes supported:
- Catalog reference (minimal): Only product_id required. Backend hydrates details.
- Inline (legacy): Full product details provided directly.
-
-
-
List of capabilities to add (at least one required)
At least
1element.One of: Request for catalog recommendations capability.
Hide attributes Show attributes
-
Value is
catalog_recommendations. -
Configuration for catalog recommendations capability.
Request for virtual try-on capability.
Hide attributes Show attributes
-
Value is
virtual_tryon. -
Configuration for virtual try-on capability.
Hide config attributes Show config attributes object
Request for virtual try-on video capability.
Hide attributes Show attributes
-
Value is
virtual_tryon_video. -
Configuration for video generation from try-on image.
Generates a short video from a virtual try-on image using Veo 3.1. The video brings the static image to life, showing the user "wearing" the products in motion.
Hide config attributes Show config attributes object
-
S3 resource ID of the generated try-on image
-
Video duration: 4, 6, or 8 seconds
Minimum value is
4.0, maximum value is8.0. Default value is4. -
Video aspect ratio: 16:9 or 9:16
Default value is
9:16. -
Video resolution: 720p or 1080p
Default value is
720p.
-
Request for wardrobe recommendations capability.
Hide attributes Show attributes
-
Value is
wardrobe_recommendations. -
Configuration for wardrobe recommendations capability.
Analyzes a user's wardrobe (from purchase history) and recommends which accessory items complement the current outfit.
Hide config attributes Show config attributes object
-
Product IDs from user's purchase history to analyze
At least
1but not more than100elements. -
Product IDs representing current outfit (from cart/selection)
-
Minimum value is
1.0, maximum value is30.0. Default value is10. -
Minimum value is
0.0, maximum value is1.0. Default value is0.5.
Request for research capability.
Hide attributes Show attributes
Request for recipes capability.
Hide attributes Show attributes
Request for nutrition analysis capability.
Hide attributes Show attributes
-
Value is
nutrition_analysis. -
Config for nutrition analysis.
Request for weekly meal plan capability.
Hide attributes Show attributes
-
Value is
weekly_meal_plan. -
Config for weekly meal plan generation.
Request for trip-based recommendation capabilities.
Hide attributes Show attributes
-
Value is
restaurants. -
Config for trip-based recommendation widgets.
Request for cart-based recommendation capabilities.
Hide attributes Show attributes
-
Value is
wearables_tracking. -
Config for cart-based recommendation widgets.
-
Responses
-
Successful Response
Hide response attributes Show response attributes object
-
One of: Hide attributes Show attributes
-
Value is
restaurants. -
Widget data for trip and cart recommendation widgets.
Additional properties are allowed.
Hide data attributes Show data attributes object | null
-
Recommendation item for various widget types.
Hide attributes Show attributes
-
Value is
wearables_tracking. -
Widget data for trip and cart recommendation widgets.
Additional properties are allowed.
Hide data attributes Show data attributes object | null
-
Recommendation item for various widget types.
Hide attributes Show attributes
-
Value is
catalog_recommendations. -
Widget data for catalog_recommendations widget.
Additional properties are allowed.
Hide data attributes Show data attributes object | null
-
Single recommendation in catalog_recommendations widget.
Hide recommendations attributes Show recommendations attributes object
-
Product data as returned by product_to_widget_dict().
Additional properties are allowed.
Hide product attributes Show product attributes object
Hide attributes Show attributes
-
Value is
virtual_tryon. -
Widget data for virtual_tryon widget.
Additional properties are allowed.
Hide data attributes Show data attributes object | null
-
Product data as returned by product_to_widget_dict().
Hide products attributes Show products attributes object
Hide attributes Show attributes
-
Value is
virtual_tryon_video. -
Widget data for virtual_tryon_video widget.
Additional properties are allowed.
Hide attributes Show attributes
-
Value is
wardrobe_recommendations. -
Widget data for wardrobe_recommendations widget.
Additional properties are allowed.
Hide data attributes Show data attributes object | null
-
Single recommendation in wardrobe_recommendations widget.
Hide recommendations attributes Show recommendations attributes object
-
Product data as returned by product_to_widget_dict().
Additional properties are allowed.
Hide product attributes Show product attributes object
Hide attributes Show attributes
-
Value is
recipes. -
Widget data for recipes widget.
Additional properties are allowed.
Hide data attributes Show data attributes object | null
-
Hide items attributes Show items attributes object
Hide attributes Show attributes
-
Value is
nutrition_analysis. -
Widget data for nutrition_analysis widget.
Additional properties are allowed.
Hide data attributes Show data attributes object | null
-
Macro nutrient data with current value
-
Percentage distribution of macronutrients
Hide distribution attributes Show distribution attributes object
-
Percentage of total macros from carbs
-
Percentage of total macros from protein
-
Percentage of total macros from fat
-
Percentage of total macros from fiber
-
Total grams of macros (carbs + protein + fat + fiber)
-
-
LLM-generated insights about cart's nutrition profile
Hide insight attributes Show insight attributes object
-
Product recommendation to improve nutrition balance
Hide attributes Show attributes
-
Value is
weekly_meal_plan. -
Widget data for weekly_meal_plan widget.
Additional properties are allowed.
Hide data attributes Show data attributes object | null
-
Meal plan for a single day
Hide days attributes Show days attributes object
-
Day of the week
Values are
Monday,Tuesday,Wednesday,Thursday,Friday,Saturday, orSunday. -
Meal suggestion with full recipe details
Hide breakfast attributes Show breakfast attributes object
-
Meal name (e.g., 'Greek Yogurt with Berries')
-
Brief description (1-2 sentences)
-
Preparation time (e.g., '15 minutes')
-
Number of servings
-
List of ingredients with amounts
-
Step-by-step cooking instructions
-
-
Meal suggestion with full recipe details
Hide lunch attributes Show lunch attributes object
-
Meal name (e.g., 'Greek Yogurt with Berries')
-
Brief description (1-2 sentences)
-
Preparation time (e.g., '15 minutes')
-
Number of servings
-
List of ingredients with amounts
-
Step-by-step cooking instructions
-
-
Meal suggestion with full recipe details
Hide dinner attributes Show dinner attributes object
-
Meal name (e.g., 'Greek Yogurt with Berries')
-
Brief description (1-2 sentences)
-
Preparation time (e.g., '15 minutes')
-
Number of servings
-
List of ingredients with amounts
-
Step-by-step cooking instructions
-
-
Beverage pairing suggestion (wine, cocktail, or beer)
Hide beveragePairing attributes Show beveragePairing attributes object | null
-
Type of beverage
Values are
wine,cocktail, orbeer. -
Beverage name
-
Brief description of the beverage
-
Why it pairs well with the meals
-
-
Ingredients to add to cart
Suggested ingredient to complete a meal
-
Hide attributes Show attributes
-
Value is
research. -
Widget data for research widget.
Additional properties are allowed.
Hide data attributes Show data attributes object | null
-
Single research section (one per question).
-
Validation Error
curl \
--request POST 'http://api.example.com/experiences/{experience_id}/capabilities' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"context":{"cart":{"type":"grocery","products":[{"productId":"string","name":"string","brand":"string","price":42.0,"category":"string","quantity":1,"size":"string","unit":"string","barcode":"string","organic":false,"glutenFree":false}]},"trip":{"flight":{"departureAirport":"string","arrivalAirport":"string","departureTimestamp":42,"arrivalTimestamp":42,"numTravelers":42,"seatClass":"economy"},"cruise":{"departurePort":"string","arrivalPort":"string","departureTimestamp":42,"arrivalTimestamp":42,"numTravelers":42}},"topic":{"topic":"string","questions":["string"]},"history":{"orders":[{"productId":"string","name":"string","brand":"string","category":"string","color":"string","purchasedAt":"string"}]}},"capabilities":[{"type":"catalog_recommendations","config":{"allowedSources":["string"],"blockedSources":["string"],"catalogSlug":"string","maxResults":6,"budgetMax":42.0}}]}'
{
"context": {
"cart": {
"type": "grocery",
"products": [
{
"productId": "string",
"name": "string",
"brand": "string",
"price": 42.0,
"category": "string",
"quantity": 1,
"size": "string",
"unit": "string",
"barcode": "string",
"organic": false,
"glutenFree": false
}
]
},
"trip": {
"flight": {
"departureAirport": "string",
"arrivalAirport": "string",
"departureTimestamp": 42,
"arrivalTimestamp": 42,
"numTravelers": 42,
"seatClass": "economy"
},
"cruise": {
"departurePort": "string",
"arrivalPort": "string",
"departureTimestamp": 42,
"arrivalTimestamp": 42,
"numTravelers": 42
}
},
"topic": {
"topic": "string",
"questions": [
"string"
]
},
"history": {
"orders": [
{
"productId": "string",
"name": "string",
"brand": "string",
"category": "string",
"color": "string",
"purchasedAt": "string"
}
]
}
},
"capabilities": [
{
"type": "catalog_recommendations",
"config": {
"allowedSources": [
"string"
],
"blockedSources": [
"string"
],
"catalogSlug": "string",
"maxResults": 6,
"budgetMax": 42.0
}
}
]
}
{
"experienceId": "string",
"status": "string",
"widgets": [
{
"capabilityId": "string",
"status": "string",
"currentVersion": 42,
"heading": "string",
"errorMessage": "string",
"type": "restaurants",
"data": {
"type": "string",
"heading": "string",
"items": [
{
"title": "string",
"description": "string",
"address": "string",
"link": "string",
"imageSearchQuery": "string",
"imageUrl": "string"
}
]
}
}
]
}
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}