Difference between revisions of "API Method EventNotificationBulkCreate"

From Updox API
Jump to: navigation, search
(Code Samples)
(Prerequisites)
Line 40: Line 40:
 
    
 
    
 
{{PreReq Account Identifier}}
 
{{PreReq Account Identifier}}
 +
 +
== Messages ==
 +
=== Destination Address ===
 +
<div style="width:500px;">
 +
  {{Base url api|eventNotificationBulkCreate|eventNotificationBulkCreate}}
 +
</div>
 +
 +
=== Request JSON ===
 +
<div style="width:500px;">
 +
{{Json Request EventNotificationBulkCreate}}
 +
</div>
 +
 +
=== HTTP Response Status ===
 +
<div style="width:500px;">
 +
  200 OK
 +
</div>
 +
 +
=== Response JSON ===
 +
<div style="width:500px;">
 +
{{Json Response EventNotificationBulkCreate}}
 +
</div>

Revision as of 17:28, 11 December 2015

Contents

Description

The following describes the processes involved when sending bulk event notifications.

A bulk event notification consists of a JSON object populated with a list of:

   - payload (the content of the notification)
   - internal id (an identification id specified by the requester)
   - delivery date/time
   - delivery method

Field Validations

payload

  • Required - The content of payload cannot be empty, otherwise the notification will be considered invalid.

internalId

  • Not Required - This field is here as a way for a requester to track their notifications being created.

deliveryDateTime

  • Not Required - This will default to the current date/time if not provided, hence the notification will be scheduled to be sent right away.
    • Date/Time Format: yyyy-MM-ddTHH:mm:ss
      • Example: 2015-01-01T14:01:00

deliveryDestination

  • Required - The destination must match the format associate with the delivery method.
    • Phone Number - The phone number can contain formatting, but the maximum number of digits is 10. This cannot be used, if a method of EMAIL is specified for the delivery method.
      • Example: 333-222-4567 resolves to 3332224567
    • Email Address - This must be a valid email address. This cannot be used, if a method of SMS is specified for the delivery method.
      • Example: abc123@alphabet.com

deliveryMethod

  • Required - The method by which the notification will be delivered. The list of acceptable values include:
    • SMS - This is case insensitive and will specify that the notification is to be delivered via text messaging.

Prerequisites

1 This API call requires Vendor-level credentials. The credentials should be populated into the applicationId and applicationPassword fields of the auth block:

 {
   ...
   "auth": {
     "applicationId": "vendorId",
     "applicationPassword": "vendorPassword",
     "accountId": "",
     "userId": ""
   }
 }
 
 

2 This API call requires a Practice/Account-level identifier. The identifier should be populated into the accountId field of the auth block:

 {
   ...
   "auth": {
     "applicationId": "vendorId",
     "applicationPassword": "vendorPassword",
     "accountId": "practiceId",
     "userId": ""
   }
 }

Messages

Destination Address

 https://updoxqa.com/io/eventNotificationBulkCreate

Request JSON

{

   "notifications": [
       {
           "payload": "Your appointment is tomorrow!",
           "internalId": "ABC",
           "deliveryDateTime": "2015-01-01T01:01:01",
           "deliveryDestination": "123-456-7890",
           "deliveryMethod": "SMS"
       },        {
       {  "payload": "Welcome to our practice!",
           "internalId": "XYZ",
           "deliveryDateTime": "2015-01-01T01:01:01",
           "deliveryDestination": "123-456-7890",
           "deliveryMethod": "SMS"
       }
   ]

}

HTTP Response Status

 200 OK

Response JSON

{

   "successful": true,
   "responseMessage": "OK",
   "responseCode": 2000,
   "bulkNotificationId": 99,
   "validNotificationTotal": 2,
   "invalidNotificationTotal": 0

}