# Offer Requests

To search for flights, you'll need to create an offer request. An offer request describes the passengers and where and when they want to travel (in the form of a list of slices). It may also include additional filters (e.g. a particular cabin to travel in).

## List offer requests

Retrieves a paginated list of your offer requests. The results may be returned in any order.

### Query parameters

**after**

string

A cursor pointing to the previous page of records.

Example: `"g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="`

**before**

string

A cursor pointing to the next page of records.

Example: `"g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="`

**limit**

integer

The maximum number of records to return per page. Defaults to `50`. May be set to any integer between `1` and `200`.

Example: `1`

Default value: `50`

### Endpoint

```bash
GET https://api.duffel.com/air/offer_requests
```

### Request

```bash
curl -X GET --compressed "https://api.duffel.com/air/offer_requests?after=g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB=&before=g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB=&limit=1" \
  -H "Accept-Encoding: gzip" \
  -H "Accept: application/json" \
  -H "Duffel-Version: v2" \
  -H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"
```

### Response

```json
{
  "meta": {
    "limit": 50,
    "after": "g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="
  },
  "data": [
    {
      "slices": [
        {
          "origin_type": "airport",
          "origin": {
            "type": "airport",
            "time_zone": "Europe/London",
            "name": "Heathrow",
            "longitude": -141.951519,
            "latitude": 64.068865,
            "id": "arp_lhr_gb",
            "icao_code": "EGLL",
            "iata_country_code": "GB",
            "iata_code": "LHR",
            "iata_city_code": "LON",
            "city_name": "London",
            "city": {
              "name": "London",
              "id": "cit_lon_gb",
              "iata_country_code": "GB",
              "iata_code": "LON",
              "airports": [
                {
                  "time_zone": "Europe/London",
                  "name": "Heathrow",
                  "longitude": -141.951519,
                  "latitude": 64.068865,
                  "id": "arp_lhr_gb",
                  "icao_code": "EGLL",
                  "iata_country_code": "GB",
                  "iata_code": "LHR"
                }
              ]
            },
            "airports": [
              {
                "time_zone": "Europe/London",
                "name": "Heathrow",
                "longitude": -141.951519,
                "latitude": 64.068865,
                "id": "arp_lhr_gb",
                "icao_code": "EGLL",
                "iata_country_code": "GB",
                "iata_code": "LHR",
                "iata_city_code": "LON",
                "city_name": "London",
                "city": {
                  "name": "London",
                  "id": "cit_lon_gb",
                  "iata_country_code": "GB",
                  "iata_code": "LON",
                  "airports": [
                    {
                      "time_zone": "Europe/London",
                      "name": "Heathrow",
                      "longitude": -141.951519,
                      "latitude": 64.068865,
                      "id": "arp_lhr_gb",
                      "icao_code": "EGLL",
                      "iata_country_code": "GB",
                      "iata_code": "LHR"
                    }
                  ]
                }
              }
            ]
          },
          "destination_type": "airport",
          "destination": {
            "type": "airport",
            "time_zone": "Europe/London",
            "name": "Heathrow",
            "longitude": -141.951519,
            "latitude": 64.068865,
            "id": "arp_lhr_gb",
            "icao_code": "EGLL",
            "iata_country_code": "GB",
            "iata_code": "LHR",
            "iata_city_code": "LON",
            "city_name": "London",
            "city": {
              "name": "London",
              "id": "cit_lon_gb",
              "iata_country_code": "GB",
              "iata_code": "LON",
              "airports": [
                {
                  "time_zone": "Europe/London",
                  "name": "Heathrow",
                  "longitude": -141.951519,
                  "latitude": 64.068865,
                  "id": "arp_lhr_gb",
                  "icao_code": "EGLL",
                  "iata_country_code": "GB",
                  "iata_code": "LHR"
                }
              ]
            },
            "airports": [
              {
                "time_zone": "Europe/London",
                "name": "Heathrow",
                "longitude": -141.951519,
                "latitude": 64.068865,
                "id": "arp_lhr_gb",
                "icao_code": "EGLL",
                "iata_country_code": "GB",
                "iata_code": "LHR",
                "iata_city_code": "LON",
                "city_name": "London",
                "city": {
                  "name": "London",
                  "id": "cit_lon_gb",
                  "iata_country_code": "GB",
                  "iata_code": "LON",
                  "airports": [
                    {
                      "time_zone": "Europe/London",
                      "name": "Heathrow",
                      "longitude": -141.951519,
                      "latitude": 64.068865,
                      "id": "arp_lhr_gb",
                      "icao_code": "EGLL",
                      "iata_country_code": "GB",
                      "iata_code": "LHR"
                    }
                  ]
                }
              }
            ]
          },
          "departure_date": "2020-04-24"
        }
      ],
      "live_mode": false,
      "id": "orq_00009hjdomFOCJyxHG7k7k",
      "created_at": "2020-02-12T15:21:01.927Z",
      "client_key": "SFMyNTY.g2gDdAAAAANkAAlsaXZlX21vZGVkAAVmYWxzZWQAD29yZ2FuaXNhdGlvbl9pZG0AAAAab3JnXzAwMDA5VWhGY29ERGk5TTFTRjhiS2FkAAtyZXNvdXJjZV9pZG0AAAAab3JxXzAwMDBBVkZWZnFJUXFBWXpYeVRRVlVuBgDpOCvdhwFiAAFRgA.df1RmLeBFUR7r1WFHHiEksilfSZNLhmPX0nj5VOKWJ4",
      "cabin_class": "economy"
    }
  ]
}
```

### Get a single offer request

Retrieves an offer request by its ID

### URL parameters

**id**

string

Duffel's unique identifier for the offer request

Example: `"orq_00009hjdomFOCJyxHG7k7k"`

### Query parameters

**view**

enum

The format of the response. When set to `offers` (the default), the response includes a flat list of offers.
When set to `itineraries`, offers are grouped into a hierarchical structure of slices, itineraries, and brands,
with shared data (airlines, places, aircraft) in top-level reference maps.

Possible values: `"offers"` or `"itineraries"`

Default value: `"offers"`

### Endpoint

```bash
GET https://api.duffel.com/air/offer_requests/{id}
```
