FuseMetrix — External
4 endpoints. Server: https://api.tunnelflight.com/api
Each endpoint below includes parameters, an example payload, a copyable curl command, and a link to the originating .bru source on GitHub.
Create Booking
POST /external/fuse-metrix/create-booking
Create Booking Endpoint
This endpoint allows users to create a new booking in the system. It accepts various parameters related to the booking and returns a response indicating the validity of the request.
Request
HTTP Method: POST
Endpoint: {{host}}/external/fuse-metrix/create-booking
Request Body
The request body must be formatted as JSON and should include the following parameters:
-
member_id (integer): The unique identifier for the member making the booking.
-
purchase_id (integer): The unique identifier for the purchase associated with the booking.
-
registration_id (integer): The unique identifier for the registration related to the booking.
-
purchase_date (integer): The timestamp representing the date of purchase.
-
flight_date (integer): The timestamp representing the date of the flight.
-
minutes_booked (integer): The duration in minutes for which the booking is made.
-
product_id (integer): The unique identifier for the product being booked.
-
tunnel_id (integer): The unique identifier for the tunnel associated with the booking.
-
checkin_time (integer): The timestamp representing the check-in time for the booking.
Example Request Body
{
"member_id": 40,
"purchase_id": 215312,
"registration_id": 123455,
"purchase_date": 1744131450,
"flight_date": 1744098000,
"minutes_booked": 9,
"product_id": 12893,
"tunnel_id": 25,
"checkin_time": 1744098000
}
Response
The response will be in JSON format and will include the following fields:
-
valid (boolean): Indicates whether the booking creation request was valid.
-
message (string): A message providing additional information about the request status.
Example Response
{
"valid": true,
"message": "Booking created successfully"
}
Notes
-
Ensure that all required parameters are included in the request body to avoid validation errors.
-
The timestamps should be in Unix format (seconds since epoch).
-
The response structure remains consistent, providing a clear indication of the success or failure of the booking creation process.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | yes | Bearer token. Required for every request. |
client-id | string | yes | Client identifier issued by IBA. Required for every request. |
token | string | no |
Request body
Request body example (default)
{
"member_id": 40,
"purchase_id": 2153121,
"registration_id": 12345511,
"purchase_date": 1744098000,
"flight_date": 1744098000,
"minutes_booked": 9,
"product_id": 12893,
"tunnel_id": 225,
"checkin_time": 1744098000
}Responses
2XX — Successful response
Try it
curl --request POST \ --url 'https://api.tunnelflight.com/api/external/fuse-metrix/create-booking' \
--header 'Authorization: Bearer <token>' \
--header 'client-id: <client-id>' \
--header 'token: <token>' \
--header 'content-type: application/json' \
--data '{"member_id":40,"purchase_id":2153121,"registration_id":12345511,"purchase_date":1744098000,"flight_date":1744098000,"minutes_booked":9,"product_id":12893,"tunnel_id":225,"checkin_time":1744098000}'Get Member
POST /external/fuse-metrix/get-member
Get Member Details
This endpoint retrieves detailed information about a member based on the provided member ID.
Request
-
Method: POST
-
URL:
{{host}}/external/fuse-metrix/get-member -
Request Body: The request must include a JSON object with the following parameter:
member_id(integer): The unique identifier for the member whose details are being requested.
Example Request
{
"member_id": 40
}
Response
The response will return a JSON object containing various details about the member. The structure of the response includes:
-
valid(boolean): Indicates if the member ID is valid. -
member_id(integer): The ID of the member. -
date_of_birth(string): The member’s date of birth. -
screen_name(string): The member’s screen name. -
role_name(string): The role assigned to the member. -
real_name(string): The member’s real name. -
tunnel_name(string): The tunnel associated with the member. -
is_coach(boolean): Indicates if the member is a coach. -
paymentStatus(string): The current payment status of the member. -
total_flight_time(string): The total flight time recorded for the member. -
last_flight(string): Details of the member’s last flight. -
currency_renewal_date_flyer(string): The date for currency renewal for the flyer. -
flyerLevels(object): Contains details about the member’s flyer levels, including:-
level1(string): Level 1 details. -
static(string): Static details. -
dynamic(string): Dynamic details. -
formation(string): Formation details.
-
-
flyer_currency_status(string): The status of the flyer currency.
Notes
-
Ensure that the
member_idprovided in the request is valid to receive accurate member details. -
The response may vary based on the member’s information available in the system.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | yes | Bearer token. Required for every request. |
client-id | string | yes | Client identifier issued by IBA. Required for every request. |
token | string | no |
Request body
Request body example (default)
{
"member_id": 40
}Responses
2XX — Successful response
Try it
curl --request POST \ --url 'https://api.tunnelflight.com/api/external/fuse-metrix/get-member' \
--header 'Authorization: Bearer <token>' \
--header 'client-id: <client-id>' \
--header 'token: <token>' \
--header 'content-type: application/json' \
--data '{"member_id":40}'Old Endpoint
GET /external/fuse-metrix/member/1
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | yes | Bearer token. Required for every request. |
client-id | string | yes | Client identifier issued by IBA. Required for every request. |
clientid | string | no | |
token | string | no | Example: 1a35f3d5e7fbadb47a9e85d98d04954902a2ddc98d000d61ed560a65bc6b9fd8 |
Request body
Request body example (default)
{
"member_id": 40,
"member_pin": "12345",
"purchase_id": 215312,
"registration_id": 123455,
"purchase_date": 1744131450,
"flight_date": 1744098000,
"minutes_booked": 9,
"product_id": 12893,
"tunnel_id": 25,
"checkin_time": 1744098000
}Responses
2XX — Successful response
Try it
curl --request GET \ --url 'https://api.tunnelflight.com/api/external/fuse-metrix/member/1' \
--header 'Authorization: Bearer <token>' \
--header 'client-id: <client-id>' \
--header 'clientid: <clientid>' \
--header 'token: <token>' \
--header 'content-type: application/json' \
--data '{"member_id":40,"member_pin":"12345","purchase_id":215312,"registration_id":123455,"purchase_date":1744131450,"flight_date":1744098000,"minutes_booked":9,"product_id":12893,"tunnel_id":25,"checkin_time":1744098000}'Validate Pin
POST /external/fuse-metrix/validate-pin
Validate PIN Endpoint
This endpoint is designed to validate a member’s PIN associated with their account. It allows clients to verify if the provided PIN is correct for a given member ID.
Request
-
Method: POST
-
URL:
{{host}}/external/fuse-metrix/validate-pin -
Headers:
Content-Type: application/json
Request Body
The request body must be in JSON format and include the following parameters:
-
member_id (integer): The unique identifier for the member whose PIN is being validated.
-
member_pin (string): The PIN that needs to be validated for the specified member.
Example Request Body:
{
"member_id": 40,
"member_pin": "12345"
}
Response
On a successful request, the server will respond with a status code of 200 and a JSON object indicating the result of the validation.
Response Structure
-
valid (boolean): Indicates whether the provided PIN is valid (
true) or not (false). -
message (string): A message providing additional context about the validation result.
Example Response:
{
"valid": true,
"message": "Member validated successfully"
}
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | yes | Bearer token. Required for every request. |
client-id | string | yes | Client identifier issued by IBA. Required for every request. |
token | string | no |
Request body
Request body example (default)
{
"member_id": 40,
"member_pin": "123456"
}Responses
2XX — Successful response
Try it
curl --request POST \ --url 'https://api.tunnelflight.com/api/external/fuse-metrix/validate-pin' \
--header 'Authorization: Bearer <token>' \
--header 'client-id: <client-id>' \
--header 'token: <token>' \
--header 'content-type: application/json' \
--data '{"member_id":40,"member_pin":"123456"}'