This article details how billable requests are made in Leanplum
Before starting, make sure to review your contract so you are familiar with the exact details of our agreement in how you are getting billed.
Due to our system architecture, our costs increase every time we need to retrieve a user profile to process an HTTP request for our API. We then bill all server-side API calls based on the number of user lookups per HTTP request and not the number of HTTP requests or API actions. Said another way, a single server-side API call will equate to one unique user lookup initiated by your HTTP request made to the Leanplum API from any source other than the Leanplum SDK. This user lookup is what we will consider a billable request.
However, to optimize the number of billable requests, we have created a HTTP request that can include multiple user lookups in one call. This multiple request, (or multi
in our API actions) allows you to batch multiple actions together for up to 50 unique users in a single request. In this scenario, the maximum number of billable API calls (or user lookups) per HTTP request would 50, not 1.
We also optimized how we handle multi
requests to prevent duplicate user lookups (reducing both our and your costs). Because we do this, you can reduce the number of billable calls you make to the Leanplum API (while executing the same number of actions) by batching actions for the same user(s).
See Batching requests for more.
NOTE: The deleteUser actions are excluded as a billable request, allowing you to keep your data clean.
Multi
The
multi
action also allows you to import an external file containing a potentially large number of actions. This is billed by breaking the file into API requests that each contains a batch of 50 actions. Each of these API requests is then billed using the above definition.
Session definition
For billing purposes, a “User Session” is defined as a call of the API Method
start
orresumeSession
that is made 30 (thirty) minutes or more after the latest call of the API MethodpauseSession
on the same device.