Skip to content

revenue report, broken down by month in ascending date order #5

Description

@marlitas

We would like a full report of all revenue, sorted by week (the database can do this for you!). The dates you get back from PostgreSQL will represent the first day of the week

The URI should follow this pattern: GET /api/v1/revenue/weekly

Example JSON response for GET /api/v1/revenue/weekly

{
"data": [
{
"id": null,
"type": "weekly_revenue",
"attributes": {
"week": "2012-03-05",
"revenue": 14981117.170000013
}
},
{
"id": null,
"type": "weekly_revenue",
"attributes": {
"week": "2012-03-12",
"revenue": 18778641.380000062
}
},
{
"id": null,
"type": "weekly_revenue",
"attributes": {
"week": "2012-03-19",
"revenue": 19106531.87999994
}
},
{
"id": null,
"type": "weekly_revenue",
"attributes": {
"week": "2012-03-26",
"revenue": 4627284.439999996
}
}
]
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions