API v2 → v3: What's Changed
API v3 keeps everything you're already pulling from v2 and adds the detail customers asked for — subscription revenue broken out by component on every campaign, A/B test variations with their own subject lines and metrics, and per-channel metrics on flows. Nothing you've built against v2 breaks; v3 is purely additive.
All v3 endpoints use the base path /v3/ (in place of /v2/).
Full base URL: https://api.hiroanalytics.com/v3/
Campaigns
Endpoint: /v3/{client_id}/campaigns
New filter: you can now filter results by platform (klaviyo, attentive, or postscript).
New fields on every campaign:
has_ab_testandvariations— if a campaign was an A/B test, you'll now see each variation's own subject line, preview text, image, and performance metrics. Important: whenhas_ab_testistrue, the subject/preview text/image at the top level of the campaign will be empty — that content only lives inside thevariationslist for A/B tests. Non-A/B campaigns are unaffected; their content stays at the top level as before.A subscription revenue breakdown on every campaign for subscription-eligible clients — see below. These land as four flat fields directly on the campaign object:
new_sub_revenue,recurring_sub_revenue,otp_revenue_in_sub,other_otp.
Flows
Endpoint: /v3/{client_id}/flows
New filter: same platform filter as campaigns.
New, additive response shape: flow metrics now include a breakdown by channel (email, SMS, push, WhatsApp) as a nested object, alongside all the existing individual fields you're already using. Nothing was removed — this is purely additional detail. For example, a flow with push notification activity now returns:
{ "metrics": { "channels": { "push": { "delivered": 9291, "recipients": 9291, "opens": 22, "clicks": 0, "unsubscribes": 0, "bounces": 0, "spam_complaints": 0, "revenue": 243.18, "orders": 2 } }, "flow_push_deliveries": 9291, "flow_push_revenue": 243.18, "flow_push_orders": 2, "flow_push_open_rate": 0.0024 } }
Subscription Revenue Field Keys
Subscription revenue in API v3 is broken into four components, each available as a total (whole-store) and as attributed (driven by marketing). On campaigns specifically, only the attributed breakdown applies — a campaign only ever gets credit for revenue attributed to it. This reference lists every field key for the reporting endpoints, broken out by source and channel.
The four components
New Subscription Revenue — subscription product revenue from a customer's first subscription charge (one-time products in the same order excluded).
Recurring Subscription Revenue — subscription product revenue from recurring charges after the first charge.
OTP in Subscription Orders — revenue from one-time products included as line items on an otherwise-subscription order.
Other OTP — one-time purchase revenue from orders with no subscription line items at all.
Component | Total field key | Attributed field key |
|---|---|---|
New Subscription Revenue | subscription_new_subscription_revenue | subscription_new_sub_revenue (alias: new_sub_revenue) |
Recurring Subscription Revenue | subscription_recurring_subscription_revenue | subscription_sub_revenue (alias: sub_revenue) |
OTP in Subscription Orders | subscription_onetime_product_revenue | subscription_otp_revenue_in_sub (alias: otp_revenue_in_sub) |
Other OTP | subscription_other_onetime_revenue | subscription_other_otp (alias: other_otp) |
Every component is available broken out by source (whole account / campaigns only / flows only) and channel (all / email / SMS). Total (non-attributed) field keys only exist at the whole-account, all-channel level.
New Subscription Revenue
Field | Type | Source | Channel |
|---|---|---|---|
New Subscription Revenue | Total | Whole account | All |
Attributed New Subscription Revenue | Attributed | Whole account | All |
Email New Subscription Revenue | Attributed | Whole account | |
SMS New Subscription Revenue | Attributed | Whole account | SMS |
Campaign New Subscription Revenue | Attributed | Campaigns | All |
Campaign Email New Subscription Revenue | Attributed | Campaigns | |
Campaign SMS New Subscription Revenue | Attributed | Campaigns | SMS |
Flow New Subscription Revenue | Attributed | Flows | All |
Flow Email New Subscription Revenue | Attributed | Flows | |
Flow SMS New Subscription Revenue | Attributed | Flows | SMS |
Recurring Subscription Revenue
Field | Type | Source | Channel |
|---|---|---|---|
Recurring Subscription Revenue | Total | Whole account | All |
Attributed Recurring Subscription Revenue | Attributed | Whole account | All |
Email Recurring Subscription Revenue | Attributed | Whole account | |
SMS Recurring Subscription Revenue | Attributed | Whole account | SMS |
Campaign Recurring Subscription Revenue | Attributed | Campaigns | All |
Campaign Email Recurring Subscription Revenue | Attributed | Campaigns | |
Campaign SMS Recurring Subscription Revenue | Attributed | Campaigns | SMS |
Flow Recurring Subscription Revenue | Attributed | Flows | All |
Flow Email Recurring Subscription Revenue | Attributed | Flows | |
Flow SMS Recurring Subscription Revenue | Attributed | Flows | SMS |
OTP in Subscription Orders
Revenue from one-time products included as line items on an otherwise-subscription order.
Field | Type | Source | Channel |
|---|---|---|---|
One-time Product Revenue | Total | Whole account | All |
OTP in Subscription Orders | Attributed | Whole account | All |
Email OTP in Subscription Orders | Attributed | Whole account | |
SMS OTP in Subscription Orders | Attributed | Whole account | SMS |
Campaign OTP in Subscription Orders | Attributed | Campaigns | All |
Campaign Email OTP in Subscription Orders | Attributed | Campaigns | |
Campaign SMS OTP in Subscription Orders | Attributed | Campaigns | SMS |
Flow OTP in Subscription Orders | Attributed | Flows | All |
Flow Email OTP in Subscription Orders | Attributed | Flows | |
Flow SMS OTP in Subscription Orders | Attributed | Flows | SMS |
Other OTP
One-time purchase revenue from orders with no subscription line items at all.
Field | Type | Source | Channel |
|---|---|---|---|
Other OTP | Total | Whole account | All |
Attributed Other OTP | Attributed | Whole account | All |
Email Other OTP | Attributed | Whole account | |
SMS Other OTP | Attributed | Whole account | SMS |
Campaign Other OTP | Attributed | Campaigns | All |
Campaign Email Other OTP | Attributed | Campaigns | |
Campaign SMS Other OTP | Attributed | Campaigns | SMS |
Flow Other OTP | Attributed | Flows | All |
Flow Email Other OTP | Attributed | Flows | |
Flow SMS Other OTP | Attributed | Flows | SMS |
OTP Revenue (rolled up)
Field | Type | Source | Channel |
|---|---|---|---|
OTP Revenue | Total | Whole account | All |
Attributed OTP Revenue | Attributed | Whole account | All |
Email OTP Revenue | Attributed | Whole account | |
SMS OTP Revenue | Attributed | Whole account | SMS |
Campaign OTP Revenue | Attributed | Campaigns | All |
Campaign Email OTP Revenue | Attributed | Campaigns | |
Campaign SMS OTP Revenue | Attributed | Campaigns | SMS |
Flow OTP Revenue | Attributed | Flows | All |
Flow Email OTP Revenue | Attributed | Flows | |
Flow SMS OTP Revenue | Attributed | Flows | SMS |
Counts
Whole-account scope only — no channel or source slices exist for counts.
Metric | Total field key | Attributed field key |
|---|---|---|
New subscription charges | subscription_new_subscription_charges | subscription_new_sub_charges |
Recurring subscription charges | subscription_recurring_subscription_charges | subscription_sub_charges |
OTP-in-subscription order lines | subscription_onetime_product_lines | subscription_otp_in_sub_lines |
Other OTP orders | subscription_other_onetime_orders | subscription_other_otp_orders |
Derived field
subscription_attr_revenue_wo_recurring — total attributed revenue minus attributed recurring subscription revenue.