Skip to main content
DELETE
Delete Horse

Authentication

Required - JWT Bearer token

Authorization

  • 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

This operation is permanent and cannot be undone. All associated vet records will also be deleted.
  • 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