The Data Synchronized event is fired when a data sync (initial and/or recurring) is completed.
Event Object
The webhook payload is sent in standard JSON format and contains an event object with the following information represented by key-value pairs (KVPs):
Element | Type | Description |
---|---|---|
event | string | Unique event name for the webhook. Set to data . |
connectionId | string | The connection id associated with the webhook. Automatically assigned by Railz. See connections for more details. |
businessName | string | The business name associated with the webhook. See businesses for more details. |
serviceName | string | The name of the connected integration. See possible enum values. |
requests | array | Data sync request objects representing the status of each synchronized |
Each object in the batch
array may include the following elements:
Element | Type | Description |
---|---|---|
id | string | Unique data sync request ID. Automatically assigned by Railz. |
request | string | The data type associated with the webhook. See /data/dataTypes endpoint for all possible enum values. |
startDate | string | The period start date for the synchronized data in the format YYYY-MM-DD . |
endDate | string | The period end date for the synchronized data in the format YYYY-MM-DD . |
reportFrequency | string | The timeframe associated with the synchronized data. Possible values: year , quarter , month . |
status | string | The status of the data sync. Possible values: success , failed , empty . See data sync statuses for more details. |
Example Batch Push Event Object
{
"data": {
"event": "data",
"connectionId": "CON-0a4e97aa-7a77-bbbb-00aa-b1b1001aa00",
"businessName": "BIZ-d6b1c7d3-fe41-4447-ae72-3814b78b5142",
"serviceName": "quickbooks",
"requests": [{
"id": "60e61e0c53031851d54b4f82",
"request": "accounts",
"status": "success"
},
{
"id": "6333539d6d8f1176fd9ac05b",
"request": "balanceSheets",
"startDate": "2018-06-01",
"endDate": "2018-09-30",
"reportFrequency": "year",
"status": "success"
},
{
"id": "6333539e6d8f1176fd9ac07f",
"startDate": "2018-06-01",
"endDate": "2018-09-30",
"reportFrequency": "quarter",
"status": "failed"
},
{
"id": "6034449e6d8f1176fd9ac09a",
"request": "incomeStatements",
"startDate": "2018-04-01",
"endDate": "2018-04-30",
"reportFrequency": "month",
"status": "empty"
},
{
"id": "6035559e6d8f1176fd9ac0b1",
"request": "cashflowStatements",
"startDate": "2020-03-01",
"endDate": "2020-03-31",
"reportFrequency": "month",
"status": "success"
}
]
},
"requestId": "a3b4fc83-3e24-41aa-ba99-13cab09b0b7a"
}