Webhook Service Meta API Implementation Examples

The following examples show how to make POST (create), GET (read), PATCH (update), and DELETE requests using the Webhook Service Meta API.

The webhook examples in this topic are based on an Integration Object called EmployeeIO. To create the Integration Object, send POST request https://localhost:9002/odata2webservices/IntegrationService/InboundChannelConfigurations with the following body:

Here is the response body that is returned:

POST a Webhook

Send POST request https://localhost:9002/odata2webservices/WebhookService/WebhookConfigurations with the following body:

Here is the response body that is returned:

POST a Webhook with Nested Destination Elements

Send POST request https://localhost:9002/odata2webservices/WebhookService/WebhookConfigurations with the following body:

Here is the response body that is returned:

GET a Webhook by Key

Send PATCH request https://localhost:9002/odata2webservices/WebhookService/WebhookConfigurations ('<integrationKey>').

For example, https://localhost:9002/odata2webservices/WebhookService/WebhookConfigurations('ExistingWebhookDestination%7CwebhookServices%7CEmployeeIO%7Cde.hybris.platform.webhookservices.event.ItemSavedEvent')

Here is the response body that is returned:

GET All Webhooks

Send GET request: https://localhost:9002/odata2webservices/WebhookService/WebhookConfigurations

Here is the response body that is returned:

PATCH a Webhook

Send PATCH request: https://localhost:9002/odata2webservices/WebhookService/WebhookConfigurations ('<integrationKey>').

For example, https://localhost:9002/odata2webservices/WebhookService/WebhookConfigurations('ExistingWebhookDestination%7CwebhookServices%7CEmployeeIO%7Cde.hybris.platform.webhookservices.event.ItemSavedEvent'), with the following body:

Here is the response body that is returned:

DELETE a Webhook

Send DELETE request: https://localhost:9002/odata2webservices/WebhookService/WebhookConfigurations ('<integrationKey>').

For example, https://localhost:9002/odata2webservices/WebhookService/WebhookConfigurations('ExistingWebhookDestination%7CwebhookServices%7CEmployeeIO%7Cde.hybris.platform.webhookservices.event.ItemSavedEvent')

No response body is returned.