Send batch of server-side events
curl --request POST \
--url https://track.scanova.io/server-events/batch \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"events": [
{
"site_id": "site_abc123",
"event_name": "purchase",
"scan_session_id": "550e8400-e29b-41d4-a716-446655440000",
"conversion_value": {
"amount": 99.99,
"currency": "USD"
},
"user_identifiers": {
"email_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"external_id": "user_12345"
},
"properties": {
"order_id": "order_789",
"product_ids": [
"prod_1",
"prod_2"
]
}
}
]
}
'import requests
url = "https://track.scanova.io/server-events/batch"
payload = { "events": [
{
"site_id": "site_abc123",
"event_name": "purchase",
"scan_session_id": "550e8400-e29b-41d4-a716-446655440000",
"conversion_value": {
"amount": 99.99,
"currency": "USD"
},
"user_identifiers": {
"email_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"external_id": "user_12345"
},
"properties": {
"order_id": "order_789",
"product_ids": ["prod_1", "prod_2"]
}
}
] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
events: [
{
site_id: 'site_abc123',
event_name: 'purchase',
scan_session_id: '550e8400-e29b-41d4-a716-446655440000',
conversion_value: {amount: 99.99, currency: 'USD'},
user_identifiers: {
email_hash: 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
external_id: 'user_12345'
},
properties: {order_id: 'order_789', product_ids: ['prod_1', 'prod_2']}
}
]
})
};
fetch('https://track.scanova.io/server-events/batch', 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://track.scanova.io/server-events/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'events' => [
[
'site_id' => 'site_abc123',
'event_name' => 'purchase',
'scan_session_id' => '550e8400-e29b-41d4-a716-446655440000',
'conversion_value' => [
'amount' => 99.99,
'currency' => 'USD'
],
'user_identifiers' => [
'email_hash' => 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
'external_id' => 'user_12345'
],
'properties' => [
'order_id' => 'order_789',
'product_ids' => [
'prod_1',
'prod_2'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://track.scanova.io/server-events/batch"
payload := strings.NewReader("{\n \"events\": [\n {\n \"site_id\": \"site_abc123\",\n \"event_name\": \"purchase\",\n \"scan_session_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"conversion_value\": {\n \"amount\": 99.99,\n \"currency\": \"USD\"\n },\n \"user_identifiers\": {\n \"email_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"external_id\": \"user_12345\"\n },\n \"properties\": {\n \"order_id\": \"order_789\",\n \"product_ids\": [\n \"prod_1\",\n \"prod_2\"\n ]\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://track.scanova.io/server-events/batch")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n {\n \"site_id\": \"site_abc123\",\n \"event_name\": \"purchase\",\n \"scan_session_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"conversion_value\": {\n \"amount\": 99.99,\n \"currency\": \"USD\"\n },\n \"user_identifiers\": {\n \"email_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"external_id\": \"user_12345\"\n },\n \"properties\": {\n \"order_id\": \"order_789\",\n \"product_ids\": [\n \"prod_1\",\n \"prod_2\"\n ]\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://track.scanova.io/server-events/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n {\n \"site_id\": \"site_abc123\",\n \"event_name\": \"purchase\",\n \"scan_session_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"conversion_value\": {\n \"amount\": 99.99,\n \"currency\": \"USD\"\n },\n \"user_identifiers\": {\n \"email_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"external_id\": \"user_12345\"\n },\n \"properties\": {\n \"order_id\": \"order_789\",\n \"product_ids\": [\n \"prod_1\",\n \"prod_2\"\n ]\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"accepted": 123,
"rejected": 123,
"event_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}API Reference
Batch Server Events API — POST /server-events/batch
Send up to 100 server-side conversion events in a single authenticated request. Recommended for queued delivery and high-volume backends.
POST
/
server-events
/
batch
Send batch of server-side events
curl --request POST \
--url https://track.scanova.io/server-events/batch \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"events": [
{
"site_id": "site_abc123",
"event_name": "purchase",
"scan_session_id": "550e8400-e29b-41d4-a716-446655440000",
"conversion_value": {
"amount": 99.99,
"currency": "USD"
},
"user_identifiers": {
"email_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"external_id": "user_12345"
},
"properties": {
"order_id": "order_789",
"product_ids": [
"prod_1",
"prod_2"
]
}
}
]
}
'import requests
url = "https://track.scanova.io/server-events/batch"
payload = { "events": [
{
"site_id": "site_abc123",
"event_name": "purchase",
"scan_session_id": "550e8400-e29b-41d4-a716-446655440000",
"conversion_value": {
"amount": 99.99,
"currency": "USD"
},
"user_identifiers": {
"email_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"external_id": "user_12345"
},
"properties": {
"order_id": "order_789",
"product_ids": ["prod_1", "prod_2"]
}
}
] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
events: [
{
site_id: 'site_abc123',
event_name: 'purchase',
scan_session_id: '550e8400-e29b-41d4-a716-446655440000',
conversion_value: {amount: 99.99, currency: 'USD'},
user_identifiers: {
email_hash: 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
external_id: 'user_12345'
},
properties: {order_id: 'order_789', product_ids: ['prod_1', 'prod_2']}
}
]
})
};
fetch('https://track.scanova.io/server-events/batch', 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://track.scanova.io/server-events/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'events' => [
[
'site_id' => 'site_abc123',
'event_name' => 'purchase',
'scan_session_id' => '550e8400-e29b-41d4-a716-446655440000',
'conversion_value' => [
'amount' => 99.99,
'currency' => 'USD'
],
'user_identifiers' => [
'email_hash' => 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
'external_id' => 'user_12345'
],
'properties' => [
'order_id' => 'order_789',
'product_ids' => [
'prod_1',
'prod_2'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://track.scanova.io/server-events/batch"
payload := strings.NewReader("{\n \"events\": [\n {\n \"site_id\": \"site_abc123\",\n \"event_name\": \"purchase\",\n \"scan_session_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"conversion_value\": {\n \"amount\": 99.99,\n \"currency\": \"USD\"\n },\n \"user_identifiers\": {\n \"email_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"external_id\": \"user_12345\"\n },\n \"properties\": {\n \"order_id\": \"order_789\",\n \"product_ids\": [\n \"prod_1\",\n \"prod_2\"\n ]\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://track.scanova.io/server-events/batch")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n {\n \"site_id\": \"site_abc123\",\n \"event_name\": \"purchase\",\n \"scan_session_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"conversion_value\": {\n \"amount\": 99.99,\n \"currency\": \"USD\"\n },\n \"user_identifiers\": {\n \"email_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"external_id\": \"user_12345\"\n },\n \"properties\": {\n \"order_id\": \"order_789\",\n \"product_ids\": [\n \"prod_1\",\n \"prod_2\"\n ]\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://track.scanova.io/server-events/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n {\n \"site_id\": \"site_abc123\",\n \"event_name\": \"purchase\",\n \"scan_session_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"conversion_value\": {\n \"amount\": 99.99,\n \"currency\": \"USD\"\n },\n \"user_identifiers\": {\n \"email_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"external_id\": \"user_12345\"\n },\n \"properties\": {\n \"order_id\": \"order_789\",\n \"product_ids\": [\n \"prod_1\",\n \"prod_2\"\n ]\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"accepted": 123,
"rejected": 123,
"event_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}{
"error": true,
"message": "Too many requests. Retry after 60 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}Use the batch endpoint when you have multiple events to send — it reduces HTTP overhead and is the preferred approach for worker-based or queue-driven architectures.
Use the site-scoped API key generated from your tracking site dashboard: Integrations → Conversion Tracking → API Keys.
See Send Server Events for a full batch request example.
Authorizations
Site-scoped server API key generated from Dashboard > Integrations > Conversion Tracking > Script/API > API tab
Body
application/json
Required array length:
1 - 100 elementsShow child attributes
Show child attributes
Was this page helpful?
⌘I