Global API
...
Requests
Contact

Update

1min
the following is an example of updating a contact where we are changing only the email address (see contact docid 3gjo07daqjxtjeayy3sl9 for all available fields) the netsuite contact id (internalid) is required to update the contact note you can only update one record at a time the response returns the complete contact information, but we have shortened the response in our example for ease of reading request // create a map to store all the data of a contact map\<string, object> nscontact = new map\<string, object>(); //pass internalid to update the contact nscontact put('internalid', '63547'); nscontact put('email', 'jamesupdate\@grandhotel com'); // initializing the requestjson data to be passed map\<string, object> requestjsonmap = new map\<string, object>(); requestjsonmap put('contacts', new list\<object>{nscontact}); string reqjson = json serialize(requestjsonmap); map\<string, object> reqobj = new map\<string, object>(); reqobj put('version', '1 0'); reqobj put('action', 'updatecontact'); reqobj put('requestjson', reqjson); // placing a request to breadwinner global api map\<string, object> resp = breadwinner ns breadwinnernetsuiteapi call(reqobj); system debug(resp); response { action = updatecontact, timestamp = 1613110502492, validrequest = true, version = 1 0, responsejson = { "status" "200", "errors" \[], "contacts" \[ { "title" "ceo", "salutation" null, "salesforceid" "a034x000004edbxaaw", "publicsubscriptionstatus" null, "phone" "3453254540", "officephone" "6546564560", "nullfieldlist" null, "mobilephone" null, "middlename" null, "lastname" "williams", "lastmodifieddate" 1613110501, "isprivate" true, "isinactive" false, "internalid" "63547", "homephone" null, "firstname" "james update", "fax" null, "externalid" null, "entityid" "james update williams", "email" "james\@grandhotel com", "defaultaddress" "james update williams\nsuite 202\n2334 park street avenue\nchicago il 60601\nunited states", "datecreated" 1613107910 } ] } }