Reservas - POST
Este endpoint permite criar uma nova reserva na plataforma Joviplanet.
Endpoint
POST /api/reservas
Exemplo de Corpo da Requisição
{
"hostRESERVA": 10,
"usuarioRESERVA": 22,
"datapublicaRESERVA": "2025-05-01",
"deRESERVA": "2025-05-10",
"ateRESERVA": "2025-05-15",
"imovelRESERVA": 101,
"statusRESERVA": 1,
"statuspagamentoRESERVA": 2,
"slugRESERVA": 3,
"ativoRESERVA": 1
}
Exemplo de Requisição (cURL)
curl -X POST "https://api.joviplanet.com/api/reservas" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <seu-token-jwt>" \
-d '{
"hostRESERVA": 10,
"usuarioRESERVA": 22,
"datapublicaRESERVA": "2025-05-01",
"deRESERVA": "2025-05-10",
"ateRESERVA": "2025-05-15",
"imovelRESERVA": 101,
"statusRESERVA": 1,
"statuspagamentoRESERVA": 2,
"slugRESERVA": 3,
"ativoRESERVA": 1
}'
Resposta Esperada (201)
{
"hostRESERVA": 10,
"usuarioRESERVA": 22,
"datapublicaRESERVA": "2025-05-01",
"deRESERVA": "2025-05-10",
"ateRESERVA": "2025-05-15",
"imovelRESERVA": 101,
"statusRESERVA": 1,
"statuspagamentoRESERVA": 2,
"slugRESERVA": 3,
"ativoRESERVA": 1
}
Resposta de Erro (400)
- Erro na criação da reserva
Observação: O header Authorization deve conter seu token JWT válido, obtido via autenticação.