Flexi Kayak GDS

GDS Engine Architecture Baseline

Welcome to the core distribution unified suite of Flexi Kayak . This unified framework allows authorized API partners to dynamically extract media resources, inspect real-time seat snapshot inventories, and settle instant isolated booking cycles against their prepaid credit vaults.

All API endpoint requests strictly utilize JSON object communication payloads. Our ingress engines employ anti-tampering non-leakage filters and reject malicious data modifications on impact.

Authentication Gateways & Headers

Ingress validation middleware performs timing-attack protected cryptographic key verification. Missing or illegal header hashes trigger a fast fail-closed block immediately.

πŸ”‘ Public Ready-To-Use Test Credentials (Test API Agent 11 - Test Vault Account):
Developers can utilize this public Test API Key directly within request headers during integration and sandbox testing cycles. This token maps explicitly to the credit limits and ledger books of Test API Agent 11 (Demo Sandbox Agent).

β€’ Header Key: X-API-KEY
β€’ Header Value: FLX-TEST-KEY-2026-SUPER-SECRET

Mandatory Request Protocol Headers

Header KeyData TypeDescription Bounds
Content-TypeStringMust be exactly mapped to application/json; charset=UTF-8
X-API-KEYStringSecure client cryptographic hash token provided by the office.

FlexiKayak API Business Rules & Source of Truth

This section is the permanent business-rule reference for Tourism Platform, B2B partners, and future developers. API consumers must use FlexiKayak responses as authoritative and must not recreate independent pricing, availability, cutoff, or booking rules.

RuleAuthoritative Behaviour
Activity ContentDescriptive/product content comes from the Activity master. An active Activity may exist as content even when it currently has no published booking dates.
Activity FareThe actual booking fare comes from the selected activity_availability.base_price. activities.base_price is only a master/reference MRP and is never a booking-price fallback.
Catalog PriceWhen future bookable dates have different fares, catalog returns informational MIN–MAX fare and partner-net ranges. The range is not the guaranteed price for every date.
CommissionConfigured Agent/API Partner + Activity commission is applied to the selected availability fare. Flat, percentage, and zero commission use the same server-side calculation rule.
AvailabilityA date/slot is bookable only when the Activity is active/not soft-deleted, capacity remains, and its booking cutoff has not passed.
Cutoffactivity_availability.booking_cutoff_minutes overrides the Activity default when non-NULL; otherwise activities.booking_cutoff_minutes applies. No fixed 60/120-minute rule is hardcoded.
Date Rangesavailable_date_ranges is derived from real future bookable dates. Consecutive dates are grouped; gaps are never merged.
Soft DeleteInactive or soft-deleted Activities are not exposed as active products, are not returned as bookable availability, and cannot be booked through an old availability ID.
No AvailabilityNO_PUBLISHED_AVAILABILITY means the Activity still exists but currently has no future published rows. It is different from deleted/inactive/non-existent.
Create Bookingcreate_booking.php independently rechecks the selected availability, Activity state, travel date, slot, capacity, effective cutoff, fare and commission inside the booking transaction. Client-supplied price is never authoritative.
Retry Safetyrequest_id is the booking retry/idempotency key. A replay must not create a second booking.
Boat PricingBoat remains a separate architecture. Its fare uses the selected boat/schedule/trip/date/nationality/age rules and boat + permit pricing; Activity pricing rules must not be copied onto Boat.
Important integration rule: A successful availability response is a snapshot, not a reservation guarantee. Tourism Platform or another partner must respect is_bookable=false and must still rely on create_booking.php as the final authority.

1. Media Content Procurement API

INTEGRATION FLOW - STEP 1: API partners invoke this endpoint to build product catalogs. Activity content comes from the Activity master, while operational Activity pricing/bookability is derived from future bookable activity_availability rows. Boat content/pricing remains on its separate Boat architecture.

