Releva has completed an $870,000 financial round led by New Vision Fund 3 with participation by HR Capital AD, Verto Invest and the investment arm of private investors.
Releva завърши финансов рунд от $870 000, воден от Фонд Ню Вижън 3 с участието на Ейч Ар Капитал АД, Верто Инвест и подкрепата на частни инвеститори.
Search the Documentations
Categories

Search Event API

The Search Event API

The search event API allows you to insert bulk search event data to Releva. Any insert submitted through this API will be live within 10 seconds of receiving a successful response.

Do I need to call it?

Yes, if you want to update user profile data with search events from your back end. If you want to send search events from the front-end read our front end integration page.

Request Parameters

For example, a client just performed a search for computers by adding filters for brand, RAM, processor, gpu, etc. You may track this search by sending a search event to the API using the following curl equivalent:

curl -H 'Content-Type: application/json' -H 'Authorization: Bearer <secretKey>' -XPOST https://releva.ai/api/v0/search -d'{
    "events": [
        {
            "locale": "bg",
            "products": [
                {
                    "id": "4578199044236"
                },
                {
                    "id": "4578197799052"
                },
                {
                    "id": "4578197831820"
                }
            ],
             "filter": {
              "operator": "and",
              "nested": [
                {"key": "foo1", "operator": "eq", "action": "include", "value": "bar"},
                {
                  "operator": "or",
                  "nested": [
                    {"key": "foo2", "operator": "eq, "action": "include", "value": "bar"},
                    {"key": "foo3", "operator": "gt", "action": "exclude", "value": "1"},
                    {"key": "foo3", "operator": "gte", "action": "exclude", "value": "0"},
                    {"key": "foo3", "operator": "lt", "action": "bury", "value": "5", "weight": 4},
                    {"key": "foo3", "operator": "lte", "action": "boost", "value": "4",  "weight": 3}
                  ]
                }
              ]
            },
            "custom": {
                "string": [
                    {
                        "key": "agent",
                        "values": [
                            "manual"
                        ]
                    },
                    {
                        "key": "type",
                        "values": [
                            "Phone call"
                        ]
                    }
                ]
            },
           "tags": ["foo", "bar"],
            "email": "georgi@releva.ai"
        }
    ]
}'

The products Array

This object is an array of Objects with the following properties.

FieldTypeDescription
emailStringThe email of the user that has performed this action.
localeStringIf you support multiple languages or currencies, set this to the current locale.
constraintsArray[Object] (Optional)The filters (constraints) that have been used during this search. If the user performed a full-text search model this as part of the constraints fileds.
productsArray[Object] (Optional)Products identifiers associated with this event.
timestampISO-8601 String (Optional)The date and time when this event happened.
customObject (Optional)The custom fields associated with the event.
tagsArray[String] (Optional)The tags associated with this event.

Response Format

A successful response will return HTTP Status 202 with an empty response body ({}).

An error response will return a HTTP 4xx or 5xx status code and have the following structure:

{
  "message": "A description of the error and how to fix it, if it's a client error."
}
Previous Custom Event API
Next Send Custom Events using Releva.push()
Table of Contents