Skip to main content
DELETE
/
consultas
/
{consulta_id}
curl -X DELETE https://api.vidaplus.com/consultas/1 \
  -H "Authorization: Bearer <token>"
{
  "message": "Consulta excluída com sucesso."
}

Authentication

This endpoint requires authentication. Include a valid JWT token in the Authorization header.
Authorization: Bearer <token>

Authorization

  • Superusers: Can delete any appointment
  • Professionals: Can only delete appointments where they are the assigned professional
  • Patients: Cannot delete appointments

Path Parameters

consulta_id
integer
required
The unique identifier of the appointment to deleteExample: 1

Response

message
string
A confirmation message indicating successful deletion
curl -X DELETE https://api.vidaplus.com/consultas/1 \
  -H "Authorization: Bearer <token>"
{
  "message": "Consulta excluída com sucesso."
}

Error Codes

Status CodeDescription
200Appointment deleted successfully
401Unauthorized - invalid or missing token
403Forbidden - user lacks permission to delete this appointment
404Appointment not found

Business Rules

  • Only the professional assigned to the appointment or a superuser can delete it
  • Patients cannot delete appointments (they should contact the professional instead)
  • Once deleted, the appointment is permanently removed from the system
  • Consider updating the status to Cancelada instead of deleting if you need to maintain history

Notes

This operation is irreversible. Consider using the Update Appointment endpoint to change the status to Cancelada instead if you need to maintain appointment history.

Build docs developers (and LLMs) love