Appearance
applyConsentForDirectory ​
Applies a "single" consent defined for a directory for a given "connected" user. Could be a "Required" or "Optional" consent. NOTE: all Required consents must be consented to by a user before a directory can be fully accessed.
Request ​
http
POST /rest/smartdirectory/{smartDirectoryUUID}/applyConsentHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-authtoken | Yes | Auth token returned from loginUser |
Parameters ​
| Parameter | Type | Required | Description |
|---|---|---|---|
smartDirectoryUUID | String | Yes | Path parameter. UUID of the Smart Directory as setup in SAM |
id | Long | Yes | The unique id of the consent. When consent not found throws error - 400 BAD REQUEST [ errorCode:1002, errorMsg: "Invalid parameter supplied to service. No consent with id 10000"] |
consented | String | Yes | Should be Y or N value otherwise this error is returned - [ errorCode:1002, errorMsg:"Invalid parameter supplied to service. consented only accepts Y or N"] |
REQUEST BODY:
json
{
"id" : 1,
"consented" : "Y"
}Response ​
200 OK ​
json
{
"userId": 8,
"value": "Y",
"consent": {
"id": 1,
"name": "Share Details",
"desc": "Your details will be shared with others in the directory",
"consentType": {
"name": "Share personal details with others in a directory",
"desc": "Share personal details with others in a directory..."
},
"required": "Y"
}
}Errors ​
| Exception | Description |
|---|---|
WSInvalidAuthTokenException | See Error Definitions |
WSCacheServiceException | See Error Definitions |
WSInvalidParameterException | See Error Definitions |
WSSmartDirectoryNotFoundException | See Error Definitions |
WSSmartDirectoryServiceException | See Error Definitions |
WSUserNotConsentedException | See Error Definitions |
WSSmartDirectoryNotEnabledForCompanyException | See Error Definitions |
WSUserContactNotFoundException | See Error Definitions |
WSUserNotInSmartDirectoryException | See Error Definitions |