Webhook Events
Events that happen and are delivered to a webhook endpoint.
Schema
The ISO 8601 datetime at which the webhook event was created
"2020-04-11 15:48:11.642000+00:00"The type of the webhook event
"air.airline_credit.created", "air.airline_credit.spent", "air.airline_credit.invalidated", "air.payment.failed", "air.payment.succeeded", "air.payment.cancelled", "air.payment.pending", "order.airline_initiated_change_detected", "order.created", "order.creation_failed", "air.order.changed", "order_cancellation.created", "order_cancellation.confirmed", "cars.booking.created", "cars.booking.cancelled", "cars.booking_creation_failed", "stays.booking_creation_failed", "stays.booking.created", "stays.booking.cancelled", "assistant.conversation.updated", or "ping.triggered"Retry delivering a webhook event
Send an event again to every active webhook subscribed to its type. Webhooks that already received the event will receive it again.
This returns 204 once every webhook has accepted the event. If any webhook doesn't, this
returns an error after trying all of them.
To find the events one webhook failed to receive, list webhook deliveries with its
endpoint_id and delivery_success=false.
Endpoint
POST https://api.duffel.com/air/webhooks/events/{id}/actions/redeliver
Request
curl -X POST --compressed "https://api.duffel.com/air/webhooks/events/{id}/actions/redeliver" \-H "Accept-Encoding: gzip" \-H "Accept: application/json" \-H "Duffel-Version: v2" \-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"
Response
No response body
Endpoint
GET https://api.duffel.com/air/webhooks/events/{id}
Request
curl -X GET --compressed "https://api.duffel.com/air/webhooks/events/{id}" \-H "Accept-Encoding: gzip" \-H "Accept: application/json" \-H "Duffel-Version: v2" \-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"
Response
{"data": {"type": "order.created","live_mode": true,"idempotency_key": "ord_0000ABd6wggSct7BoraU1o","id": "wev_0000A3tQSmKyqOrcySrGbo","data": {"object": {"offer_id": "off_00009htYpSCXrwaB9DnUm0","id": "ord_00009hthhsUZ8W4LxQgkjo"}},"created_at": "2020-04-11 15:48:11.642000+00:00","api_version": "v2"}}
List webhook events
Retrieve a paginated list of webhook events
Query parameters
The maximum number of records to return per page. Defaults to 50.
May be set to any integer between 1 and 200. For more information on how to paginate through records, see the Pagination section.
150A cursor pointing to the previous page of records. For more information on how to paginate through records, see the Pagination section.
"g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="A cursor pointing to the next page of records. For more information on how to paginate through records, see the Pagination section.
"g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="Endpoint
GET https://api.duffel.com/air/webhooks/events
Request
curl -X GET --compressed "https://api.duffel.com/air/webhooks/events?limit=1&before=g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB=&after=g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB=&created_at=undefined&type=order.created&delivery_success=true" \-H "Accept: application/json" \-H "Accept-Encoding: gzip" \-H "Duffel-Version: v2" \-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"
Response
{"meta": {"limit": 50,"after": "g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="},"data": [{"type": "order.created","live_mode": true,"idempotency_key": "ord_0000ABd6wggSct7BoraU1o","id": "wev_0000A3tQSmKyqOrcySrGbo","data": {"object": {"offer_id": "off_00009htYpSCXrwaB9DnUm0","id": "ord_00009hthhsUZ8W4LxQgkjo"}},"created_at": "2020-04-11 15:48:11.642000+00:00","api_version": "v2"}]}