Refine a capability with user feedback.
Uses optimistic locking - client must provide expected_version. Returns 409 Conflict if version mismatch or refinement already in progress.
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/{capability_id}/refine' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"type":"string","expectedVersion":42,"prompt":"string","accept":["string"],"reject":["string"],"filters":{}}'
{
"type": "string",
"expectedVersion": 42,
"prompt": "string",
"accept": [
"string"
],
"reject": [
"string"
],
"filters": {}
}
{
"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"
}
]
}