QBO Webhooks Listener

<back to all web services

QboWebhooksRequest

The following routes are available for this service:
POST/qbowebhook

export 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,
}

export enum QBOOperation
{
    Update = 'Update',
    Create = 'Create',
    Merge = 'Merge',
    Delete = 'Delete',
    Emailed = 'Emailed',
    Void = 'Void',
}

export class QBOEntity
{
    // @DataMember(Name="name")
    public name: QBOEntityName;

    // @DataMember(Name="id")
    public id: string;

    // @DataMember(Name="operation")
    public operation: QBOOperation;

    // @DataMember(Name="lastUpdated")
    public lastUpdated: string;

    // @DataMember(Name="deletedId")
    public deletedId: string;

    public constructor(init?: Partial<QBOEntity>) { (Object as any).assign(this, init); }
}

export class QBODataChangeEvent
{
    // @DataMember(Name="entities")
    public entities: QBOEntity[];

    public constructor(init?: Partial<QBODataChangeEvent>) { (Object as any).assign(this, init); }
}

export class QBOEventNotification
{
    // @DataMember(Name="realmId")
    public realmId: string;

    // @DataMember(Name="dataChangeEvent")
    public dataChangeEvent: QBODataChangeEvent;

    public constructor(init?: Partial<QBOEventNotification>) { (Object as any).assign(this, init); }
}

// @DataContract
export class QboWebhooksRequest
{
    // @DataMember(Name="eventNotifications")
    public eventNotifications: QBOEventNotification[];

    public constructor(init?: Partial<QboWebhooksRequest>) { (Object as any).assign(this, init); }
}

TypeScript QboWebhooksRequest DTOs

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

HTTP + XML

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/xml
Content-Type: application/xml
Content-Length: length

<QboWebhooksRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ESI.Service.QBOWebhooksListener">
  <eventNotifications>
    <QBOEventNotification>
      <DataChangeEvent>
        <Entities>
          <QBOEntity>
            <DeletedId>String</DeletedId>
            <Id>String</Id>
            <LastUpdated>0001-01-01T00:00:00</LastUpdated>
            <Name>Customer</Name>
            <Operation>Update</Operation>
          </QBOEntity>
        </Entities>
      </DataChangeEvent>
      <RealmId>String</RealmId>
    </QBOEventNotification>
  </eventNotifications>
</QboWebhooksRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

(string)