Skip to main content
Published: September 27 2006, 11:02:00 AMUpdated: November 28 2020, 2:49:26 PM

Why are my notification events getting disabled even though I the SetNotificationPreferences call returns a success when I enable them?

Why are my notification events getting disabled even though I the SetNotificationPreferences call returns a success when I enable them?

Summary

 In the request, if you use an incorrect tag instead of EventEnable, it will not get recognized and will set the default value of Disable for each of the EventTypes that you send in the SetNotificationPreferences call.



Detailed Description

After you make a call to SetNotificationPreferences, it is a good idea to make a call to GetNotificationPreferences to ensure that the events are enabled the way you expect them.  You can also make use of the tag WarningLevel in SetNotificationPreferences and set it to High so you can find out all the unrecognized elements in the response and make the necessary corrections.

Here is a sample SetNotificationPreferences with a wrong tag to enable events:
<?xml version="1.0" encoding="utf-8"?>
<
SetNotificationPreferencesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <
Version>479</Version>
  <
WarningLevel>High</WarningLevel>
  <
RequesterCredentials>
    <
eBayAuthToken>*****</eBayAuthToken>
  </
RequesterCredentials>
  <
UserDeliveryPreferenceArray>
    <
NotificationEnable>
      <
EventType>EndOfAuction</EventType>
      <
Enable>Enable</Enable>
    </
NotificationEnable>
  </
UserDeliveryPreferenceArray>
</
SetNotificationPreferencesRequest>

This is the error message you will see in the response since the WarningLevel is set to High:

  <ShortMessage>Unrecognised element <UserDeliveryPreferenceArray.NotificationEnable.Enable> in SOAP request.</ShortMessage> 
  </LongMessage> The element <UserDeliveryPreferenceArray.NotificationEnable.Enable> was found in the input SOAP request. This is not a declared element in the schema and will be ignored.</LongMessage>

This tells you that tag Enable is incorrect. The correct tag name is EventEnable.

When you make a call to GetNotificationPreferences:
<?xml version="1.0" encoding="utf-8"?>
<
GetNotificationPreferencesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <
Version>479</Version>
  <
PreferenceLevel>User</PreferenceLevel>
  <
RequesterCredentials>
    <
eBayAuthToken>*****</eBayAuthToken>
  </
RequesterCredentials>
</
GetNotificationPreferencesRequest>

This is what you will see in the response:
<?xml version="1.0" encoding="utf-8"?>
<
GetNotificationPreferencesResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <
Timestamp>2006-09-27T17:56:56.033Z</Timestamp>
  <
Ack>Success</Ack>
  <
Version>479</Version>
  <
Build>e479_core_Bundled_3587531_R1</Build>
  <
UserDeliveryPreferenceArray>
    <
NotificationEnable>
      <
EventType>EndOfAuction</EventType>
      <
EventEnable>Disable</EventEnable>
    </
NotificationEnable>
  </
UserDeliveryPreferenceArray>
</
GetNotificationPreferencesResponse>

If the SetNotificationPreferences call is made with the correct tag, the event will be enabled and you will see the EventEnable tag returned as Enable in the GetNotificationPreferences rseponse.


Version Info

The code example above was based on the versions specified below:

API Schema Version 479



Additional Resources




How well did this answer your question?
Answers others found helpful