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.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
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