updated api for start date and end date