How to validate a webhook request

How to validate a webhook request

Authenticating and Validating Webhook Calls

This article explains how to authenticate or validate webhook calls that are made from a Clarus WMS automation or integration. Learn about the five important headers that help you identify and validate these requests.


Step-by-Step Guide

1. Understand the Headers

Webhook requests from Clarus WMS automations or integrations send five specific headers. These headers provide crucial information to help you identify and confirm the authenticity of the request sent to your webhook URL.


2. Identify 'X-ClarusWMS-Domain'

This header provides the exact URL that initiated the webhook call. This will be the base URL you use to log in to Clarus WMS. Use this to verify the origin of the request.


3. Identify 'X-ClarusWMS-API-Domain'

This header contains the API URL that is linked to the domain. This helps you confirm the associated API endpoint for the originating domain.


4. Identify 'X-ClarusWMS-Subdomain'

This header gives you the subdomain part of the URL that triggered the webhook. For example, it might be 'customer'. This helps pinpoint the specific subdomain from which the call originated.


5. Identify 'X-ClarusWMS-Automation-ID'

This header provides the unique ID of the automation that caused the webhook to be triggered. For instance, the ID could be '43'. This allows you to trace which automation initiated the call.


6. Identify 'X-ClarusWMS-Integration-ID'

This header provides the ID of the integration that is linked to the automation that triggered the webhook. This is only included if it is set or applicable. For example, the ID could be '723'. This helps identify the specific integration involved.


7. Validate Authenticity

The values provided in these five headers are essential for you to effectively confirm that the request to your webhook URL is genuine and has come from a trusted source.


FAQs

What are webhook headers?

Webhook headers are pieces of information sent along with a webhook request. They contain important details about the request's origin and purpose, helping you to identify and validate it.

Why are these headers important for validation?

These headers are crucial because they provide verifiable information about the source of the webhook call, such as the domain, subdomain, and specific IDs of the automation or integration in Clarus WMS. This allows you to confirm that the request is legitimate and not from an unauthorised source.


    • Related Articles

    • How do I Send a Webhook When Stock is Positively Adjusted in Clarus WMS?

      Automating Webhooks with Stock Adjustments This guide explains how to set up automations in Clarus WMS that trigger a webhook when stock is positively adjusted. This allows you to send real-time stock data to external systems for further processing. ...
    • How do I Send a Webhook When Stock is Negatively Adjusted in Clarus WMS?

      Automating Webhooks for Negative Stock Adjustments You can set up automations in Clarus WMS to trigger a webhook when stock is negatively adjusted. This means that when stock levels decrease unexpectedly, an external system can be automatically ...
    • How Can I Issue Invoices in Different Currencies?

      How to Change Invoice Currency By default, Clarus WMS invoices are in British Pounds. If you need to use a different currency, you will need to contact the support team to request this change. Step-by-Step Guide 1. Contact Support Action: Request to ...
    • How do I Get DHL Credentials for Integration with Clarus WMS?

      Integrate DHL as a Carrier: Setup Guide This guide explains how to obtain the necessary DHL credentials (SiteID, Password, Account Number) to integrate DHL as a shipping carrier within Clarus WMS. It covers steps for both US and international users, ...
    • Imports unsuccessful Troubleshooting

      Troubleshooting Failing or Unuploaded Imports This guide helps you resolve issues where your imports are not working correctly or are not appearing in Clarus WMS. Follow these steps to diagnose and fix common problems. Step-by-Step Guide 1. Check ...