recommendations

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-recommendations"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/8728367b-f531-4013-ae22-403cc6d4ddb0/social-card.svg?v=3e7ae33eec8b" alt="recommendations" width="600" height="315"></a>
PATCHhttps://lucidace.com/v1/projects/{project_id}/recs/placements/{id}Scope experiment:write

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json

Create body; on PATCH every field is optional and absent ones keep their value.

descriptionstring
exclude_anchorboolean
exclude_out_of_stockboolean
exclude_recentboolean
fallbackstring
popular | none
keystring
limitinteger
namestring
same_categoryboolean
strategiesarray
strategystring
popular | 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_atstringrequired
descriptionstringrequired
exclude_anchorbooleanrequired
exclude_out_of_stockbooleanrequired
exclude_recentbooleanrequired
fallbackstringrequired
popular | none.
idstringrequired
keystringrequired
limitintegerrequired
namestringrequired
same_categorybooleanrequired
strategiesstring[]required
strategystringrequired
updated_atstringrequired
400
403
404
409
GEThttps://lucidace.com/v1/projects/{project_id}/recs/placements/{id}/statsScope experiment:read

Parameters

project_idstringpathrequired
idstringpathrequired
daysintegerquery
1 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[]required
Show child parameters
clickedintegerrequired
ctrnumberrequired
clicked / shown (0 when nothing was shown).
shownintegerrequired
strategystringrequired
variantstring
The flag value the person had when the payload chose the strategy (null = placement default).
404
503
GEThttps://lucidace.com/v1/projects/{project_id}/recs/recommendationsScope experiment:read

Parameters

project_idstringpathrequired
placementstringqueryrequired
item_idstringquery
distinct_idstringquery
Use this person's recently viewed items as anchors
strategystringquery
One the placement allows; else its default
limitintegerquery

Code 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[]required
Show child parameters
attributesobjectrequired
categorystring
image_urlstring
in_stockbooleanrequired
item_idstringrequired
namestringrequired
pricenumber
sourcestringrequired
events | feed | manual.
updated_atstringrequired
urlstring
scorenumberrequired
placementstringrequired
strategystringrequired
400
404
GEThttps://lucidace.com/v1/projects/{project_id}/recs/settingsScope experiment:read

Parameters

project_idstringpathrequired

Code 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_errorstring
build_statusstringrequired
never | ok | failed.
built_atstring
catalog_sourcestringrequired
events | feed | warehouse.
enabledbooleanrequired
item_id_propertystringrequired
lookback_daysintegerrequired
purchase_eventstringrequired
view_eventstringrequired
warehouse_tablestring
404
PUThttps://lucidace.com/v1/projects/{project_id}/recs/settingsScope experiment:write

Parameters

project_idstringpathrequired

Request body

application/json
catalog_sourcestring
events | feed | warehouse
enabledboolean
item_id_propertystring
lookback_daysinteger
purchase_eventstring
view_eventstring
warehouse_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

Responses

400
403
404
Updated