Skip to content

Tourmind Flight Distribution API (1.0) ​

Download Swagger specification: Download

This is a development document for the Tourmind Flight Distribution API.

Tourmind.com

Overview ​

  • This is the specification for the Tourmind Flight Distribution API.
  • All communications from agents to the Tourmind Flight Distribution API are published via HTTP.
  • The format of request payloads is based on JSON.
  • All requests include common request headers, including authentication information.

Update Log ​

VersionDateDescription
v1.0.12025.01.07Interface documentation v1
v1.0.22025.02.21Add signature case
v1.0.32025.04.09Add JavaScript signature example, adjust signature algorithm
v1.0.42025.04.16Add invoice type; Correct price field to decimal string type
v1.0.52025.07.15Adjust signature algorithm; Correct return data structure for booking and payment interfaces
v1.0.62025.08.14Add pre-sale ancillary interface;Add schedule change push interface
v1.0.72025.09.25Add error code documentation
v1.0.82026.06.08Add infant type parameters and descriptions

Error Codes ​

Search Error Codes (101xx)

codemessageError description
10101look2book errorPrice deviation exceeds
10102currency not sameCurrency mismatch
10103parse supplier respFailed to parse supplier response
10104search time invalidInvalid search time
10105iata code invalidInvalid IATA code
10106there should be at least one adultAt least one adult is required
10107the number of infant passengers can not exceed the number of adult passengersThe number of infants cannot exceed the number of adults
10108the maximum number of passengers with seat is 9Maximum number of passengers with seats is 9
10109can not find the related dataRelated data not found
10110shopping failed from upstreamUpstream shopping failed

Verification Error Codes (201xx)

codemessageError description
20101verify errorVerification failed
20102verify price changePrice change
20103verify no seatNo seat
20104verify no solutionNo corresponding quote
20105verify permission deniedVerification permission denied
20106flight near take-offFlight is near take-off
20107can not find any price for this flightNo price found for this flight
20108can not find any supplier for current searchNo supplier found for current search

Booking Error Codes (301xx)

codemessageError description
30101booking errorBooking failed
30102booking price changePrice change
30103booking params errorParameter error
30104booking no seatNo seat
30105booking passenger info errorPassenger information exception
30106too late bookingVerify price to booking timeout
30107session id expiredSession ID expired
30108solution not foundQuote solution not found
30109ancillary not foundAncillary not found
30110permission deniedBooking permission denied
30111need card infoDocument information required
30113duplicate reservationDuplicate reservation
30114flight re-scheduleFlight may be rescheduled
30115airline pnr missingAirline PNR missing
30116create failed from gdsGDS order creation failed
30117retrieve pnr failedGDS PNR retrieval failed
30118save price failed from gdsGDS price save failed
30119airline or flight restrictionAirline or flight restriction
30120last ticketing time not enoughLast ticketing time is not enough
30121segment status invalidSegment status invalid
30122saved booking failedSave booking failed
30123infant type errorInfant passenger type error
30124associatedIndex required for infantAssociated passenger index is required for infant
30125passenger name too longPassenger name too long
30126adult age errorAdult age error
30127verify data expiredVerification data expired
30128flight invalid, please select other flight optionsFlight invalid, please select other flight options
30129fare unavailable, please select other flight optionsFare unavailable, please select other flight options
30130children age errorChild age error
30131passenger name illegalPassenger name illegal
30132passenger doc requiredPassenger document information required
30133passenger age limitationPassenger age limitation
30134lack of passenger indexPassenger index missing
30135duplicate baggagesDuplicate baggage
30136multiple seat selectionDuplicate seat selection

Pre-payment Validation Error Codes (401xx)

codemessageError description
40101pay valid errorPre-payment validation failed
40102pay valid timeoutPayment timeout
40103pay valid order status errorOrder status error
40104no airline pnr existAirline PNR does not exist
40105pnr status invalidPNR status invalid
40106price changedPrice changed
40107latest ticketing time expiredLatest ticketing time expired
40108flight changedFlight changed
40109order not foundOrder not found
40110supplier status is invalidSupplier status invalid
40111flight status invalidFlight status invalid
40112fare is not guaranteedFare is not guaranteed
40113no priceNo price
40114order pricing failed, please try againOrder pricing failed, please try again
40115no seatNo seat

Payment Error Codes (501xx)

codemessageError description
50101pay errorPayment failed
50102pay order cancelOrder cancelled
50103pay duplicateDuplicate payment
50104pay balance not enoughInsufficient balance
50105pay deadline expiredPayment deadline expired
50106pay deadline expiredOrder number does not exist
50107pay order status invalidPayment order status invalid

Ancillary Error Codes (601xx)

