Appearance
getDirectoryContactForUser ​
Returns a User's own Contact record within a given Company's Directory so they can 1.) view it; and 2.) edit it.
Request ​
http
GET /rest/smartdirectory/{smartDirectoryUUID}/contactRecordHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-authtoken | Yes | Auth token returned from loginUser |
Parameters ​
smartDirectoryUUID - path parameter. UUID of the Smart Directory as set up in SAM.
Response ​
200 OK ​
json
{
"contactId": 5,
"fields": [
{
"id": 35,
"name": "contactEmail1",
"value": "aaron.mcmullen@hypermedia.com.au",
"hide": "N",
"type": "text",
"order" : 1,
"isAddressField" : "N"
},
{
"id": 36,
"name": "contactFirstname",
"value": "Joe",
"hide": "N",
"type": "text",
"order" : 2,
"isAddressField" : "N"
},
{
"id": 33,
"name": "contactLastname",
"value": "Bloggs",
"hide": "N",
"type": "text",
"order" : 3,
"isAddressField" : "N"
},
{
"id": 37,
"name": "gender",
"value": null,
"hide": "N",
"type": "text",
"order" : 4,
"isAddressField" : "N"
}
],
"addresses": [
{
"uuid": null,
"type": "Work",
"typeCode": "W",
"name": "Address 1 Name",
"street": "Address 1 Street",
"city": "Address 1 City",
"suburb": null,
"stateCode": "AU-NSW",
"state": "New South Wales",
"postcode": "2000",
"countryCode": "AU",
"country": "AUSTRALIA",
"email": null,
"phone": "1234567",
"fax": "1234567",
"mobile": "1234567",
"department": "Address 1 Department",
"division": null,
"jobTitle": "Address 1 Job Title"
}
]
}Errors ​
| Exception | Description |
|---|---|
WSInvalidAuthTokenException | See Error Definitions |
WSCacheServiceException | See Error Definitions |
WSInvalidParameterException | See Error Definitions |
WSSmartDirectoryNotFoundException | See Error Definitions |
WSSmartDirectoryServiceExceptio | See Error Definitions |
WSSmartDirectoryNotEnabledForCompanyException | See Error Definitions |
WSUserContactNotFoundException | See Error Definitions |
WSUserNotInSmartDirectoryException | See Error Definitions |