/api/data/api/data: Groups by event date (when refund/chargeback occurred)/api/data/cohort: Groups by initial date (when customer first signed up){
"start_date": "2025-07-01",
"end_date": "2025-07-30",
"group_by": ["date"],
"metrics": ["revenue_by_initial_date", "cb_amount_by_initial_date", "refund_amount_by_initial_date"]
}{
"start_date": "2025-07-01",
"end_date": "2025-07-30",
"group_by": ["date", "billing_cycle"],
"metrics": ["approvals_by_initial_date", "revenue_by_initial_date"]
}{
"start_date": "2025-07-01",
"end_date": "2025-07-30",
"group_by": ["campaign_id"],
"metrics": ["revenue_by_initial_date", "cb_amount_by_initial_date", "cpa"]
}date (initial date), sales_type, billing_cycle, attempt_col, refund_type, alert_typeprice_point, bin, affid, sub_affid, campaign_id, product_id, gateway_idproduct_name, product_group, campaign_name, campaign_typemcc, acquirer, gateway_alias, bank, card_brand, card_typeapprovals_by_initial_date, attempts_by_initial_date, revenue_by_initial_date, cpacb_count_by_initial_date, cb_amount_by_initial_daterefund_count_by_initial_date, refund_amount_by_initial_datealert_count_by_initial_date, alert_by_initial_dateinitial_attempt, initial_approved, rebills_attempted, rebills_approvedstart_date and end_datestart_date and end_date filter by initial/trial date, not event datex-client-id and x-client-secretcurl --location --request POST 'https://api.beastinsights.com/api/data/cohort' \
--header 'x-client-id;' \
--header 'x-client-secret;' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"start_date": "2025-07-01",
"end_date": "2025-07-30"
}'{
"success": true,
"code": 200,
"message": "Cohort summary data retrieved successfully (grouped by initial date)",
"data": [
{
"date": "2025-07-01",
"revenue_by_initial_date": 15248.75,
"approvals_by_initial_date": 284,
"cb_amount_by_initial_date": 450,
"refund_amount_by_initial_date": 1247.5
},
{
"date": "2025-07-02",
"revenue_by_initial_date": 12847.25,
"approvals_by_initial_date": 256,
"cb_amount_by_initial_date": 320,
"refund_amount_by_initial_date": 892.3
}
],
"pagination": {
"total": 30,
"limit": 100,
"offset": 0,
"has_more": false
},
"timestamp": "2025-08-05T10:30:00.000Z"
}