Skip to content
Hiro Analytics Help Center home

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_test and variations — 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: when has_ab_test is true, the subject/preview text/image at the top level of the campaign will be empty — that content only lives inside the variations list 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
subscription_new_subscription_revenue

Total

Whole account

All

Attributed New Subscription Revenue
subscription_new_sub_revenue

Attributed

Whole account

All

Email New Subscription Revenue
subscription_email_new_sub_revenue

Attributed

Whole account

Email

SMS New Subscription Revenue
subscription_sms_new_sub_revenue

Attributed

Whole account

SMS

Campaign New Subscription Revenue
subscription_campaign_new_sub_revenue

Attributed

Campaigns

All

Campaign Email New Subscription Revenue
subscription_campaign_email_new_sub_revenue

Attributed

Campaigns

Email

Campaign SMS New Subscription Revenue
subscription_campaign_sms_new_sub_revenue

Attributed

Campaigns

SMS

Flow New Subscription Revenue
subscription_flow_new_sub_revenue

Attributed

Flows

All

Flow Email New Subscription Revenue
subscription_flow_email_new_sub_revenue

Attributed

Flows

Email

Flow SMS New Subscription Revenue
subscription_flow_sms_new_sub_revenue

Attributed

Flows

SMS

Recurring Subscription Revenue

Field

Type

Source

Channel

Recurring Subscription Revenue
subscription_recurring_subscription_revenue

Total

Whole account

All

Attributed Recurring Subscription Revenue
subscription_sub_revenue

Attributed

Whole account

All

Email Recurring Subscription Revenue
subscription_email_sub_revenue

Attributed

Whole account

Email

SMS Recurring Subscription Revenue
subscription_sms_sub_revenue

Attributed

Whole account

SMS

Campaign Recurring Subscription Revenue
subscription_campaign_sub_revenue

Attributed

Campaigns

All

Campaign Email Recurring Subscription Revenue
subscription_campaign_email_sub_revenue

Attributed

Campaigns

Email

Campaign SMS Recurring Subscription Revenue
subscription_campaign_sms_sub_revenue

Attributed

Campaigns

SMS

Flow Recurring Subscription Revenue
subscription_flow_sub_revenue

Attributed

Flows

All

Flow Email Recurring Subscription Revenue
subscription_flow_email_sub_revenue

Attributed

Flows

Email

Flow SMS Recurring Subscription Revenue
subscription_flow_sms_sub_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
subscription_onetime_product_revenue

Total

Whole account

All

OTP in Subscription Orders
subscription_otp_revenue_in_sub

Attributed

Whole account

All

Email OTP in Subscription Orders
subscription_email_otp_revenue_in_sub

Attributed

Whole account

Email

SMS OTP in Subscription Orders
subscription_sms_otp_revenue_in_sub

Attributed

Whole account

SMS

Campaign OTP in Subscription Orders
subscription_campaign_otp_revenue_in_sub

Attributed

Campaigns

All

Campaign Email OTP in Subscription Orders
subscription_campaign_email_otp_revenue_in_sub

Attributed

Campaigns

Email

Campaign SMS OTP in Subscription Orders
subscription_campaign_sms_otp_revenue_in_sub

Attributed

Campaigns

SMS

Flow OTP in Subscription Orders
subscription_flow_otp_revenue_in_sub

Attributed

Flows

All

Flow Email OTP in Subscription Orders
subscription_flow_email_otp_revenue_in_sub

Attributed

Flows

Email

Flow SMS OTP in Subscription Orders
subscription_flow_sms_otp_revenue_in_sub

Attributed

Flows

SMS

Other OTP

One-time purchase revenue from orders with no subscription line items at all.

Field

Type

Source

Channel

Other OTP
subscription_other_onetime_revenue

Total

Whole account

All

Attributed Other OTP
subscription_other_otp

Attributed

Whole account

All

Email Other OTP
subscription_email_other_otp

Attributed

Whole account

Email

SMS Other OTP
subscription_sms_other_otp

Attributed

Whole account

SMS

Campaign Other OTP
subscription_campaign_other_otp

Attributed

Campaigns

All

Campaign Email Other OTP
subscription_campaign_email_other_otp

Attributed

Campaigns

Email

Campaign SMS Other OTP
subscription_campaign_sms_other_otp

Attributed

Campaigns

SMS

Flow Other OTP
subscription_flow_other_otp

Attributed

Flows

All

Flow Email Other OTP
subscription_flow_email_other_otp

Attributed

Flows

Email

Flow SMS Other OTP
subscription_flow_sms_other_otp

Attributed

Flows

SMS

OTP Revenue (rolled up)

Field

Type

Source

Channel

OTP Revenue
subscription_otp_revenue_total

Total

Whole account

All

Attributed OTP Revenue
subscription_otp_revenue

Attributed

Whole account

All

Email OTP Revenue
subscription_email_otp_revenue

Attributed

Whole account

Email

SMS OTP Revenue
subscription_sms_otp_revenue

Attributed

Whole account

SMS

Campaign OTP Revenue
subscription_campaign_otp_revenue

Attributed

Campaigns

All

Campaign Email OTP Revenue
subscription_campaign_email_otp_revenue

Attributed

Campaigns

Email

Campaign SMS OTP Revenue
subscription_campaign_sms_otp_revenue

Attributed

Campaigns

SMS

Flow OTP Revenue
subscription_flow_otp_revenue

Attributed

Flows

All

Flow Email OTP Revenue
subscription_flow_email_otp_revenue

Attributed

Flows

Email

Flow SMS OTP Revenue
subscription_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.