Subscribing to an Event

You can use webhook subscriptions to receive notifications about particular events in Anvyl. After you've subscribed to a webhook, you can let your application immediately respond to specific events instead of having to make API calls periodically to check their status. For example, you can rely on webhooks to trigger an action in your app when a new Part is created or Purchase Order is drafted.

Creating a webhook subscription

You can configure a new webhook subscription by making an HTTP POST request to the Webhook endpoint.

The request should contain a name, target_url, and comma-delimited set of events that to your application would like to subscribe to.

An example request looks like the following:

POST /webhooks
"webhook": {
  name: "My application",
  target_url: "",
  events: "PartCreated, OrderShipped"

Every webhook response will contain the following common properties