Microservice generating reports on the CRM data
Add the following snippet to your docker-compose.yml
to include the reporting service in your project.
reporting:
image: rollvolet/reporting-service
Generate a report listing total revenue per month for a given timeframe
The request body contains the range (in years) to generate the report for. By default the report will be generated for the last 5 years.
{
"data": {
"type": "revenue-reports",
"attributes": {
"from-year": 2019,
"until-year": 2022
}
}
}
201 Created
if the report has been generated succesfully. The response body contains a list of monthly sales entries.
{
"data": [
{
"id": "1/2019",
"type": "monthly-sales-entries",
"attributes": {
"month": 1,
"year": 2019,
"amount": 2342.57
}
},
...
]
}