GET https://flexikayak.com/api/content.php
🎯 Identity Enforcement Dynamic Parsing Rule:
When the administration updates backend configurations for a specific tour or journey (e.g., the 'Jolly Bouy Island' ferry), the flags inside the identity_enforcement response block update dynamically. The frontend integration layout must render conditional fields accordingly:
  • is_id_mandatory = 1: Verification documents must be strictly enforced for every passenger payload.
  • is_id_no_required = 1: Unique document string identifiers (e.g., Aadhaar or Passport numbers) are mandatory input structures.
  • is_id_upload_required = 1: Valid proof document binary attachments via Base64 stream uploads must be strictly collected.
Activity catalog pricing: pricing.min_available_fare and max_available_fare summarize currently bookable future availability. If there is no future published availability, the Activity may still be returned as content with availability.available=false and a reason such as NO_PUBLISHED_AVAILABILITY. Missing availability is never converted to β‚Ή0 or master MRP.

Query String Mappings

Parameter KeyTypeStatusOperational Bounds
moduleStringRequiredStrict routing selectors allowed: ACTIVITY or BOAT.
travel_dateStringConditionalRequired for date-specific Boat catalog pricing. Activity catalog does not use this as an authoritative fare selector; use search_availability.php for an exact Activity date/slot fare.
limitIntegerOptionalRecord packet constraints limit. Bound range: 1 to 500.

3. Real-Time Booking Engine (Dual Module Core)

INTEGRATION FLOW - STEP 3: Locks allocations, deducts financial nets atomically from credit lines, and completes real-time ticketing. Handles both fixed activity slots and boat dynamic schedules safely.

POST https://flexikayak.com/api/create_booking.php
πŸ›‘οΈ Strict Security & Passenger Validation Guards:
β€’ Foreigner Passport Rule: If the nationality parameter value of any passenger inside the payload is non-Indian (i.e., anything other than INDIAN), the id_type must be strictly passed as PASSPORT, and both id_number and id_proof_file strings are strictly required. Failures will trigger an immediate firewall rejection.
β€’ Base64 Size Bomb Cap: The uploaded document verification binary stream (id_proof_file) must be strictly capped under a length of 2.0 MB.
Server-side source of truth: Do not send or trust an authoritative Activity price from the client. During booking, FlexiKayak locks/reloads the selected availability and rechecks Activity active/deleted state, date, slot, capacity, effective cutoff, activity_availability.base_price and Agent+Activity commission before settlement. Reusing a request_id must not create a second booking.

Master Object Structural Fields

Field NameData TypeStatusValidation Metric Requirements
request_idStringRequiredUnique context tracking token. Length cap limit 100 chars.
module_typeStringRequiredExplicit processing router targets: ACTIVITY or BOAT.
qtyIntegerRequiredStrict integer scale range bound between 1 and 100.
travel_dateStringRequiredTemporal format string: YYYY-MM-DD (Must be >= Today).
customer_nameStringRequiredPrimary customer string name. Maximum length boundary: 100 chars.
customer_emailStringRequiredGeneric RFC regular expression email filter verification protection.
customer_phoneStringRequiredNumeric validation match sequence check string: ^[0-9]{8,15}$.
availability_idIntegerConditionalMandatory when module_type is ACTIVITY.
slot_idIntegerConditionalMandatory when module_type is ACTIVITY.
schedule_idIntegerConditionalMandatory when module_type is BOAT.
passengersArrayConditionalMandatory only for BOAT bookings. Array size must match qty.

4. Cancellation & Automated Refund Engine

INTEGRATION FLOW - STEP 4: Processes secure cancellation calculations when a passenger requests a cancellation. QUOTE evaluates refunds/charges, while CONFIRM permanent voids records and credits back wallet balances atomically.

POST https://flexikayak.com/api/cancel_booking.php

Cancellation Parameters Matrix

Field KeyTypeStatusOperational Rule Parameter Metrics
request_idStringRequiredUnique tracking identifier to protect against multi-node replay blocks.
booking_refStringRequiredThe alphanumeric PNR reference code received during booking confirmation.
module_typeStringRequiredClassification target engine layers: ACTIVITY or BOAT.
actionStringRequiredFixed state control parameters options allowed: QUOTE or CONFIRM.
qtyIntegerConditionalMandatory for ACTIVITY module type. Count of seats to release.
passenger_idsArrayConditionalMandatory for BOAT module type. Array of individual traveler IDs.

5. Wallet Balance & Audit Gateway

