API: Delete Trip Instance

Request

Delete a specific trip instance by ID:

DELETE /trip-instances/{id}

Sample Response:


{
  "success": true,
  "message": "Trip Instance deleted successfully",
  "data": null
}
                

Notes:

  • The trip instance ID is required in the URL to specify which configuration to delete.
  • If the trip instance does not exist, the API will return a 404 error.
  • This operation will also delete all associated boarding/dropping points.
  • This is a permanent delete operation - the record will be completely removed from the database.
  • Make sure to backup any important data before deletion.

Error Responses:

404 Not Found

{
  "success": false,
  "message": "Trip Instance not found"
}
                
500 Server Error

{
  "success": false,
  "message": "Failed to delete trip instance: Database connection error"
}
                

Cascade Effects:

  • Boarding/Dropping Points - All related boarding and dropping points will be deleted
  • Active Bookings - Consider checking for active bookings before deletion
  • Historical Data - This operation may affect reporting and historical data