Profitability

Get Profitability Summary Cards

GET
/v1/profitability/cards

Returns the organization's consolidated profitability indicators for the period: revenue, media spend, orders, customers, CAC, CPV, LTV, ROI, payback, conversion and the indicators by campaign strategy (acquisition, brand and monetization).

  • Use it for summary KPIs and for comparison with the previous period: with startDate and endDate, the response includes previousPeriod and changes (% change). Without dates, the whole history is used and both fields are null.
  • Revenue-derived values (contribution, ltv, roi, clv, etc.) are multiplied by the contribution margin. With no margin configured, marginPercent is 100 and marginConfigured is false, so values are gross.
  • null means "cannot be calculated" and is different from 0.

Authorization

ClientIdAuthClientSecretAuth
headerx-client-id<token>

Client ID

headerx-client-secret<token>

Client secret

Query Parameters

organizationId*string

Organization identifier (required)

startDate?string

First day of the period, inclusive (YYYY-MM-DD). Applied only together with endDate; without both, the API uses the whole history.

Formatdate
endDate?string

Last day of the period, inclusive (YYYY-MM-DD). Applied only together with startDate; without both, the API uses the whole history.

Formatdate

Response Body

Profitability summary cards retrieved successfully

application/json
  1. response

Consolidated profitability indicators of the organization for the period.

revenue*number

Total gross revenue in the period

investment*number

Total paid media spend (Meta Ads and Google Ads) in the period.

orders*number

Total number of orders in the period

customers*number

Total customers (new + recurring) in the period

newCustomers*number

Customers whose first purchase happened in the period.

recurringCustomers*number

Customers who bought in the period and whose first purchase was before its start.

recurringOrders?integer

Repeat orders in the period: orders from customers who had already bought before that order (includes the second purchase of customers who entered within the period). It is the divisor of cpr (investment ÷ recurringOrders). Not the same population as recurringCustomers; do not divide one by the other.

averageTicket*number

Average order value: revenue ÷ orders. 0 when there are no orders.

contribution*number

Contribution margin amount: revenue × marginPercent / 100. With no margin configured, equals revenue.

contributionProfit*number

Contribution profit (contribution − investment)

cpv*number

Cost per sale: investment ÷ orders. Does not depend on the margin. 0 when there are no orders.

cpr*number

Cost per repeat order: investment ÷ recurringOrders, that is, how much was spent on media, on average, for each repeat order. Uses total spend, so it is always greater than or equal to cpv. Does not depend on the margin. 0 when there are no repeat orders.

cac*number

Average CAC: total media spend ÷ new customers. Includes brand and monetization spend, because those campaigns also bring customers. For CAC restricted to acquisition campaigns, see campaignCac and acquisitionCac. Does not depend on the margin. 0 when there are no new customers.

campaignCac*number

CAC counting only spend on campaigns classified as acquisition (unclassified campaigns are excluded), divided by all new customers. 0 when no campaign is classified or there are no new customers; use hasAcquisitionClassification to tell the two cases apart.

acquisitionInvestment*number

Spend on campaigns classified as acquisition. It is the numerator of campaignCac and acquisitionCac.

acquisitionNewCustomers*|

New customers whose first purchase was attributed (by UTM) to an acquisition campaign. Different from newCustomers, which counts every new customer, organic included. Without dates, uses the whole history.

acquisitionCac*|

CAC of acquisition campaigns: acquisitionInvestment ÷ acquisitionNewCustomers, with both sides restricted to those campaigns. Does not depend on the margin. null when there is no acquisition spend or those campaigns brought no attributed customer.

acquisitionLtvCacRatio*|

LTV/CAC of acquisition campaigns: acquisitionLtv ÷ acquisitionCac. Different from ltvCacRatio, which considers every customer and all spend. null when either side cannot be calculated.

acquisitionRoi*|

ROI of acquisition campaigns, as a ratio: (acquisitionContribution − acquisition spend) ÷ acquisition spend. Usually much lower than roi, whose numerator includes organic and unattributed sales. null when there is no acquisition spend or those campaigns brought no attributed customer (the revenue was not observed, so it is not 0).

acquisitionContribution*|

