Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Notification History > Get Email Notification Histories

Get Email Notification Histories

This REST API reference describes how to get a notification history for notification emails.

See Notification and Callouts and Create and Edit Notifications for more information.

Request

  • Production: GET https://api.zuora.com/rest/v1/notification-history/email
  • API Sandbox: GET https://apisandbox-api.zuora.com/rest/v1/notification-history/email

Request Header

The accept request header is optional. Only JSON will be returned.

Request Parameters

Request parameters and their values may be appended with a "?" following the HTTPS GET request.  Additional request parameter are separated by "&".   An example:

GET https://api.zuora.com/rest/v1/notification-history/email?startTime=2015-01-12T00:00:00&endTime=2015-01-15T00:00:00&failedOnly=false&eventCategory=1000&pageSize=1

endTime

optional

query

The end date and time of records to be returned. Defaults to now. Use format yyyy-MM-ddTHH:mm:ss.

The maximum date range (endTime - startTime) is three days.

startTime

optional

query

The initial date and time of records to be returned. Defaults to (end time - 1 day). Use format yyyy-MM-ddTHH:mm:ss.

The maximum date range (endTime - startTime) is three days.

objectId

optional

query

The Id of an object that triggered an email notification.

failedOnly

optional

query

If true, only returns failed records. When false, returns all records in the given date range. Defaults to true when not specified.

eventCategory

optional

query

Category of records to be returned by event category.

pageSize

optional

query

Number of rows to return.  Maximum is 40; default is 20.

Response

emailHistories

A container for email histories.

result

The result from the mail server of sending the email.

errorMessage

null if the content of result is "OK". A description of the error if the content of result is not "OK".

eventCategory

The event category of the email.

notification

The name of the notification.

subject

The subject of the email.

toEmail

The intended recipient of the email.

fromEmail

The sender of the email.

cc

Carbon Copy recipients of the email.

bcc

Blind carbon copy recipients of the email.

replyTo

The reply-to address as configured in the email template.

sendTime

The date and time the email was sent.

nextPage

URL for requesting the next page of the response if a next page exists. Absent if there are no more pages.

success

Contains true if successful, otherwise false.

processId

Internal process ID to assist Zuora support. Only returned if success is false.

reasons

Information on one or more reasons for the result. Only returned if success is false.

code

Eight-digit numeric error code

message

Description of the error

Examples

HTTP/JSON request:

GET https://api.zuora.com/rest/v1/notification-history/email?startTime=2015-01-12T00:00:00&endTime=2015-01-15T00:00:00&failedOnly=false&eventCategory=1000&pageSize=1

JSON response:

{
   "emailHistories": [
       {
           "result": "OK",
           "errorMessage": null,
           "eventCategory": 1210,
           "notification": "New Subscription Created",
           "subject": "New subscription A-S00000003 was created and activated",
           "toEmail": "mary.smith@company.test",
           "fromEmail": "no-reply@sender.test",
           "cc": "bob@company.test,chris@company.test",
           "bcc": "ceo@company.test,cto@company.test",
           "replyTo": "support@sender.test",
           "sendTime": "2015-01-13T03:31:43"
       }
   ],
   "nextPage": "https://localhost:8080/apps/v1/notification-history/email?page=2&pageSize=1&startTime=2015-01-12T00:00:00&endTime=2015-01-15T00:00:00&failedOnly=false&eventCategory=1000",
   "success": true
}
Last modified
07:19, 19 Aug 2016

Tags

Classifications

(not set)