Mapping Webhook Parameters

Kevin Wilde

Last Update hace 9 días

Mapping Webhook Parameters

When a Shopify webhook triggers a request in APIEase, the full webhook payload is forwarded as the body of the request. APIEase allows you to map any value from the webhook payload to any part of the request.


How Mapping Works

In order to pass a webhook payload value to the API endpoint specified in your request definition you must add a parameter to your request with the following:
  • Type: Query, Header or Body
  • Name: The name expected by the endpoint you are calling
  • Value: A reference to the value from the webhook payload, wrapped in curly braces

For example the following is a payload from the products/delete webhook:

In order to map the id value to a query parameter named "deleted_product_id" we add a parameter to our request with:

  • Type: Query
  • Name: deleted_product_id
  • Value: {id}

This will take the id field from the incoming products/delete webhook payload and send it as a query parameter named deleted_product_id to your target system. So a request with address https://example.com will be rendered and executed as: https://example.com&deleted_product_id=788032119674292922


Nested Values

If the value you need is inside a nested object, you can reference it using dot notation.

The following is a payload from the product_listings/remove webhook:

To map the product_id to a body parameter named "deleted_product_listing_id" you would add a parameter to your request with:

  • Type: Body

  • Name: body

  • Value: {"deleted_product_listing_id": "{product_listing.product_id}"}

Was this article helpful?

0 out of 0 liked this article