codemessageError description
60101ancillary not supportAncillary not supported
60102ancillary search failedAncillary search failed
60103ssr count seg count not sameAncillary result count does not match segment count

Query Error Codes (701xx)

codemessageError description
70101query errorSearch failed

Change Error Codes (801xx)

codemessageError description
80101change not supportChange not supported
80102change exists changeChange request already in progress
80103miss required dataRequired data missing
80104amount errorAmount error

Refund Error Codes (901xx)

codemessageError description
90101refund not supportRefund not supported
90102refund exists refundRefund request already in progress
90103miss required dataRequired data missing

Void Error Codes (1001xx)

codemessageError description
100101void not supportVoid not supported
100102void exists voidVoid request already in progress
100103miss required dataRequired data missing

Error Code Category Description

  • 101xx: Search related errors
  • 201xx: Verification related errors
  • 301xx: Booking related errors
  • 401xx: Pre-payment validation related errors
  • 501xx: Payment related errors
  • 601xx: Ancillary related errors
  • 701xx: Search related errors
  • 801xx: Change related errors
  • 901xx: Refund related errors
  • 1001xx: Void related errors

API Call Flow ​

Description:

Interface call flow:

Signature ​

Code examples for generating API request signatures。secretKey will be provided by Tourmind。

To ensure the security of API requests, all requests must include a signature in the request header: X-Key is appKey (optional), X-Timestamp is the timestamp, X-Signature is the signature.

The signature algorithm is as follows:

  1. Define a string with the format:body&timestamp
  2. Use secretKey as the key to perform HMAC-SHA256 encryption on the string.
  3. HMAC-SHA256 encrypted result to a hexadecimal string.
  4. Perform Base64 encoding on the hexadecimal string.

Here is the signature generation example:

secretKey: 3bdba1ec69824e1f
body: `{
    "key":"g6xTdXBwbGllckNvZGWjRElEqVNlYXJjaEtledmXU2VhcmNoOmg2aFVjbWx3Vkhsd1pRR3FSbXhwWjJoMFZIbHdaUUNxUTJGaWFXNURiR0Z6YzZDbVFXUjFiSFJ6QWFoRGFHbHNaSEpsYmdDblNXNW1ZVzUwY3dDa1RHVm5jNUdEbzBSbGNLTkRSMHVuUkdWd1JHRjBaYW95TURJMUxUQTBMVEl5bzBGeWNxTlRVa2M9OkRJRKpTZWdtZW50S2V52SA4YzMxZjRhMWY1YjFjZGY0YTZiY2ViNWY1ZWIxOGYyOQ==",
    "adults":1
}`
timestamp: 1682068743
sign: ZDM2NGJjMWQ2ODQ1MTk3MDcxYTEyOWU2YTg3ODdmZTM2NjVhNzdiOWIyNTlkOGNhZmVjMDg2MGEyOGM2Y2VlNg==

Here are example codes in PHP, Java and Go:

php
<?php
function getSign(string $secretKey, string $requestBody, string $timestamp): string {
  $str2Sign = $requestBody . "&" . $timestamp;

  $hmacSha256 = hash_hmac('sha256', $str2Sign, $secretKey, true);
  $hexString = bin2hex($hmacSha256);

  return base64_encode($hexString);
}

// Example usage
$secretKey = "your_secret_key";
$requestBody = "your_request_body";
$timestamp = time();

$signature = getSign($secretKey, $requestBody, $timestamp);
echo "Signature: " . $signature . PHP_EOL;
?>
java
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.util.Base64;
import java.nio.charset.StandardCharsets;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;

public class SignatureGenerator {
  public static String getSign(String secretKey, String requestBody, String timestamp)
          throws NoSuchAlgorithmException, InvalidKeyException {
      String str2Sign = requestBody + "&" + timestamp;

      SecretKeySpec secretKeySpec = new SecretKeySpec(secretKey.getBytes(StandardCharsets.UTF_8), "HmacSHA256");
      Mac mac = Mac.getInstance("HmacSHA256");
      mac.init(secretKeySpec);
      byte[] hmacSha256Bytes = mac.doFinal(str2Sign.getBytes(StandardCharsets.UTF_8));

      String hexString = bytesToHex(hmacSha256Bytes);

      return Base64.getEncoder().encodeToString(hexString.getBytes(StandardCharsets.UTF_8));
  }

  private static String bytesToHex(byte[] bytes) {
      StringBuilder sb = new StringBuilder();
      for (byte b : bytes) {
          sb.append(String.format("%02x", b));
      }
      return sb.toString();
  }