Margin generated by the customers brought by acquisition campaigns: revenue of those customers × marginPercent / 100. null in the same cases as acquisitionRoi.

acquisitionLtv*|

Average LTV, with margin, of the customers brought by acquisition campaigns: lifetime revenue of those customers × margin ÷ acquisitionNewCustomers. null in the same cases as acquisitionRoi.

monetizationInvestment*number

Spend on campaigns classified as monetization (selling to existing customers). It is the denominator of monetizationRoi and monetizationCpr.

unclassifiedInvestment*number

Spend on campaigns not classified as acquisition, brand or monetization. Added to acquisitionInvestment, brandInvestment and monetizationInvestment, it gives total campaign spend without double counting. That total may differ slightly from investment because of data update timing and because zero or negative spend adjustments are included here but not in investment.

brandInvestment*number

Spend on campaigns classified as brand (brand awareness).

brandImpressions*number

Total impressions of campaigns classified as brand, across Meta Ads and Google Ads. For brand CPM, compute brandInvestment ÷ brandImpressions × 1000.

brandNewCustomers*|

New customers whose first purchase was attributed (by UTM) to a brand campaign. Without dates, uses the whole history. As a count, 0 is a real value.

brandContribution*|

Margin generated by the customers brought by brand campaigns: revenue of those customers × marginPercent / 100. null when there is no brand spend or those campaigns brought no attributed customer.

brandRoi*|

ROI of brand campaigns, as a ratio: (brandContribution − brand spend) ÷ brand spend. The spend used comes from the same attribution base as brandContribution and may differ slightly from brandInvestment. null in the same cases as brandContribution.

retentionLtv*number

Part of the LTV generated by repeat purchases: average per customer of the revenue from months after the first-purchase month × marginPercent / 100. Considers customers acquired up to the end of the period (or the whole base, without dates). A second purchase in the same month as the first counts as entry, not as repurchase. 0 when there are no customers.

monetizationContribution*|

