Discussions
Company Contact creation API issue
I will start with that I do like working with the SM8 API. Its pretty well documented and allows for a lot of flexibility.
However, similar to this discussion https://developer.servicem8.com/discuss/67cf8fb7b67a670030c73437
I cannot create two or more company contacts for the one company. My Issue originally stemmed from not being able to create a company contact set as a property owner. According to the above discussion I should be able to set a secondary contact to JOB. However, this is not the case as well.
What seems to be happening is whatever the latest company created contact is will replace any previous contacts. This looks like its happening in the background since I can see the contacts being created and when I quickly refresh the page and check the company I can see the API has successfully create the contact as either Property owner or Job contact. A minute later the contact has been switched to billing and overrides the previous contact. If I do multiple at a time, I can see multiple get created (with their roles), then a minute later they all get removed except the latest primary contact which is set to billing.
When performing the same actions manually in the dashboard, everything is fine and no contacts get overridden (until pushing a new contact via the API). Is there a hidden webhook / validation that only applies to API calls, as the validation does not seem to apply to any manual actions in the Dashboard.