  public static void main(String[] args) throws Exception {
      String secretKey = "your_secret_key";
      String requestBody = "your_request_body";
      String timestamp = String.valueOf(System.currentTimeMillis() / 1000);

      String signature = getSign(secretKey, requestBody, timestamp);
      System.out.println("Signature: " + signature);
  }
}
go
package main

import (
  "crypto/hmac"
  "crypto/sha256"
  "encoding/base64"
  "encoding/hex"
  "fmt"
  "strconv"
  "time"
)

func getSign(secretKey, requestBody string, timestamp string) string {
  str2Sign := fmt.Sprintf("%s&%s", requestBody, timestamp)

  hmacSha256 := hmac.New(sha256.New, []byte(secretKey))
  hmacSha256.Write([]byte(str2Sign))
  hashBytes := hmacSha256.Sum(nil)
  hexString := hex.EncodeToString(hashBytes)

  return base64.StdEncoding.EncodeToString([]byte(hexString))
}

func main() {
  secretKey := "your_secret_key"
  requestBody := "your_request_body"
  timestamp := fmt.Sprintf("%d", time.Now().Unix())

  signature := getSign(secretKey, requestBody, timestamp)
  fmt.Println("Signature:", signature)
}
js
const CryptoJS = require('crypto-js');

function getSign(secretKey, requestBody, timestamp) {
  const str2Sign = `${requestBody}&${timestamp}`;

  const hmacSha256 = CryptoJS.HmacSHA256(str2Sign, secretKey);

  const hexString = hmacSha256.toString(CryptoJS.enc.Hex);

  return CryptoJS.enc.Base64.stringify(
      CryptoJS.enc.Utf8.parse(hexString)
  );
}

const secretKey = pm.environment.get('secretKey');
const requestBody = pm.request.body.raw;
const timestamp = Math.floor(Date.now() / 1000);

const signature = getSign(secretKey, requestBody, timestamp);

pm.request.headers.add({
  key: 'X-Signature',
  value: signature
});
pm.request.headers.add({
  key: 'X-Key',
  value: pm.environment.get('appKey')
});
pm.request.headers.add({
  key: 'X-Timestamp',
  value: timestamp.toString()
});

console.log("secretKey:", secretKey)
console.log("body:", requestBody)
console.log("timestamp:", timestamp)
console.log("sign:", signature)

Price ​

Search for flight combinations based on conditions, return quotation list if successful

API Call Schema

NameValue
Request URLhttps://test.hlzinterface.cn/api/standard/search
Request methodPOST
Request Fields
adults: integer
AdultCount
cabinClass: string
Cabin class, default Y
children: integer
Number of children
flightType: integer
Flight type, 0: All by default, 1: Direct, 2: Transfer
infants: integer
Number of infants
tripType: integerRequired
Trip type, 1: One-way 2: Round-trip 3: Multi-trip
Response Fields
code: integer
0: Success, others: Error code
message: string
Error message
json
{
  "adults": 1,
  "cabinClass": "Y",
  "children": 0,
  "flightType": 0,
  "infants": 0,
  "legs": [
    {
      "arr": "HKG",
      "dep": "BJS",
      "depDate": "2025-04-02"
    }
  ],
  "tripType": 1
}
json
{
  "code": 0,
  "data": {
    "solutions": [
      {
        "adtFare": "1000.00",
        "adtTax": "50.00",
        "adults": 1,
        "baggageRules": [
          {
            "baggageType": 1,
            "passengerType": 1,
            "piece": 2,
            "segmentIndex": 1,
            "weight": 23
          }
        ],
        "changeRules": [
          {
            "conditionList": [
              {
                "amount": "100.00",
                "status": 1
              }
            ],
            "currency": "CNY",
            "fee": "100.00",
            "noShowFee": "200.00",
            "noShowStatus": 1,
            "noShowTime": 24,
            "passengerType": 1,
            "status": 1,
            "ticketStatus": 1,
            "useCondition": false
          }
        ],
        "chdFare": "800.00",
        "chdTax": "50.00",
        "children": 0,
        "convenienceFee": "0.00",
        "currency": "CNY",
        "identify": "hKxTdXBwbGllckNvZGWkRlIyNKlTZWFyY2hLZXnZmFNlYXJjaDpoNmhVY21sd1ZIbHdaUUdxUm14cFoyaDBWSGx3WlFDcVEyRmlhVzVEYkdGemM2Rlpwa0ZrZFd4MGN3bW9RMmhwYkdSeVpXNEFwMGx1Wm1GdWRITUFwRXhsWjNPUmc2TkVaWENqU0V0SHAwUmxjRVJoZEdXcU1qQXlOUzB3TVMweU5hTkJjbktqUWtwVDpGUjI0qlNlZ21lbnRLZXnZIGVhYjdiYjRiMDRhNTJlMjIwYzk3ZTdjOWU1ZjI2MDM3qVRvdGFsRmFycQI/////gIW9iA=",
        "journeys": [
          {
            "arrAirport": "PVG",
            "arrCity": "SHA",
            "depAirport": "PEK",
            "depCity": "BJS",
            "duration": 120,
            "index": 1,
            "segmentIndexs": [],
            "transferCount": 0
          }
        ],
        "merchantFee": "0.00",
        "platformServiceFee": "0.00",
        "pnr": "EJB6GT",
        "qCharge": "100.00",
        "refundRules": [
          {
            "conditionList": [
              {
                "amount": "100.00",
                "status": 1
              }
            ],
            "currency": "CNY",
            "fee": "100.00",
            "noShowFee": "200.00",
            "noShowStatus": 1,
            "noShowTime": 24,
            "passengerType": 1,
            "status": 1,
            "ticketStatus": 1,
            "useCondition": false
          }
        ],
        "segments": [
          {
            "airline": "CA",
            "arrAirport": "PVG",
            "arrCity": "SHA",
            "arrTime": "2025-01-01 14:00",
            "cabinClass": "Y",
            "cabinCode": "Y",
            "cabinCount": 9,
            "codeShare": 0,
            "depAirport": "PEK",
            "depCity": "BJS",
            "depTime": "2025-01-01 12:00",
            "duration": 120,
            "flightNo": "123",
            "group": 0,
            "index": 1,
            "stopovers": [
              {
                "airport": "CAN",
                "arrTime": "2025-01-01 13:00",
                "city": "CAN",
                "depTime": "2025-01-01 14:00",
                "duration": 60
              }
            ]
          }
        ],
        "ticketCarrier": "CA",
        "tktFee": "0.00",
        "totalFare": "1050.00",
        "tripType": 1
      }
    ]
  },
  "message": "success"
}

