BRK Flight API Documentation

This document provides comprehensive documentation for the BRK Flight API, which enables partners to search flights and create bookings across multiple providers.

Base URL: https://api.brk360.net/v2

Authentication

Before using the API, you need to authenticate to receive a token.

POST /login

Request Body

{
  "email": "testapi@brk360.net",
  "password": "TEST112233$$"
}

Response

{
  "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
  "user": {
    "id": 123,
    "name": "Test API User",
    "email": "testapi@brk360.net",
    "balance": 1000.50
  }
}
Authentication for Subsequent Requests:
For all subsequent requests, include the received token in the Authorization header: Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...

Get Fare Rules

Retrieve the fare rules for a specific flight. This endpoint returns detailed information about cancellation policies, modification rules, baggage allowances, and other terms and conditions associated with the flight.

GET /flights/v2/rules/{flight_key}

URL Parameters

Parameter Description Required
flight_key The flight key identifier obtained from the flight search results (e.g., brk_api_690a24dac9e7b_17_1762272474). Required

Headers

Header Description Required
Authorization Bearer token obtained from the login endpoint Required
Accept Application/json (recommended) Optional

cURL Example

curl 'https://api.brk360.net/v2/flights/v2/rules/brk_api_690a24dac9e7b_17_1762272474' \
  -H 'Accept: */*' \
  -H 'Authorization: Bearer YOUR_TOKEN_HERE' \
  -H 'Content-Type: application/json'

Response

The response contains fare rules grouped by airline and route segments.

{
    "status": true,
    "data": {
        "fareRules": [
            {
                "group": {
                    "airline": "G9",
                    "cities": "BGW-SHJ"
                },
                "details": [
                    {
                        "title": "FareRuleReference",
                        "text": "4. Flight times, changes, cancellations and credit:\na) Reservations can be modified\/cancelled up to 24 hours before local scheduled flight departure time by contacting our call center\/sales centers or appointed travel agents. Following *charges will apply:\nModification\nAED 200 Per Passenger each way (Fare difference applies for modification)\nCancellation\nAED 200 Per Passenger each way\nb) Within 24 hours before departure - No changes permitted.\nc) For Ultimate fare, It is mandatory to cancel the booking any time before 24 hours from the scheduled departure, and immediately submit the CFAR refund request through the link https:\/\/CFARTune.amaglobalassistance.com. CFAR Claims submitted within 24 hours of the scheduled flight departure time or after the scheduled departure time of the flight will not be accepted.\nd) For group bookings, modification and cancellation charges may vary. Please contact your issuing agency.\ne) Air Arabia does not have a refund policy once the booking is paid for (except flights to\/from Cairo). On cancellation, Air Arabia will retain the remaining amount as a credit towards a future flight which can be used for travel within one year from the date of payment by the same passenger only.\nf) Business class passengers traveling on Cairo & Dammam flights are:\n-eligible for a free modification up to 8 hrs prior to scheduled departure time (fare difference will apply)-entitle for a refund on cancellation\n-subject to terms & conditions\ng) All passengers traveling to\/from Cairo, are entitled for refund on \nancellation, subject to terms & conditions.\nh) *Govt. taxes, fees or any other charges are subject to change without prior notice.\ni) Flight schedules can be changed between the reservation date and the flight date.\nj) Passengers must provide when booking their valid email address, mobile phone number and travel phone number. Any schedule changes will be communicated to passengers using the contact details provided when booking.this flight does not have mealNo Bag"
                    }
                ]
            },
            {
                "group": {
                    "airline": "G9",
                    "cities": "SHJ-IKA"
                },
                "details": [
                    {
                        "title": "FareRuleReference",
                        "text": "4. Flight times, changes, cancellations and credit:\na) Reservations can be modified\/cancelled up to 24 hours before local scheduled flight departure time by contacting our call center\/sales centers or appointed travel agents. Following *charges will apply:\nModification\nAED 200 Per Passenger each way (Fare difference applies for modification)\nCancellation\nAED 200 Per Passenger each way\nb) Within 24 hours before departure - No changes permitted.\nc) For Ultimate fare, It is mandatory to cancel the booking any time before 24 hours from the scheduled departure, and immediately submit the CFAR refund request through the link https:\/\/CFARTune.amaglobalassistance.com. CFAR Claims submitted within 24 hours of the scheduled flight departure time or after the scheduled departure time of the flight will not be accepted.\nd) For group bookings, modification and cancellation charges may vary. Please contact your issuing agency.\ne) Air Arabia does not have a refund policy once the booking is paid for (except flights to\/from Cairo). On cancellation, Air Arabia will retain the remaining amount as a credit towards a future flight which can be used for travel within one year from the date of payment by the same passenger only.\nf) Business class passengers traveling on Cairo & Dammam flights are:\n-eligible for a free modification up to 8 hrs prior to scheduled departure time (fare difference will apply)-entitle for a refund on cancellation\n-subject to terms & conditions\ng) All passengers traveling to\/from Cairo, are entitled for refund on \nancellation, subject to terms & conditions.\nh) *Govt. taxes, fees or any other charges are subject to change without prior notice.\ni) Flight schedules can be changed between the reservation date and the flight date.\nj) Passengers must provide when booking their valid email address, mobile phone number and travel phone number. Any schedule changes will be communicated to passengers using the contact details provided when booking.this flight does not have mealNo Bag"
                    }
                ]
            }
        ]
    }
}

