Skip to content

createAssetLevelUserPreferences ​

Create a new ASSET-Level user preference for an authenticated users.

Supported keys for V1 are: ALP-ABM Audio Bookmark ALP-AFV Aggregated Favourite ALP-BKM Bookmark ALP-CAT Category ALP-COM Comment ALP-EUN Email Unsubscribe ("true" mean unsubscribed) ALP-FAV Favourite ALP-FIL Filter ALP-NUN Notification Unsubscribe ("true" mean unsubscribed) ALP-SHS Search History ALP-TFV Team Favourite ALP-TOP Topic ALP-VBM Video Bookmark ALP-POP Push Notification Opt in/Opt out ALP-EOP Email Notification Opt in/Opt out

Request ​

http
POST /rest/user/preferences/asset/{assetId}

Headers ​

HeaderRequiredDescription
x-nextinteract-authtokenYesAuth token returned from loginUser

Parameters ​

ParameterTypeRequiredDescription
assetIdNumberYesPath variable. The asset id of the user preferences to retrieve.
keyString(7)YesKey for the asset-level user preference. See keys above.
valuesArray of Strings (max 100 length)YesThe values to be set for the given asset-level user preference. At least one required.

SAMPLE REQUEST:

json
{
    "key" : "ALP-BKM",
    "values" : [
        "1,2"
    ]
}

Response ​

200 OK ​

Returns the newly created user preferences with uPrefValueId that can be used for updates/deletes.

RESPONSE:

json
{
    "uPrefId": 29,
    "type": "ALP",
    "key": "ALP-FAV",
    "values": [
        {
            "uPrefValueId": 44,
            "value": "1",
            "lastModified": 1567662973000
        },
        {
            "uPrefValueId": 22,
            "value": "2",
            "lastModified": 1567662973000
        }
    ]
}

Errors ​

ExceptionDescription
WSInvalidParameterExceptionSee Error Definitions
WSInvalidAuthTokenExceptionSee Error Definitions
WSCacheServiceExceptionSee Error Definitions
WSUserPreferenceServiceExceptionSee Error Definitions
WSBrochureNotFoundExceptionSee Error Definitions
WSInsufficientPrivilegesExceptionSee Error Definitions
WSAuthorisationServiceExceptionSee Error Definitions
WSAlreadyExistsExceptionSee Error Definitions