Skip to content

Webhooks ​

Orisha Commerce Portal has support for triggering webhooks on certain events. These webhooks can be configured through a management endpoint in the API or within the portal. Every administration has a limit of 3 webhooks.

WARNING

There is no guarantee that a webhook won't be triggered multiple times. This means that consumers are responsible for handling a second callback so no duplicate mails/exports are triggered.

In the header for each webhook the X-Event-Id is sent which contains a unique identifier for the specific event. This can be used to check if the webhook is already processed.

WARNING

There is no promise about delivery time of the event.

WARNING

A webhook will be automatically disabled after failing 100 times with no successful execution. This will prevent the webhook from failing indefinitely. A notification will be sent to the app to notify the customer of this.

Security ​

When a webhook is created in the API or portal you will get a unique secret which is sent in the header X-Secret. In your implementation you should validate that this header is present and is equal to this unique secret.

We only provide the secret once, so you should keep it safe. If you have lost your secret, you need to reset the secret.

Webhook request ​

The webhook will be sent to your endpoint as a POST request. The request will consist of multiple default request headers and a request body based on the event type.

Default request headers ​

Below is a list of the default request headers we sent over:

HeaderDescription
X-Event-IdUnique ID for the specific event.
X-Event-TypeType of the event which triggered the webhook.
X-SecretUnique secret for the specific webhook.
X-Administration-CodeThe administration code for the specific webhook.
X-TriggeredBy-IdUnique ID for the user who triggered the webhook.

Event types ​

Per webhook you can define what types of event you would receive. You have the option to choose one or more from the following types:

Event typeRequest body
item.createdItemCode
item.deletedItemCode
customer.createdCustomerCode
customer.deletedCustomerCode
customer.updatedCustomerCode
pricelist.createdPriceListCode
pricelist.deletedPriceListCode
customer.contactperson.createdCustomerCode, ContactPersonCode
customer.contactperson.deletedCustomerCode, ContactPersonCode
customer.contactperson.updatedCustomerCode, ContactPersonCode
customer.address.createdCustomerCode, AddressCode
customer.address.deletedCustomerCode, AddressCode
customer.address.updatedCustomerCode, AddressCode