API: Delete Fare

Request

Soft delete a specific fare by ID:

DELETE /fares/{id}

Sample Response:


{
  "status": "success",
  "message": "Fare deleted successfully",
  "data": null
}
                

Notes:

  • The fare ID is required in the URL to specify which fare to delete.
  • If the fare does not exist or has already been deleted, the API will return a 404 error.
  • This is a soft delete operation - the fare record remains in the database but is marked as deleted.
  • After deletion, the fare will not appear in listing or single fare queries.
  • The deleted_at timestamp is set to mark the fare as deleted.

Error Responses:


{
  "status": "error",
  "message": "Fare not found"
}