Skip to content

total revenue generated in the whole system over a start/end date range #6

Description

@marlitas

This endpoint should return the total revenue across all merchants between the given dates, inclusive of the start and end date.

The URI should follow this pattern: GET /api/v1/revenue?start_date=<start_date>&end_date=<end_date>

Assume your users will only send dates in the format YYYY-MM-DD. Revenue must be counted for any invoices on the end_date as well.

An error should be returned if either/both the start date or end date are not provided.

Example JSON response for GET /api/v1/revenue?start=2012-03-09&end=2012-03-24

{
"data": {
"id": null,
"attributes": {
"revenue" : 43201227.8000003
}
}
}

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