openapi: 3.0.1 info: title: Duffel Ancillaries Webhooks API description: The Duffel API is a REST API to sell travel - flights, accommodation (Stays), and ancillaries. It covers offer requests and offers, orders, payments, seat maps, ancillary services, accommodation search and booking, and webhooks. Requests are authenticated with a Bearer access token and must include a Duffel-Version header identifying the API version. termsOfService: https://duffel.com/legal/terms-of-use contact: name: Duffel Support url: https://help.duffel.com version: v2 servers: - url: https://api.duffel.com security: - bearerAuth: [] tags: - name: Webhooks description: Register endpoints to receive event notifications. paths: /air/webhooks: post: operationId: createWebhook tags: - Webhooks summary: Create a webhook parameters: - $ref: '#/components/parameters/DuffelVersion' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateWebhook' responses: '201': description: The webhook was created. get: operationId: listWebhooks tags: - Webhooks summary: List webhooks parameters: - $ref: '#/components/parameters/DuffelVersion' responses: '200': description: A paginated list of webhooks. /air/webhooks/{id}: patch: operationId: updateWebhook tags: - Webhooks summary: Update a webhook parameters: - $ref: '#/components/parameters/DuffelVersion' - $ref: '#/components/parameters/PathId' requestBody: required: true content: application/json: schema: type: object responses: '200': description: The updated webhook. delete: operationId: deleteWebhook tags: - Webhooks summary: Delete a webhook parameters: - $ref: '#/components/parameters/DuffelVersion' - $ref: '#/components/parameters/PathId' responses: '204': description: The webhook was deleted. /air/webhooks/{id}/actions/ping: post: operationId: pingWebhook tags: - Webhooks summary: Ping a webhook parameters: - $ref: '#/components/parameters/DuffelVersion' - $ref: '#/components/parameters/PathId' responses: '204': description: A ping event was sent to the webhook. components: schemas: CreateWebhook: type: object required: - data properties: data: type: object required: - url - events properties: url: type: string format: uri events: type: array items: type: string example: order.created parameters: DuffelVersion: name: Duffel-Version in: header required: true description: The version of the Duffel API to use for this request. schema: type: string default: v2 PathId: name: id in: path required: true schema: type: string securitySchemes: bearerAuth: type: http scheme: bearer description: 'Authenticate with your Duffel access token as a Bearer token in the Authorization header (Authorization: Bearer YOUR_ACCESS_TOKEN).'