Verify ​

Verify the flight quotation. If successful, return the quotation content and SessionId for booking

API Call Schema

NameValue
Request URLhttps://test.hlzinterface.cn/api/standard/verify
Request methodPOST
Request Fields
adults: integer
AdultCount
children: integer
Number of children
infants: integer
Number of infants
key: stringRequired
Identify from search quotation response
Response Fields
code: integer
0: Success, others: Error code
message: string
Error message
json
{
  "adults": 1,
  "children": 0,
  "infants": 0,
  "key": "hKxTdXBwbGllckNvZGWkRlIyNKlTZWFyY2hLZXnZmFNlYXJjaDpoNmhVY21sd1ZIbHdaUUdxUm14cFoyaDBWSGx3WlFDcVEyRmlhVzVEYkdGemM2Rlpwa0ZrZFd4MGN3bW9RMmhwYkdSeVpXNEFwMGx1Wm1GdWRITUFwRXhsWjNPUmc2TkVaWENqU0V0SHAwUmxjRVJoZEdXcU1qQXlOUzB3TVMweU5hTkJjbktqUWtwVDpGUjI0qlNlZ21lbnRLZXnZIGVhYjdiYjRiMDRhNTJlMjIwYzk3ZTdjOWU1ZjI2MDM3qVRvdGFsRmFycQI/////gIW9iA="
}
json
{
  "code": 0,
  "data": {
    "sessionId": "0E553602C2EC4FC1851D0D2B01C15276",
    "solution": {
      "adtFare": "1000.00",
      "adtTax": "50.00",
      "adults": 1,
      "baggageRules": [
        {
          "baggageType": 1,
          "passengerType": 1,
          "piece": 2,
          "segmentIndex": 1,
          "weight": 23
        }
      ],
      "changeRules": [
        {
          "conditionList": [
            {
              "amount": "100.00",
              "status": 1
            }
          ],
          "currency": "CNY",
          "fee": "100.00",
          "noShowFee": "200.00",
          "noShowStatus": 1,
          "noShowTime": 24,
          "passengerType": 1,
          "status": 1,
          "ticketStatus": 1,
          "useCondition": false
        }
      ],
      "chdFare": "800.00",
      "chdTax": "50.00",
      "children": 0,
      "convenienceFee": "0.00",
      "currency": "CNY",
      "identify": "hKxTdXBwbGllckNvZGWkRlIyNKlTZWFyY2hLZXnZmFNlYXJjaDpoNmhVY21sd1ZIbHdaUUdxUm14cFoyaDBWSGx3WlFDcVEyRmlhVzVEYkdGemM2Rlpwa0ZrZFd4MGN3bW9RMmhwYkdSeVpXNEFwMGx1Wm1GdWRITUFwRXhsWjNPUmc2TkVaWENqU0V0SHAwUmxjRVJoZEdXcU1qQXlOUzB3TVMweU5hTkJjbktqUWtwVDpGUjI0qlNlZ21lbnRLZXnZIGVhYjdiYjRiMDRhNTJlMjIwYzk3ZTdjOWU1ZjI2MDM3qVRvdGFsRmFycQI/////gIW9iA=",
      "journeys": [
        {
          "arrAirport": "PVG",
          "arrCity": "SHA",
          "depAirport": "PEK",
          "depCity": "BJS",
          "duration": 120,
          "index": 1,
          "segmentIndexs": [],
          "transferCount": 0
        }
      ],
      "merchantFee": "0.00",
      "platformServiceFee": "0.00",
      "pnr": "EJB6GT",
      "qCharge": "100.00",
      "refundRules": [
        {
          "conditionList": [
            {
              "amount": "100.00",
              "status": 1
            }
          ],
          "currency": "CNY",
          "fee": "100.00",
          "noShowFee": "200.00",
          "noShowStatus": 1,
          "noShowTime": 24,
          "passengerType": 1,
          "status": 1,
          "ticketStatus": 1,
          "useCondition": false
        }
      ],
      "segments": [
        {
          "airline": "CA",
          "arrAirport": "PVG",
          "arrCity": "SHA",
          "arrTime": "2025-01-01 14:00",
          "cabinClass": "Y",
          "cabinCode": "Y",
          "cabinCount": 9,
          "codeShare": 0,
          "depAirport": "PEK",
          "depCity": "BJS",
          "depTime": "2025-01-01 12:00",
          "duration": 120,
          "flightNo": "123",
          "group": 0,
          "index": 1,
          "stopovers": [
            {
              "airport": "CAN",
              "arrTime": "2025-01-01 13:00",
              "city": "CAN",
              "depTime": "2025-01-01 14:00",
              "duration": 60
            }
          ]
        }
      ],
      "ticketCarrier": "CA",
      "tktFee": "0.00",
      "totalFare": "1050.00",
      "tripType": 1
    }
  },
  "message": "success"
}

