Skip to main content

Search Min Fare

Search for the cheapest flight fares within a specified date range or period. This endpoint helps find the most affordable travel dates for flexible travelers.


Endpoint

  • URL: /api/v1/flight/searchminfare
  • Method: POST
  • Auth Required: Yes (Bearer Token/X-API-KEY)
  • Content-Type: application/json

Authentication

This endpoint requires a valid JWT Bearer token in the Authorization header:

Authorization: Bearer <access_token>

Obtain tokens via /api/v1/sign-in (POST) with your credentials.


Request Structure

FieldTypeRequiredDescription
systemstringYesBooking system code (e.g., VN, VJ, 1A)
searchModestringNoSearch mode (wholemonth, nextsday, nearday)
monthintegerNoMonth for search (1-12)
yearintegerNoYear for search
routeobjectNoRoute information (see SearchRoute)

SearchRoute Object

FieldTypeRequiredDescription
legintegerNoFlight segment sequence number
startPointstringNoDeparture airport code (3-letter IATA)
endPointstringNoArrival airport code (3-letter IATA)
departDatestringNoDeparture date (ddMMyyyy format, e.g., 20122024)
preferCabinstringNoCabin preference (F, C, W, M, Y)

Search Mode Options

  • wholemonth: Find cheapest fares for an entire month (default)
  • nextsday: Find cheapest fares for the next 30 days from selected date
  • nearday: Find cheapest fares within ±3 days of selected date

Cabin Class Codes

  • F: First Class
  • C: Business Class
  • W: Premium Economy
  • M: Non-premium Economy
  • Y: Economy

Example Request:

{
"system": "VN",
"searchMode": "wholemonth",
"month": 6,
"year": 2024,
"route": {
"leg": 1,
"startPoint": "SGN",
"endPoint": "HAN",
"departDate": "02062024",
"preferCabin": "Y"
}
}

Request Constraints & Business Rules

  • Either month/year or departDate in route should be provided depending on search mode.
  • wholemonth mode requires month and year.
  • nextsday and nearday modes require departDate in route.
  • Airport codes must be valid 3-letter IATA codes.
  • Search is typically limited to the next 12 months for availability.
  • Results are based on lowest available published fares.

Response Structure

FieldTypeNullableDescription
systemstringYesSystem name (e.g., VN, VJ, 1A)
statusbooleanNotrue if successful, false if failed
errorobjectYesError details (if any)
descriptionstringYesError description (if any)
trackingIdstringYesTracking ID for request logs
trackingTimestringYesTime for request tracking (ISO 8601 format)
minFaresarrayYesList of minimum fares by date (see MinFare)

MinFare Object

FieldTypeNullableDescription
datestringYesDate (YYYY-MM-DD format)
totalPricenumberNoMinimum total price for that date

Example Response:

{
"system": "VN",
"status": true,
"error": null,
"description": null,
"trackingId": "abc-123",
"trackingTime": "2024-06-01T12:00:00Z",
"minFares": [
{
"date": "2024-06-01",
"totalPrice": 2100000
},
{
"date": "2024-06-02",
"totalPrice": 2350000
},
{
"date": "2024-06-03",
"totalPrice": 1950000
},
{
"date": "2024-06-04",
"totalPrice": 2200000
},
{
"date": "2024-06-05",
"totalPrice": 2450000
}
]
}

Error Codes

See Error Codes for details on possible error responses.


Security & Validation

  • All input is validated for type and required fields.
  • Only authenticated users can access this endpoint.
  • Airport codes are validated against IATA standards.
  • Date ranges are validated to ensure reasonable search periods.
  • All search actions are logged and traceable.

Validation Questions

  • What is the maximum date range that can be searched?
  • Are promotional fares included in minimum fare results?
  • How frequently are minimum fare data updated?
  • Can results be filtered by specific fare classes or booking codes?

For integration support, see Contact Support.