Legs

A leg represents a single flight. A leg typically has at least one pre-flight risk assessment run for it, but can also be used to group multiple risk assessments representing pre-flight, in-flight, and post-flight states.

/Legs/

HTTP PUT Service Accounts

Adds or updates a leg. Existence is determined by the legId.

Input

Field Type Constraints Detail
legId Mapped ID Required This value should be unique independent of tripId. Other APIs will use this ID and it must stand on its own.
tripId Mapped ID Required If the legId is not found in FlightRisk, a new leg will be created and added to the trip with this tripId. If the leg exists, but a tripId is provided for a different trip, the leg will be moved to that trip.
tailId Mapped ID Required
rulesetId Integer Required This is FlightRisk's ID for the ruleset. A list of available rulesets should be retrieved from the Rulesets API.
specialCircumstanceIds Integer Array An array of special circumstance IDs; candidate IDs are obtained from rulesets provided by the Rulesets API.
legType String 50 A type label to associate with the leg. Some systems have labels to identify different operations: revenue flight, repositioning flight, maintenance flight, etc. Sending this data allows FlightRisk to analyze the different operations.
base String 50 A base label to associate with the leg. Some customers have multiple bases associated with their operations. Specifying the base will allow the customer to filter and better organize the schedule information in FlightRisk.
flightType String Required

Accepted Values

  • ifr
  • vfr
notes String 500
passengerCount Integer
airfields Array
Field Type Constraints Details
code Airfield Code Required
timeOfInterest Date Required
designation String Required

Accepted Values

  • departure
  • arrival
isAlternate Boolean Set to true to designate the airfield as an alternate.
crew Array
Field Type Constraints Details
accountId Mapped ID Required
position String Required

Accepted Values

  • pilotInCommand
  • secondInCommand
  • flightAttendant
  • flightEngineer
  • otherCabinCrew

Sample Payload

Output

See HTTP Response Codes

HTTP Status Data
200
201

/Legs/Takeoff

HTTP POST Service Accounts

Marks a leg as taken off and specifies the actual takeoff time and departure location. FlightRisk may provide inflight risk analysis for legs that have been marked as taken off but haven’t landed.

Input

Field Type Constraints Details
legId Mapped ID Required
code Airfield Code Required
timeOfInterest Date Required

Output

See HTTP Response Codes

HTTP Status Data
200

/Legs/Land

HTTP POST Service Accounts

Marks the leg as having landed and specifies the actual landing time and arrival location. FlightRisk may provide post-flight risk analysis using the actual takeoff and landing info.

The leg must have been previously marked as taken off.

Input

Field Type Constraints Details
legId Mapped ID Required
code Airfield Code Required
timeOfInterest Date Required

Output

See HTTP Response Codes

HTTP Status Data
200

/Legs/

HTTP DELETE Service Accounts

Deletes a leg and any risk assessments belonging to it.

Input

Field Type Constraints Details
legId Mapped ID Required

Output

See HTTP Response Codes

HTTP Status Data
200

API Version 14.1.9203.25168

Copyright ©2008-2025 Polaris Aero, LLC.