Skip to content

find a quantity of items sorted by descending revenue #14

@abreaux26

Description

@abreaux26
  • The endpoint will return a quantity of items ranked by descending revenue.
  • The URI should follow this pattern: GET /api/v1/revenue/items?quantity=x
  • where ‘x’ is the maximum count of results to return.
    • quantity should default to 10 if not provided
    • endpoint should return an error if it is not an integer greater than 0.
  • Example JSON response for GET /api/v1/items/revenue?quantity=1
{
  "data": [
    {
      "id": 4,
      "type": "item_revenue",
      "attributes": {
        "name": "Men's Titanium Ring",
        "description": "Fine titanium ring",
        "unit_price": 299.99,
        "merchant_id": 54,
        "revenue": 19823.12985
      }
    }
  ]
}

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