Obtém os produtos com categoria visível

GET /products

Retorna a lista de produtos cujas categorias têm o campo 'mostrarLoja' igual a 1.

Responses

  • 200 application/json

    Lista de produtos com categoria visível na loja

    Hide response attributes Show response attributes object
  • 400 application/json

    Solicitação inválida

    Hide response attribute Show response attribute object
  • 500 application/json

    Erro no servidor

    Hide response attribute Show response attribute object
GET /products
curl \
 --request GET 'http://localhost:8000/products'
Response examples (200)
[
  {
    "id": 42,
    "name": "string",
    "price": 42.0,
    "stock": 42,
    "imagem": "string",
    "category_name": "string",
    "created_at": "2025-05-04T09:42:00Z",
    "scientific_name": "string",
    "isKit": true,
    "description": "string",
    "size": "string"
  }
]
Response examples (400)
{
  "message": "Erro na solicitação"
}
Response examples (500)
{
  "message": "Erro no servidor"
}