You can get quick answer of your question by entering here
Can I cancel the primary passenger in Bus API?
If partial cancellation is not allowed from operator's end, you are not authorized to cancel the seat for a particular passenger. But user can cancel the primary passenger to cancel entire booking.
But if the partial cancellation is allowed from operator's end then if the primary passenger is cancelled then wholeticket gets cancelled which is not recommended.
This has to be implemented from development team end that whenever primary passenger is being cancelled then they have to throw the message that the "primary passenger can not be cancelled".