recommendations
PATCH
https://lucidace.com /v1/projects/{project_id}/recs/placements/{id} Scope experiment:writeParameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
Create body; on PATCH every field is optional and absent ones keep their value.
descriptionstringexclude_anchorbooleanexclude_out_of_stockbooleanexclude_recentbooleanfallbackstringpopular | nonekeystringlimitintegernamestringsame_categorybooleanstrategiesarraystrategystringpopular | trending | viewed_with | bought_with | recently_viewed{
"description": "string",
"exclude_anchor": true,
"exclude_out_of_stock": true,
"exclude_recent": true,
"fallback": "string",
"key": "string",
"limit": 0,
"name": "string",
"same_category": true,
"strategies": [
"string"
],
"strategy": "string"
}Code samples
cURL
curl -X PATCH "https://lucidace.com/v1/projects/{project_id}/recs/placements/{id}" \
-H "Content-Type: application/json" \
-d '{"description":"string","exclude_anchor":true,"exclude_out_of_stock":true,"exclude_recent":true,"fallback":"string","key":"string","limit":0,"name":"string","same_category":true,"strategies":["string"],"strategy":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Saved; lists follow the new rules at the next build
Example
{
"created_at": "2024-01-01T00:00:00Z",
"description": "string",
"exclude_anchor": true,
"exclude_out_of_stock": true,
"exclude_recent": true,
"fallback": "string",
"id": "string",
"key": "string",
"limit": 0,
"name": "string",
"same_category": true,
"strategies": [
"string"
],
"strategy": "string",
"updated_at": "2024-01-01T00:00:00Z"
}Schema
created_atstringrequireddescriptionstringrequiredexclude_anchorbooleanrequiredexclude_out_of_stockbooleanrequiredexclude_recentbooleanrequiredfallbackstringrequiredpopular | none.idstringrequiredkeystringrequiredlimitintegerrequirednamestringrequiredsame_categorybooleanrequiredstrategiesstring[]requiredstrategystringrequiredupdated_atstringrequired400
403
404
409
GET
https://lucidace.com /v1/projects/{project_id}/recs/placements/{id}/stats Scope experiment:readParameters
project_idstringpathrequiredidstringpathrequireddaysintegerquery1 to 365, default 30
Code samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/recs/placements/{id}/stats"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 $recommendation_shown / $recommendation_clicked per strategy and variant
Example
{
"rows": [
{
"clicked": 0,
"ctr": 0,
"shown": 0,
"strategy": "string",
"variant": "string"
}
]
}Schema
rowsRecsStatsRow[]requiredShow child parameters
clickedintegerrequiredctrnumberrequiredclicked / shown (0 when nothing was shown).
shownintegerrequiredstrategystringrequiredvariantstringThe flag value the person had when the payload chose the strategy (
null = placement default).404
503
GET
https://lucidace.com /v1/projects/{project_id}/recs/recommendations Scope experiment:readParameters
project_idstringpathrequiredplacementstringqueryrequireditem_idstringquerydistinct_idstringqueryUse this person's recently viewed items as anchors
strategystringqueryOne the placement allows; else its default
limitintegerqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/recs/recommendations?placement=<placement>"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"items": [
{
"attributes": {},
"category": "string",
"image_url": "string",
"in_stock": true,
"item_id": "string",
"name": "string",
"price": 0,
"source": "string",
"updated_at": "2024-01-01T00:00:00Z",
"url": "string",
"score": 0
}
],
"placement": "string",
"strategy": "string"
}Schema
itemsRecsScoredItem[]requiredShow child parameters
attributesobjectrequiredcategorystringimage_urlstringin_stockbooleanrequireditem_idstringrequirednamestringrequiredpricenumbersourcestringrequiredevents | feed | manual.updated_atstringrequiredurlstringscorenumberrequiredplacementstringrequiredstrategystringrequired400
404
GET
https://lucidace.com /v1/projects/{project_id}/recs/settings Scope experiment:readParameters
project_idstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/recs/settings"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"build_error": "string",
"build_status": "string",
"built_at": "2024-01-01T00:00:00Z",
"catalog_source": "string",
"enabled": true,
"item_id_property": "string",
"lookback_days": 0,
"purchase_event": "string",
"view_event": "string",
"warehouse_table": "string"
}Schema
build_errorstringbuild_statusstringrequirednever | ok | failed.built_atstringcatalog_sourcestringrequiredevents | feed | warehouse.enabledbooleanrequireditem_id_propertystringrequiredlookback_daysintegerrequiredpurchase_eventstringrequiredview_eventstringrequiredwarehouse_tablestring404
PUT
https://lucidace.com /v1/projects/{project_id}/recs/settings Scope experiment:writeParameters
project_idstringpathrequiredRequest body
application/json
catalog_sourcestringevents | feed | warehouseenabledbooleanitem_id_propertystringlookback_daysintegerpurchase_eventstringview_eventstringwarehouse_tablestring{
"catalog_source": "string",
"enabled": true,
"item_id_property": "string",
"lookback_days": 0,
"purchase_event": "string",
"view_event": "string",
"warehouse_table": "string"
}Code samples
cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/recs/settings" \
-H "Content-Type: application/json" \
-d '{"catalog_source":"string","enabled":true,"item_id_property":"string","lookback_days":0,"purchase_event":"string","view_event":"string","warehouse_table":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Updated