{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["img","small-center"]},"type":"markdown"},"seo":{"title":"Webhooks overview","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"webhooks-overview","__idx":0},"children":["Webhooks overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This page provides an introduction to webhooks, how they work on Spotnana, and a sample use case."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"what-are-webhooks","__idx":1},"children":["What are webhooks?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Webhooks are custom HTTP callbacks that allow one application to send real-time data to another whenever a specific event occurs. Unlike APIs that require constant polling for updates, webhooks push the latest data to a partner's designated endpoint automatically."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When a specific event occurs on the Spotnana platform (e.g., an air booking creation), a webhook event sends the relevant data payload to the partner's configured endpoint via an HTTP POST request."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"spotnana-webhooks-workflow","__idx":2},"children":["Spotnana webhooks workflow"]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/docs/assets/webhook-usecase.e277cba83a6970402ea2227fb05fdfcc01f5684235cf5f633b2849673de0d3df.9c1bb791.png","alt":"Webhook request and response flow","withLightbox":false,"width":"100%","height":"100%","align":"center","border":"1px solid black"},"children":[]},{"$$mdtype":"Tag","name":"SmallCenter","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Fig:"]}," Fig: Webhook request and response flow between Spotnana and the partner’s system."]}]}]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"\nHere's how the webhook flow works:\n",{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["An event occurs on the Spotnana platform (e.g., a booking has been created)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Spotnana sends an HTTP POST request containing the event data to the partner's configured HTTPS endpoint."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The partner's system receives and processes the webhook payload."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The partner's system returns an HTTP 200 OK response indicating the delivery has been successful."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Spotnana logs the delivery as successful on our system."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"sample-use-case","__idx":3},"children":["Sample use case"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Scenario:"]}," A partner wants to create an expense entry in their system every time their traveler books a flight on Spotnana."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here's how the flow works in this scenario:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The partner creates a webhook subscription for the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/webhookeventapi/webhooks/paths/pnr_v3/post"},"children":["PNR_V3"]}," event using the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/webhooksubscriptionapi/webhook-subscription/createwebhooksubscription"},"children":["Create Webhook Subscription API"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A traveler (who's part of the partner's organization) books a flight on Spotnana. This triggers the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/webhookeventapi/webhooks/paths/pnr_v3/post"},"children":["PNR_V3"]}," event with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["operation"]}," as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BOOKING_CREATED"]},". The partner's system receives the booking details and knows that a new trip is in progress."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The supplier then processes the payment and issues a ticket for the booking. This triggers the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/webhookeventapi/webhooks/paths/pnr_v3/post"},"children":["PNR_V3"]}," event with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["operation"]}," as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BOOKING_TICKETED"]},". This indicates the payment has been made and the ticket has been issued to the traveler."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The partner endpoint receives this event along with the booking details, traveler info, pricing, and payment data."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The partner system uses this data to create an expense entry in their database."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If the traveler later cancels or exchanges the ticket, a ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/webhookeventapi/webhooks/paths/pnr_v3/post"},"children":["PNR_V3"]}," event is triggered with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["operation"]}," as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TICKET_VOIDED"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TICKET_REFUNDED"]},", and the partner updates or reverses the expense accordingly."]}]}]},"headings":[{"value":"Webhooks overview","id":"webhooks-overview","depth":1},{"value":"What are webhooks?","id":"what-are-webhooks","depth":2},{"value":"Spotnana webhooks workflow","id":"spotnana-webhooks-workflow","depth":2},{"value":"Sample use case","id":"sample-use-case","depth":2}],"frontmatter":{"seo":{"title":"Webhooks overview"}},"lastModified":"2026-06-18T12:59:39.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/webhooks/webhook-overview","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}