Data Sync Webhooks

Railz offers two data synchronized webhook events.

  1. The Data Synchronized event is fired when a data sync (initial and/or recurring) is completed. This webhook event should be used to get informed for when the business has completed syncing with all the event types within 1 webhook.
  2. The Data Per Type event is fired for the selected data types you have indicated within our Railz Dashboard. Once the data has completed syncing for the specified data type, you will receive the webhook event. Note: that if you manually select all of the data types, then you will receive a webhook event for each individual type.

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):

ElementTypeDescription
eventstringUnique event name for the webhook. Set to data.
connectionIdstringThe connection id associated with the webhook. Automatically assigned by Railz. See connections for more details.
businessNamestringThe business name associated with the webhook. See businesses for more details.
serviceNamestringThe name of the connected integration. See possible enum values.
requestsarrayData sync request objects representing the status of each synchronized
dataSyncTypestringData synchronization options. See possible enum values.

Each object in the requests array may include the following elements:

ElementTypeDescription
idstringUnique data sync request ID. Automatically assigned by Railz.
requeststringThe data type associated with the webhook. See /data/dataTypes endpoint for all possible enum values.
startDatestringThe period start date for the synchronized data in the format YYYY-MM-DD.
endDatestringThe period end date for the synchronized data in the format YYYY-MM-DD.
reportFrequencystringThe timeframe associated with the synchronized data. Possible values: year, quarter, month.
statusstringThe status of the data sync. Possible values: success, failed, empty. See data sync statuses for more details.

Example Data Sync Event Object

{
	"data": {
		"event": "data",
		"connectionId": "CON-0a4e97aa-7a77-bbbb-00aa-b1b1001aa00",
		"businessName": "BIZ-d6b1c7d3-fe41-4447-ae72-3814b78b5142",
		"serviceName": "quickbooks",
    "dataSyncType": "manualSync"
		"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"
}

Example Data per type Sync Event Object

[
  {
    "serviceName": "freshbooks",
    "serviceNameDescription": "string",
    "serviceType": "accounting",
    "isBeta": true,
    "dataTypes": [
      {
        "name": "accountingTransactions",
        "description": "AP Aging",
        "action": [
          "delete"
        ],
        "accountingMethod": "cash",
        "reportType": "accounting"
      }
    ]
  }
]