Add Custom Shipping Profile to Custom Product

Hi Folks,

Please i will be so thankful to your help,

we are creating a custom product using the API Code, but we are not able to affect the custom shipping profile, it automatically get the General shipping,

Please any insights ?

thank you,