Retorna os produtos mais populares

GET /populares

Obtém os 8 produtos mais populares, com base nas vendas totais.

Responses

  • 200 application/json

    Lista de produtos populares

    Hide response attributes Show response attributes object
    • id integer
    • name string
    • price number(float)
    • image string
    • total_sales integer
GET /populares
curl \
 --request GET 'http://localhost:8000/populares'
Response examples (200)
[
  {
    "id": 42,
    "name": "string",
    "price": 42.0,
    "image": "string",
    "total_sales": 42
  }
]