Webhooks
Webhooks provide a powerful way to receive real-time notifications of events in your system.
Last updated
Webhooks provide a powerful way to receive real-time notifications of events in your system.
Last updated
When certain events occur, our API will send an HTTP POST request to the specified URL, delivering a payload with event details. This enables you to automate reactions or synchronize data without the need for polling.
Here are the currently supported events you can subscribe to:
pud:status_update
Status changes on a PUD
pud:price_update
Price changes on a PUD
When an event occurs, we'll send a POST request to the callback_url. The data object will depend on the eventType. See the payload data examples below.
Headers
X-Hub-Signature-256
sha256=<signature>
Body
id
string
Id of event
eventType
string
Type of event
timestamp
Date
Date and time of event
data
object
Payload data (see below)
If you provided a secret when creating a webhook, Gire will use it, along with the payload, to create a hash signature that is sent in the X-Hub-Signature-256
header. You can use this to verify the integrity and authenticity of the webhook payload.
Receive payload and signature: Your server gets the payload and the X-Hub-Signature-256
header.
Generate signature: Use HMAC SHA-256 with the secret and the raw payload to compute a hash.
Compare signature: Compare your computed hash with the signature received in the header. If they match, the payload is verified and authentic.
Company API token
The URL to send the webhook to
https://example.com/webhook
The events that are enabled for this webhook
["pud:status_update","pud:price_update"]
A secret to sign the webhook with
supersecret
Webhook id
Company API token
The URL to send the webhook to
https://example.com/webhook
The events that are enabled for this webhook
["pud:status_update","pud:price_update"]