Submete as respostas do quiz

POST /quiz/submit

Envia as respostas do quiz e retorna as plantas compatíveis com base nas respostas.

application/json

Body Required

  • Respostas do quiz.

    Hide responses attribute Show responses attribute object
    • * string Additional properties

Responses

  • 200 application/json

    Respostas enviadas e plantas compatíveis retornadas com sucesso.

    Hide response attributes Show response attributes object
    • id integer

      ID da planta.

    • name string

      Nome da planta.

    • image string

      URL da imagem da planta.

  • 400 application/json

    Erro na validação das respostas.

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

    Erro ao consultar a API externa.

    Hide response attribute Show response attribute object
POST /quiz/submit
curl \
 --request POST 'http://localhost:8000/quiz/submit' \
 --header "Content-Type: application/json" \
 --data '{"responses":{"additionalProperty1":"string","additionalProperty2":"string"}}'
Request examples
{
  "responses": {
    "additionalProperty1": "string",
    "additionalProperty2": "string"
  }
}
Response examples (200)
[
  {
    "id": 42,
    "name": "string",
    "image": "string"
  }
]
Response examples (400)
{
  "message": "Erro ao submeter as respostas."
}
Response examples (500)
{
  "error": "Não foi possível obter as plantas."
}