Skip to main content

Overview

Webhooks allow apps to stay in sync with ChannelApe data or perform an action after a specific event occurs on a business. Webhooks are a performant alternative to continuously polling for changes.

For example, a webhook can notify your app when a user updates a shipment. Your app can then perform an action when the shipment change occurs.

This guide introduces how webhooks work, including how to configure a webhook for your app and manage webhooks.

Webhook Concepts

To help orient you with the content in this guide, the following definitions explain webhook concepts:

Webhook Configuration: Links a webhook endpoint (hook consumer url) to a business.

Webhook: A single event message. ChannelApe sends a webhook to an webhook configuration's hook consumer url. A webhook contains a JSON payload in the body, and metadata in the headers.

Webhook Action: A class of webhook events. An action controls when webhook events are created and what's in the webhook payload. For example, shipments.created webhook events are sent whenever a shipment is created for a business, and contain the new shipment as the payload.

Webhook Configuration Action: A persisted data object created using the ChannelApe API, which defines the following:

  • The action (class of events) that the consumer wants to receive.

  • A Webhook Configuration which defines a subscription endpoint, or the destination where ChannelApe sends webhooks (event messages) for the specified action linked to the specified business.

note

Webhooks are only available on REST API V2 and GraphQL.