# Assure events

You can request to be notified from the Assure API when a process is finished, either successfully or not. To do that, you must subscribe to Assure events in the Signicat Dashboard.

# Subscribe to events

To subscribe to notifications from Assure events:

  1. Log into the Dashboard (opens new window).
  2. Select Events, Add subscriptions and Webhook as subscription type.
  3. Set up the webhook:
    • Name (mandatory): You can use any name to identify your subscription.
    • Webhook (mandatory): This is where you will receive the HTTP POST request.
    • Secret (optional but recommended): This is the secret for the message authentication. When selected, a secret token is automatically created for you. You can copy this secret token and use it to validate that the event payload is coming from Signicat. For more details, see Validating payloads.
  4. In the "Listen to" list, choose Selected events > Assure and tick Select all Assure events / Process complete. This means you will receive a notification each time an Assure process is completed. Currently, there is only one Assure event type.

    TIP

    To preview the JSON Schema presented in the body payload, hover over Process complete and select the Preview button. This will display the body payload format in the right pane.

Here is an example setup:

Set up Assure events click-to-zoom

  1. Select Add to add the selected event. It should now be displayed on the Subscriptions (opens new window) page.

# Test subscription

To check that you subscription is working:

  1. On the Subscriptions (opens new window) page, select the Test events button. This displays the Test your events page.
  2. Create a mock event (see example below) to test that your subscription and event handling code works.
  3. From the drop-down menus, select your subscription and event type. The mock event will be sent to the selected subscription if it listens to the selected event type.
  4. Select Send.
Slideshow slide
Slideshow slide
Slideshow slide
Slideshow slide
Slideshow slide
Slideshow slide

You can now check that the notification has arrived to your defined webhook URL with the 200 OK response status.

# Mock example

Here is an example of a mock event notification:

Mock event notification click-to-zoom

Mock data

The received data in this example is mocked. The real data for dossierId and processId must comply with the UUID format and status as described in the Get process section.

{
  "id": "mock-ae906f8462074aa8b3228881225609eb",
  "timestamp": "2024-04-11T10:46:30.6156082Z",
  "eventName": "process.complete",
  "sender": "assure-api",
  "eventData": {
    "dossierId": "3vEnkf81dvhNvUR5tIz0953mzenGpJFbdQVeWZw3KqfRps7Ecef5r3Uxu",
    "processId": "wKtjgVHLt2Ae5j2nX3rJz9P",
    "status": "m02N6Vl9ff3T6kyb86DZffTS3z5422iLaBCOAL3gQjiF8Rfa"
  },
  "accountId": "a-sdge-ukFPCPQ2M1RjhbnRQop3",
  "expiresAt": "2024-04-11T10:47:00.6156082Z",
  "isMockEvent": true,
  "tags": [
    "mock"
  ]
}

# Next step

Dive deeper into how to set up events:

Last updated: 08/05/2024 14:10 UTC