The Push Status event is fired when a 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):
Element | Type | Description |
---|---|---|
event | string | Unique event name for the webhook. Set to push . |
connectionId | string | The connection id associated with the webhook. Automatically assigned by Accounting Data as a Service™. 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. |
pushCommunicationId | string | Unique push request ID. Automatically assigned by Accounting Data as a Service™. |
sourceObjectIds | array | An array of strings representing the created object ids in the service providers. |
dataType | string | The data type associated with the webhook. See /data/dataTypes endpoint for all possible enum values. |
requestedOn | string | The date and time at which the batch push was requested. See date format for more details. |
completedOn | string | The date and time at which the batch push was completed. See date format for more details. |
status | string | The status of the batch push request. Possible values: success , failed . |
responseCode | integer | Standard 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. |
validation | object | An object containing an array of errors . Returned if a specific batch push object failed. |
serviceAccountRef | object | Object containing the account id and subsidiary or sub account id for the connection |
Each object in the errors
array may include the following elements:
Element | Type | Description |
---|---|---|
field | string | The name of the element or property in the original request associated with the validation or error. |
message | string | A user-friendly validation or error message sent by the service provider. |
serviceAccountRef
Object may include the following elements:
Element | Type | Description |
---|---|---|
id | string | Account id for the connection |
entityRef.id | string | Sub account or Subsidiary account id for the connection |
Example Push Event Objects
{
"data": {
"event": "push",
"connectionId": "CON-0a4e97aa-7a77-bbbb-00aa-b1b1001aa00",
"businessName": "BIZ-d6b1c7d3-fe41-4447-ae72-3814b78b5142",
"serviceName": "quickbooks",
"dataType": "invoices",
"pushCommunicationId": "60473b57f0cdd1683ca71f60",
"sourceObjectIds": ["354"],
"requestedOn": "2021-03-09T19:56:03.952Z",
"completedOn": "2021-03-09T19:56:03.952Z",
"status": "success",
"responseCode": 200,
"serviceAccountRef": {
"id": "DEV",
"entityRef": {
"id": "100"
}
},
},
"requestId": "a3b4fc83-3e24-41aa-ba99-13cab09b0b7a"
}
{
"data": {
"event": "push",
"connectionId": "CON-0a4e97aa-7a77-bbbb-00aa-b1b1001aa00",
"businessName": "BIZ-d6b1c7d3-fe41-4447-ae72-3814b78b5142",
"serviceName": "quickbooks",
"dataType": "invoices",
"pushCommunicationId": "60473b57f0cdd1683ca71f60",
"sourceObjectId": ["354"],
"requestedOn": "2021-03-09T19:56:03.952Z",
"completedOn": "2021-03-09T19:56:03.952Z",
"status": "failed",
"responseCode": 400,
"serviceAccountRef": {
"id": "DEV",
"entityRef": {
"id": "100"
}
},
"validation": {
"errors": [
{
"field": "currencyRef",
"message": "Business Validation Error: Multi Currency should be enabled to perform this operation."
}
]
}
},
"requestId": "a3b4fc83-3e24-41aa-ba99-13cab09b0b7a"
}