Report Webhook Payloads
This page describes the webhook payloads for report events in AndDone. Report Webhook Events
This page describes the payloads for the Report webhook module.
Using Report Event Payloads to Download Reports
By combining the Report webhook module with the POST Download Report API, you can:
- Monitor report generation status: Receive real-time notifications about report generation success, failures, or empty results.
- Trigger report data retrieval: Programmatically fetch report data as soon as it is available using the data provided in the Report.OnReportGeneration webhook event.
The Report.OnReportGeneration event payload provides the ReportID
, ReportGenerationLogID
and EventDateTime
parameters, which are used in the POST Download Report API. See the POST Download Report documentation for details on using the API to fetch report data.
Report Webhook Events
The Report webhook module includes webhook notifications for the following events:
- Report.OnReportGeneration - The Report.OnReportGeneration webhook event is sent when a report is successfully generated.
- Report.OnGenerationWithNoData - The Report.OnGenerationWithNoData webhook is sent when a report is generated that contains no data.
- Report.OnReportGenerationFailed - The Report.OnReportGenerationFailed webhook event is sent when a report fails to generate. The event payload includes information related to the cause of failure including the
ReasonCode
andErrorMessage
.
Report Webhook Payload Fields
This table provides a reference to the fields included in report event webhook payloads.
Field | Data Type | Description | MinLength | MaxLength |
EventCode | Enumeration | ReportGenerated, ReportGeneratedWithNoData, ReportGenerationFailed | 1 | 36 | EventDateTime | string | Date and time of event. | 36 | 36 |
EventBody | array | Detailed information related to the event (see below) | N/A | N/A |
- MerchantId | string | Unique identifier of merchant | 8 | 8 |
- UserType | String | User type | 1 | 50 |
- SubscriptionStatus | String | Indicates whether automatic generation is enabled for the report | 1 | 50 |
- Frequency | String | Indicates how frequently the report is generated | 1 | 50 |
- FrequencyParam | String | The time when the report is scheduled to be generated | 1 | 50 |
- ReportId | string | The unique ID for the requested report. This value is required to fetch report data using the POST Download Report API. | 8 | 8 |
- ReportName | string | Unique name of the report | 36 | 36 |
- ReportFileName | String | File name for the report | 0 | 250 |
- ReportFileSize | String | File size in kilobytes | 0 | 50 |
- ReportAccessURL | String | The URL at which the report can be accessed | 0 | 250 |
- ErrorMessage | String | Error message if an error occurred | 0 | 250 |
- ReasonCode | String | Reason code/description related to report generation | 0 | 250 |
- NotificationType | Enumeration | Report-available, Report-noData, Report-error | 36 | |
- NotificationDate | String | Date and time when the notificatino was triggered | 1 | 50 |
- RetentionPolicyId | String | ID for the report retention policy | 1 | 50 |
- ReportSchemaId | String | Id | 1 | 50 |
- CreatedOn | String | Date and time when the report was created | 1 | 50 |
- ModifiedOn | String | Date and time when the report was modified | 1 | 50 |
- CreatedBy | String | ID of the user who created the report | 1 | 50 |
- ModifiedBy | String | ID of the user who modified the report | 1 | 50 |
- NextGenerationTime | String | Date and time when the next report will be generated | 1 | 50 |
- TimeZone | String | Time zone for the report created and modified time. | 1 | 50 | AdditionalFields | string | Additional metadata values related to the webhook. The ReportGenerationLogId is returned as an additional field. The ReportGenerationLogId required to fetch report data using the POST Download Report API. | 1 | 100 |
Signature | string | HMAC value used to validate webhook | 1 | 100 |
Payload Example: Report Generated
{
"EventCode": "ReportGenerated",
"EventDateTime": "12-15-2023 00:02:51",
"EventBody": {
"MerchantId": "4bvl9KxM",
"UserType": "Merchant",
"SubscriptionStatus": "On",
"Frequency": "Daily",
"FrequencyParam": "11:50",
"ReportId": "KGx1n813",
"RetentionPolicyId": "KGx1n813",
"ReportSchemaId": "KGx1n813",
"ReportName": "Daily Authorization Report",
"ReportFileName": "report_payment_authorization_2023_12_14.csv",
"ReportFileSize": "0.9KB",
"ReportAccessURL": null,
"NotificationType": "Report-available",
"NotificationDate": "12-15-2023 00:02:51",
"CreatedOn": "07-19-2022 10:27:59",
"ModifiedOn": "06-20-2023 07:05:58",
"CreatedBy": "TrustInC",
"ModifiedBy": "TrustInC",
"NextGenerationTime": "12-15-2023 23:59:59",
"ErrorMessage": null,
"ReasonCode": "200",
"TimeZone": "Eastern"
},
"AdditionalFields": "[{\"ReportGenerationLogId\":\"evGYDYL8\"}]",
"Signature": "uU5MwjVom5UMjdEQanVhjn1Wfb6R11i9ENr/PIFw8m0="
}