| POST | /qbowebhook |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports ESI.Service.QBOWebhooksListener
Namespace Global
Namespace ESI.Service.QBOWebhooksListener
Public Partial Class QBODataChangeEvent
<DataMember(Name:="entities")>
Public Overridable Property Entities As List(Of QBOEntity)
End Class
Public Partial Class QBOEntity
<DataMember(Name:="name")>
Public Overridable Property Name As QBOEntityName
<DataMember(Name:="id")>
Public Overridable Property Id As String
<DataMember(Name:="operation")>
Public Overridable Property Operation As QBOOperation
<DataMember(Name:="lastUpdated")>
Public Overridable Property LastUpdated As Date
<DataMember(Name:="deletedId")>
Public Overridable Property DeletedId As String
End Class
Public Enum QBOEntityName
Customer = 20
Department = 21
Vendor = 21
Deposit = 22
Invoice = 23
Bill = 24
Item = 24
JournalCode = 25
PurchaseOrder = 25
JournalEntry = 26
Estimate = 26
RefundReceipt = 26
Employee = 27
SalesReceipt = 27
TaxAgency = 28
Term = 29
TimeActivity = 30
Account = 30
Transfer = 31
VendorCredit = 31
CreditMemo = 32
Purchase = 33
Currency = 33
Payment = 35
PaymentMethod = 36
BillPayment = 36
Preferences = 37
Budget = 37
[Class] = 38
End Enum
Public Partial Class QBOEventNotification
<DataMember(Name:="realmId")>
Public Overridable Property RealmId As String
<DataMember(Name:="dataChangeEvent")>
Public Overridable Property DataChangeEvent As QBODataChangeEvent
End Class
Public Enum QBOOperation
Update
Create
Merge
Delete
Emailed
Void
End Enum
<DataContract>
Public Partial Class QboWebhooksRequest
<DataMember(Name:="eventNotifications")>
Public Overridable Property EventNotifications As List(Of QBOEventNotification)
End Class
End Namespace
End Namespace
VB.NET QboWebhooksRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /qbowebhook HTTP/1.1
Host: wh.entersecurity.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"eventNotifications":[{"realmId":"String","dataChangeEvent":{"entities":[{"name":"Customer","id":"String","operation":"Update","lastUpdated":"\/Date(-62135596800000-0000)\/","deletedId":"String"}]}}]}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length (string)