Using the Upsert Operation

The upsert operation enables you to either create a record, or update an existing record. You can only use the upsert operation when you use an external ID in the request URL and when you use the PUT HTTP method. For information about using external IDs, see Using External IDs.

You can use the upsert operation as a synchronization tool. When using the upsert operation, you do not need to be concerned whether the record with the given external ID already exists.

The following example shows how to use the upsert operation. If the record does not exist, it will be added. If the record already exists, it will be updated.

          PUT http://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/customer/eid:CID002
{
  "firstName": "John",
  "lastName": "Smith"
} 

        

Related Topics

General Notices