# Duffel

> Search flight offers and retrieve airline, airport, order and payment records.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/duffel

## Actions

### Get aircraft

Get aircraft in Duffel.

**Inputs**

- Aircraft ID (`aircraft_id`, text, required): Aircraft id.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": {
      "iata_code": "example",
      "id": "example",
      "name": "example"
    }
  }
}
```

### Get airline

Get airline in Duffel.

**Inputs**

- Airline ID (`airline_id`, text, required): Airline id.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": {
      "iata_code": "example",
      "id": "example",
      "name": "example"
    }
  }
}
```

### Get airport

Get airport in Duffel.

**Inputs**

- Airport ID (`airport_id`, text, required): Airport id.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": {
      "iata_code": "example",
      "id": "example",
      "name": "example"
    }
  }
}
```

### Get offer

Get offer in Duffel.

**Inputs**

- Offer ID (`offer_id`, text, required): Offer id.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": {
      "expires_at": "example",
      "id": "example",
      "owner": {
        "iata_code": "example",
        "id": "example",
        "name": "example"
      },
      "slices": [
        {}
      ],
      "total_amount": "example",
      "total_currency": "example"
    }
  }
}
```

### Get offer request

Get offer request in Duffel.

**Inputs**

- Offer request (`offer_request_id`, text, required): Offer request id.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": {
      "cabin_class": "example",
      "created_at": "example",
      "id": "example",
      "offers": [
        {
          "expires_at": "example",
          "id": "example",
          "owner": {
            "iata_code": "example",
            "id": "example",
            "name": "example"
          },
          "slices": [
            {}
          ],
          "total_amount": "example",
          "total_currency": "example"
        }
      ],
      "slices": [
        {}
      ]
    }
  }
}
```

### Get order

Get order in Duffel.

**Inputs**

- Order (`order_id`, text, required): Order id.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": {
      "booking_reference": "example",
      "cancelled_at": "example",
      "created_at": "example",
      "id": "example",
      "live_mode": true,
      "total_amount": "example",
      "total_currency": "example"
    }
  }
}
```

### Get order cancellation

Get order cancellation in Duffel.

**Inputs**

- Cancellation ID (`cancellation_id`, text, required): Cancellation id.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": {
      "confirmed_at": "example",
      "id": "example",
      "order_id": "example",
      "refund_amount": "example",
      "refund_currency": "example"
    }
  }
}
```

### Get order payment

Get order payment in Duffel.

**Inputs**

- Payment ID (`payment_id`, text, required): Payment id.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": {
      "amount": "example",
      "currency": "example",
      "id": "example",
      "order_id": "example",
      "status": "example"
    }
  }
}
```

### List aircraft

List aircraft in Duffel.

**Inputs**

- Limit (`limit`, number): Limit. From 1 to 200.
- After (`after`, text): Next-page cursor returned by Duffel.
- Before (`before`, text): Previous-page cursor returned by Duffel.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "iata_code": "example",
        "id": "example",
        "name": "example"
      }
    ],
    "meta": {
      "after": "example",
      "before": "example",
      "limit": 1
    }
  }
}
```

### List airlines

List airlines in Duffel.

**Inputs**

- Limit (`limit`, number): Limit. From 1 to 200.
- After (`after`, text): Next-page cursor returned by Duffel.
- Before (`before`, text): Previous-page cursor returned by Duffel.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "iata_code": "example",
        "id": "example",
        "name": "example"
      }
    ],
    "meta": {
      "after": "example",
      "before": "example",
      "limit": 1
    }
  }
}
```

### List airports

List airports in Duffel.

**Inputs**

- Limit (`limit`, number): Limit. From 1 to 200.
- After (`after`, text): Next-page cursor returned by Duffel.
- Before (`before`, text): Previous-page cursor returned by Duffel.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "iata_code": "example",
        "id": "example",
        "name": "example"
      }
    ],
    "meta": {
      "after": "example",
      "before": "example",
      "limit": 1
    }
  }
}
```

### List loyalty programmes

List loyalty programmes in Duffel.

**Inputs**

- Limit (`limit`, number): Limit. From 1 to 200.
- After (`after`, text): Next-page cursor returned by Duffel.
- Before (`before`, text): Previous-page cursor returned by Duffel.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "iata_code": "example",
        "id": "example",
        "name": "example"
      }
    ],
    "meta": {
      "after": "example",
      "before": "example",
      "limit": 1
    }
  }
}
```

### List offer requests