INTEGRATION FLOW - STEP 5: Retrieves real-time active cash balances, credit facility limits, utilized runways, and lists recent ledger double-entry journal logs securely scoped by your tenant space. Used by finance systems to ensure sync.

POST https://flexikayak.com/api/wallet_balance.php

6. Real-Time PNR Decoder Status API

INTEGRATION FLOW - STEP 6: Allows distributors to query precise real-time processing, traveler manifests, ledger reconciliations, and refund states of any active or cancelled reservation at any point in the post-booking lifecycle.

POST https://flexikayak.com/api/booking_status.php

Standard GDS Error Matrix

When authentication, validation, inventory, cutoff, retry or financial constraints fail, the engine returns structured JSON errors. Existing public codes remain backward compatible where possible.

CategoryRepresentative CodesTypical HTTP
Authentication / AccessAUTHENTICATION_FAILED, API_ACCESS_DISABLED, SCOPE_NOT_ALLOWED401 / 403
Activity / AvailabilityACTIVITY_NOT_AVAILABLE, SOLD_OUT, BOOKING_CLOSED, INVALID_AVAILABILITY_OR_SLOT404 / 409 / 422
Retry / ConflictDUPLICATE_REQUEST_REPLAY, BOOKING_CONFLICT409
ValidationINVALID_TRAVEL_DATE, INVALID_QUANTITY_BOUNDS, INVALID_REQUEST_IDENTIFIER400 / 422

Interactive Postman Mappings

Developers can copy these exact configurations directly within Postman query, headers, and request body frames to begin sandbox cycles.

1. Media Content Query Pipeline

Step 1 β€” Content Lookup Specifications

1.1 BOAT MODULE METHOD & TARGET URL

Postman HTTP Request Component
GET https://flexikayak.com/api/content.php?module=BOAT&travel_date=2026-07-05

Expected Response Payload (200 OK):

Response JSON
{
    "status": "SUCCESS",
    "module": "BOAT",
    "count": 1,
    "data": [
        {
            "schedule_id": 1,
            "boat_id": 2,
            "boat_name": "Ocean Pearl",
            "trip_id": 4,
            "trip_name": "Jolly Bouy / Red Skin Island Trip",
            "departure_time": "10:00:00",
            "return_time": "14:30:00",
            "policies": {
                "identity_enforcement": {
                    "is_id_mandatory": 1,
                    "is_id_no_required": 1,
                    "is_id_upload_required": 1
                },
                "gst_percentage": 5.00
            },
            "inventory": {
                "remaining_seats": 10,
                "status": "AVAILABLE"
            },
            "rates": [
                {
                    "ticket_type": "Adult",
                    "age_range": "12 - ∞ Years",
                    "nationality": "MIXED",
                    "mrp": 1675.00,
                    "net_price": 1675.00,
                    "currency": "INR"
                }
            ]
        }
    ]
}

1.2 ACTIVITY MODULE METHOD & TARGET URL

Postman HTTP Request Component
GET https://flexikayak.com/api/content.php?module=ACTIVITY

Expected Response Payload (200 OK) β€” variable future fares are summarized; selected-date price is resolved by Step 2:

Response JSON
{
    "status": "SUCCESS",
    "module": "ACTIVITY",
    "count": 1,
    "data": [
        {
            "activity_id": 7,
            "title": "Bioluminescence Kayaking at Havelock",
            "location": "Havelock Island",
            "description": "Activity description from the FlexiKayak database...",
            "short_description": "Clean short description derived from the stored description...",
            "pricing": {
                "mrp": 2000.00,
                "mrp_source": "activities.base_price (reference only; never authoritative booking fare)",
                "offer_price": null,
                "net_price": null,
                "agent_commission_type": "FLAT",
                "agent_commission_value": 200.00,
                "currency": "INR",
                "price_unit": "Per Person",
                "price_basis": "PER_PERSON",
                "min_available_fare": 1500.00,
                "max_available_fare": 1800.00,
                "min_net_partner_price": 1300.00,
                "max_net_partner_price": 1600.00,
                "display": "β‚Ή1,500 – β‚Ή1,800",
                "price_source": "activity_availability.base_price",
                "catalog_price_is_summary": true
            },
            "availability": {
                "available": true,
                "reason": null,
                "available_date_ranges": [
                    { "from": "2026-09-15", "to": "2026-09-20" },
                    { "from": "2026-10-15", "to": "2026-10-20" }
                ]
            },
            "booking": {
                "booking_cutoff": {
                    "type": "MINUTES_BEFORE_START",
                    "default_minutes": 120,
                    "source": "ACTIVITY_DEFAULT; activity_availability override wins when non-NULL"
                }
            }
        }
    ]
}

