Evolução das métricas de lucratividade
Retorna uma série mensal com CAC, LTV, CPV, LTV/CAC, receita, pedidos, investimento, clientes novos e o bloco de CMV real de cada mês. O período é expandido para meses inteiros.
Use para acompanhar tendências. O ltv de cada mês é o dos clientes adquiridos naquele mês e é multiplicado pela margem de contribuição (marginPercent e marginConfigured vêm no nível da resposta). CAC e CPV não dependem da margem.
ClientIdAuthClientSecretAuthx-client-id<token>Client ID
x-client-secret<token>Client secret
organizationId*stringIdentificador da organização (obrigatório)
startDate?stringPrimeiro dia do período, inclusivo (YYYY-MM-DD). Só é aplicado junto com endDate; sem os dois, a API considera todo o histórico.
dateendDate?stringÚltimo dia do período, inclusivo (YYYY-MM-DD). Só é aplicado junto com startDate; sem os dois, a API considera todo o histórico.
dategtmMotionId?stringGTM motion of the organization (UUID), as listed by GET /v1/gtm-motions. Optional: without it, or with the default GTM motion, the response is the organization data, exactly as before. Any other GTM motion of the organization is answered with that motion's own rows, read from the *_by_gtm_motion twins of the models behind the route (obt_profitability_daily/monthly/cohorts/product_cohorts/cohorts_by_dimension, obt_acquisition_customers, obt_acquisition_product_cohorts, fct_transactions and fct_media_daily), and the monetary figures are priced with the motion's own contribution margin (V4MOS-2707). A motion with no store linked has no orders or customers: the route answers with zeros or empty lists, never an error. Not a UUID: 400. Not a live GTM motion of the organization: 403 GTM_MOTION_NOT_IN_ORGANIZATION.
uuidDados de evolução de métricas obtidos com sucesso
application/json- response
data*array<>Série temporal mensal de métricas de rentabilidade
marginPercent*numberPercentual de margem de contribuição aplicado. 100 quando nenhuma margem está configurada
marginConfigured*booleanIndica se uma margem de contribuição personalizada foi configurada para esta organização
marginCompleteness?MarginCompletenessCompletude da margem configurada item a item (gateway, imposto, frete e CMV): complete = todos os itens resolvidos; partial = algum item pendente, então a margem é parcial; none = não há composição por item (margem nunca configurada ou configurada como percentual único; diferencie pelos valores de marginConfigured).
"complete""partial""none"marginItemStatus?|Status por item da composição da margem (synced = vindo dos pedidos, configured = informado pelo usuário, pending = não configurado ou com dados ausentes). null quando a organização não tem composição.
curl -X GET "https://example.com/v1/profitability/metrics-evolution?organizationId=c0ad4763-173e-4a05-9cff-5208c8ea5f6a&startDate=2025-01-01&endDate=2025-12-31>mMotionId=019a5b2e-7c4d-7abc-8def-0123456789ab"{ "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}