# Income Reports

## Sum

Get sum of all sales

<mark style="color:green;">`GET`</mark> `https://api.pesatime.com/v1/reports/sum`

#### Request Body

<table><thead><tr><th width="143.75">Name</th><th width="115.421875">Type</th><th width="111.5234375">Required</th><th>Description</th></tr></thead><tbody><tr><td>date_from</td><td>Date</td><td><mark style="color:red;">yes</mark></td><td>Date from in format - YYYY-MM-DD</td></tr><tr><td>date_to</td><td>Date</td><td><mark style="color:red;">yes</mark></td><td>Date to in format - YYYY-MM-DD</td></tr><tr><td>groupBy</td><td>Object</td><td>no</td><td><p>Follows mongodb grouping standards. See below instructions for grouping.<br>properties allowed for grouping - </p><pre class="language-json"><code class="lang-json">date -> $date
-----
Example
------
{
    "date": {
        "$dateToString": {
            "format": "%2025-%01-%01",
            "date": "$date"
        }
    }
}
</code></pre></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.pesatime.com/reports/income-reports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
