Batch Push Webhooks

šŸš§

In Beta

The batch push webhooks are part of our beta v2 APIs which are not officially supported for the general public.

The Batch Push Status event is fired when a batch push API request has finished processing through Accounting Data as a Serviceā„¢ and the accounting service provider.

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 batchPush.
connectionIdstringThe connection id associated with the webhook. Automatically assigned by Accounting Data as a Serviceā„¢. 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.
batchIdstringUnique batch ID for the webhook. Automatically assigned by Accounting Data as a Serviceā„¢.
batcharrayBatch push objects in your batch push request. The order of the batch push objects in this batch array matches the order of your original request.
serviceAccountRefobjectObject containing the account id and subsidiary or sub account id for the connection

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

ElementTypeDescription
pushCommunicationIdstringUnique push request ID. Automatically assigned by Accounting Data as a Serviceā„¢.
sourceObjectIdsarrayAn array of strings representing the created object ids in the service providers.
dataTypestringThe data type associated with the webhook. See /data/dataTypes endpoint for all possible enum values.
requestedOnstringThe date and time at which the batch push was requested. See date format for more details.
completedOnstringThe date and time at which the batch push was completed. See date format for more details.
statusstringThe status of the batch push request. Possible values: success, failed.
responseCodeintegerStandard HTTP response code from the service provider. In general, 200 HTTP codes correspond to success, 40X codes are for developer- or user-related failures, and 50X codes are for Accounting Data as a Serviceā„¢ related issues.
validationobjectAn object containing an array of errors. Returned if a specific batch push object failed.

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

ElementTypeDescription
fieldstringThe name of the element or property in the original request associated with the validation or error.
messagestringA user-friendly validation or error message sent by the service provider.

serviceAccountRef object may include the following elements:

ElementTypeDescription
idstringAccount id for the connection
entityRef.idstringSub account or Subsidiary account id for the connection

Example Data Push Event Object

{
  "data": {
    "event": "batchPush",
    "connectionId": "CON-0a4e97aa-7a77-bbbb-00aa-b1b1001aa00",
    "businessName": "BIZ-d6b1c7d3-fe41-4447-ae72-3814b78b5142",
    "serviceName": "xero",
    "batchId": "63c6d1d02175edb3822e8d47",
    "batch": [
      {
        "pushCommunicationId": "63c6d1d02175edb3822e8d4d",
        "sourceObjectIds": ["235"],
        "dataType": "journalEntries",
        "requestedOn": "2023-01-17T16:50:24.063Z",
        "completedOn": "2023-01-17T16:50:30.579Z",
        "status": "success",
        "responseCode": 200
      },
      {
        "pushCommunicationId": "63c6d1d02175edb3822e8d4e",
        "sourceObjectIds": ["289"],
        "dataType": "journalEntries",
        "requestedOn": "2023-01-17T16:50:24.063Z",
        "completedOn": "2023-01-17T16:50:30.679Z",
        "status": "success",
        "responseCode": 200
      },
      {
        "pushCommunicationId": "63c6d1d02175edb3822e8d4f",
        "sourceObjectIds": [],
        "validation": {
          "errors": [
            {
              "message": "Business Validation Error: When you use Accounts Payable, you must choose a supplier in the Name field."
            }
          ]
        },
        "dataType": "journalEntries",
        "requestedOn": "2023-01-17T16:50:24.064Z",
        "completedOn": "2023-01-17T16:50:30.579Z",
        "status": "failed",
        "responseCode": 400
      }
    ]
  },
  "serviceAccountRef": {
    "id": "DEV",
    "entityRef": {
      "id": "100"
    }
  },
  "requestId": "7c8648ce-8244-4948-9a0f-7d01e665d1aa"
}