---
title: "Create a search request"
method: POST
path: "/searches"
tags: ["Shopping"]
---

# Create a search request

`POST /searches`

A `requestId` will be returned given a valid search request. This `requestId` is required for polling for search results later on.

## Request body

- SearchRequest — This is the payload to be sent when calling `/searches` endpoint.
  - `queries` Query[], required — This is a list containing the same number of queries as the number of flights for the trip. For one-way trip there should be one query, whereas for round trip there should be two queries.
    - `depCity` string, required — This is the departure city specified using its IATA code.
    - `depAirport` string, required — This is the departure airport specified using its IATA code.
    - `arrCity` string, required — This is the arrival city specified using its IATA code.
    - `arrAirport` string, required — This is the arrival airport specified using its IATA code.
    - `date` string, required — This is the departure date in `YYYYMMDD` format
  - `type` 'OW' | 'RT' — This is the trip type, where `OW` is for one-way trip and `RT` is for round trip.
  - `adultAmount` integer, required — This is the number of adult passengers
  - `childAmount` integer — This is the number of child passengers
  - `infantAmount` integer — This is the number of infant passengers
  - `fareClass` 'Economy' | 'PremiumEconomy' | 'Business' | 'First' — This is the fare class, which is one of `Economy`, `PremiumEconomy`, `Business` and `First`.

## Response `200`

OK

- SearchResponse
  - `message` string — message returned by server side if there is any

## Other responses

- `400` — Bad Request

## Changes

- **2021-09-28** `e0e4c01254e9` — 1 breaking
  - removed the enum value `All` of the request property `fareClass`
- **2021-08-04** `a988ec9f3541` — 3 breaking, 4 info
  - added the new required request property `queries/items/arrCity`
  - added the new required request property `queries/items/depCity`
  - removed the media type `text/plain` for the response with the status `400`
  - the `queries/items/arrAirport` request property's minLength was decreased from `3` to `0`
  - …3 more
- **2021-08-02** `d999b55b251f` — 1 breaking, 1 warning, 1 info
  - removed the media type `application/json` for the response with the status `400`
  - removed the optional property `resultCode` from the response with the `200` status
  - added the media type `text/plain` for the response with the status `400`
- **2021-07-20** `704267da2188` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/newpathfly/apis/virtual-interlining-api/changes/searches/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/422128cc2430/schema)