Pre-sale ancillary ​

Available ancillary products for flight quotes

API Call Schema

NameValue
Request URLhttps://test.hlzinterface.cn/api/standard/ssr
Request methodPOST
Request Fields
sessionId: string
SessionId returned by verify price interface
Response Fields
code: integer
0: Success, others: Error code
message: string
Error message
json
{
  "sessionId": "0E553602C2EC4FC1851D0D2B01C15276"
}
json
{
  "code": 0,
  "data": {
    "ancillaries": [
      {
        "flightNumber": "CA1234",
        "isDirect": true,
        "items": [
          {
            "code": "7e122baf-3af3-4510-98bd-8713dac383ec",
            "currency": "USD",
            "desc": "",
            "name": "Checked baggage",
            "piece": 1,
            "price": 87.02,
            "serviceFee": 0,
            "size": "",
            "unit": "KG",
            "weight": 23
          }
        ],
        "segmentIndex": 1
      }
    ]
  },
  "message": "success"
}

Booking & Pay ​

Booking ​

Book flights based on the quotation. If successful, return the generated Tourmind order information

API Call Schema

NameValue
Request URLhttps://test.hlzinterface.cn/api/standard/booking
Request methodPOST
Request Fields
agentOrderNo: stringRequired
User-defined order number
sessionId: stringRequired
SessionId returned by the verify price interface
Response Fields
code: integer
0: Success, others: Error code
message: string
Error message
json
{
  "agentOrderNo": "5J2501021544NL",
  "ancillaryItems": [
    {
      "code": "7e122baf-3af3-4510-98bd-8713dac383ec",
      "count": 1,
      "currency": "USD",
      "desc": "Checked baggage",
      "flightNo": "CA1234",
      "name": "Checked baggage",
      "passengerIndex": 1,
      "piece": 1,
      "price": 87.02,
      "unit": "KG",
      "weight": 23
    }
  ],
  "contact": {
    "address": "北京市朝阳区",
    "areaCode": "86",
    "email": "test@example.com",
    "name": "张三",
    "phone": "13800138000"
  },
  "passengers": [
    {
      "associatedIndex": 0,
      "birthday": "1990-01-01",
      "cardExpired": "2030-01-01",
      "cardIssuePlace": "CN",
      "cardNo": "E12345678",
      "cardType": "PP",
      "email": "test@example.com",
      "firstName": "JOHN",
      "index": 1,
      "lastName": "DOE",
      "nationality": "CN",
      "phone": "13800138000",
      "sex": 1,
      "type": 1
    }
  ],
  "sessionId": "0E553602C2EC4FC1851D0D2B01C15276"
}
json
{
  "code": 0,
  "data": {
    "order": {
      "adults": 1,
      "amount": "1000.00",
      "ancillaryItems": [
        {}
      ],
      "children": 0,
      "contact": {
        "address": "北京市朝阳区",
        "areaCode": "86",
        "email": "test@example.com",
        "name": "张三",
        "phone": "13800138000"
      },
      "currency": "CNY",
      "orderNo": "1876513316759830528",
      "passengers": [
        {
          "associatedIndex": 0,
          "birthday": "1990-01-01",
          "cardExpired": "2030-01-01",
          "cardIssuePlace": "CN",
          "cardNo": "E12345678",
          "cardType": "PP",
          "email": "test@example.com",
          "firstName": "JOHN",
          "index": 1,
          "lastName": "DOE",
          "nationality": "CN",
          "phone": "13800138000",
          "sex": 1,
          "type": 1
        }
      ],
      "paytime": "2023-01-01 12:00:00",
      "status": 1,
      "ticketingTime": "2023-01-01 12:00:00",
      "tickets": [
        {
          "airlinePnr": "DEF456",
          "firstName": "John",
          "group": 1,
          "lastName": "Doe",
          "passengerIndex": 1,
          "pnrCode": "KC4862",
          "segmentIndex": 1,
          "ticketNo": "EJB6GT"
        }
      ]
    },
    "orderNo": "1876513316759830528",
    "solution": {
      "adtFare": "1000.00",
      "adtTax": "50.00",
      "adults": 1,
      "baggageRules": [
        {
          "baggageType": 1,
          "passengerType": 1,
          "piece": 2,
          "segmentIndex": 1,
          "weight": 23
        }
      ],
      "changeRules": [
        {
          "conditionList": [
            {
              "amount": "100.00",
              "status": 1
            }
          ],
          "currency": "CNY",
          "fee": "100.00",
          "noShowFee": "200.00",
          "noShowStatus": 1,
          "noShowTime": 24,
          "passengerType": 1,
          "status": 1,
          "ticketStatus": 1,
          "useCondition": false
        }
      ],
      "chdFare": "800.00",
      "chdTax": "50.00",
      "children": 0,
      "convenienceFee": "0.00",
      "currency": "CNY",
      "identify": "hKxTdXBwbGllckNvZGWkRlIyNKlTZWFyY2hLZXnZmFNlYXJjaDpoNmhVY21sd1ZIbHdaUUdxUm14cFoyaDBWSGx3WlFDcVEyRmlhVzVEYkdGemM2Rlpwa0ZrZFd4MGN3bW9RMmhwYkdSeVpXNEFwMGx1Wm1GdWRITUFwRXhsWjNPUmc2TkVaWENqU0V0SHAwUmxjRVJoZEdXcU1qQXlOUzB3TVMweU5hTkJjbktqUWtwVDpGUjI0qlNlZ21lbnRLZXnZIGVhYjdiYjRiMDRhNTJlMjIwYzk3ZTdjOWU1ZjI2MDM3qVRvdGFsRmFycQI/////gIW9iA=",
      "journeys": [
        {
          "arrAirport": "PVG",
          "arrCity": "SHA",
          "depAirport": "PEK",
          "depCity": "BJS",
          "duration": 120,
          "index": 1,
          "segmentIndexs": [],
          "transferCount": 0
        }
      ],
      "merchantFee": "0.00",
      "platformServiceFee": "0.00",
      "pnr": "EJB6GT",
      "qCharge": "100.00",
      "refundRules": [
        {
          "conditionList": [
            {
              "amount": "100.00",
              "status": 1
            }
          ],
          "currency": "CNY",
          "fee": "100.00",
          "noShowFee": "200.00",
          "noShowStatus": 1,
          "noShowTime": 24,
          "passengerType": 1,
          "status": 1,
          "ticketStatus": 1,
          "useCondition": false
        }
      ],
      "segments": [
        {
          "airline": "CA",
          "arrAirport": "PVG",
          "arrCity": "SHA",
          "arrTime": "2025-01-01 14:00",
          "cabinClass": "Y",
          "cabinCode": "Y",
          "cabinCount": 9,
          "codeShare": 0,
          "depAirport": "PEK",
          "depCity": "BJS",
          "depTime": "2025-01-01 12:00",
          "duration": 120,
          "flightNo": "123",
          "group": 0,
          "index": 1,
          "stopovers": [
            {
              "airport": "CAN",
              "arrTime": "2025-01-01 13:00",
              "city": "CAN",
              "depTime": "2025-01-01 14:00",
              "duration": 60
            }
          ]
        }
      ],
      "ticketCarrier": "CA",
      "tktFee": "0.00",
      "totalFare": "1050.00",
      "tripType": 1
    }
  },
  "message": "success"
}

