---
title: "Poll for search results"
method: POST
path: "/polls"
tags: ["Shopping"]
---

# Poll for search results

`POST /polls`

A `requestId` is needed for polling for search results corresponding to its search request.

## Request body

- SearchResultPoll — This is the payload to be sent when calling `/polls` endpoint. The virtual interlining engine will mostly likely keep generating results at the backend, so stop calling this endpoint when number of results is good enough as a general practice.
  - `requestId` string, required — This is the request ID for which to be polled.
  - `offset` integer — This is the offset of the results to be polled next.
  - `size` integer — This is the maximum number of results to be polled. The actual number of results might be less when there is no more results available at the moment.

## Response `200`

OK

- SearchResult — This result contains up to the number of flight trips specified by `size` in the request.
  - `resultCode` integer — The result code is `200` for a successful poll and it is `400` otherwise.
  - `message` string — This message contains the reason for a failed poll.
  - `currencyCode` string — This is the 3-letter currency code in which price is provided.
  - `trips` Trip[] — This is a list of trips based on `queries` and `TripType` in the corresponding `SearchRequest`.
    - `flights` Flight[] — A one-way trip consists of one flight. A round-trip consists of two flights going forth and back between two places.
      - `segments` Segment[] — A flight consists of one or more segments. For example, a direct flight from Toronto (YYZ) to London (LON) is a flight consists of exactly one flight segment.
        - `fareClass` 'Economy' | 'PremiumEconomy' | 'Business' | 'First' | 'All' — This is the fare class, which is one of `Economy`, `PremiumEconomy`, `Business`, `First` and `All`, where `All` means query for all fare classes.
        - `depDate` string — This is the departure date in `YYYYMMDD` format.
        - `depTime` string — This is the departure time in `HH:mm` format.
        - `depAirport` string — This is the departure airport specified using its IATA code.
        - `arrDate` string — This is the arrival date in `YYYYMMDD` format.
        - `arrTime` string — This is the arrival time in `HH:mm` format.
        - `arrAirport` string — This is the arrival airport specified using its IATA code.
        - `flightNo` string — This is the flight number starting with carrier IATA code.
        - `carrier` string — This is the 2-letter IATA carrier code
    - `prices` object — This is a map between each price type and the actual pricing information. `ADT`, `CHD` and `INF` correspond to each individual passenger type. `ALL` corresponds to all passengers. The total price in `ALL` should equal to `ADT` * `adultAmount` + `CHD` * `childAmount` + `INF` * `infantAmount`.
      - `ADT` Price — This is the pricing information including `price`, `tax` and `totalPrice`.
        - `price` number, double — This it the before tax price.
        - `tax` number, double — This it the tax.
        - `totalPrice` number, double — This it the total price including tax.
        - `seatsStatus` 'EMPTY' | 'ENOUGH' | 'LIMITED' — Seat status is `EMPTY` when there is no seat. Else, it is `LIMITED` when there are less than 8 seats. Else, it is `ENOUGH`.
        - `currencyCode` string — This is the 3-letter currency code in which price is provided.
      - `CHD` Price — This is the pricing information including `price`, `tax` and `totalPrice`.
        - `price` number, double — This it the before tax price.
        - `tax` number, double — This it the tax.
        - `totalPrice` number, double — This it the total price including tax.
        - `seatsStatus` 'EMPTY' | 'ENOUGH' | 'LIMITED' — Seat status is `EMPTY` when there is no seat. Else, it is `LIMITED` when there are less than 8 seats. Else, it is `ENOUGH`.
        - `currencyCode` string — This is the 3-letter currency code in which price is provided.
      - `INF` Price — This is the pricing information including `price`, `tax` and `totalPrice`.
        - `price` number, double — This it the before tax price.
        - `tax` number, double — This it the tax.
        - `totalPrice` number, double — This it the total price including tax.
        - `seatsStatus` 'EMPTY' | 'ENOUGH' | 'LIMITED' — Seat status is `EMPTY` when there is no seat. Else, it is `LIMITED` when there are less than 8 seats. Else, it is `ENOUGH`.
        - `currencyCode` string — This is the 3-letter currency code in which price is provided.
      - `ALL` Price — This is the pricing information including `price`, `tax` and `totalPrice`.
        - `price` number, double — This it the before tax price.
        - `tax` number, double — This it the tax.
        - `totalPrice` number, double — This it the total price including tax.
        - `seatsStatus` 'EMPTY' | 'ENOUGH' | 'LIMITED' — Seat status is `EMPTY` when there is no seat. Else, it is `LIMITED` when there are less than 8 seats. Else, it is `ENOUGH`.
        - `currencyCode` string — This is the 3-letter currency code in which price is provided.

## Changes

- **2021-07-20** `704267da2188` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/newpathfly/apis/virtual-interlining-api/changes/polls/post.md)

---

[API](https://skmtc.dev/newpathfly/apis/virtual-interlining-api.md) · [All operations](https://skmtc.dev/newpathfly/apis/virtual-interlining-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/newpathfly/virtual-interlining-api/revisions/704267da2188/schema)
