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 |
| X-Shop | string | Shopify’s myshopify url. (without https://) |
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. |
| session_id | string | Session id associated with the request. |
| config_id | string | Configuration id for the widget. |
| query_id | string | Query ID sent in the response of search, recommendation, etc calls. |
| sku | string | Affected sku. |
| creation_date | string | Time of event occurrence 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 | Shopify’s myshopify url. (without https://) |
| company_id | string | Shopify B2B company id. |
| location_id | string | Shopify B2B location id. |
| country | string | Country code. |
| state | string | State code. |
- 200: OK Sending the Events to Frenzy AI.
- Success
- Failure
{'status': 'Event saved', 'success': true}}
{'error': 'server_error'}
Event Names
Below is a list of acceptable Event names- Download the attached file| Event Name | Usage |
|---|---|
| collection_product_click | When the user clicks the product from the collection page. |
| search_product_click | When the user clicks the product from the search page. |
| suggest_query_hover | When the user hovers over the suggest query on auto-suggest. |
| suggest_query_click | When the user clicks over the suggest query on auto-suggest. |
| suggest_search_product_click | When the user clicks over the product from suggest auto-suggest. |
| default_suggest_query_click | When the user clicks over the suggest query on auto-suggest when default results are displayed. |
| default_suggest_search_product_click | When the user clicks over the product from suggest auto-suggest when default results are displayed. |
| pdp_carousel_product_click | When the user clicks the product from the pdp page carousel. |
| landing_page_carousel_product_click | When the user clicks the product from the pdp page carousel. |
| similar_product_carousel_product_click | When the user clicks the product from the similar product carousel. |
| cross_sell_carousel_product_click | When the user clicks the product from the cross-sell carousel. |
| personalized_homepage_carosuel_product_click | When the user clicks the product from the personalized home page carousel. |
| most_clicked_skus_carousel_product_click | When the user clicks the product from the most clicked home page carousel. |
| bundle_product_click | When the user clicks the product from the bundle. |
| add_cart_product_click | When the user clicks the product from the cart drawer carousel. |
| add_to_cart | When the user adds products to the cart. |
| add_to_wishlist | When the user adds products to the wishlist. |
| product_view | When the user views the product on the PDP page. |
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.