Response Fields

Field Type Description
status boolean Indicates if the request was successful
data.fareRules array Array of fare rule groups, each representing rules for a specific airline and route segment
group.airline string IATA airline code (e.g., "G9" for Air Arabia)
group.cities string Route segment in format "ORIGIN-DESTINATION" (e.g., "BGW-SHJ")
details array Array of rule detail objects containing title and text
details[].title string Title/category of the rule (e.g., "FareRuleReference")
details[].text string Full text of the fare rules including cancellation policies, modification rules, baggage information, etc.

Error Response

If the flight key is invalid or not found:

{
    "status": "error",
    "message": "Flight not found"
}
Note: The flight key must be obtained from a recent flight search result. Flight keys are cached and may expire after a certain period. Make sure to use the key from the most recent search operation.

Get Branded Fares

Retrieve available branded fare options for a specific flight. Branded fares offer different service packages (baggage, meals, seat selection, flexibility, etc.) at varying price points, allowing passengers to choose the fare that best suits their needs.

POST /flights/v2/offer

Request Body

{
    "key": "f4-690a2a9c03a00-33"
}

Request Parameters

Parameter Description Required
key The flight key identifier obtained from the flight search results (e.g., f4-690a2a9c03a00-33). Required

Headers

Header Description Required
Authorization Bearer token obtained from the login endpoint Required
Content-Type application/json Required
Accept Application/json (recommended) Optional

cURL Example

curl 'https://api.brk360.net/v2/flights/v2/offer' \
  -H 'Accept: */*' \
  -H 'Authorization: Bearer YOUR_TOKEN_HERE' \
  -H 'Content-Type: application/json' \
  --data-raw '{"key":"f4-690a2a9c03a00-33"}'

Response

The response contains an array of branded fare options, each with different service packages and pricing.

{
    "status": "success",
    "referenceId": "1c77ea3y5z3oecxfjz3t9pqz690a2a7ce5646",
    "offer": {
        "status": true,
        "data": [
            {
                "brands": [
                    {
                        "index": "df96c228-e9fd-4ca1-8ea4-2b9b1c1acc44",
                        "title": "ECO FLY",
                        "services": [
                            "15 KG Baggage",
                            "1 PIECE X 8 KG CABIN BAGGAGE",
                            "MEAL SERVICE",
                            "ONLINE MESSAGE RIGHT"
                        ],
                        "meals": false,
                        "seats": false,
                        "baggages": false,
                        "priceInfo": {
                            "currency": {
                                "id": 158,
                                "title": "United States dollar",
                                "abb": "USD",
                                "symbol": "$",
                                "decimal_places": 2
                            },
                            "payable": 197.2256,
                            "baseFare": 68.64,
                            "breakDowns": {
                                "adult": {
                                    "baseFare": 71.3856,
                                    "sellerDiff": 121,
                                    "margin": 0,
                                    "netPrice": 197.2256,
                                    "commission": 0,
                                    "payable": 197.2256,
                                    "passengersCount": 1,
                                    "passengerTypeTotal": {
                                        "baseFare": 71.3856,
                                        "payable": 197.2256,
                                        "margin": 0,
                                        "commission": 0,
                                        "netPrice": 197.2256
                                    },
                                    "original_payable": 197.2256,
                                    "discount_applied": 0
                                }
                            },
                            "guaranteed": false,
                            "original_payable": 197.2256,
                            "discount_applied": 0
                        }
                    }
                ]
            }
        ]
    }
}