Pre-payment verification ​

Verify if the order is in a payable state before payment

API Call Schema

NameValue
Request URLhttps://test.hlzinterface.cn/api/standard/pay/valid
Request methodPOST
Request Fields
orderNo: stringRequired
Tourmind order number
Response Fields
code: integer
0: Success, others: Error code
message: string
Error message
json
{
  "orderNo": "1876513316759830528"
}
json
{
  "code": 0,
  "data": {},
  "message": "success"
}

Pay ​

Pay

API Call Schema

NameValue
Request URLhttps://test.hlzinterface.cn/api/standard/pay
Request methodPOST
Request Fields
orderNo: stringRequired
Tourmind order number
Response Fields
code: integer
0: Success, others: Error code
message: string
Error message
json
{
  "orderNo": "1876513316759830528"
}
json
{
  "code": 0,
  "data": {
    "orderNo": "1876513316759830528",
    "solution": {
      "adtFare": "1000.00",
      "adtTax": "50.00",
      "adults": 1,
      "baggageRules": [
        {
          "baggageType": 1,
          "passengerType": 1,
          "piece": 2,
          "segmentIndex": 1,
          "weight": 23
        }
      ],
      "changeRules": [
        {
          "conditionList": [
            {
              "amount": "100.00",
              "status": 1
            }
          ],
          "currency": "CNY",
          "fee": "100.00",
          "noShowFee": "200.00",
          "noShowStatus": 1,
          "noShowTime": 24,
          "passengerType": 1,
          "status": 1,
          "ticketStatus": 1,
          "useCondition": false
        }
      ],
      "chdFare": "800.00",
      "chdTax": "50.00",
      "children": 0,
      "convenienceFee": "0.00",
      "currency": "CNY",
      "identify": "hKxTdXBwbGllckNvZGWkRlIyNKlTZWFyY2hLZXnZmFNlYXJjaDpoNmhVY21sd1ZIbHdaUUdxUm14cFoyaDBWSGx3WlFDcVEyRmlhVzVEYkdGemM2Rlpwa0ZrZFd4MGN3bW9RMmhwYkdSeVpXNEFwMGx1Wm1GdWRITUFwRXhsWjNPUmc2TkVaWENqU0V0SHAwUmxjRVJoZEdXcU1qQXlOUzB3TVMweU5hTkJjbktqUWtwVDpGUjI0qlNlZ21lbnRLZXnZIGVhYjdiYjRiMDRhNTJlMjIwYzk3ZTdjOWU1ZjI2MDM3qVRvdGFsRmFycQI/////gIW9iA=",
      "journeys": [
        {
          "arrAirport": "PVG",
          "arrCity": "SHA",
          "depAirport": "PEK",
          "depCity": "BJS",
          "duration": 120,
          "index": 1,
          "segmentIndexs": [],
          "transferCount": 0
        }
      ],
      "merchantFee": "0.00",
      "platformServiceFee": "0.00",
      "pnr": "EJB6GT",
      "qCharge": "100.00",
      "refundRules": [
        {
          "conditionList": [
            {
              "amount": "100.00",
              "status": 1
            }
          ],
          "currency": "CNY",
          "fee": "100.00",
          "noShowFee": "200.00",
          "noShowStatus": 1,
          "noShowTime": 24,
          "passengerType": 1,
          "status": 1,
          "ticketStatus": 1,
          "useCondition": false
        }
      ],
      "segments": [
        {
          "airline": "CA",
          "arrAirport": "PVG",
          "arrCity": "SHA",
          "arrTime": "2025-01-01 14:00",
          "cabinClass": "Y",
          "cabinCode": "Y",
          "cabinCount": 9,
          "codeShare": 0,
          "depAirport": "PEK",
          "depCity": "BJS",
          "depTime": "2025-01-01 12:00",
          "duration": 120,
          "flightNo": "123",
          "group": 0,
          "index": 1,
          "stopovers": [
            {
              "airport": "CAN",
              "arrTime": "2025-01-01 13:00",
              "city": "CAN",
              "depTime": "2025-01-01 14:00",
              "duration": 60
            }
          ]
        }
      ],
      "ticketCarrier": "CA",
      "tktFee": "0.00",
      "totalFare": "1050.00",
      "tripType": 1
    }
  },
  "message": "success"
}