List offer requests in Duffel.

**Inputs**

- Limit (`limit`, number): Limit. From 1 to 200.
- After (`after`, text): Next-page cursor returned by Duffel.
- Before (`before`, text): Previous-page cursor returned by Duffel.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "cabin_class": "example",
        "created_at": "example",
        "id": "example",
        "offers": [
          {
            "expires_at": "example",
            "id": "example",
            "owner": {
              "iata_code": "example",
              "id": "example",
              "name": "example"
            },
            "slices": [
              {}
            ],
            "total_amount": "example",
            "total_currency": "example"
          }
        ],
        "slices": [
          {}
        ]
      }
    ],
    "meta": {
      "after": "example",
      "before": "example",
      "limit": 1
    }
  }
}
```

### List offers

List offers in Duffel.

**Inputs**

- Limit (`limit`, number): Limit. From 1 to 200.
- After (`after`, text): Next-page cursor returned by Duffel.
- Before (`before`, text): Previous-page cursor returned by Duffel.
- Offer request (`offer_request_id`, text, required): Offer request id.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "expires_at": "example",
        "id": "example",
        "owner": {
          "iata_code": "example",
          "id": "example",
          "name": "example"
        },
        "slices": [
          {}
        ],
        "total_amount": "example",
        "total_currency": "example"
      }
    ],
    "meta": {
      "after": "example",
      "before": "example",
      "limit": 1
    }
  }
}
```

### List order cancellations

List order cancellations in Duffel.

**Inputs**

- Limit (`limit`, number): Limit. From 1 to 200.
- After (`after`, text): After.
- Before (`before`, text): Before.
- Order (`order_id`, text): Order id.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "confirmed_at": "example",
        "id": "example",
        "order_id": "example",
        "refund_amount": "example",
        "refund_currency": "example"
      }
    ],
    "meta": {
      "after": "example",
      "before": "example",
      "limit": 1
    }
  }
}
```

### List order payments

List order payments in Duffel.

**Inputs**

- Limit (`limit`, number): Limit. From 1 to 200.
- After (`after`, text): After.
- Before (`before`, text): Before.
- Order (`order_id`, text): Order id.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "amount": "example",
        "currency": "example",
        "id": "example",
        "order_id": "example",
        "status": "example"
      }
    ],
    "meta": {
      "after": "example",
      "before": "example",
      "limit": 1
    }
  }
}
```

### List orders

List orders in Duffel.

**Inputs**

- Limit (`limit`, number): Limit. From 1 to 200.
- After (`after`, text): Next-page cursor returned by Duffel.
- Before (`before`, text): Previous-page cursor returned by Duffel.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "booking_reference": "example",
        "cancelled_at": "example",
        "created_at": "example",
        "id": "example",
        "live_mode": true,
        "total_amount": "example",
        "total_currency": "example"
      }
    ],
    "meta": {
      "after": "example",
      "before": "example",
      "limit": 1
    }
  }
}
```

### List seat maps for an offer

List seat maps for an offer in Duffel.

**Inputs**

- Offer ID (`offer_id`, text, required): Offer id.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "cabins": [
          {}
        ],
        "id": "example",
        "slice_id": "example"
      }
    ]
  }
}
```

### Search airports and cities

Search airports and cities in Duffel.

**Inputs**

- Query (`query`, text, required): Query.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "iata_code": "example",
        "id": "example",
        "name": "example"
      }
    ]
  }
}
```

### Search flights for one leg

Search flights for one leg in Duffel.

**Inputs**

- Origin (`origin`, text, required): Departure airport or city IATA code.
- Destination (`destination`, text, required): Arrival airport or city IATA code.
- Departure date (`departure_date`, date, required): Departure date.
- Adults (`adults`, number, required): Number of adult travelers. From 1 to 9.
- Cabin class (`cabin_class`, text): Cabin class. One of: `economy`, `premium_economy` (Premium economy), `business`, `first`.
- Return offers (`return_offers`, true/false): Return offers.

**Outputs**

- `data` (object): The response from Duffel.

**Example output**

```json
{
  "data": {
    "data": {
      "id": "example",
      "offers": [
        {
          "expires_at": "example",
          "id": "example",
          "owner": {
            "iata_code": "example",
            "id": "example",
            "name": "example"
          },
          "slices": [
            {}
          ],
          "total_amount": "example",
          "total_currency": "example"
        }
      ],
      "slices": [
        {}
      ]
    }
  }
}
```
