Documentation

Reports with cURL and jq

Here is a small example of how you can leverage our API and a JSON processor to perform quick analysis on your data.

Fetch data with curl

# Transactions for March 2024
curl "https://validator.iaptic.com/v3/transactions?appName=APP_NAME&apiKey=SECRET_KEY&limit=10000&startdate=2024-03-01&enddate=2024-03-31" > transactions.json

# Customers
curl "https://validator.iaptic.com/v3/customers?appName=APP_NAME&apiKey=SECRET_KEY&limit=10000&" > customers.json

Query with jq

jq is a great tool to process JSON documents without writing code.

# Number of transactions in March 2024
jq '.paging.total' transactions.json

# Number of transactions that are in intro period
jq '[.rows[] | select(.isIntroPeriod == true)] | length' transactions.json

# Number of transaction that are in trial period
jq '[.rows[] | select(.isTrialPeriod == true)] | length' transactions.json

# Number of active subscribers
jq '[.rows[] | select(.customerInfo.activeSubscriber == true)] | length' customers.json

Do more