QBO Webhooks Listener

<back to all web services

QboWebhooksRequest

The following routes are available for this service:
POST/qbowebhook
namespace ESI.Service.QBOWebhooksListener

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    type 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

    type QBOOperation =
        | Update = 0
        | Create = 1
        | Merge = 2
        | Delete = 3
        | Emailed = 4
        | Void = 5

    [<AllowNullLiteral>]
    type QBOEntity() = 
        [<DataMember(Name="name")>]
        member val Name:QBOEntityName = new QBOEntityName() with get,set

        [<DataMember(Name="id")>]
        member val Id:String = null with get,set

        [<DataMember(Name="operation")>]
        member val Operation:QBOOperation = new QBOOperation() with get,set

        [<DataMember(Name="lastUpdated")>]
        member val LastUpdated:DateTime = new DateTime() with get,set

        [<DataMember(Name="deletedId")>]
        member val DeletedId:String = null with get,set

    [<AllowNullLiteral>]
    type QBODataChangeEvent() = 
        [<DataMember(Name="entities")>]
        member val Entities:ResizeArray<QBOEntity> = null with get,set

    [<AllowNullLiteral>]
    type QBOEventNotification() = 
        [<DataMember(Name="realmId")>]
        member val RealmId:String = null with get,set

        [<DataMember(Name="dataChangeEvent")>]
        member val DataChangeEvent:QBODataChangeEvent = null with get,set

    [<DataContract>]
    [<AllowNullLiteral>]
    type QboWebhooksRequest() = 
        [<DataMember(Name="eventNotifications")>]
        member val EventNotifications:ResizeArray<QBOEventNotification> = null with get,set

F# QboWebhooksRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	eventNotifications: 
	[
		{
			realmId: String,
			dataChangeEvent: 
			{
				entities: 
				[
					{
						name: Customer,
						id: String,
						operation: Update,
						lastUpdated: 0001-01-01,
						deletedId: String
					}
				]
			}
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

(string)