Regarding to your solution post and other post, I got a bit understanding from your suggestions to create company.
The workflow is going to require 3 steps to create a contact with company(For REST API)
- Create a company by “Create Contact” function and pre-fill accoutid.
- Retrieve/save the account ID from insertion on step 1.
- Add new contact for client and save that accountid to “company”=>“id”
Couple of questions(REST API documentation doesn’t show it ):
- What if accountid is already existing on another company ? Will the data be overwritten ? Or API request will error ?
- Will you create Company module in REST API shortly? If yes, will that work around from your suggestion be still be available ?
I have tried this PHP coe and it got error “Input could not be converted to a valid request”
$newCompany = [
'company' => [
'company_name' => "Test"
, 'AccountId' => 100];
$insertCompany = $this->infusionsoft->contacts()->create($newCompany);
@Ethan_Kusters , one quick question for you, have you used similar php data structure to create new company ?