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
| Field | Type | Required | Description |
|---|---|---|---|
| system | string | Yes | Booking system code (e.g., VN, VJ, 1A) |
| searchMode | string | No | Search mode (wholemonth, nextsday, nearday) |
| month | integer | No | Month for search (1-12) |
| year | integer | No | Year for search |
| route | object | No | Route information (see SearchRoute) |
SearchRoute Object
| Field | Type | Required | Description |
|---|---|---|---|
| leg | integer | No | Flight segment sequence number |
| startPoint | string | No | Departure airport code (3-letter IATA) |
| endPoint | string | No | Arrival airport code (3-letter IATA) |
| departDate | string | No | Departure date (ddMMyyyy format, e.g., 20122024) |
| preferCabin | string | No | Cabin 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/yearordepartDatein route should be provided depending on search mode. wholemonthmode requiresmonthandyear.nextsdayandneardaymodes requiredepartDatein 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
| Field | Type | Nullable | Description |
|---|---|---|---|
| system | string | Yes | System name (e.g., VN, VJ, 1A) |
| status | boolean | No | true if successful, false if failed |
| error | object | Yes | Error details (if any) |
| description | string | Yes | Error description (if any) |
| trackingId | string | Yes | Tracking ID for request logs |
| trackingTime | string | Yes | Time for request tracking (ISO 8601 format) |
| minFares | array | Yes | List of minimum fares by date (see MinFare) |
MinFare Object
| Field | Type | Nullable | Description |
|---|---|---|---|
| date | string | Yes | Date (YYYY-MM-DD format) |
| totalPrice | number | No | Minimum 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.