Hello,
It is not possible to hide a field from Rest API when matching the conditional logic of the field. The conditional logic helps you to show/hide the field on the page with JS code, actually is visible/invisible and the field element are still there.