Profitability

Get Profitability Metrics Evolution

GET
/v1/profitability/metrics-evolution

Returns a monthly series with CAC, LTV, CPV, LTV/CAC, revenue, orders, spend, new customers and the real COGS block for each month. The period is expanded to whole months.

Use it to follow trends. Each month's ltv is that of the customers acquired in that month and is multiplied by the contribution margin (marginPercent and marginConfigured are returned at the response level). CAC and CPV do not depend on the margin.

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

Metrics evolution data retrieved successfully

application/json
  1. response
data*array<>

Monthly profitability metrics time series

marginPercent*number

Contribution margin percentage applied. 100 when no margin is configured

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.

curl -X GET "https://example.com/v1/profitability/metrics-evolution?organizationId=c0ad4763-173e-4a05-9cff-5208c8ea5f6a&startDate=2025-01-01&endDate=2025-12-31"
{  "data": [    {      "month": "2025-10-01",      "cac": 125.5,      "ltv": 680,      "cpv": 68.18,      "ltvCacRatio": 5.42,      "totalRevenue": 480000,      "totalOrders": 1100,      "totalInvestment": 75000,      "newCustomers": 598    }  ],  "marginPercent": 35,  "marginConfigured": true,  "marginCompleteness": "none",  "marginItemStatus": null}