Documentation Sweet Pricing API

POST / events

This endpoint accepts event data from mobile apps. When the user views an in-app store or makes a purchase, this endpoint tracks the event.

Our Android and iOS client libraries track the 'view variant' event when the user views an in-app store, and the 'purchase' event when the user makes an in-app purchase. The mobile device buffers up these events and periodically sends them to this endpoint.

This endpoint accepts a batch of events for efficiency. Each event contains details about the user, their mobile device and event-specific properties such as product group ID or price.

We do not process events immediately, so you will not see instant results from the GET /variants/:variantId/stats endpoint, for example. This endpoint adds events to a queue for processing, and we normally process events within a few seconds.



Field Type Description
Authorization String

Header of form api-key <API key>

Authorization: api-key <API Key>


Field Type Description
batch Object[]

Array of events.

batch.messageId String
batch.type String String
batch.context Object Object Number String String String
batch.context.traits Object
batch.context.traits.anonymousId String
batch.context.traits.userId String
batch.context.library Object String
batch.context.library.version String
batch.context.os Object String
batch.context.os.version String
batch.context.timezone String
batch.context.screen Object
batch.context.screen.density Number
batch.context.screen.width Number
batch.context.screen.height Number
batch.context.userAgent String
batch.context.locale String
batch.context.device Object String
batch.context.device.manufacturer String
batch.context.device.model String String Object Boolean String Boolean Boolean
batch.event String Object Mixed



Name Description

You are not authenticated to perform the request.


Name Description

You are not allowed to view/modify this resource.


Name Description

Resource not found.