setNotificationPreferences

setNotificationPreferences Setup notifications for our servers to call back to your application when a specified event happens.

setNotificationPreferences Input

setNotificationPreferences is a secure API method with the following URL and HTTP header requirements:

Submit to URL: https://api.bonanza.com/api_requests/secure_request
Required in HTTP header: X-BONANZLE-API-DEV-NAME set to your dev_id
  X-BONANZLE-API-CERT-NAME set to your cert_id

Note that all secure methods except for fetchToken and getBoothItems require you to submit a user token so that we know what user account you are acting on behalf of.  For details about setting up and submitting user tokens, see our intro to user tokens.

The name for your request should be setNotificationPreferencesRequest.

Here are the available input parameters that can be serialized into JSON:

Argument Type Occurrence Meaning
requesterCredentials Container Required Container for user credentials
requesterCredentials .bonanzleAuthToken string Required The verified user token for the user who you are acting on behalf of.
Call-specific Input Fields
applicationDeliveryPreferences Container Required Container to hold all the details about notification being setup.
applicationDeliveryPreferences .applicationEnable string Optional Enables or disables notifications and alerts. If you disable notifications, the application will not receive them, but its notification preferences are preserved. Possible values are
  • Disable: The entry is disabled.
  • Enable: The entry is enabled.
applicationDeliveryPreferences .applicationURL string optional The address of a notification delivery URL. This address applies to the DeliveryURLName within the same ApplicationDeliveryPreferences.DeliveryURLDetails container. For delivery to a server, the URL begins with http:// or https:// and must be well formed. Use a URL that is functional at the time of the call. For delivery to an email address, the URL begins with mailto:// and specifies a valid email address.
applicationDeliveryPreferences .deliveryURLDetails Container Optional  
applicationDeliveryPreferences.
deliveryURLDetails.
deliveryURL
string Optional The address of a notification delivery URL. This address applies to the DeliveryURLName within the same ApplicationDeliveryPreferences.DeliveryURLDetails container. For delivery to a server, the URL begins with http:// or https:// and must be well formed. Use a URL that is functional at the time of the call. For delivery to an email address, the URL begins with mailto:// and specifies a valid email address.
applicationDeliveryPreferences.
deliveryURLDetails.
deliveryURLName
string Optional The name of a notification delivery URL. You can list up to 25 instances of DeliveryURLName, and then subscribe these URLs to notifications by listing them in comma- separated format in the DeliveryURLName element outside of ApplicationDeliveryPreferences.
applicationDeliveryPreferences.
deliveryURLDetails.
status
string Optional Enables or disables this notifications URL. Possible values are
  • Disable: The entry is disabled.
  • Enable: The entry is enabled.
userDeliveryPreferenceArray Container Optional  
userDeliveryPreferenceArray.
notificationEnable
Container Optional Array of containers for individual events.
userDeliveryPreferenceArray.
notificationEnable.eventEnable
string Optional Whether this event is enabled or not Possible values are
  • Disable: The entry is disabled.
  • Enable: The entry is enabled.
userDeliveryPreferenceArray.
notificationEnable.eventType
EventNotificationType Optional See list of possible values in EventNotificationType
userDeliveryPreferenceArray.
notificationEnable.detailed
boolean Optional Whether or not to include detailed information

setNotificationPreferences Output

The name for the output returned from this request is setNotificationPreferencesResponse. So, after parsing the serialized response into JSON, you can access the data with something like my_json_hash['setNotificationPreferencesResponse']

Here are all the possible output parameters:

Argument Type Occurrence Meaning
Standard Output Fields
errorMessage Container Conditionally Description of an error or warning that occurred when Bonanza processed the request. Not returned if the ack value is Success.
errorMessage.error Container Conditionally,
repeatable: [0..*]
errorMessage.error.category ErrorCategory Conditionally Currently unused.
errorMessage.error.message string Conditionally A description of the error
errorMessage.error.type ErrorType Conditionally A unique descriptive name for the error.
timestamp dateTime Always This value represents the date and time when Bonanza processed the request. The time zone of this value is GMT and the format is the ISO 8601 date and time format (YYYY-MM-DDTHH:MM:SS.SSSZ). See the "dateTime" type for information about this time format and converting to and from the GMT time zone.
warnings Container Conditionally Description of a warning that occurred when Bonanza processed the request.
warnings.unrecognized_parameters Container Conditionally,
repeatable: [0..*]
An array of unrecognized parameters.
Call-specific Output Fields
notificationId integer Always Unique ID of the notification that was created, if the operation was successful.
deliveryURLsProcessed integer Always The number of delivery URLs that were successfully processed.
eventsProcessed integer Always The number of event subscriptions that were successfully processed.