Skip to Content
Business logicIntegrationsFuzeMetrixPublic-facing rules reference

FuzeMetrix IBA Integration - Public

 

Overview

The IBA validates members when they check in at wind tunnels using the FuzeMetrix (FM) booking system.

The integration performs the following 4 tasks:

  1. Member Validation: Exposes an endpoint where FM can validate an IBA member using a member’s member_id and PIN code.
  2. Member Data: Exposes an endpoint where FM can retrieve member data for an individual member
  3. Tunnel Booking Data: Exposes an endpoint where FM can send the flight booking data for storage in the IBA system
  4. Logbook Management: Based on the status of the member the system will create a logbook entry for the member. It also allows members to easily update the flight time associated with a booking via an email link and web form
 

Business Logic

Business logic is mostly handled on the FM side apart from logbook entries associated with the booking.

Creating a Logbook Entry

Logbook entries are only created for members that have an active flyer_currency.

Email Triggers

When a booking is created through the FuzeMetrix integration, the system sends different emails based on the member’s currency status:

  1. Active Currency Status:

    • Creates a logbook entry for the flight time
    • Sends an “active” email template (logbook/external-time-entry-active)
    • Email includes a link for the member to update their flight time
    • The link contains a unique token that allows one-time access to modify the booking
  2. Inactive Currency Status (Not current):

    • Does NOT create a logbook entry (to prevent automatic recurrency)
    • Sends an “inactive” email template (logbook/external-time-entry-inactive)
    • Notifies the member that they need to complete recurrency before their time can be logged
 

Important Notes on Data Types

  1. Date Format:
    • In payload all dates must be Unix timestamps in seconds
    • In Responces all dates are in ISO format (2022-06-05T20:51:00.000Z)
  2. Token Generation: Must use HMAC SHA-256 with the exact JSON structure of the request body
 

Error Handling

HTTP Status Codes

  • 200: Success - Request processed successfully
  • 400: Bad Request - Missing client ID or token headers
  • 403: Forbidden - Invalid HMAC token/unauthorized access
  • 404: Not Found - Invalid client ID/client not found
  • 422: Unprocessable Entity - Validation failed/missing required fields
  • 500: Internal Server Error - Server-side error occurred

Error Response Format

{ "valid": false, "message": "Error description" }

Common Error Messages

  • “Please provide client id for access the data”
  • “Please provide token to access the resource”
  • “Client id does not match with data”
  • “Your token does not match”
  • “Missing required fields: [field_list]”
  • “Member not found”
  • “Invalid PIN”
  • “Invalid member ID”
  • “Tunnel not found”
  • “Booking already exits”

Success Messages

  • “Member validated successfully”
  • “Booking created successfully”
 

Authentication

HMAC SHA-256 Token Authentication

All API requests require HMAC authentication using SHA-256.

Required Headers:

  • client-id: Unique identifier for the FuzeMetrix client
  • token: HMAC SHA-256 hash of the request body using the client’s secret key

Token Generation:

crypto.createHmac('SHA256', clientSecret).update(JSON.stringify(requestBody)).digest('hex')
 

API Endpoints

Base URL https://api.tunnelflight.com/api/external/fuse-metrix

API reference: see /api/fusemetrix-external or /api/fusemetrix-internal for the generated endpoint reference (parameters, example payloads, copy-as-cURL, and a link to the source .bru file).

1. PIN Validation

Validates member using their member_id and pin. Use this to check PIN before proceeding with booking creation.

Endpoint: POST /api/external/fuse-metrix/validate-pin (validation only)

Headers:

client-id: your-client-id Authorization: generated-hmac-token Content-Type: application/json

Request Body:

{ "member_id": 60649, "member_pin": "67510" }

Response (Success - 200):

{ "valid": true, "message": "Member validated successfully" }

Response (Error - 422):

{ "valid": false, "message": "Invalid PIN" // or "Member not found" }

Flow Diagram

View Flow Diagram

 

2. Member Data Endpoint

Retrieves member information for display or verification purposes.

Endpoint: POST /api/external/fuse-metrix/get-member

Request Body:

{ "member_id": 60649 }

Headers:

client-id: your-client-id Authorization: any-valid-token

Note: client-id is lowercase with no hyphen for this legacy endpoint

Request Body: None (GET request)

Response (Success - 200):

{ "valid": true, "member_id": 40, "date_of_birth": "1979-06-08T15:28:42.000Z", "screen_name": "Rusty Lewis", "role_name": "Examiner", "real_name": "Rusty Lewis", "tunnel_name": "Support Center", "is_coach": true, "paymentStatus": "Not required", "total_flight_time": "0:53", "last_flight": "2025-04-08T07:40:00.000Z", "currency_renewal_date_flyer": "2025-10-05T07:40:00.000Z", "flyerLevels": { "level1": "Yes", "static": "Pro", "dynamic": "Pro", "formation": "Level 4" }, "flyer_currency_status": "Active" }

Response (Error - 422):

{ "valid": false, "message": "Member not found" }

Flow Diagram

View Flow Diagram

 

3. Create Booking Entry

Registers a new checkin / booking at the wind tunnel.

Endpoint: POST /api/external/fuse-metrix/create-booking

Path Parameters: None

Headers:

client-id: your-client-id Authorization: generated-hmac-token Content-Type: application/json

Request Body:

{ "member_id": 60649, "purchase_id": 215312, "purchase_date": 1744131450, "flight_date": 1744098000, "minutes_booked": 9, "product_id": 12893, "tunnel_id": 25, // uses FM tunnel ID "checkin_time": 1744098000 }

Note: All dates are Unix timestamps in seconds.

Response (Success - 200):

{ "valid": true, "message": "Booking created successfully" }

Response (Error - 422):

{ "valid": false, "message": "Member not found" }

Flow Diagram

View Flow Diagram

 

API reference

See /api/fusemetrix-external for the generated endpoint reference. Each endpoint exposes its parameters, example payload, copyable curl command, and a link to the source .bru file in api/bruno/ — open that in Bruno desktop to execute against the live FuzeMetrix integration endpoints.


This is the public version of the FuzeMetrix integration documentation. For internal IBA implementation details, see the internal documentation.

Last updated on