Appearance
upsertContacts ​
Inserts OR updates contacts from an external CRM system.
Request ​
http
POST /rest/company/contact/upsertHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-authtoken | Yes | Auth token returned from loginUser |
Parameters ​
An array of ContactJSON objects i.e.
json
[
{
"contactId": null,
"countryCode": "AU",
"otherCountryCode": null,
"externalId": "CRMID-123",
"contactType": null,
"title": null,
"firstname": "TestContact",
"lastname": "McMullen",
"mobile": null,
"phone": null,
"otherPhone": null,
"department": null,
"contactProfession": "Doctor",
"contactSpecialty": "Oncologist",
"contactCategory": "Sat Nov 15 13:34:00 EST 2014",
"email1": "aaron@interact.technology",
"email2": null,
"company": null,
"workAddress1": "100 Test Street",
"workAddress2": "North Sydney",
"workAddress3": null,
"city": "Sydney",
"state": null,
"postCode": "2061",
"ownedBy": null,
"notes": null,
"facebookId": null,
"dateOfBirth": null,
"webPage": null,
"otherAddress1": null,
"otherAddress2": null,
"otherAddress3": null,
"otherCity": null,
"otherState": null,
"otherPostcode": null,
"faxNumber": null,
"twitterId": null,
"contactCreated": null,
"contactCreatedBy": null,
"contactModified": 1416018840030,
"contactModifiedBy": null
},
{
"contactId": null,
"countryCode": "AU",
"otherCountryCode": null,
"externalId": "CRMID-456",
"contactType": null,
"title": null,
"firstname": "LeoTestContact",
"lastname": "Chen",
"mobile": null,
"phone": null,
"otherPhone": null,
"department": null,
"contactProfession": "Doctor",
"contactSpecialty": "Cardiologist",
"contactCategory": "Sat Nov 15 13:34:00 EST 2014",
"email1": "leo@interact.technology",
"email2": null,
"company": null,
"workAddress1": "100 Test Street",
"workAddress2": "North Sydney",
"workAddress3": null,
"city": "Sydney",
"state": null,
"postCode": "2061",
"ownedBy": null,
"notes": null,
"facebookId": null,
"dateOfBirth": null,
"webPage": null,
"otherAddress1": null,
"otherAddress2": null,
"otherAddress3": null,
"otherCity": null,
"otherState": null,
"otherPostcode": null,
"faxNumber": null,
"twitterId": null,
"contactCreated": null,
"contactCreatedBy": null,
"contactModified": 1416018840030,
"contactModifiedBy": null
}
]Response ​
200 OK ​
Returns the number of records successfully saved to SAM.
json
[
{
"recordId": "CRMID-123",
"rowsAffected": 1
},
{
"recordId": "CRMID-456",
"rowsAffected": 1
}
]Errors ​
| Exception | Description |
|---|---|
WSUserServiceUnavailableException | See Error Definitions |
WSCompanyServiceUnavailableException | See Error Definitions |
WSInvalidAuthTokenException | See Error Definitions |
WSInvalidParameterException | See Error Definitions |
WSInsufficientPermissionsException | See Error Definitions |
WSCompanyServiceException | See Error Definitions |
WSCacheServiceException | See Error Definitions |