2.1 ACTIVITY MODULE SEARCH ROUTE

Postman HTTP Request Component
GET https://flexikayak.com/api/search_availability.php?module=ACTIVITY&date=2026-09-15&activity_id=7

Expected Response Payload (200 OK) β€” the selected availability fare is exact for this date/slot:

Response JSON
{
    "status": "SUCCESS",
    "module": "ACTIVITY",
    "available": true,
    "reason": null,
    "count": 1,
    "bookable_count": 1,
    "data": [
        {
            "availability_id": 588,
            "activity_id": 7,
            "activity_name": "Bioluminescence Kayaking at Havelock",
            "date": "2026-09-15",
            "slot": {
                "slot_id": 5,
                "label": "04:00-06:00am",
                "time_window": "04:00:00 - 06:00:00"
            },
            "availability_status": "AVAILABLE",
            "inventory": {
                "remaining_seats": 40,
                "status": "AVAILABLE"
            },
            "booking_rules": {
                "booking_cutoff_type": "MINUTES_BEFORE_START",
                "booking_cutoff_minutes": 120,
                "booking_cutoff_at": "2026-09-15T02:00:00+05:30",
                "slot_start_at": "2026-09-15T04:00:00+05:30",
                "cutoff_source": "ACTIVITY_DEFAULT",
                "is_booking_open": true,
                "is_bookable": true,
                "reason": null
            },
            "pricing": {
                "availability_fare": 1800.00,
                "offer_price": 1800.00,
                "agent_commission_type": "FLAT",
                "agent_commission_value": 200.00,
                "commission_amount": 200.00,
                "net_partner_price": 1600.00,
                "net_price": 1600.00,
                "currency": "INR",
                "price_basis": "PER_PERSON",
                "price_source": "activity_availability.base_price"
            }
        }
    ]
}

2.2 BOAT MODULE SEARCH ROUTE

Postman HTTP Request Component
GET https://flexikayak.com/api/search_availability.php?module=BOAT&date=2026-09-15

Expected Response Payload (200 OK):

Response JSON
{
    "status": "SUCCESS",
    "module": "BOAT",
    "available": true,
    "reason": null,
    "count": 1,
    "bookable_count": 1,
    "data": [
        {
            "schedule_id": 1,
            "boat_id": 2,
            "boat_name": "Ocean Pearl",
            "trip_id": 4,
            "trip_name": "Island Trip",
            "travel_date": "2026-09-15",
            "booking_close_days": 1,
            "departure_time": "10:00:00",
            "return_time": "14:30:00",
            "inventory": {
                "capacity_per_rotation": 10,
                "remaining_seats": 10,
                "status": "AVAILABLE",
                "inventory_mode": "SCHEDULE_CAPACITY_REFERENCE",
                "is_live_inventory": false
            },
            "rates": [
                {
                    "ticket_type": "Adult",
                    "age_range": "12+ Years",
                    "nationality": "Indian",
                    "boat_fare": 1200.00,
                    "permit_fare": 300.00,
                    "mrp": 1500.00,
                    "agent_commission_type": "FLAT",
                    "agent_commission_value": 200.00,
                    "commission_amount": 200.00,
                    "net_price": 1300.00,
                    "currency": "INR",
                    "price_source": "boat_prices.boat_cost + boat_prices.permit_cost"
                }
            ]
        }
    ]
}
Production smoke test: Use the same live X-API-KEY for an ACTIVITY exact-search request and a BOAT exact-search request on the same date. A browser address bar normally does not send this header. API_ACCESS_DISABLED means the recognized partner is disabled; a BOAT-only provider configuration failure is returned with a Boat-specific error code rather than raw SQL.

