Appearance
findContactsForUser ​
Returns a list of Contacts for the authenticated user OR all contacts for that Company
Request ​
http
GET /rest/user/contactsHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-authtoken | Yes | Auth token returned from loginUser |
Parameters ​
all=true - (OPTIONAL) will return ALL contacts for that Company. If false or not supplied will only return Contacts assigned to that User.
Response ​
200 OK ​
Returns an array of Contact JSONs:
json
[ { "city" : "Deakin",
"company" : "John James Medical Centre",
"contactProfession" : "Doctor",
"contactSpecialty" : "Medical Oncology",
"contactCategory" : "Category3",
"contactId" : 2,
"contactType" : "Type",
"countryCode" : "AU",
"dateOfBirth" : "01-JUL-74",
"department" : "Sales Dept",
"email1" : "davidleong@unittest.com.au",
"email2" : "davidleong2@unittest.com.au",
"externalId" : "2",
"facebookId" : "FacebookId",
"faxNumber" : "02FAX",
"firstname" : "David",
"lastname" : "Leong",
"mobile" : "04Mobile",
"notes" : "Some Notes",
"otherAddress1" : "1 Other Address",
"otherAddress2" : "2 Other Address",
"otherAddress3" : "3 Other Address",
"otherCity" : "Other City",
"otherCountryCode" : null,
"otherPhone" : "02OtherPhone",
"otherPostcode" : "2000",
"otherState" : "NSW",
"ownedBy" : "Owner",
"phone" : "02 62824831",
"postCode" : "2600",
"state" : "ACT",
"title" : "Dr",
"twitterId" : "TwitterId",
"sampleOrderEmail": "samples@aaron.com",
"webPage" : "http://webpage",
"workAddress1" : "Suite 4\t175 Strickland Crescent",
"workAddress2" : null,
"workAddress3" : null
},
{ "city" : "Auchenflower",
"company" : "Wesley Medical Centre",
"contactProfession" : "Doctor",
"contactSpecialty" : "Medical Oncology",
"contactCategory" : "Category3",
"contactId" : 4,
"contactType" : "Type",
"countryCode" : "AU",
"dateOfBirth" : "01-JUL-74",
"department" : "Medical Oncology",
"email1" : "ghruby@unittest.com.au",
"email2" : null,
"externalId" : "4",
"facebookId" : "FacebookId",
"faxNumber" : "02FAX",
"firstname" : "Geoffrey",
"lastname" : "Beadle",
"mobile" : "04Mobile",
"notes" : "Some Notes",
"otherAddress1" : "1 Other Address",
"otherAddress2" : "2 Other Address",
"otherAddress3" : "3 Other Address",
"otherCity" : "Other City",
"otherCountryCode" : null,
"otherPhone" : "02OtherPhone",
"otherPostcode" : "2000",
"otherState" : "NSW",
"ownedBy" : "Owner",
"phone" : "07 38704255",
"postCode" : "4066",
"state" : "QLD",
"title" : "Dr",
"twitterId" : "TwitterId",
"sampleOrderEmail": "samples@aaron.com",
"webPage" : "http://webpage",
"workAddress1" : "40 Chaseley St",
"workAddress2" : null,
"workAddress3" : null
},
{ "city" : "Camperdown",
"company" : "Royal Prince Alfred Hospital",
"contactProfession" : "Doctor",
"contactSpecialty" : "Radiation Oncology",
"contactCategory" : "Category3",
"contactId" : 3,
"contactType" : "Type",
"countryCode" : "AU",
"dateOfBirth" : "01-JUL-74",
"department" : "Radiation Oncology",
"email1" : "ghruby@unittest.com.au",
"email2" : null,
"externalId" : "3",
"facebookId" : "FacebookId",
"faxNumber" : "02FAX",
"firstname" : "George",
"lastname" : "Hruby",
"mobile" : "04Mobile",
"notes" : "Some Notes",
"otherAddress1" : "1 Other Address",
"otherAddress2" : "2 Other Address",
"otherAddress3" : "3 Other Address",
"otherCity" : "Other City",
"otherCountryCode" : null,
"otherPhone" : "02OtherPhone",
"otherPostcode" : "2000",
"otherState" : "NSW",
"ownedBy" : "Owner",
"phone" : "02 9515 7113",
"postCode" : "2050",
"state" : "NSW",
"title" : "Dr",
"twitterId" : "TwitterId",
"sampleOrderEmail": "samples@aaron.com",
"webPage" : "http://webpage",
"workAddress1" : "Missenden Rd",
"workAddress2" : null,
"workAddress3" : null
},
{ "city" : "Sydney",
"company" : "Company A",
"contactProfession" : "Nurse",
"contactSpecialty" : "Radiology",
"contactCategory" : "Category3",
"contactId" : 1,
"contactType" : "Type",
"countryCode" : "AU",
"dateOfBirth" : "01-JUL-74",
"department" : "Sales Dept",
"email1" : "contact1@email.com",
"email2" : "contact2@email.com",
"externalId" : null,
"facebookId" : "FacebookId",
"faxNumber" : "02FAX",
"firstname" : "Rowan",
"lastname" : "Atkinson",
"mobile" : "04Mobile",
"notes" : "Some Notes",
"otherAddress1" : "1 Other Address",
"otherAddress2" : "2 Other Address",
"otherAddress3" : "3 Other Address",
"otherCity" : "Other City",
"otherCountryCode" : null,
"otherPhone" : "02OtherPhone",
"otherPostcode" : "2000",
"otherState" : "NSW",
"ownedBy" : "Owner",
"phone" : "02Phone",
"postCode" : "2000",
"state" : "NSW",
"title" : "Mr",
"twitterId" : "TwitterId",
"sampleOrderEmail": "samples@aaron.com",
"webPage" : "http://webpage",
"workAddress1" : "1 Work Address",
"workAddress2" : "2 Work Address",
"workAddress3" : "3 Work Address"
}
]Errors ​
| Exception | Description |
|---|---|
WSUserServiceUnavailableException | See Error Definitions |
WSInvalidParameterException | See Error Definitions |
WSUserNotFoundException | See Error Definitions |
WSUserServiceException | See Error Definitions |
WSCompanyServiceException | See Error Definitions |
WSCacheServiceException | See Error Definitions |