Retrieve event
curl --request GET \
--url https://api.neuronsearchlab.com/v1/events/{event_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.neuronsearchlab.com/v1/events/{event_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.neuronsearchlab.com/v1/events/{event_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.neuronsearchlab.com/v1/events/{event_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.neuronsearchlab.com/v1/events/{event_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.neuronsearchlab.com/v1/events/{event_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neuronsearchlab.com/v1/events/{event_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "12345",
"object": "event",
"user_id": "user-abc123",
"item_id": "7f3a2c9e",
"type": "purchase",
"purchase": {
"amount": 4999,
"currency": "usd"
},
"session_id": "4a93",
"request_id": "c7f0d2bb-56b1-4ca7-8f09-84d8e4ed02b4",
"context_id": "101",
"placement": "home_feed",
"metadata": {
"context_id": "101",
"purchase": {
"amount": 4999,
"currency": "usd"
}
},
"occurred_at": 1777478400,
"created": 1777478405
}{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "Validation error",
"details": {
"fieldErrors": {
"name": [
"Required"
]
}
}
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized_no_client_id_in_jwt",
"message": "Unauthorized: No client ID in JWT"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"type": "not_found_error",
"code": "item_not_found",
"message": "Item not found"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Events
Retrieve event
Retrieve a single ingested event.
GET
/
v1
/
events
/
{event_id}
Retrieve event
curl --request GET \
--url https://api.neuronsearchlab.com/v1/events/{event_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.neuronsearchlab.com/v1/events/{event_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.neuronsearchlab.com/v1/events/{event_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.neuronsearchlab.com/v1/events/{event_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.neuronsearchlab.com/v1/events/{event_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.neuronsearchlab.com/v1/events/{event_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neuronsearchlab.com/v1/events/{event_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "12345",
"object": "event",
"user_id": "user-abc123",
"item_id": "7f3a2c9e",
"type": "purchase",
"purchase": {
"amount": 4999,
"currency": "usd"
},
"session_id": "4a93",
"request_id": "c7f0d2bb-56b1-4ca7-8f09-84d8e4ed02b4",
"context_id": "101",
"placement": "home_feed",
"metadata": {
"context_id": "101",
"purchase": {
"amount": 4999,
"currency": "usd"
}
},
"occurred_at": 1777478400,
"created": 1777478405
}{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "Validation error",
"details": {
"fieldErrors": {
"name": [
"Required"
]
}
}
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized_no_client_id_in_jwt",
"message": "Unauthorized: No client ID in JWT"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"type": "not_found_error",
"code": "item_not_found",
"message": "Item not found"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Request
GET /v1/events/12345
Response
{
"id": "12345",
"object": "event",
"user_id": "user-abc123",
"item_id": "7f3a2c9e",
"type": "click",
"click": {},
"session_id": "4a93",
"request_id": "c7f0d2bb-56b1-4ca7-8f09-84d8e4ed02b4",
"context_id": "101",
"placement": "home_feed",
"metadata": {
"context_id": "101",
"click": {}
},
"occurred_at": 1777478400,
"created": 1777478405
}
session_id, request_id, and placement are null when not provided at ingest time.
Errors
| Status | Scenario |
|---|---|
400 | Malformed event ID |
404 | Event does not exist for the authenticated tenant |
Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Public event ID.
Pattern:
^[1-9][0-9]*$Response
Event
Pattern:
^[1-9][0-9]*$Example:
"12345"
Available options:
event Example:
"user-abc123"
Example:
"7f3a2c9e"
Example:
"purchase"
Arbitrary JSON object used for filtering, ranking, and debugging.
Example:
{
"category": "electronics",
"brand": "Acme",
"price": 10999,
"currency": "usd"
}
Example:
1777478400
Example:
1777478405
Example:
"101"
Example:
"home_feed"
Was this page helpful?
⌘I

