RE: How to distinguish if the order is B2B or B2C using sales order API?
There is no such separation available in the standard app.
In my market we would typically used prices incl. vat for B2C because here it is mandatory to always show prices incl. vat to a consumer customer.
If that is not the same in your market you could consider using a dimension for this purpose.
I have also seen some differentiate those kinds of orders by using different no. series for them.
A customized field is an option to but that is a lot of more work.
I would prefer one of the two first options.