Profit margin by product
margin_reportRevenue, cost and margin for the products sold in a period. Needs cost prices stored in the shop (the Cost price field on each product). Products without a cost are left out and counted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | How many rows to return (max 100). | |
| store | No | Store address or id. Leave empty if you have only one store. | |
| period | No | today, yesterday, this_week, last_week, this_month, last_month, last_7_days, last_30_days, last_90_days, this_year, last_year — or YYYY-MM-DD..YYYY-MM-DD. Uses the store's own timezone. | last_30_days |