Pular para o conteúdo principal
POST
/
api
/
v1
/
events
Events
curl --request POST \
  --url https://api.example.com/api/v1/events

Authentication

All requests must include an API key via the x-api-key header or key query parameter.
curl -X POST https://alana.shopping/api/v1/events \
  -H "Content-Type: application/json" \
  -H "x-api-key: ak_your_api_key" \
  -d '{
    "events": [
      {
        "eventType": "detail-page-view",
        "visitorId": "visitor-123",
        "productId": "550e8400-e29b-41d4-a716-446655440000"
      }
    ]
  }'

Rate Limits

LevelLimitWindow
Per API key1,000 requests1 minute
Per API key + IP100 requests1 minute

Event Types

Event TypeRequired FieldsDescription
home-page-viewvisitorIdUser viewed the home page
searchvisitorId, queryUser performed a search
category-viewvisitorId, categoryPathUser browsed a category page
detail-page-viewvisitorId, productIdUser viewed a product detail page
add-to-cartvisitorId, productIdUser added a product to their cart
shopping-cart-page-viewvisitorIdUser viewed their cart
purchase-completevisitorId, productIds, revenue, currencyUser completed purchase

Request Format

Send a batch of up to 100 events in a single request.
{
  "events": [
    {
      "eventType": "search",
      "visitorId": "visitor-abc",
      "userId": "user-123",
      "query": "camiseta azul"
    },
    {
      "eventType": "detail-page-view",
      "visitorId": "visitor-abc",
      "productId": "550e8400-e29b-41d4-a716-446655440000"
    }
  ]
}

Common Fields

FieldTypeRequiredDescription
eventTypestringYesOne of the 7 event types listed above
visitorIdstringYesAnonymous visitor identifier
userIdstringNoAuthenticated user ID (for personalization)
metadataobjectNoAdditional context (free-form key/value)

Response Format

{
  "status": "ok",
  "stored": 2,
  "errors": 0
}
FieldTypeDescription
statusstringAlways "ok" on success
storednumberNumber of events successfully stored
errorsnumberNumber of events that failed validation
Last modified on March 12, 2026