Get Project Profitability
get_project_profitabilityPer-project profitability, on the same margin definition as the app's profitability report: revenue billed to the project in the company currency against the cost of the time logged to it. Returns margin and margin percentage per project, sorted by margin descending. Past 100 projects it returns the 50 highest and 50 lowest margins (projectsShown, projectsTotal); companyTotals always cover every project, and projectId reads any one. Lifetime by default; give from and to for a period (invoices by issue date, time by work date). Answers questions like "which projects are profitable?", "which projects are losing money?", "what were our margins last quarter?", or "what is project profit and loss?".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Last day of the period, YYYY-MM-DD, inclusive. | |
| from | No | First day of the period, YYYY-MM-DD. | |
| projectId | No | Optional: filter to a single project by ID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | The window read, when one was given | |
| projects | No | ||
| companyTotals | No | ||
| projectsShown | No | Rows returned, when the list was cut to the highest and lowest margins | |
| projectsTotal | No | Projects the totals cover, when the list was cut |