Margin of orders attributed (by the order's own UTM) to monetization campaigns: revenue of those orders × marginPercent / 100. Without dates, uses the whole history. null when order attribution is not available for the organization.

monetizationRoi*|

ROI of monetization campaigns, as a ratio: (monetizationContribution − monetizationInvestment) ÷ monetizationInvestment. null when there is no monetization spend or order attribution is not available.

monetizationRecurringCustomers*|

Distinct returning customers with at least one order in the period attributed (by the order's UTM) to a monetization campaign. A subset of recurringCustomers. 0 is a measured value; null when order attribution is not available.

monetizationCpr*|

Cost per repeat order of monetization campaigns: monetizationInvestment ÷ repeat orders attributed to those campaigns. Does not depend on the margin. null (not 0) when there is no attributed repeat order, no monetization spend, or order attribution is not available.

ltv*number

LTV of customers acquired in the period: average lifetime revenue per customer × marginPercent / 100.

ltvLifetime*number

Average LTV of the organization's whole customer base, with no period filter, × marginPercent / 100. Compare with ltv: if the period's LTV does not cover the CAC but the base's does, the issue is payback time, not CAC.

ltvCacRatio*number

How many times the LTV pays for the CAC: ltv ÷ cac. 0 when cac is 0.

roi*number

Return on media spend, as a ratio: (contribution − investment) ÷ investment (e.g. 1.19 = 119%). 0 when there is no spend.

clv*number

Customer lifetime profit (ltv − cac): net value per customer after acquisition cost. Uses the period ltv (margin-aware); CAC is margin-independent. May be negative when CAC exceeds the period LTV.

conversionRate*|

Conversion rate from the Interest stage to the Decision stage of the funnel configured in the platform, in % (0–100): Decision ÷ Interest × 100, in the same period. Does not depend on the margin. null when the organization has no Interest stage configured.

payback*number

Payback in months: time until a customer cohort's accumulated margin covers its acquisition cost, averaged and weighted by the number of customers across the cohorts that already paid back. 0 when no cohort paid back in the period.

marginPercent*number

Contribution margin percentage applied. 100 when no margin is configured (marginConfigured=false)

marginConfigured*boolean

Whether a custom contribution margin has been configured for this organization

marginCompleteness?MarginCompleteness

Completeness of the item-by-item margin (gateway, tax, shipping and COGS): complete = every item resolved; partial = some item pending, so the margin is partial; none = no item-by-item composition (margin never configured, or configured as a single percentage; tell them apart with marginConfigured).

Value in"complete""partial""none"
marginItemStatus?|

Status per item of the margin composition (synced = from the orders, configured = informed by the user, pending = not configured or missing data). null when the organization has no composition.

hasAcquisitionClassification*boolean

Whether the organization has ever classified a campaign as acquisition, in any period. Use it to tell "never classified campaigns" apart from "classified, but no data in this period".

previousPeriod*|

The same indicators calculated for the period immediately before, with the same number of days (e.g. for Mar 1–Mar 31, the previous one is Jan 29–Feb 28). Exceptions: ltv and retentionLtv hold the customer base acquired up to the start of the selected period, and margin is the configured margin (does not depend on the period). null when the request has no startDate and endDate.

changes*|

Percentage change of each indicator: (current − previous) ÷ previous × 100, compared with previousPeriod. For ltv and retentionLtv, compares the base acquired up to the end with the base acquired up to the start of the period. margin is always 0. Each field is null when the previous value is 0 or null; the whole object is null without startDate and endDate.

cogs?|

Real cost of goods sold (COGS), summed only over orders whose cost is reported by the e-commerce platform. null (not 0) when cost data is not available.

revenueWithCmv?|

Revenue of orders that have real COGS (a currency amount, not a percentage).

revenueWithoutCmv?|

Revenue of orders without real COGS (a currency amount). Added to revenueWithCmv, gives total revenue.

marginBasis?|

Where the margin came from: cmv_real (every order has real COGS), mixed (only some do), configured_percent (none do, but a margin is configured) or no_basis (neither real COGS nor a configured margin). null when cost data could not be read, which is different from no_basis.

Value in"cmv_real""mixed""configured_percent""no_basis"
blendedContribution?|

Contribution margin using real COGS where it exists and the configured margin elsewhere: (revenueWithCmv − cogs) + revenueWithoutCmv × marginPercent / 100. If the margin was configured item by item and is complete (marginCompleteness = complete), each part deducts its own costs (gateway, tax, shipping and COGS). null (never a partial sum) when part of the revenue has no margin basis. Does not change contribution, which remains revenue × marginPercent / 100.

curl -X GET "https://example.com/v1/profitability/cards?organizationId=c0ad4763-173e-4a05-9cff-5208c8ea5f6a&startDate=2025-01-01&endDate=2025-12-31"
{  "revenue": 500000,  "investment": 80000,  "orders": 1200,  "customers": 950,  "newCustomers": 620,  "recurringCustomers": 330,  "averageTicket": 416.67,  "contribution": 175000,  "contributionProfit": 95000,  "cpv": 66.67,  "cpr": 3.59,  "cac": 129.03,  "campaignCac": 118.4,  "acquisitionInvestment": 13723.78,  "monetizationInvestment": 627.91,  "unclassifiedInvestment": 1310.2,  "brandInvestment": 2450.5,  "brandImpressions": 184320,  "acquisitionContribution": 12900.4,  "acquisitionLtv": 212.6,  "brandNewCustomers": 41,  "brandContribution": 3120.75,  "brandRoi": 0.27,  "retentionLtv": 318.4,  "ltv": 700,  "ltvLifetime": 1020,  "ltvCacRatio": 5.43,  "roi": 1.19,  "clv": 570.97,  "conversionRate": 5.24,  "payback": 6.5,  "marginPercent": 35,  "marginConfigured": true,  "marginCompleteness": "none",  "marginItemStatus": null,  "hasAcquisitionClassification": true,  "previousPeriod": {    "investment": 72000,    "contribution": 161500,    "roi": 1.02,    "clv": 512.4,    "conversionRate": 5.36,    "cac": 132.5,    "cpv": 64.1,    "ltv": 980,    "payback": 7.1,    "margin": 35  },  "changes": {    "investment": 11.11,    "contribution": 8.36,    "roi": 16.67,    "clv": 11.43,    "conversionRate": -2.24,    "cac": -2.62,    "cpv": 4.01,    "ltv": 4.08,    "payback": -8.45,    "margin": 0  }}