Introduction
Use Webhooks to listen to events from Fasten Connect, rather than polling the API.
Why Use Webhooks?
When building applications using Fasten Connect, you’ll need to configure a webhook to receive events. Since collecting medical records from Health Systems can take time, webhooks allow you to wait for the data to be available, without wasting time and resources by polling the API.
To enable webhook events, you need to register a webhook in the Developer Portal.
Fasten Connect uses HTTPS to POST
webhook events to your app as a JSON payload that includes an Event object.
Payload Overview
All webhook payloads contain a common set of fields wrapping the event data. The event
object contains the event type and the data associated with the event.
The Fasten Connect API has two modes: test
and live
. Test mode is used for development and testing, while live mode is used for production.
This field will always be present in the payload and will indicate the mode of the API that generated the event.
This will be an RFC3339 timestamp that encodes the date & time the payload delivery was attempted.
This may not be when the event was created. The timestamp of the attempt may be different to the timestamp of the event that generated the attempt. One common example of where this happens: failed deliveries. Every time an attempt is retried the timestamp of the attempt is updated, while the timestamp of the original event remains the same. The attempt’s timestamp as an important security measure meant to prevent replay attacks.
The id
is a UUIDv4 that uniquely identifies the event. This is useful for idempotency, to ensure that you don’t process the same event multiple times.
It remains the same no matter how many times a webhook that has failed is retried.
Event Types indicate the type of the event being sent in the webhook and the schema of the data
field.
See type
and Event Types documentation to find out what fields are present in the data
object.