Configuring a webhook involves:

  • Creating a credential set for authentication to the endpoint.
  • Creating a webhook that specifies the URL where Stedi should deliver events.
  • Adding one or more event bindings that trigger the webhook.

Credential set

A credential set defines how to authenticate with a specific API. You can use a single credential set across multiple webhooks. Stedi supports the following types of configurations.

TypeDescription
API KeysThe API keys as headers in the request. The most common version is ‘bearer tokens’.
Basic AuthHTTP Basic Auth, where you provide a username and password.
NoneFor endpoints that don’t require any authentication.

Unauthenticated endpoints

When using the ‘None’ credential set type in webhooks, it’s functionally the same as using ‘API Keys’. However, we set a dummy value for Header name and Value (x-stedi-noauth and dummy). Since the receiving API isn’t authenticating the call, it will ignore these values and accept the request.

Create credential set

You can define a credential set as part of configuring a new webhook. You can also create a new credential set independently and then attach it to one or more webhooks.

To create a credential set:

  1. Go to the Webhooks page.
  2. Click Manage credentials, and then click Create credential set.
  3. Enter a name.
  4. Choose the appropriate Authentication type.
  5. Enter the details.
  6. Click Create credential set.

Webhook

A webhook defines which URL endpoint Stedi should call when the webhook is invoked, and which HTTP method to use (POST, PUT, GET, PATCH, DELETE).

You can only attach one credential set to each webhook. However, you might have multiple webhooks for a single system integration, each with a different endpoint.

Create webhook

To create a new webhook:

  1. Go to the Webhooks page.
  2. Click Create webhook.
  3. Enter a name.
  4. Choose a Method and enter an Endpoint URL. This is where Stedi delivers the events when the webhook is invoked.
  5. Select a Credential set to use for authentication or create a new one for this endpoint.
  6. (Optional) Set the Concurrency. You can set the maximum number of deliveries that Stedi will attempt to deliver to the endpoint at one time. This can help you avoid overloading the target service.

Event bindings

Event bindings allow you to specify which events trigger the webhook. You can create multiple event bindings for a single webhook. For example, you may want to create an event binding for each type of transaction you want to send to your API.

Create event binding

To create a new event binding:

  1. Go to the Webhooks page.
  2. Click the webhook.
  3. Click the Event bindings tab.
  4. Click New event binding.
  5. Choose an Event type and complete the remaining fields. To listen for processed transactions, select Transaction processed or Fragment processed. Visit Event types for details about each event.
  6. Click Create binding.

Ingest processed transactions

You can use the provided download URLs in the following events to retrieve the processed transaction data from Stedi.

  • Transaction processed events: An EDI file can contain multiple transactions, so a single EDI file can produce multiple events that each invoke the configured webhook.
  • Fragment processed events: When Fragments are enabled, Stedi emits one fragment processed event for each fragment within the processed transaction.

You may want to configure the following settings for transaction processed or fragment processed events:

  1. Transaction set ID: This is useful if you want to send events for different transaction sets to different endpoints. For example, you could send events for 850 Purchase Orders to one endpoint and events for 860 Purchase Order Change Requests to another.
  2. Partnership ID: This is useful if you want to send events from different partners to different endpoints. For example, you could send events from processed Walmart transactions to one endpoint and events from processed Target transactions to another. This is less common.
  3. Guide: This is useful if you want to send events from transactions parsed using different guides to different endpoints. For example, you may receive 005010 850 Purchase Orders from two different retailers, and those retailers have different guides. Since the transaction payloads will differ, you may want to send them to different API endpoints within your system.
  4. (Optional) You can configure the following Advanced settings:
    • Connection: This is useful when you are using multiple connections for a single partnership. For example, you may have set up one connection type for test data and a separate connection for production data.
    • Mode: Specify the type of data Stedi is processing. You can choose from Test or Production.