Please refer to ASME Sec. VIII Div. 1, Appendix 2 or at ASME Sec. VIII Div. 2, Part 4.16 . There you can find calculation on flange leakage which B31.3 stated.

Im not a CeasarII user but as I know it also provide separate program for flange leakage analysis.

As for API pump allowable, read the code and you will found that it allows user to double the allowable for nozzle qualification.