Cookies Settings

Loading

dnb-logo
Direct 2.0
Collapse

Update User Preference

IMPORTANT: Version 2.2 is the latest available service for Direct 2.0 customers.

This function allows a customer to modify or cancel a user preference.

Update History

No modifications have been made to this data layer since the initial release.

What to do First

Feature Request

IMPORTANT: Please see the new Online Services Security Enhancement Release, effective November 09, 2020.

Data Layer Entitlement

For customers in U.S. and Canadian markets, the API is provisioned for specific collections of products, reports, and/or features (collectively referred to as data layers) for production and trial usage. Entitlement is not required for testing in the sandbox environment.

  • This particular feature does not require entitlement for production and trial usage for D&B Direct 2.0 customers.

Specification

User Preferences can be removed by setting the status to "Cancelled"; however, if the item is referenced in a Notification Profile it may not be removed.

Sample Request (Update)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:user="http://services.dnb.com/UserServiceV2.0">
     <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-7" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>MyUserName</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">MyPassword</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <user:UpdatePreferenceRequest ServiceVersionNumber="2.0">
         <user:UpdatePreferenceRequestDetail>
            <user:PreferenceDetail>
               <user:PreferenceType>HTTPCallBack</user:PreferenceType>
               <user:ApplicationAreaName>Monitoring</user:ApplicationAreaName>
               <user:PreferenceName>MyCompany-HTTPCallBack</user:PreferenceName>
            </user:PreferenceDetail>
            <user:PreferenceUpdateSpecification>
               <user:PreferenceValueText>https://www.mycompany.com/httppushnewuri</user:PreferenceValueText>
               <user:DefaultPreference>true</user:DefaultPreference>
            </user:PreferenceUpdateSpecification>
         </user:UpdatePreferenceRequestDetail>
      </user:UpdatePreferenceRequest>
   </soapenv:Body>
</soapenv:Envelope>
Name Characteristics
UpdatePreferenceRequest Aggregate
UpdatePreferenceRequest@ServiceVersionNumber Attribute
UpdatePreferenceRequest. TransactionDetail Aggregate, Optional
UpdatePreferenceRequest. TransactionDetail. ApplicationTransactionID string up to 64 chars., Optional
UpdatePreferenceRequest. TransactionDetail. TransactionTimestamp DateTimestamp, Optional
UpdatePreferenceRequest. TransactionDetail. SubmittingOfficeID string up to 64 chars., Optional
END: UpdatePreferenceRequest. TransactionDetail /Aggregate
UpdatePreferenceRequest. UpdatePreferenceRequestDetail Aggregate, Required
UpdatePreferenceRequest. UpdatePreferenceRequestDetail. PreferenceDetail Aggregate, Required
UpdatePreferenceRequest. UpdatePreferenceRequestDetail. PreferenceDetail. PreferenceType PreferenceTypeEnum, Required
UpdatePreferenceRequest. UpdatePreferenceRequestDetail. PreferenceDetail. ApplicationAreaName ApplicationAreaEnum, Optional
UpdatePreferenceRequest. UpdatePreferenceRequestDetail. PreferenceDetail. PreferenceName string up to 64 chars., Optional
END: UpdatePreferenceRequest. UpdatePreferenceRequestDetail. PreferenceDetail /Aggregate
UpdatePreferenceRequest. UpdatePreferenceRequestDetail. PreferenceUpdateSpecification Aggregate, Required
UpdatePreferenceRequest. UpdatePreferenceRequestDetail. PreferenceUpdateSpecification. ApplicationAreaName ApplicationAreaEnum, Optional
UpdatePreferenceRequest. UpdatePreferenceRequestDetail. PreferenceUpdateSpecification. PreferenceName string up to 64 chars., Optional
UpdatePreferenceRequest. UpdatePreferenceRequestDetail. PreferenceUpdateSpecification. PreferenceValueText string up to 1024 chars., Optional
UpdatePreferenceRequest. UpdatePreferenceRequestDetail. PreferenceUpdateSpecification. UserCredentials Aggregate, Optional
UpdatePreferenceRequest. UpdatePreferenceRequestDetail. PreferenceUpdateSpecification. UserCredentials. UserID string up to 64 chars., Required
UpdatePreferenceRequest. UpdatePreferenceRequestDetail. PreferenceUpdateSpecification. UserCredentials. PasswordText string up to 64 chars., Required
END: UpdatePreferenceRequest. UpdatePreferenceRequestDetail. PreferenceUpdateSpecification. UserCredentials /Aggregate
UpdatePreferenceRequest. UpdatePreferenceRequestDetail. PreferenceUpdateSpecification. PreferenceStatusText PreferenceStatusTextEnum, Optional

