Apicat Docs
  1. Dynamic values Modules
Apicat Docs
  • What is Apicat?
  • Send requests
    • Create requests
      • Request basics
      • Parameters and body
      • Request headers
      • Request settings
      • Dynamic values
      • HTTP/2
      • SOAP/WebService
    • Authentication and authorization
      • Overview
      • CA and client certificates
      • Authorization types supported by Apidog
      • Digest Auth
      • OAuth 1.0
      • OAuth 2.0
      • Hawk Authentication
      • Kerberos
      • NTLM
      • Akamai EdgeGrid
    • Response and cookies
      • Overview
      • API response in Apidog
      • Create and send cookies
      • Debug requests
    • Dynamic values Modules
      • Airline
      • Animal
      • Color
      • Commerce
      • Company
      • Database
      • Datatype
      • Date
      • Finance
      • Food
      • Git
      • Hacker
      • Helpers
      • Image
      • Internet
      • Location
      • Lorem
      • Music
      • Number
      • Person
      • Phone
      • Science
      • String
      • System
      • Vehicle
      • Word
  • Environments & variables
    • Overview
    • Using variables
    • Environments & services
  • Pre/Post processors
    • Overview
    • Assertion
    • Extract variable
    • Wait
    • Database operations
      • Overview
      • MySQL
      • MongoDB
      • Redis
      • Oracle Client
    • Using scripts
      • Overview
      • Pre processor scripts
      • Post processor scripts
      • Public scripts
      • Postman scripts reference
      • Calling other programming languages
      • Using JS libraries
      • Visualizing responses
      • Script examples
        • Assertion scripts
        • Using variables in scripts
        • Using scripts to modify request messages
        • Other examples
  • Best practices
    • How to handle API signatures
    • How to access OAuth 2.0 protected APIs
    • Apidog collaboration workflow
    • Managing authentication state in Apidog
  • Account & preferences
    • Account settings
    • Generate OpenAPI access token
    • Language settings
    • Hot keys
    • Network proxy configuration
    • Data backup
    • Updating Apidog
    • Deleting account
    • Experimental Features
  • References
    • API-Design First Approach
    • Apidog OpenAPI/Swagger Specificaiton Extensions
    • JSONPath
    • XPath
    • Regular Expressions
    • JSON Schema
    • CSV File Format
    • Install Java Environment
    • Runner deployment environment
    • Apidog flavored Markdown
  1. Dynamic values Modules

Airline

Module to generate airline and airport related data.
Overview
Several methods in this module return objects rather than strings. For example, you can use {{$airline.airportIataCode}} to pick out the specific property you need.
For a random airport, use {{$airline.airportName}} and {{$airline.airportIataCode}}.
For a random airline, use {{$airline.airlineName}} and {{$airline.airlineIataCode}}.
For a dummy booking, a passenger will generally book a flight on a specific {{$airline.flightNumber}}, {{$airline.airplaneName}}, be allocated a {{$airline.seat}} and {{$airline.recordLocator}}.
Related Modules
To generate sample passenger data, you can use the methods of the person module.

aircraftType#

Returns a random aircraft type.
Returns: 'narrowbody' | 'regional' | 'widebody'
Examples

airline#

The original faker.airline.airline() method has been refined into two more precise variables:
{{$airline.airlineName}}: Generates an airline name.
{{$airline.airlineIataCode}}: Generates an airline IATA code.
Generates a random airline.
Returns: Airline
Examples

airplane#

The original faker.airline.airplane() method has been refined into two more precise variables:
{{$airline.airplaneName}}: Generates an airplane name.
{{$airline.airplaneIataTypeCode}}: Generates an airplane IATA code.
Generates a random airplane.
Returns: airplane
Examples

airport#

The original faker.airline.airport() method has been refined into two more precise variables:
{{$airline.airportName}}: Generates an airport name.
{{$airline.airportIataCode}}: Generates an airport IATA code.
Generates a random airport.
Returns: Airport
Examples

flightNumber#

Returns a random flight number. Flight numbers are always 1 to 4 digits long. Sometimes they are used without leading zeros (e.g.: American Airlines flight 425) and sometimes with leading zeros, often with the airline code prepended (e.g.: AA0425).
To generate a flight number prepended with an airline code, combine this function with the airline() function and use template literals:
Parameters
NameTypeDefaultDescription
addLeadingZerosbooleanfalseWhether to pad the flight number up to 4 digits with leading zeros.
lengthnumber{ min: number; max: number; }{ min: 1, max: 4 }
Returns: string
Examples

recordLocator#

Generates a random record locator. Record locators are used by airlines to identify reservations. They're also known as booking reference numbers, locator codes, confirmation codes, or reservation codes.
Parameters
NameTypeDefaultDescription
allowNumericsbooleanfalseWhether to allow numeric characters.
allowVisuallySimilarCharactersbooleanfalseWhether to allow visually similar characters such as '1' and 'I'.
Returns: string
Examples

seat#

Generates a random seat.
Parameters
NameTypeDefaultDescription
aircraftType'narrowbody' | 'regional' | 'widebody'narrowbodyThe aircraft type. Can be one of narrowbody, regional, widebody.
Returns: string
Examples
Modified at 2025-06-25 07:57:16
Previous
Dynamic values Modules
Next
Animal
Built with