Palbase IAP · API
/iap/charts/overviewRead the charts' overview
The project's figures at a glance: MRR, active subscriptions and active trials now; revenue (of revenue_type), new customers and active customers over the last 28 days, today included — each as its chart counts it. Money is in the reporting currency (or currency); an amount in a currency the European Central Bank does not publish is left out and named (unconverted). A replica computes two charts (the overview among them) at once and one of a project; another is refused at once as busy (503 charts_busy, Retry-After), and so is one that takes longer than 15 seconds. The same request within a minute is answered from the replica's cache (a change of the project's settings drops it there). A replica computes 20 charts of a project in a row, then one each 2 seconds (30 a minute); past that a chart is refused (429 too_many_charts, Retry-After) — an answer from the cache is not counted.
Called by your server, with the project's secret key.
Query
sandboxboolean · optionalCount the stores' test purchases too (Apple's sandbox, Stripe's test mode); segment or filter by sandbox to tell them apart.revenue_type"gross" | "net_of_taxes" | "proceeds" · optionalWhat of the money a monetary chart counts: gross (what customers paid), net_of_taxes, or proceeds (net of taxes and the store's commission); gross unless said. What the ledger does not state is estimated, and the answer says so (estimated).currencystring · optionalThe currency to report money in, for this answer: one the European Central Bank publishes a reference rate for. The project's reporting currency (settings) unless said.curl -X GET "https://<your-ref>.palbase.studio/iap/charts/overview" \
-H "apikey: $PALBASE_SECRET_KEY"Responses
200The overview
400`sandbox` is not true or false (`invalid_request`); `revenue_type` is none of them (`invalid_revenue_type`); `currency` is not one the European Central Bank publishes (`unsupported_currency`)
401No key, not a key of this project, or a token that is not valid (the edge's answer)
403Not the project's secret key (`secret_key_required`)
422A customer of the project — or a chain no one owns — holds more than 20,000 transactions: a chart reads a customer's whole ledger at once, and refuses one past that (`chart_too_large`, naming it)
429Past the 20 charts of the project computed in a row on this replica, one more each 2 seconds (`too_many_charts`; an answer from the cache is not counted), or over the project's request limit; Retry-After says when to try again
503The charts are busy — two being computed in this replica, or one of the project — or reading the ledger took longer than 15 seconds (`charts_busy`, Retry-After); or temporarily unavailable, retrying is safe after Retry-After
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation GetChartsOverview of iap's contract.