3. Ticket Creation Engine Pipeline

Step 3 β€” Settlement Processing

3.1 BOAT MODULE SCHEME

Postman HTTP Request Component
POST https://flexikayak.com/api/create_booking.php
Request RAW JSON Body
{
    "request_id": "REQ_BOAT_PRODUCTION_TXN_999",
    "customer_name": "Ripos Das",
    "customer_email": "ripos.das@example.com",
    "customer_phone": "9933245842",
    "travel_date": "2026-07-05",
    "module_type": "BOAT",
    "qty": 1,
    "schedule_id": 1,
    "passengers": [
        {
            "traveler_name": "John Doe",
            "age": 35,
            "pax_gender": "MALE",
            "nationality": "AMERICAN",
            "id_type": "PASSPORT",
            "id_number": "PASS987654",
            "id_proof_file": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="
        }
    ]
}

Expected Response Payload (201 Created):

Response JSON
{
    "status": "SUCCESS",
    "code": "BOOKING_IMMEDIATELY_SETTLED",
    "booking_id": 157,
    "booking_ref": "290626FLX5679",
    "settlement_breakdown": {
        "total_debited": 3752.00,
        "deducted_from_cash": 3752.00,
        "deducted_from_credit": 0.00
    }
}

3.2 ACTIVITY MODULE SCHEME

Postman HTTP Request Component
POST https://flexikayak.com/api/create_booking.php
Request RAW JSON Body
{
    "request_id": "REQ_ACT_PRODUCTION_TXN_888",
    "customer_name": "Ripos Das",
    "customer_email": "ripos.das@example.com",
    "customer_phone": "9933245842",
    "travel_date": "2026-09-15",
    "module_type": "ACTIVITY",
    "qty": 2,
    "availability_id": 588,
    "slot_id": 5
}

Expected Response Payload (201 Created):

Response JSON
{
    "status": "SUCCESS",
    "code": "BOOKING_IMMEDIATELY_SETTLED",
    "booking_id": 484,
    "booking_ref": "20260628FLX5205",
    "request_id": "REQ_ACT_PRODUCTION_TXN_888",
    "module_type": "ACTIVITY",
    "booking_status": "confirmed",
    "payment_status": "paid",
    "activity": {
        "activity_id": 7,
        "activity_name": "Bioluminescence Kayaking at Havelock",
        "availability_id": 588,
        "travel_date": "2026-09-15",
        "slot_id": 5,
        "slot_label": "04:00-06:00am",
        "qty": 2
    },
    "pricing": {
        "availability_fare_per_person": 1800.00,
        "price_source": "activity_availability.base_price",
        "commission_type": "FLAT",
        "commission_value": 200.00,
        "commission_amount_per_person": 200.00,
        "net_partner_price_per_person": 1600.00,
        "net_partner_total": 3200.00,
        "gst_percentage": 12.00,
        "gst_amount": 384.00,
        "total_payable": 3584.00,
        "currency": "INR"
    },
    "settlement_breakdown": {
        "total_debited": 3584.00,
        "deducted_from_cash": 3584.00,
        "deducted_from_credit": 0.00
    }
}

4. Cancellation & Automated Refund Engine

Step 4 β€” Reversal Verification

4.1 BOAT CANCELLATION

Postman HTTP Request Component
POST https://flexikayak.com/api/cancel_booking.php
Request RAW JSON Body
{
    "request_id": "REQ_LIVE_BOAT_REAL_SYNC_V26",
    "booking_ref": "290626FLX5679",
    "module_type": "BOAT",
    "action": "CONFIRM",
    "passenger_ids": [623, 624]
}

Expected Response Payload (200 OK):

Response JSON
{
    "status": "SUCCESS",
    "code": "BOOKING_CANCELLATION_SETTLED_INSTANTLY",
    "refund_reference": "BRF-1BF61D",
    "new_booking_status": "Cancelled",
    "pricing_summary": {
        "net_agent_refund_credited": 3350.00,
        "platform_cancellation_charge": 402.00
    }
}

4.2 ACTIVITY CANCELLATION

