Appearance
Webhooks
A webhook is a way for Spark to automatically let your system know when something important happens — without you having to constantly check for updates. In the Spark platform, webhooks are most commonly used to notify you when a price is released or updated.
How Webhooks Work (in simple terms)
- You give Spark a webhook URL — this is like giving Spark a phone number that only your system answers.
- Spark watches for events — such as when new prices are released or when a price is corrected.
- Spark sends a notification — as soon as the event happens, Spark sends details to your webhook URL.
- Your system receives the info — your system can then do something with the data, like update internal prices or trigger alerts.
Key Things to Know
• What you provide: You’ll need to set up a webhook endpoint — a special address (URL) on your server that can receive messages from Spark.
Example URL:
https://yourcompany.com/spark-webhook
• What Spark sends you: Each notification includes:
- Which event happened (e.g., new LNG Freight price release)
- Details about the event (the price release details)
• Event types Spark supports now:
new-lng-freight-physical-price-release— when a new LNG Freight physical price release is publishednew-lng-freight-financial-price-release— when a new LNG Freight financial price release is publishednew-lng-cargo-physical-price-release— when a new LNG Cargo physical price release is publishednew-lng-cargo-financial-price-release— when a new LNG Cargo financial price release is published
When Should You Use Webhooks?
You don’t always need webhooks. They’re most useful when you want real-time notifications instead of regular checks.
Use webhooks if:
- You want your system to react instantly when a price is released or revised.
- You want to avoid “polling” (repeatedly asking Spark for updates).
You might not need webhooks if:
- You already pull prices on a regular schedule — and that schedule meets your needs.
Getting Started with Spark Webhooks
To set up a webhook with Spark
- Create your endpoint URL — this is where Spark will send notifications.
- Register the URL in the Spark application
- Test the webhook — Spark lets you send a test message to confirm your system receives it correctly.
Once everything is set up, Spark will start sending notifications automatically whenever the selected events occur.