Hi,
Basically you can use
BAPI_BUPA_CREATE_FROM_DATA this fm allow you to create any kind of BP
You might also need to use BAPI_BUPR_CONTP_CREATE in order to create the relationship between the contact and the corresponding BP.
Dont forget to use also the BAPI_TRANSACTION_COMMIT after the other fm.
Regards