Records the status of the monitoring profile

UpdatePreferenceRequest. UpdatePreferenceRequestDetail. PreferenceUpdateSpecification. DefaultPreference boolean, Optional
END: UpdatePreferenceRequest. UpdatePreferenceRequestDetail. PreferenceUpdateSpecification /Aggregate
END: UpdatePreferenceRequest. UpdatePreferenceRequestDetail /Aggregate
END: UpdatePreferenceRequest /Aggregate

Deleting a Preference

To remove a preference, change the status to "Cancelled" through an update request. Canceled items can be restored within 24-hours of the update, after which they are deleted by the system.

<PreferenceUpdateSpecification>
     <PreferenceStatusText>Cancelled</PreferenceStatusText>
</PreferenceUpdateSpecification>

Endpoint

Use the following endpoint with the downloadable WSDL to request this feature.

Endpoint (User)
https://direct.dnb.com/UserService/V{version}

Testing

This operation has no additional limits or restrictions in the D&B Direct sandbox (test) environment.

Feature Response

Specification

The following is a list of the possible data fields returned by this operation in the XML response. Samples are provided for testing successful and failed retrieval, and to demonstrate the basic layout of a response. The data returned in samples may not represent actual values that this feature will deliver.

Sample Response (Update)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soap-env:Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
      <user:UpdatePreferenceResponse ServiceVersionNumber="2.2" xmlns:user="http://services.dnb.com/UserServiceV2.0">
         <user:TransactionDetail>
            <user:ServiceTransactionID>Id-4ccb6404520e3b492b4b742e-1</user:ServiceTransactionID>
            <user:TransactionTimestamp>2013-08-16T10:46:33.232-04:00</user:TransactionTimestamp>
         </user:TransactionDetail>
         <user:TransactionResult>
            <user:SeverityText>Information</user:SeverityText>
            <user:ResultID>CM000</user:ResultID>
            <user:ResultText>Success</user:ResultText>
         </user:TransactionResult>
         <user:UpdatePreferenceResponseDetail>
            <user:UpdatedPreferenceCount>1</user:UpdatedPreferenceCount>
            <user:PreferenceDetail>
               <user:PreferenceType>HTTPCallBack</user:PreferenceType>
               <user:ApplicationAreaName>Monitoring</user:ApplicationAreaName>
               <user:PreferenceName>MyCompany-HTTPCallBack</user:PreferenceName>
               <user:PreferenceValueText>https://www.mycompany.com/httppushnewuri</user:PreferenceValueText>
               <user:PreferenceStatusText>Active</user:PreferenceStatusText>
               <user:DefaultPreference>true</user:DefaultPreference>
            </user:PreferenceDetail>
         </user:UpdatePreferenceResponseDetail>
      </user:UpdatePreferenceResponse>
   </soap-env:Body>
