Duffel Order Cancellations API

Cancel an existing order and preview refunds.

OpenAPI Specification

duffel-order-cancellations-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Duffel Ancillaries Order Cancellations 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: Order Cancellations
  description: Cancel an existing order and preview refunds.
paths:
  /air/order_cancellations:
    post:
      operationId: createOrderCancellation
      tags:
      - Order Cancellations
      summary: Create a pending order cancellation
      description: Previews the refund amount for cancelling an order.
      parameters:
      - $ref: '#/components/parameters/DuffelVersion'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '201':
          description: The pending order cancellation with refund details.
    get:
      operationId: listOrderCancellations
      tags:
      - Order Cancellations
      summary: List order cancellations
      parameters:
      - $ref: '#/components/parameters/DuffelVersion'
      - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          description: A paginated list of order cancellations.
  /air/order_cancellations/{id}:
    get:
      operationId: getOrderCancellation
      tags:
      - Order Cancellations
      summary: Get a single order cancellation
      parameters:
      - $ref: '#/components/parameters/DuffelVersion'
      - $ref: '#/components/parameters/PathId'
      responses:
        '200':
          description: The order cancellation.
  /air/order_cancellations/{id}/actions/confirm:
    post:
      operationId: confirmOrderCancellation
      tags:
      - Order Cancellations
      summary: Confirm an order cancellation
      description: Confirms a pending cancellation, refunding and voiding the order.
      parameters:
      - $ref: '#/components/parameters/DuffelVersion'
      - $ref: '#/components/parameters/PathId'
      responses:
        '200':
          description: The confirmed order cancellation.
components:
  parameters:
    PathId:
      name: id
      in: path
      required: true
      schema:
        type: string
    Limit:
      name: limit
      in: query
      schema:
        type: integer
        default: 50
        maximum: 200
    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
  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).'