Get Daily CMV Evolution
Returns a daily series with each day's revenue, orders, average ticket and real cost of goods sold (COGS), using the same COGS fields as /cards and /metrics-evolution (cogs, revenueWithCmv, revenueWithoutCmv, marginBasis, blendedContribution).
- A day on which every order has a real cost returns
marginBasis = cmv_real. Days with partial cost coverage returnmixed, so you can flag that the value is incomplete. degraded: truewithdata: []means cost data was not available at query time, not that the period is empty.
ClientIdAuthClientSecretAuthx-client-id<token>Client ID
x-client-secret<token>Client secret
organizationId*stringOrganization identifier (required)
startDate?stringFirst day of the period, inclusive (YYYY-MM-DD). Applied only together with endDate; without both, the API uses the whole history.
dateendDate?stringLast day of the period, inclusive (YYYY-MM-DD). Applied only together with startDate; without both, the API uses the whole history.
dateDaily CMV evolution retrieved successfully
application/json- response
data*array<>Daily CMV (COGS) time series, ordered by date
granularity*"daily"Always daily. For the monthly view, use /metrics-evolution.
"daily"degraded*booleantrue when cost data was not available at query time. In that case data is empty because the query could not be answered, not because the period has no data.
marginPercent*numberContribution margin percentage applied. 100 when no margin is configured
marginConfigured*booleanWhether a custom contribution margin has been configured for this organization
marginCompleteness?MarginCompletenessCompleteness 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).
"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/cmv-evolution?organizationId=c0ad4763-173e-4a05-9cff-5208c8ea5f6a&startDate=2025-01-01&endDate=2025-12-31"{ "data": [ { "date": "2026-09-01", "revenue": 100000, "orders": 250, "averageTicket": 400, "cogs": 38000, "revenueWithCmv": 82000, "revenueWithoutCmv": 18000, "marginBasis": "mixed", "blendedContribution": 52100 } ], "granularity": "daily", "degraded": false, "marginPercent": 35, "marginConfigured": true, "marginCompleteness": "none", "marginItemStatus": null}