Profit and loss
get_pnlThe headline P&L for the current period, each with previous: netRevenue (without VAT, after returns), cogs, grossProfit, grossMarginPct, adSpend and contribution (gross profit − ad spend: the contribution margin), plus cogsCoverage (share of revenue whose cost is known, 0..1) and marginBasis (measured = real costs; blended or entered = partly or wholly the margin the brand entered). targets compares the period with the brand's targets: contribution margin % and ROAS, each with actual, target, variance (actual − target) and meetsTarget; targetsSource says where the targets came from (operator = the brand set them, catalog or benchmark = Nuira's default for its vertical — say so). Use for profit, margin, P&L, 'are we on target'. For the step-by-step waterfall use get_contribution_breakdown. Optional from and to (inclusive YYYY-MM-DD, both or neither, never after today) read another span instead of the default period. A named month, a week or two dates the operator gave MUST be sent here: without them this reads the last 30 days, which is not that month.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Last day of the span, inclusive, as YYYY-MM-DD; not after today. Send together with `from`, or omit both to read the default 30-day period. | |
| from | No | First day of the span, inclusive, as YYYY-MM-DD. Send together with `to`, or omit both to read the default 30-day period. |