# Assign Crew to Flight Assigns a list of crew members to a specific flight using its flight ID. Required Fields: - pilotId: The unique identifier of the pilot/crew member (or use externalReference or logName as alternatives) - role: The crew role (see enum values in schema) Optional Fields: All other fields are optional. Additional crew information (firstName, lastName, email, etc.) is only used when updateCrewUsers=true (default) to create or update user records. Note: The crewPosition field is optional and not used during assignment. The system determines positions based on the role field and aircraft configuration. Endpoint: POST /api/external/flight/{flightId}/crew Version: 1.8.0 Security: API_AUTHENTICATION ## Path parameters: - `flightId` (any, required) Flight ID (can be internal flightId as integer or external reference as string) ## Query parameters: - `updateCrewUsers` (boolean) If true (default), the system will create or update user records with the provided crew information (firstName, lastName, email, etc.). If false, only existing users can be assigned and only pilotId is required. ## Request fields (application/json): - `role` (string, required) REQUIRED. The crew role/qualification. Common values: - CMD: Captain (Pilot in Command) - FO: First Officer (Second in Command) - FA: Flight Attendant - CA: Cabin Assistant - DHC: Deadhead Crew - AUG_PIC: Augmented Pilot in Command - AUG_SIC: Augmented Second in Command - OBS: Observer - ENG: Onboard Engineer Enum: "CMD", "FO", "CC", "MED1", "ATPL", "LST", "AQ", "OPCRH", "PA", "FA", "CPL", "DG", "ESET", "Sec", "FF", "ENL4", "ENL5", "ENL6", "LC", "OPC", "LVTO", "LV", "RVSM", "TRI", "TRE", "AUS", "SQMM", "SECG", "BMVIT", "EFB", "GRT", "ESE", "OCC", "OICC", "PICC", "DITCH", "FAID", "WINTER", "BRNAV", "MNPS_ETOPS", "RACQ", "ETOPS", "TCAS", "CRM", "ASH", "USER0", "USER1", "USER2", "USER3", "USER4", "USER5", "USER6", "USER7", "USER8", "USER9", "ENG", "AUGM_CREW", "ADD_CREW", "CREW", "IR", "HW_OPS", "PBN", "PFI", "FM", "SEP", "SEP_IR", "FI_A", "MEP", "CR", "RC", "OBS", "DHC", "EX_CM", "AUG_PIC", "AUG_SIC", "AUG_CRP", "INSTRUCTOR", "CHECK_AIRMAN", "GROUND_INSTRUCTOR", "AUG_FA", "CA", "MD", "RN", "MEDIC", "MAINTENANCE", "JUMPSEAT", "LOAD_MASTER", "OPS_CONTROL", "FLIGHT_COORDINATOR", "COURIER", "NR", "INSPECTOR", "COMPANY_REP", "SINGLE_PILOT", "ADD_FCM", "ADD_CCM" - `pilotId` (integer) REQUIRED (unless using externalReference or logName). The unique identifier of the pilot/crew member. - `crewPosition` (object) - `crewPosition.id` (integer) - `crewPosition.role` (string) Enum: "CMD", "FO", "CC", "MED1", "ATPL", "LST", "AQ", "OPCRH", "PA", "FA", "CPL", "DG", "ESET", "Sec", "FF", "ENL4", "ENL5", "ENL6", "LC", "OPC", "LVTO", "LV", "RVSM", "TRI", "TRE", "AUS", "SQMM", "SECG", "BMVIT", "EFB", "GRT", "ESE", "OCC", "OICC", "PICC", "DITCH", "FAID", "WINTER", "BRNAV", "MNPS_ETOPS", "RACQ", "ETOPS", "TCAS", "CRM", "ASH", "USER0", "USER1", "USER2", "USER3", "USER4", "USER5", "USER6", "USER7", "USER8", "USER9", "ENG", "AUGM_CREW", "ADD_CREW", "CREW", "IR", "HW_OPS", "PBN", "PFI", "FM", "SEP", "SEP_IR", "FI_A", "MEP", "CR", "RC", "OBS", "DHC", "EX_CM", "AUG_PIC", "AUG_SIC", "AUG_CRP", "INSTRUCTOR", "CHECK_AIRMAN", "GROUND_INSTRUCTOR", "AUG_FA", "CA", "MD", "RN", "MEDIC", "MAINTENANCE", "JUMPSEAT", "LOAD_MASTER", "OPS_CONTROL", "FLIGHT_COORDINATOR", "COURIER", "NR", "INSPECTOR", "COMPANY_REP", "SINGLE_PILOT" - `crewPosition.name` (string) - `crewPosition.code` (string) - `crewPosition.crewType` (string) Enum: "FLIGHT_DECK", "CABIN" - `crewPosition.disableFtFdpCalculation` (boolean) - `crewPosition.assignable` (boolean) - `crewPosition.typeRatingRelated` (boolean) - `externalReference` (string) Optional. Alternative to pilotId for identifying crew members. Used if pilotId is not provided. - `logName` (string) Optional. Alternative to pilotId for identifying crew members. Used if pilotId and externalReference are not provided. - `firstName` (string) Optional. Only used when updateCrewUsers=true to create or update the crew member's first name. - `middleName` (string) Optional. Only used when updateCrewUsers=true to create or update the crew member's middle name. - `lastName` (string) Optional. Only used when updateCrewUsers=true to create or update the crew member's last name. - `email` (string) Optional. Only used when updateCrewUsers=true to update the crew member's email. - `phone` (string) Optional. Only used when updateCrewUsers=true to update the crew member's phone number. - `mobile` (string) Optional. Only used when updateCrewUsers=true to update the crew member's mobile number. - `gender` (string) Optional. Only used when updateCrewUsers=true to update the crew member's gender. Enum: "FEMALE", "MALE", "OTHER" - `trigram` (string) Optional. Only used when updateCrewUsers=true to update the crew member's trigram/nickname. - `weight` (number) Optional. Only used when updateCrewUsers=true to update the crew member's weight. - `weightUnit` (string) Optional. Only used when updateCrewUsers=true to update the crew member's weight unit. Enum: "KILOGRAM", "POUND" - `luggageWeight` (number) Optional. Only used when updateCrewUsers=true to update the crew member's luggage weight. - `luggageUnit` (string) Optional. Only used when updateCrewUsers=true to update the crew member's luggage weight unit. Enum: "KILOGRAM", "POUND" - `personnelNumber` (string) Optional. Only used when updateCrewUsers=true to update the crew member's personnel number. - `isPilotLanding` (boolean) Optional. If true, sets the landing count to 1. Can be overridden by explicitly setting the landings field. - `isPilotTakeoff` (boolean) Optional. If true, sets the takeoff count to 1. Can be overridden by explicitly setting the takeOffs field. - `landings` (integer) Optional. Number of landings performed by this crew member on this flight. If isPilotLanding is true and this field is not set, it defaults to 1. - `takeOffs` (integer) Optional. Number of takeoffs performed by this crew member on this flight. If isPilotTakeoff is true and this field is not set, it defaults to 1. - `nightLandings` (integer) Optional. Number of night landings performed by this crew member on this flight. - `nightTakeOffs` (integer) Optional. Number of night takeoffs performed by this crew member on this flight. - `checkIn` (string) Optional. Crew member check-in/report time in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss'Z'). - `checkOut` (string) Optional. Crew member check-out/close time in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss'Z'). ## Response 200 fields (application/json): - `crews` (array) - `crews.crewPosition` (object) - `crews.crewPosition.assignable` (boolean) - `crews.crewPosition.code` (string) - `crews.crewPosition.crewType` (string) Enum: "FLIGHT_DECK", "CABIN" - `crews.crewPosition.disableFtFdpCalculation` (boolean) - `crews.crewPosition.id` (integer) - `crews.crewPosition.name` (string) - `crews.crewPosition.role` (string) Enum: "CMD", "FO", "CC", "MED1", "ATPL", "LST", "AQ", "OPCRH", "PA", "FA", "CPL", "DG", "ESET", "Sec", "FF", "ENL4", "ENL5", "ENL6", "LC", "OPC", "LVTO", "LV", "RVSM", "TRI", "TRE", "AUS", "SQMM", "SECG", "BMVIT", "EFB", "GRT", "ESE", "OCC", "OICC", "PICC", "DITCH", "FAID", "WINTER", "BRNAV", "MNPS_ETOPS", "RACQ", "ETOPS", "TCAS", "CRM", "ASH", "USER0", "USER1", "USER2", "USER3", "USER4", "USER5", "USER6", "USER7", "USER8", "USER9", "ENG", "AUGM_CREW", "ADD_CREW", "CREW", "IR", "HW_OPS", "PBN", "PFI", "FM", "SEP", "SEP_IR", "FI_A", "MEP", "CR", "RC", "OBS", "DHC", "EX_CM", "AUG_PIC", "AUG_SIC", "AUG_CRP", "INSTRUCTOR", "CHECK_AIRMAN", "GROUND_INSTRUCTOR", "AUG_FA", "CA", "MD", "RN", "MEDIC", "MAINTENANCE", "JUMPSEAT", "LOAD_MASTER", "OPS_CONTROL", "FLIGHT_COORDINATOR", "COURIER", "NR", "INSPECTOR", "COMPANY_REP", "SINGLE_PILOT" - `crews.crewPosition.typeRatingRelated` (boolean) - `crews.email` (string) - `crews.externalReference` (string) - `crews.firstName` (string) - `crews.gender` (string) Enum: "FEMALE", "MALE", "OTHER" - `crews.isPilotLanding` (boolean) - `crews.isPilotTakeoff` (boolean) - `crews.lastName` (string) - `crews.logName` (string) - `crews.luggageUnit` (string) Enum: "KILOGRAM", "POUND" - `crews.luggageWeight` (number) - `crews.middleName` (string) - `crews.mobile` (string) - `crews.personnelNumber` (string) - `crews.phone` (string) - `crews.pilotId` (integer) - `crews.trigram` (string) - `crews.weight` (number) - `crews.weightUnit` (string) Enum: "KILOGRAM", "POUND" - `flightId` (integer) ## Response 201 fields ## Response 401 fields ## Response 403 fields ## Response 404 fields ## Response 406 fields ## Response 412 fields