> ## Documentation Index
> Fetch the complete documentation index at: https://docs.travomatrix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Step 5: Find New Flight

Perform a search for the new desired travel date. Copy the `offer_id` of the flight you wish to switch to.

### Request Setup

<ParamField body="origin" type="string" default="DEL">3-letter IATA origin code.</ParamField>
<ParamField body="dest" type="string" default="BOM">3-letter IATA destination code.</ParamField>
<ParamField body="dod" type="string" default="20270515">Departure Date (YYYYMMDD).</ParamField>
<ParamField body="pax_adult" type="integer" default="1">Number of adults.</ParamField>

### Instructions

1. Review the requirements and set up the request payload.
2. Hit the **Send** button.

<Warning>
  **Requirement:** Copy the `search_id` and `signature` from the response. You will need them.
</Warning>


## OpenAPI

````yaml POST /flight/search
openapi: 3.0.3
info:
  title: Travomatrix B2B Travel API
  version: 1.0.0
  description: >
    Travomatrix is a high-performance multi-vertical travel booking engine
    designed for B2B enterprises.


    ### Verticals Supported

    - **Flights**: Unified interface for global GDS and NDC providers.

    - **Hotels**: Coming Soon.

    - **Rail**: Coming Soon.

    - **Cabs**: Coming Soon.


    ### Key Security & Reliability Headers

    - **X-API-Key**: Your primary server-to-server API key.

    - **Idempotency-Key**: Required for financial operations. Prevents duplicate
    actions on retries.

    - **X-Request-ID**: Optional but recommended. Used for tracing requests
    through the Travomatrix infrastructure.
servers:
  - url: https://api.travomatrix.com/api/v1
    description: Production Environment
  - url: http://uat.travomatrix.com/api/v1
    description: UAT Environment
  - url: http://localhost:80/api/v1
    description: Localhost (Port 80)
  - url: http://localhost:8080/api/v1
    description: Localhost (Port 8080)
security: []
paths:
  /flight/search:
    post:
      tags:
        - Flights - Operations
      summary: Search Flights
      parameters:
        - $ref: '#/components/parameters/RequestIDHeader'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequest'
            example:
              origin: DEL
              dest: BOM
              dod: '20270515'
              pax_adult: 1
              mode: b2b
      responses:
        '200':
          description: List of flight offers.
          content:
            application/json:
              schema:
                type: object
                properties:
                  search_id:
                    type: string
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/UnifiedOffer'
                  cursor:
                    type: string
        '400':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  parameters:
    RequestIDHeader:
      name: X-Request-ID
      in: header
      description: Unique correlation ID for tracing.
      required: false
      schema:
        type: string
  schemas:
    SearchRequest:
      type: object
      required:
        - origin
        - dest
        - dod
      example:
        origin: DEL
        dest: BOM
        dod: '20270515'
        pax_adult: 1
      properties:
        origin:
          type: string
          example: DEL
          pattern: ^[A-Z]{3}$
        dest:
          type: string
          example: DXB
          pattern: ^[A-Z]{3}$
        dod:
          type: string
          example: '20270501'
          pattern: ^\d{8}$
          description: Departure date in YYYYMMDD format.
        doa:
          type: string
          example: '20270505'
          pattern: ^\d{8}$
          description: Return date in YYYYMMDD format (optional for one-way).
        pax_adult:
          type: integer
          minimum: 1
          maximum: 9
          default: 1
        pax_child:
          type: integer
          minimum: 0
          maximum: 9
          default: 0
        pax_infant:
          type: integer
          minimum: 0
          maximum: 9
          default: 0
        cabin:
          type: string
          enum:
            - ECONOMY
            - PREMIUM_ECONOMY
            - BUSINESS
            - FIRST
        limit:
          type: integer
          default: 100
        cursor:
          type: string
          description: Pagination cursor obtained from the previous search response.
    UnifiedOffer:
      type: object
      properties:
        offer_id:
          type: string
        search_id:
          type: string
        signature:
          type: string
        airline:
          type: string
        segments:
          type: array
          items:
            $ref: '#/components/schemas/Segment'
        best_price_paise:
          type: integer
        currency:
          type: string
        pricing_breakdown:
          $ref: '#/components/schemas/PricingBreakdown'
        expires_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      properties:
        trace_id:
          type: string
          example: req_abc123
        error:
          $ref: '#/components/schemas/AppError'
    Segment:
      type: object
      properties:
        carrier:
          type: string
          pattern: ^[A-Z0-9]{2}$
        flight_no:
          type: string
        origin:
          type: string
          pattern: ^[A-Z]{3}$
        dest:
          type: string
          pattern: ^[A-Z]{3}$
        dep_time:
          type: string
          format: date-time
        arr_time:
          type: string
          format: date-time
        cabin:
          type: string
          enum:
            - ECONOMY
            - PREMIUM_ECONOMY
            - BUSINESS
            - FIRST
        booking_class:
          type: string
        seats_available:
          type: integer
    PricingBreakdown:
      type: object
      properties:
        base_fare:
          type: integer
          description: Base fare in Paise.
        taxes:
          type: integer
          description: Total taxes and fees in Paise.
        commission:
          type: integer
          description: Agent commission earned in Paise.
        ota_markup:
          type: integer
          description: Platform markup in Paise.
        agent_markup:
          type: integer
          description: Sub-agent markup in Paise.
        net_fare:
          type: integer
          description: >-
            Final amount to be debited from agent wallet (Base + Taxes + Markup
            - Commission).
        final_price:
          type: integer
          description: Total price to display to the end customer.
    AppError:
      type: object
      required:
        - category
        - code
        - message
      properties:
        category:
          type: string
          enum:
            - AUTH
            - SEARCH
            - BOOKING
            - WALLET
            - PROVIDER
            - SYSTEM
            - VALIDATION
        code:
          type: string
          example: BOOKING_FARE_EXPIRED
        message:
          type: string
          example: The selected fare has expired.
        retryable:
          type: boolean
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
        provider:
          $ref: '#/components/schemas/ProviderError'
    ValidationError:
      type: object
      properties:
        field:
          type: string
          example: passengers[0].first_name
        code:
          type: string
          example: REQUIRED
        message:
          type: string
          example: First name is required.
    ProviderError:
      type: object
      properties:
        name:
          type: string
          example: AMADEUS
        code:
          type: string
          example: '32171'
        message:
          type: string
          example: Price has changed
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````