Response Fields

Field Type Description
status string Response status ("success" or "error")
referenceId string Unique reference ID for this offer request. This may be needed for booking operations.
offer.status boolean Indicates if branded fares are available
offer.data array Array containing branded fare groups (typically one per flight segment)
brands array Array of available branded fare options
brands[].index string Unique identifier for this branded fare option. Use this when booking.
brands[].title string Name of the branded fare (e.g., "ECO FLY", "EXTRA FLY", "PRIME FLY", "BUSINESS FLY")
brands[].services array List of services included in this fare brand (baggage allowance, meals, seat selection, flexibility, etc.)
brands[].meals boolean Whether meal service is available (may be false even if listed in services)
brands[].seats boolean Whether seat selection is available
brands[].baggages boolean Whether additional baggage can be purchased
brands[].priceInfo object Pricing information for this branded fare
priceInfo.currency object Currency details (id, title, abbreviation, symbol, decimal places)
priceInfo.payable number Total amount to pay for this branded fare
priceInfo.baseFare number Base fare amount before taxes and fees
priceInfo.breakDowns object Price breakdown by passenger type (adult, child, infant)
priceInfo.guaranteed boolean Whether the price is guaranteed
breakDowns.adult.netPrice number Net price for adult passengers
breakDowns.adult.commission number Commission amount
breakDowns.adult.passengersCount number Number of passengers of this type

Common Branded Fare Types

Different airlines may offer various branded fare options. Common examples include:

  • ECO FLY / ECONOMY BASIC: Basic economy fare with minimal baggage and services
  • EXTRA FLY / ECONOMY FLEX: Standard economy with increased baggage allowance
  • PRIME FLY / ECONOMY PREMIUM: Premium economy with additional services like seat selection and flexibility
  • BUSINESS FLY / BUSINESS CLASS: Business class with lounge access, priority services, and enhanced baggage
  • BUSINESS PRIME: Premium business class with maximum flexibility and services

Error Response

If the flight key is invalid or branded fares are not available:

{
    "status": "error",
    "message": "Flight not found"
}
Note: Not all flights support branded fares. Some flights may only return a single fare option. The referenceId returned in the response may be required for booking operations with the selected branded fare.

Booking Creation

Create a flight booking with the selected flight and passenger details.

POST /flights/v2/book

Request Body

{
    "key": "f4-690a2a9c03a00-33",
    "selected_brand": [
        "37076b58-dae8-4826-887b-58f4df74ff11"
    ],
    "id_request": "1234567890", // this only if provider (iran)
    "captchcode": "1234567890", // this only if provider (iran)
    "contact_email": "mohmmadmoatz@gmail.com",
    "contact_phone": "9647518775861",
    "passengers": [
        {
            "type": "ADT",
            "first_name": "MOHMMAD",
            "last_name": "MOATZ",
            "birth_date": "1998-10-05",
            "email": "mohmmadmoatz@gmail.com",
            "document": {
                "type": "passport",
                "number": "A9419219",
                "country": "IQ",
                "expiry_date": "2030-10-05"
            }
        }
    ]
}

Request Parameters

