Creating services and service providers in appointments+

I want to create 'service providers' using php when a user registers on my site. Then I want to create a service when they create a post.

Any pointers for the php required to create a service provider and service?

Thanks,