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...

Booking Creation

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

POST /flights/v2/book

Request Body

{
    "key":"brk360-688e2ac26552a-0",
    "payment_method": "balance", // or "creditCard"
    "contact_email": "user@example.com",
    "contact_phone": "+9647518775861",
    "passengers": [
        {
            "type": "ADT", // ADT, CHD, INF
            "first_name": "John",
            "last_name": "Doe", 
            "birth_date": "1990-01-01",
            "email": "john@example.com",
            "document": {
                "type": "passport", // or "passport"
                "number": "1234567890",
                "country": "IR", // XR for Iran, others for passport
                "expiry_date": "2030-01-01" // for passport only
            }
        }
    ]
}

Response

{
  "status": "success",
  "BookId": "123456"
}

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