Order ​

Order detail ​

Query order details based on Tourmind order number

API Call Schema

NameValue
Request URLhttps://test.hlzinterface.cn/api/standard/order
Request methodPOST
Request Fields
orderNo: stringRequired
Tourmind order number
Response Fields
code: integer
0: Success, others: Error code
message: string
Error message
json
{
  "orderNo": "1876513316759830528"
}
json
{
  "code": 0,
  "data": {
    "order": {
      "adults": 1,
      "amount": "1000.00",
      "ancillaryItems": [
        {}
      ],
      "children": 0,
      "contact": {
        "address": "北京市朝阳区",
        "areaCode": "86",
        "email": "test@example.com",
        "name": "张三",
        "phone": "13800138000"
      },
      "currency": "CNY",
      "orderNo": "1876513316759830528",
      "passengers": [
        {
          "associatedIndex": 0,
          "birthday": "1990-01-01",
          "cardExpired": "2030-01-01",
          "cardIssuePlace": "CN",
          "cardNo": "E12345678",
          "cardType": "PP",
          "email": "test@example.com",
          "firstName": "JOHN",
          "index": 1,
          "lastName": "DOE",
          "nationality": "CN",
          "phone": "13800138000",
          "sex": 1,
          "type": 1
        }
      ],
      "paytime": "2023-01-01 12:00:00",
      "status": 1,
      "ticketingTime": "2023-01-01 12:00:00",
      "tickets": [
        {
          "airlinePnr": "DEF456",
          "firstName": "John",
          "group": 1,
          "lastName": "Doe",
          "passengerIndex": 1,
          "pnrCode": "KC4862",
          "segmentIndex": 1,
          "ticketNo": "EJB6GT"
        }
      ]
    },
    "segments": [
      {
        "airline": "CA",
        "arrAirport": "PVG",
        "arrCity": "SHA",
        "arrTime": "2025-01-01 14:00",
        "cabinClass": "Y",
        "cabinCode": "Y",
        "cabinCount": 9,
        "codeShare": 0,
        "depAirport": "PEK",
        "depCity": "BJS",
        "depTime": "2025-01-01 12:00",
        "duration": 120,
        "flightNo": "123",
        "group": 0,
        "index": 1,
        "stopovers": [
          {
            "airport": "CAN",
            "arrTime": "2025-01-01 13:00",
            "city": "CAN",
            "depTime": "2025-01-01 14:00",
            "duration": 60
          }
        ]
      }
    ]
  },
  "message": "success"
}

