Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
62 lines (50 sloc) 1.56 KB

Reacting to events

Reacting to events

Reactions can be used to trigger external services when certain events occur.

The following examples shows the basic APIs for working with reactions.

Create event reaction definition

As an example, we are going to set up a reaction that posts notifications every time an order is placed. We need to specify the feed name and the event type to react to.

We use a POST command to configure our reaction:

{% tabs %} {% tab title="cURL" %}

curl -i \
  --header "Content-Type: application/json" \
  --header "Serialized-Access-Key: <YOUR_ACCESS_KEY>" \
  --header "Serialized-Secret-Access-Key: <YOUR_SECRET_ACCESS_KEY>" \
  --data '
    "reactionName": "new-order-notifier",
    "feedName": "order",
    "reactOnEventType": "OrderPlacedEvent",
    "action": {
      "actionType": "HTTP_POST",
      "targetUri": ""

{% endtab %} {% endtabs %}

HTTP/1.1 200 Created
Content-Length: 0

Next time an OrderPlacedEvent happens you will get a POST request to your looking something like this:

You can’t perform that action at this time.