Delete Horse
Horses
Delete Horse
Delete a horse listing and all associated vet records (owner or admin)
DELETE
Delete Horse
Authentication
Required - JWT Bearer tokenAuthorization
- Sellers can only delete their own listings
- Admins can delete any listing
Path Parameters
string
required
Horse unique identifier (MongoDB ObjectId)
Behavior
- Permanently deletes the horse listing
- Automatically deletes all associated vet records
- Cannot be undone
Response
boolean
Indicates if the request was successful
string
Confirmation message
Examples
Error Responses
400 - Invalid Horse ID
401 - Unauthorized
404 - Not Found or Unauthorized
Returned when:- Horse ID doesn’t exist
- User is not the owner and not an admin
500 - Server Error
Notes
- Sellers can only delete horses they own
- Admins can delete any horse listing
- Associated vet records are automatically removed
- Consider setting
status: "paused"instead of deleting if you want to temporarily hide a listing