Postman HTTP Request Component
POST https://flexikayak.com/api/cancel_booking.php
Request RAW JSON Body
{
    "request_id": "REQ_ACT_REAL_SYNC_V26",
    "booking_ref": "20260628FLX5205",
    "module_type": "ACTIVITY",
    "action": "CONFIRM",
    "qty": 2
}

Expected Response Payload (200 OK):

Response JSON
{
    "status": "SUCCESS",
    "code": "BOOKING_CANCELLATION_SETTLED_INSTANTLY",
    "refund_reference": "REF-60B61A",
    "new_booking_status": "Cancelled",
    "pricing_summary": {
        "net_agent_refund_credited": 1950.00,
        "platform_cancellation_charge": 150.00
    }
}

5. Wallet Balance Query Pipeline

Step 5 β€” Credit Audit

Postman HTTP Request Component
POST https://flexikayak.com/api/wallet_balance.php
Request RAW JSON Body
{
    "request_id": "REQ_WALLET_LIVE_AUDIT_2026"
}

Expected Response Payload (200 OK):

Response JSON
{
    "status": "SUCCESS",
    "code": "WALLET_METRICS_DECODED_SUCCESSFULLY",
    "data": {
        "agent_id": 11,
        "tenant_id": "tenant_flexi_01",
        "account_status": "active",
        "financial_balances": {
            "live_available_balance": 10984.77,
            "currency": "INR"
        },
        "credit_facility": {
            "allocated_limit": 500000.00,
            "limit_utilized": 293491.39,
            "available_credit_runway": 206508.61
        },
        "recent_ledger_journal_snapshot": []
    }
}

6. Real-Time PNR Decoder Status API

Step 6 β€” Post-Booking Track Check

6.1 BOAT MODULE PASSBOOK STATUS

Postman HTTP Request Component
POST https://flexikayak.com/api/booking_status.php
Request RAW JSON Body
{
    "request_id": "REQ_BOAT_STATUS_AUDIT_2026",
    "booking_ref": "290626FLX5679",
    "module_type": "BOAT"
}

Expected Response Payload Template (200 OK):

Response JSON
{
    "status": "SUCCESS",
    "code": "BOOKING_STATUS_DECODED_SUCCESSFULLY",
    "data": {
        "booking_reference": "290626FLX5679",
        "module": "BOAT",
        "booking_status": "Confirmed",
        "payment_status": "Paid",
        "refund_status": "NONE",
        "metadata": {
            "boat_name": "Ocean Pearl",
            "trip_name": "Jolly Bouy / Red Skin Island Trip",
            "departure_time": "10:00:00"
        },
        "financial_breakdown": {
            "fare_amount": 3200.00,
            "permit_amount": 150.00,
            "gst_amount": 402.00,
            "total_price": 3752.00
        },
        "traveler_manifest": [
            {
                "traveler_name": "John Doe",
                "age": 35,
                "pax_gender": "MALE",
                "passenger_type": "Adult",
                "traveler_status": "Confirmed"
            }
        ]
    }
}

6.2 ACTIVITY MODULE PASSBOOK STATUS

Postman HTTP Request Component
POST https://flexikayak.com/api/booking_status.php
Request RAW JSON Body
{
    "request_id": "REQ_ACT_STATUS_AUDIT_2026",
    "booking_ref": "20260628FLX5205",
    "module_type": "ACTIVITY"
}

Expected Response Payload Template (200 OK):

Response JSON
{
    "status": "SUCCESS",
    "code": "BOOKING_STATUS_DECODED_SUCCESSFULLY",
    "data": {
        "booking_reference": "20260628FLX5205",
        "module": "ACTIVITY",
        "booking_status": "confirmed",
        "payment_status": "paid",
        "refund_status": "NONE",
        "metadata": {
            "activity_name": "Bioluminescence Kayaking at Havelock",
            "travel_date": "2026-07-04",
            "slot_label": "04:00-06:00am"
        },
        "financial_summary": {
            "total_paid": 2100.00,
            "total_refunded": 0.00,
            "balance_amount": 0.00
        },
        "ledger_reconciliation": {
            "journal_status": "SETTLED",
            "ledger_journal_entry_id": "TXN-20260628-99A8"
        }
    }
}