API Call

This page explains the request and response formats of the '/events' endpoint of Frenzy Search. It also provide examples to help you understand better.

send events to Frenzy AI

POST https://xyz.search.frenzy.ai /events

The request body will include an array of event objects.

Headers

Name
Type
Description

X-Frenzy-Authorization*

string

API key provided at the time of account creation.

Content-type*

string

application/json

Request Body

Name
Type
Description

event_name*

string

Type of event to share e.g. Add to Cart, etc.

user_id*

string

User ID that triggered the event.

query_id

string

Query ID sent in the response of search, recommendation, etc calls.

sku

string

Affected sku.

time

string

Time of event occurance UTC format. (e.g.

2021-02-13 17:00:02)

If not provided will use the arrival time of the request.

query

string

user entered query

filters

json

user selected filters

shop

string

name of the Shopify Store. (required for shopify stores)

{'status': 'Event saved', 'success': true}}

Response Object

status
success

String- describing if the event is saved. In case of failure, return the error message.

Boolean- describing if the event was saved or not.

Example Request

curl --location --request POST 'https://xyz.search.frenzy.ai/events' \
--header 'Content-Type: application/json' \
--header 'X-Frenzy-Authorization: API_KEY' \
--data-raw '[{
    "event_name":"add to cart",
    "user_id": "1234",
    "sku":"PSS-123-12345"
}]'

NOTE: Historic events can be shared over the API. Please add the time of event occurrence in the request.

Last updated

Was this helpful?