Ticket ​

Order ticket notice ​

Order ticket notice

API Call Schema

NameValue
Request URL
Request methodPOST
Request Fields
agentOrderNo: stringRequired
User-defined order number
orderNo: stringRequired
Tourmind order number
Response Fields
code: integer
0: Success, others: Error code
message: string
Error message
json
{
  "agentOrderNo": "1876513316759830528",
  "orderNo": "1876513316759830528",
  "tickets": [
    {
      "airlinePnr": "DEF456",
      "firstName": "John",
      "group": 1,
      "lastName": "Doe",
      "passengerIndex": 1,
      "pnrCode": "KC4862",
      "segmentIndex": 1,
      "ticketNo": "EJB6GT"
    }
  ]
}
json
{
  "code": 0,
  "message": "success"
}

After-sales ​

Schedule Change ​

Push order schedule change data

API Call Schema

NameValue
Request URL
Request methodPOST
Request Fields
agentOrderNo: string
changedType: integer
Schedule change type,1:Schedule change,2:Schedule cancellation
orderNo: string
Tourmind order number
pnr: string
PNR
Response Fields
code: integer
0: Success, others: Error code
message: string
Error message
orderNo: string
Tourmind order number
json
{
  "agentOrderNo": "1947498981984833536",
  "changedSegments": [
    {
      "arrAirport": "FUK",
      "arrTime": "2025-09-07 10:50",
      "cabinClass": "Y",
      "cabinCode": "W",
      "depAirport": "ICN",
      "depTime": "2025-09-07 09:30",
      "flightNo": "ZE641",
      "group": 1
    }
  ],
  "changedType": 1,
  "orderNo": "1947498981984833536",
  "originalSegments": [
    {
      "arrAirport": "FUK",
      "arrTime": "2025-09-07 09:55",
      "cabinClass": "Y",
      "cabinCode": "W",
      "depAirport": "ICN",
      "depTime": "2025-09-07 08:35",
      "flightNo": "ZE641",
      "group": 1
    }
  ],
  "pnr": "CWQRS4",
  "tickets": [
    {
      "airlinePnr": "CWQRS4",
      "firstName": "John",
      "flightNo": "ZE641",
      "lastName": "Doe",
      "passengerIndex": 1,
      "pnrCode": "CWQRS4",
      "ticketNo": "8392882170841"
    }
  ]
}
json
{
  "code": 0,
  "message": "success",
  "orderNo": "1947498981984833536"
}