---
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.
    - `depAirport` string, required — This is the departure airport 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' | 'All' — This is the fare class, which is one of `Economy`, `PremiumEconomy`, `Business`, `First` and `All`, where `All` means query for all fare classes.

## Response `200`

OK

- SearchRequestSuccessful — This is the response when a `SearchRequest` is accepted.
  - `resultCode` integer — The result code is always `200` for accepted request.
  - `requestId` string — This value should be included in the polling later on.

## Other responses

- `400` — Bad Request

## Changes

- **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/704267da2188/schema)
