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

# Create a search request

`POST /shopping/searches`

A `SearchResponse` containing a `requestId` will be returned given a valid `SearchRequest`.

This `requestId` is required for polling for results later on.

## Request body

- SearchRequest — todo
  - `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
> This is a `SearchResponse` containing a `requestId` that can be referred to in `PollRequest`.

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

## Other responses

- `400` — Bad Request > Check if anything incorrect or missing in the given `SearchRequest`. See `message` for any error message.

## Changes

- **2021-11-12** `c3e56ec8db70` — 1 info
  - endpoint added
- **2021-07-20** `704267da2188` — 1 breaking
  - api path removed without deprecation

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