API or Integration to associate a contact-person with a contact?

API or Integration to associate a contact-person with a contact?

How in Deluge to associate a Contact-Person with a Contact?

I need to programmatically assign the Books company owner as a 'contact-persons' for each Customer.