Skip to content

find a quantity of merchants sorted by descending revenue #13

@abreaux26

Description

@abreaux26
  • This endpoint should return a variable number of merchants ranked by total revenue.
  • The URI should follow this pattern: GET /api/v1/merchants/revenue?quantity=x
  • where x is the number of merchants to be returned. The quantity parameter is required, and should return an error if it is missing or if it is not an integer greater than 0.
  • Example JSON response for GET /api/v1/merchants/most_revenue?quantity=2
{
  "data": [
    {
      "id": "1",
      "type": "merchant_name_revenue",
      "attributes": {
        "name": "Turing School",
        "revenue": 512.256128
      }
    },
    {
      "id": "4",
      "type": "merchant_name_revenue",
      "attributes": {
        "name": "Ring World",
        "revenue": 245.130001
      }
    }
  ]
}

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