Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Creating customers with REST API - adding addresses works but not adding contacts
We are trying to add new customer objects via the REST API. The basic customer data looks like this:
$asClientDataToPush['email'] = "jsmith@mailinator.com";
$asClientDataToPush['firstName'] = "Joe";
$asClientDataToPush['lastName'] = "Smith";
$asClientDataToPush['isinactive'] = false;
$asClientDataToPush['mobilePhone'] = '2125551212';
$asClientDataToPush['url'] = "https://google.com";
$asClientDataToPush['companyname'] = "ACME Inc";
$asClientDataToPush['entityId'] = $asClientDataToPush['companyname'];
$ssDefaultSubSidiary = $asClientUserDetails['default_subsidiary']; //Getting default subsidiary from account
$asClientDataToPush['subsidiary'] = array('id'=>"$ssDefaultSubSidiary");
$asClientDataToPush['addressbook']['items'][0]['addressbookaddress']= array(
'addr1'=>'Address 1',
'addr2'=>'Address S',
'addressee'=>'Test Addressee');
This works fine, but if we try to add a contact person (using a structure like we did with the address):
0