Skip to main content

Registering Webhooks

Before receiving webhook calls a webhook URL must be registered using the Webhook API Endpoint.

Webhook Structure

Webhooks across the Nmbr API follow a consistent JSON structure that includes:
  • the event
  • the resource
    • type
    • identifier
    • external reference (external_ref), if the resource type supports setting an external reference
    • company identifier, if the resource type is scoped to a company
The webhook call made when a business entity is created would have the following properties:
{
  "event": "resource_created",
  "resource": {
    "type": "business_entity",
    "id": "<id>",
    "external_ref": "<ref>",
    "company_id": "<id>"
  }
}
The webhook call made when a company is created would have similar properties:
{
  "event": "resource_created",
  "resource": {
    "type": "company",
    "id": "<id>",
    "external_ref": "<ref>"
  }
}
Note that the call doesn’t include the company_id property because the resource is the company itself and so its identifier is in the id property. The webhook structure does not contain additional entity data. It is recommended the receiving system performs a GET request for the specific entity to retrieve the most up-to-date resource.

Webhook Security

Nmbr will automatically generate a key for each webhook created. Any outgoing webhook calls will include a Webhook-Signature header with an HMAC SHA256 hash of the payload using the webhook key. Consumers may calculate their own signature using the known key and payload to compare to the request header. If the resulting signatures match the developer can be confident the request came from Nmbr.

Webhook Events

Most resources support 3 standard events:
  • resource_created
  • resource_updated
  • resource_deleted
Some resources have additional events that can be used to determine the state of the resource:
  • payroll_approved
The following table outlines each resource and the corresponding supported events.
ResourceTypeSupported Events
Accounting Codeaccounting_code
  • resource_created
  • resource_updated
  • resource_deleted
Accounting Code Ruleaccounting_code_rule
  • resource_created
  • resource_updated
  • resource_deleted
Adjustmentadjustment
  • resource_created
  • resource_updated
  • resource_deleted
Allowanceallowance
  • resource_created
  • resource_updated
  • resource_deleted
Async Taskasync_task
  • async_task_completed
Bank Accountbank_account
  • resource_created
  • resource_updated
  • resource_deleted
Business Entitybusiness_entity
  • resource_created
  • resource_updated
  • resource_deleted
  • integration_authentication_success
  • integration_authentication_failure
  • integration_sync_account_codes_complete
  • integration_sync_account_codes_failure
  • integration_sync_tags_complete
  • integration_sync_tags_failure
Business Presetbusiness_preset
  • resource_created
  • resource_updated
  • resource_deleted
Companycompany
  • resource_created
  • resource_updated
  • resource_deleted
Contractorcontractor
  • resource_created
  • resource_updated
  • resource_deleted
Deductiondeduction
  • resource_created
  • resource_updated
  • resource_deleted
Earningearning
  • resource_created
  • resource_updated
  • resource_deleted
Employeeemployee
  • resource_created
  • resource_updated
  • resource_deleted
Employee Benefitemployee_benefit
  • resource_created
  • resource_updated
  • resource_deleted
Employer Benefitemployer_benefit
  • resource_created
  • resource_updated
  • resource_deleted
Form Batchform_batch
  • form_batch_completed
Overtime Rateovertime_rate
  • resource_created
  • resource_updated
  • resource_deleted
Pay Ratepay_rate
  • resource_created
  • resource_updated
  • resource_deleted
Pay Schedulepay_schedule
  • resource_created
  • resource_updated
  • resource_deleted
Pay Splitpay_split
  • resource_created
  • resource_updated
  • resource_deleted
Pay Stubpay_stub
  • resource_created
  • resource_updated
  • resource_deleted
  • pay_stub_available
Payrollpayroll
  • resource_created
  • resource_updated
  • resource_deleted
  • payroll_approved
  • payroll_unapproved
  • payroll_paid
  • payroll_deadline_upcoming
  • integration_sync_journal_entries_complete
  • integration_sync_journal_entries_failure
Reimbursementreimbursement
  • resource_created
  • resource_updated
  • resource_deleted
Remittance Accountremittance_account
  • resource_created
  • resource_updated
  • resource_deleted
Remittance Account Enrollmentremittance_account_enrollment
  • resource_created
  • resource_updated
  • resource_deleted
Tagtag
  • resource_created
  • resource_updated
  • resource_deleted
Tag Grouptag_group
  • resource_created
  • resource_updated
  • resource_deleted
Vacation Pay Settingvacation_pay_setting
  • resource_created
  • resource_updated
  • resource_deleted
Work Assignmentwork_assignment
  • resource_created
  • resource_updated
  • resource_deleted