</soapenv:Envelope>
Name Characteristics
UpdatePreferenceResponse Aggregate [M]
UpdatePreferenceResponse@ServiceVersionNumber Attribute [M]
UpdatePreferenceResponse. TransactionDetail Aggregate, Required [M]
UpdatePreferenceResponse. TransactionDetail. ApplicationTransactionID string up to 64 chars., Optional [M]
UpdatePreferenceResponse. TransactionDetail. ServiceTransactionID string up to 64 chars., Required [M]
UpdatePreferenceResponse. TransactionDetail. TransactionTimestamp DateTimestamp, Required [M]
END: UpdatePreferenceResponse. TransactionDetail /Aggregate [M]
UpdatePreferenceResponse. TransactionResult Aggregate, Required [M]
UpdatePreferenceResponse. TransactionResult. SeverityText string, Required [M]
UpdatePreferenceResponse. TransactionResult. ResultID string up to 32 chars., Required [M]
UpdatePreferenceResponse. TransactionResult. ResultText string up to 512 chars., Optional [M]
UpdatePreferenceResponse. TransactionResult. ResultMessage Aggregate, Optional (Array) [M]
UpdatePreferenceResponse. TransactionResult. ResultMessage. ResultDescription string up to 512 chars., Required [M]
END: UpdatePreferenceResponse. TransactionResult. ResultMessage /Aggregate [M]
END: UpdatePreferenceResponse. TransactionResult /Aggregate [M]
UpdatePreferenceResponse. UpdatePreferenceResponseDetail Aggregate, Optional [M]
UpdatePreferenceResponse. UpdatePreferenceResponseDetail. UpdatedPreferenceCount int, Required [M]

A numeric value which records the count of preferences updated for the details provided by the customer in the request

UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail Aggregate, Optional [M]
UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. PreferenceType PreferenceTypeEnum, Required [M]
UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. ApplicationAreaName ApplicationAreaEnum, Optional [M]
UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. PreferenceName string up to 64 chars., Optional [M]
UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. PreferenceValueText string up to 256 chars., Required [M]
UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. UserCredentials Aggregate, Optional [M]
UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. UserCredentials. UserID string up to 64 chars., Required [M]
UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. UserCredentials. PasswordText string up to 64 chars., Required [M]
END: UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. UserCredentials /Aggregate [M]
UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. PreferenceStatusText PreferenceStatusTextEnum, Required [M]

Records the status of the monitoring profile

UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. DefaultPreference boolean, Required [M]
UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. FormerPreferenceDetail Aggregate, Optional [M]
UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. FormerPreferenceDetail. ApplicationAreaName ApplicationAreaEnum, Optional [M]
UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. FormerPreferenceDetail. PreferenceName string up to 64 chars., Optional [M]
UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. FormerPreferenceDetail. PreferenceValueText string up to 1024 chars., Required [M]
UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. FormerPreferenceDetail. UserCredentials Aggregate, Optional [M]
UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. FormerPreferenceDetail. UserCredentials. UserID string up to 64 chars., Required [M]
UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. FormerPreferenceDetail. UserCredentials. PasswordText string up to 64 chars., Required [M]
END: UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. FormerPreferenceDetail. UserCredentials /Aggregate [M]
UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. FormerPreferenceDetail. PreferenceStatusText PreferenceStatusTextEnum, Required [M]

Records the status of the monitoring profile

UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. FormerPreferenceDetail. DefaultPreference boolean, Required [M]
END: UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail. FormerPreferenceDetail /Aggregate [M]
END: UpdatePreferenceResponse. UpdatePreferenceResponseDetail. PreferenceDetail /Aggregate [M]
END: UpdatePreferenceResponse. UpdatePreferenceResponseDetail /Aggregate [M]
END: UpdatePreferenceResponse /Aggregate [M]

NOTE: There may be additional request and/or response elements specified in the WSDL that are not applicable for D&B Direct customers. Data elements that are not listed on this page are currently unused by this operation.

Response Codes & Error Handling

Successful service requests will return a CM000 response code in the TransactionResult ResultID field. Otherwise, one of the D&B Direct standard response codes will be returned.

This operation may return the following response codes: CM002, CM004, CM007, CM023, and SC001-SC009.

D&B Direct 2.0 API requests are provided on a metered basis; and may require entitlement prior to use in the production environment. In addition, a concurrency limit (QPS) is monitored to ensure that it is not exceeded. An error code will be returned in the event that a transaction is throttled.

While this operation is provided on a metered basis, usage is tracked; however, no billing for successful calls is recorded.