Integration guide
To subscribe to Spotnana’s webhooks requires that you contact and collaborate with our engineering team. The following steps explain the process for enabling webhooks and what the shared responsibilities are.
Step 1: Requirement gathering
To integrate with Spotnana webhooks, the initial step will involve gathering requirements. Discuss your specific requirements for webhook integration with the Spotnana engineering team. These requirements may include:
- Authentication methods (only specific methods are currently supported)
- Specific events that should trigger webhook delivery
- Credentials to authenticate incoming webhooks
Step 2: Non-production setup
Spotnana will configure your webhook subscription in our non-production environment based on your requirements. This setup enables end-to-end testing and validation before deploying it to production.
Note: You can use our sample receiver (powered by Node.js) as a reference to create your own endpoint for receiving webhook messages.
Step 3: Handling the webhook delivery
Once the initial setup and integration test is completed, we’ll test the webhook delivery in the non-production environment. To receive the webhook payload, you must implement an endpoint that authenticates and handles incoming POST
requests using the credentials provided during setup.
Note: Spotnana webhooks support payload delivery to one endpoint per subscription. This means the same message cannot be delivered to multiple endpoints.
Here’s an overview of the webhook delivery flow:
- Spotnana authenticates with your delivery endpoint using the credentials provided. Since the credentials are only used by the specific delivery node, your endpoint must support concurrent authentication requests from multiple systems using the same credentials.
- A
POST
request is sent to your authenticated endpoint. This request contains the following information:- Message Generation Timestamp: Helps troubleshoot consistency issues with out-of-order deliveries.
- Event Type: Identifies the event that triggered the webhook notification.
- Operation: Describes the specific change that triggered the event (e.g.,
FLIGHT_CANCELLED
orBOOKING_CREATED
). - Payload: Contains the event data.
- After receiving the webhook message, your API must send a
200 OK
response indicating a successful delivery. Any response other than200 OK
will be treated as message delivery failure and begins the retry mechanism.
Step 4: Deploy to production
Once we’ve validated that the integration, webhook delivery, and handling are successful through repeated testing, we’ll deploy your webhook subscription to production and continue to monitor the live data flow.