Skip to content

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}/contactRecord

Headers ​

HeaderRequiredDescription
x-nextinteract-authtokenYesAuth 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 ​

ExceptionDescription
WSInvalidAuthTokenExceptionSee Error Definitions
WSCacheServiceExceptionSee Error Definitions
WSInvalidParameterExceptionSee Error Definitions
WSSmartDirectoryNotFoundExceptionSee Error Definitions
WSSmartDirectoryServiceExceptioSee Error Definitions
WSSmartDirectoryNotEnabledForCompanyExceptionSee Error Definitions
WSUserContactNotFoundExceptionSee Error Definitions
WSUserNotInSmartDirectoryExceptionSee Error Definitions