Parameter Description Required
key The flight key identifier obtained from the flight search results (e.g., f4-690a2a9c03a00-33). Required
selected_brand Array of branded fare index identifiers. Use the index field from the Get Branded Fares response. Required if the flight supports branded fares. Conditional
id_request Request ID from the offer/validation step. Only required for Iran provider flights. Conditional
captchcode CAPTCHA code from the validation step. Only required for Iran provider flights. Conditional
contact_email Contact email address for booking notifications. Required
contact_phone Contact phone number (include country code, e.g., 9647518775861). Required
passengers Array of passenger objects with details for each traveler. Required
passengers[].type Passenger type: ADT (Adult), CHD (Child), or INF (Infant). Required
passengers[].first_name First name of the passenger (uppercase recommended). Required
passengers[].last_name Last name of the passenger (uppercase recommended). Required
passengers[].birth_date Birth date in YYYY-MM-DD format. Required
passengers[].email Email address of the passenger. Required
passengers[].document Travel document information (passport or national ID). Required
document.type Document type: passport or national_id. Required
document.number Document number. Required
document.country Country code (ISO 3166-1 alpha-2, e.g., IQ, IR). Required
document.expiry_date Document expiry date in YYYY-MM-DD format. Required for passport type. Conditional

Response

{
  "status": "success",
  "BookId": "123456"
}
Branded Fares Workflow: If the flight supports branded fares, first call the Get Branded Fares endpoint to retrieve available options. Then include the selected_brand array with the index values from your chosen branded fare options when creating the booking.
Iran Provider Requirements: For flights from the Iran provider, you must first validate the offer using the /flights/v2/offer endpoint, which will return id_request and captchcode values. These must be included in the booking request.

Booking Status

Retrieve the status of a booking.

GET /flights/bookings/{bookingId}

Response

{
  "status": "success",
  "data": {
    "booking_id": "123456",
    "pnr": "ABC123",
    "status": "Issued",
    "origin": "NJF",
    "destination": "THR",
    "departure_date": "2024-08-10T10:30:00",
    "arrival_date": "2024-08-10T12:45:00",
    "airline": "IR",
    "price": 350.75,
    "baggage": "30KG",
    "passengers": [
      {
        "name": "John Doe",
        "type": "ADT",
        "document_number": "A12345678",
        "ticket_number": "724-1234567890"
      }
    ]
  }
}

Error Handling

The API uses standard HTTP status codes to indicate the status of requests. In case of an error, the response will include a descriptive message.

Example Error Response

{
  "status": "error",
  "message": "Insufficient balance"
}
Status Code Description
400 Bad Request (invalid parameters)
401 Unauthorized (authentication required)
403 Forbidden (insufficient permissions)
404 Not Found (resource not found)
422 Validation Error (invalid data)
500 Server Error

Data Structures

Passenger Types

Payment Methods

Booking Statuses

Postman Collection

Download and import our comprehensive Postman collection to test the BRK Flight API endpoints quickly and easily.

Ready-to-Use Collection: Pre-configured with authentication, environment variables, and test examples.

Download Collection

The Postman collection includes:

  • Authentication: Pre-configured login with test credentials
  • Flight Operations: Search, rules, booking, and status endpoints
  • Test Examples: Multiple scenarios with different passenger types
  • Environment Variables: Auto-token management and base URL
  • Test Scripts: Automatic token saving and validation
Download Postman Collection

JSON format • Ready to import

Quick Start Guide

  1. Download the collection file above
  2. Import into Postman (File → Import)
  3. Set Variables:
    • base_url: https://api.brk360.net/v2
    • auth_token: Auto-populated after login
  4. Run Authentication first to get your token
  5. Test Endpoints in any order
Pro Tip: The collection automatically saves your JWT token after login, so you don't need to manually copy it for subsequent requests.

Collection Structure

Folder Description Requests
Authentication User login and token management Login
Flight Operations Core flight API functionality Search, Rules, Book, Status
Test Examples Pre-configured test scenarios Economy, Business, First Class bookings
Test Credentials: The collection uses test credentials (testapi@brk360.net / TEST112233$$) for demonstration purposes.

Need Help?

For support with the Postman collection or API integration, contact our development team.

Contact Support