{"openapi":"3.0.0","servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/leena.bhavnani/AA_Envoy_CrewEvent/1.0.0"},{"description":"Automock for Envoy Crew Event Integration","url":"https://virtserver.swaggerhub.com/AccommodationsPlus/AAEnvoyCrewEvent/1.0.0"}],"info":{"version":"1.0.0","title":"AA/Envoy Crew Event Integration","description":"New event based integration with AA FOS CMS to replace the existing FlightHub batch integration."},"security":[{"accessCode":["read","write"]}],"paths":{"/crewEvent":{"post":{"summary":"Crew update or remove event","description":"Eventpoint for processing crew events from Envoy","requestBody":{"$ref":"#/components/requestBodies/crewEventRequestBody"},"responses":{"200":{"description":"OK"},"400":{"description":"Bad input parameter"},"403":{"description":"Authentication failure for backend services"},"500":{"description":"Configuration or other interal error"}}}},"/ping":{"get":{"summary":"Server heartbeat operation","description":"This operation shows how to override the global security defined above, as we want to open it up for all users.","security":[],"responses":{"200":{"description":"OK"}}}}},"components":{"requestBodies":{"crewEventRequestBody":{"description":"A JSON object containing a crew event request","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crewEvent"}}}}},"schemas":{"crewEvent":{"$ref":"#/components/schemas/pairing"},"pairing":{"type":"object","required":["pairingNumber","pairingDate","baseStation","eventType","eventTimestamp"],"properties":{"pairingNumber":{"type":"string","description":"Pairing Number","example":"06657"},"pairingDate":{"type":"string","description":"Pairing start date","format":"date","example":"2024-10-01"},"baseStation":{"type":"string","description":"Base location of pairing","example":"DFW"},"pairingType":{"type":"string","description":"FO = Flight Ops<br>\nIFS = Inflight Services\n","enum":["FO","IFS"],"example":"FO"},"eventType":{"type":"string","description":"UPDATE = Pairing Update<br>\nREMOVE = Crew Remove\n","enum":["UPATE","REMOVE"],"example":"UPDATE"},"eventTimestampZ":{"type":"string","format":"date-time","description":"Timestamp when event was created","example":"2024-10-01T00:23:00Z"},"bidPeriod":{"$ref":"#/components/schemas/bidPeriod"},"pairingCrew":{"oneOf":[{"$ref":"#/components/schemas/openCrew"},{"$ref":"#/components/schemas/assignedCrew"}]},"dutyPeriods":{"type":"array","items":{"$ref":"#/components/schemas/dutyPeriod"}}}},"bidPeriod":{"type":"object","required":["number","year"],"properties":{"number":{"type":"string","format":"integer","description":"Bid period number","example":10},"year":{"type":"string","format":"integer","description":"Bid period year","example":2024}}},"openCrew":{"type":"object","properties":{"openPosition":{"$ref":"#/components/schemas/seatPositionType"}}},"assignedCrew":{"type":"object","properties":{"position":{"type":"object","required":["seatPosition","employeeNumber","employeeName","employeeSubtype"],"properties":{"seatPostion":{"$ref":"#/components/schemas/seatPositionType"},"employeeNumber":{"type":"string","description":"y","example":"888998"},"employeeName":{"type":"string","description":"y","example":"Jack Bauer"},"employeeSubtype":{"type":"string","description":"REGULAR = Regular/training crew member<br>\nIOE = Crew member Initial Operation Experience\n","enum":["REGULAR","IOE"],"example":"REGULAR"}}}}},"dutyPeriod":{"type":"object","required":["dutyPeriodSeqNumber","dutyType","scheduledStartTime","scheduledEndTime"],"properties":{"dutyPeriodSeqNumber":{"type":"string","description":"Duty period sequence number","format":"integer","example":1},"dutyType":{"type":"string","description":"DOMESTIC = No border crossings<br>\nINTERNATIONAL = One or more border crossings\n","enum":["DOMESTIC","INTERNATIONAL"],"example":"DOMESTIC"},"scheduledStartTime":{"type":"string","format":"date-time","example":"2024-10-01T20:45:00Z"},"schedulesEndTime":{"type":"string","format":"date-time","example":"2024-10-02T00:26:00Z"},"estimatedStartTime":{"type":"string","format":"date-time"},"estimatedEndTime":{"type":"string","format":"date-time"},"segments":{"type":"array","items":{"$ref":"#/components/schemas/segment"}}}},"segment":{"type":"object","required":["seqNumber","airlineCode","flightNumber","deadhead","origin","destination","scheduledDepartureDateTime","scheduledArrivalDateTime","segmentDate","segmentType"],"properties":{"seqNumber":{"type":"string","description":"Segment number within duty period","format":"integer","example":1},"airlineCode":{"type":"string","description":"x","example":"MQ"},"flightNumber":{"type":"string","description":"x","example":"3640"},"deadhead":{"type":"string","description":"x","format":"boolean","example":false},"origin":{"type":"string","description":"x","example":"GSO"},"destination":{"type":"string","description":"x","example":"MIA"},"scheduledDepartureDateTime":{"type":"string","description":"x","format":"date-time","example":"2024-10-01T21:45:00Z"},"scheduledArrivalDateTime":{"type":"string","description":"x","format":"date-time","example":"2024-10-02T23:56:00Z"},"estimatedDepartureDateTime":{"type":"string","description":"x","format":"date-time"},"estimatedArrivalDateTime":{"type":"string","description":"x","format":"date-time"},"actualDepartureDateTime":{"type":"string","description":"x","format":"date-time"},"actualArrivalDateTime":{"type":"string","description":"x","format":"date-time"},"segmentDate":{"type":"string","description":"x","format":"date","example":"2024-10-01"},"segmentType":{"type":"string","description":"FLIGHT = Operating or deadhead flight<br>\nGROUND = Ground transportation<br>\nSTATIONARY = Non-movement ground activity, e.g., training\n","enum":["FLIGHT","GROUND","STATIONARY"],"example":"FLIGHT"}}},"seatPositionType":{"type":"string","description":"CA - Captain<br>\nFO - First Officer<br>\n01 - Flight Attendant #1<br>\n02 - Flight Attendant #2\n","enum":["CA","FO","01","02"],"example":"FO"}},"securitySchemes":{"accessCode":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"http://example.com/oauth/auth","tokenUrl":"http://example.com/oauth/token","scopes":{"write":"allows modifying resources","read":"allows reading resources"}}}}}}}