Skip to main content
POST
/
api
/
widget
/
{widget_id}
Get widget recommendations
curl --request POST \
  --url https://{search_zone}-recommendations.doofinder.com/api/widget/{widget_id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "current_url": "https://shop.example.com/products/wireless-headphones-pro",
  "session_id": "b2b89619844f4eb0b5fa19f28a19d679",
  "user_id": "8c80694b-354c-4533-acd1-e4b8e7d74b7b",
  "language": "en",
  "price_name": "EUR",
  "hashid": "de8f052ea612f95b6950d4013dd6ef38",
  "cart_items": [
    {
      "dfid": "123e4567e89b12d3a456426614174000@product@e7b7a6c35b2d4afc94991bfc8100227a"
    }
  ],
  "category_context": [
    {}
  ]
}
'
{
  "title": "Our recommendations",
  "currency": {
    "code": "EUR",
    "label": "Euro",
    "format": "%v %s",
    "symbol": "€",
    "precision": 2,
    "decimal": ",",
    "thousand": "."
  },
  "fallback_action": "disabled",
  "results": [
    {}
  ]
}

Path Parameters

widget_id
string<uuid>
required

Unique identifier for the widget

Example:

"123e4567-e89b-12d3-a456-426614174000"

Body

application/json
current_url
string<uri>
required

Current page URL

Example:

"https://shop.example.com/products/wireless-headphones-pro"

session_id
string | null

Session identifier (optional)

Example:

"b2b89619844f4eb0b5fa19f28a19d679"

user_id
string<uuid> | null

User identifier (optional)

Example:

"8c80694b-354c-4533-acd1-e4b8e7d74b7b"

language
string

Language code (optional)

Example:

"en"

price_name
string

Currency code (optional)

Example:

"EUR"

hashid
string

Hash identifier (optional)

Example:

"de8f052ea612f95b6950d4013dd6ef38"

cart_items
object[] | null

A list of items added to the shopping cart for additional context.

category_context
object[] | null

Contextual category information (optional)

Response

Successful response with recommendations

title
string
Example:

"Our recommendations"

currency
object
fallback_action
string
Example:

"disabled"

results
object[]

Array of recommendation items