---
title: Update
slug: netsuite/74ew-update
description: Learn how to easily update a contact's email address in NetSuite using this comprehensive guide. Find out the step-by-step process and view a concise code block example to help you make the necessary changes. Access the JSON response to see the fully upda
docTags: 
createdAt: 2021-10-27T16:30:54.000Z
---

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.

:::hint{type="info"}
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.

:::CodeblockTabs
Request

```apex
//  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

```json
{
    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
          ...
          ...
          ...
    	}
      ]
    }
}
```
:::

