X-API-Key header for all server event requests.
cURL
Copy
curl -X POST "https://track.scanova.io/server-events" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_SITE_API_KEY" \
-d '{
"site_id": "site_abc123",
"event_name": "purchase",
"event_id": "550e8400-e29b-41d4-a716-446655440000",
"scan_session_id": "550e8400-e29b-41d4-a716-446655440001",
"conversion_value": {"amount": 99.99, "currency": "USD"},
"properties": {"order_id": "ord_1001"}
}'
Node.js
Copy
await fetch('https://track.scanova.io/server-events', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': process.env.SCANOVA_TRACKING_API_KEY
},
body: JSON.stringify({
site_id: 'site_abc123',
event_name: 'purchase',
event_id: crypto.randomUUID(),
conversion_value: { amount: 99.99, currency: 'USD' },
properties: { order_id: 'ord_1001' }
})
});
Python
Copy
import uuid
import requests
requests.post(
"https://track.scanova.io/server-events",
headers={
"Content-Type": "application/json",
"X-API-Key": "YOUR_SITE_API_KEY"
},
json={
"site_id": "site_abc123",
"event_name": "purchase",
"event_id": str(uuid.uuid4()),
"conversion_value": {"amount": 99.99, "currency": "USD"},
"properties": {"order_id": "ord_1001"}
},
timeout=10,
)