# Flights

## GET /v1/flights

> Get flights within a geographic area

```json
{"openapi":"3.0.3","info":{"title":"Wingbits Customer API","version":"1.0.0"},"servers":[{"url":"http://localhost:3002"},{"url":"https://customer-api.wingbits.com"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for accessing protected endpoints"}}},"paths":{"/v1/flights":{"get":{"tags":["Flights"],"description":"Get flights within a geographic area","parameters":[{"schema":{"default":"box","type":"string","enum":["box","radius"]},"in":"query","name":"by","required":false,"description":"Search type: 'box' or 'radius'"},{"schema":{"type":"number"},"in":"query","name":"w","required":true,"description":"Width of search box (in km or nm based on unit)"},{"schema":{"type":"number"},"in":"query","name":"h","required":true,"description":"Height of search box (in km or nm based on unit)"},{"schema":{"type":"number"},"in":"query","name":"rad","required":true,"description":"Search radius (in km or nm based on unit)"},{"schema":{"type":"number","minimum":-90,"maximum":90},"in":"query","name":"la","required":true,"description":"Latitude of center point (-90 to 90)"},{"schema":{"type":"number","minimum":-180,"maximum":180},"in":"query","name":"lo","required":true,"description":"Longitude of center point (-180 to 180)"},{"schema":{"type":"number"},"in":"query","name":"min_ab","required":false,"description":"Minimum altitude filter in feet"},{"schema":{"type":"number"},"in":"query","name":"max_ab","required":false,"description":"Maximum altitude filter in feet"},{"schema":{"default":"nm","type":"string","enum":["km","nm"]},"in":"query","name":"unit","required":false,"description":"Unit for dimensions: 'km' or 'nm' (nautical miles)"},{"schema":{"type":"string"},"in":"query","name":"categories","required":false,"description":"Comma-separated aircraft category codes (e.g., A1,A2,A7)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"h":{"type":"string"},"la":{"type":"number","minimum":-90,"maximum":90},"lo":{"type":"number","minimum":-180,"maximum":180},"c":{"type":"string"},"f":{"type":"string"},"th":{},"ab":{},"ro":{"type":"number"},"ra":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"og":{"description":"Whether aircraft is on ground"},"sq":{"description":"Transponder squawk code","type":"string"},"gs":{"description":"Speed over ground","type":"number"}},"required":["h","la","lo","og"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}}}}
```

## POST /v1/flights

> Get flights within multiple geographic areas

```json
{"openapi":"3.0.3","info":{"title":"Wingbits Customer API","version":"1.0.0"},"servers":[{"url":"http://localhost:3002"},{"url":"https://customer-api.wingbits.com"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for accessing protected endpoints"}}},"paths":{"/v1/flights":{"post":{"tags":["Flights"],"description":"Get flights within multiple geographic areas","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"by":{"default":"box","type":"string","enum":["box"]},"w":{"description":"Width of search box (in km or nm based on unit)","type":"number"},"h":{"description":"Height of search box (in km or nm based on unit)","type":"number"}},"required":["w","h"]},{"type":"object","properties":{"by":{"default":"radius","type":"string","enum":["radius"]},"rad":{"description":"Search radius (in km or nm based on unit)","type":"number"}},"required":["rad"]}]},{"type":"object","properties":{"by":{"description":"Search type: 'box' or 'radius'","default":"box","type":"string","enum":["box","radius"]},"la":{"description":"Latitude of center point (-90 to 90)","type":"number","minimum":-90,"maximum":90},"lo":{"description":"Longitude of center point (-180 to 180)","type":"number","minimum":-180,"maximum":180},"min_ab":{"description":"Minimum altitude filter in feet","type":"number"},"max_ab":{"description":"Maximum altitude filter in feet","type":"number"},"unit":{"description":"Unit for dimensions: 'km' or 'nm' (nautical miles)","default":"nm","type":"string","enum":["km","nm"]},"categories":{"description":"Comma-separated aircraft category codes (e.g., A1,A2,A7)","type":"string"}},"required":["la","lo"]},{"type":"object","properties":{"alias":{"description":"lookup alias for response","type":"string"}},"required":["alias"]}]}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"alias":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"h":{"type":"string"},"la":{"type":"number","minimum":-90,"maximum":90},"lo":{"type":"number","minimum":-180,"maximum":180},"c":{"type":"string"},"f":{"type":"string"},"th":{},"ab":{},"ro":{"type":"number"},"ra":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"og":{"description":"Whether aircraft is on ground"},"sq":{"description":"Transponder squawk code","type":"string"},"gs":{"description":"Speed over ground","type":"number"}},"required":["h","la","lo","og"],"additionalProperties":false}}},"required":["alias","data"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}}}}
```

## GET /v1/flights/{id}

> Get a flight by ID

```json
{"openapi":"3.0.3","info":{"title":"Wingbits Customer API","version":"1.0.0"},"servers":[{"url":"http://localhost:3002"},{"url":"https://customer-api.wingbits.com"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for accessing protected endpoints"}}},"paths":{"/v1/flights/{id}":{"get":{"tags":["Flights"],"description":"Get a flight by ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"Item identifier"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"flight":{"anyOf":[{"type":"object","properties":{"la":{"description":"Aircraft latitude","type":"number","minimum":-90,"maximum":90},"lo":{"description":"Aircraft longitude","type":"number","minimum":-180,"maximum":180},"c":{"description":"Aircraft category","type":"string"},"f":{"description":"Flight number/callsign","type":"string"},"ab":{"description":"Altitude from barometric pressure"},"ra":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"d":{"description":"Station identifier","type":"string"},"h":{"description":"ICAO aircraft address","type":"string"},"tr":{"description":"Track angle"},"th":{"description":"Heading relative to true north"},"og":{"description":"Whether aircraft is on ground"},"a":{"description":"Alert status","type":"number"},"ag":{"description":"Altitude from GPS","type":"number"},"br":{"description":"Rate of change in barometric altitude","type":"number"},"em":{"description":"Emergency status","type":"string"},"gr":{"description":"Rate of change in geometric altitude","type":"number"},"gs":{"description":"Speed over ground","type":"number"},"gv":{"description":"Accuracy of geometric altitude","type":"number"},"i":{"description":"Indicated Air Speed","type":"number"},"m":{"description":"Mach number","type":"number"},"mh":{"description":"Heading relative to magnetic north","type":"number"},"n":{"description":"NIC value","type":"number"},"naf":{"description":"Altitude from Flight Management System","type":"number"},"nam":{"description":"Altitude set on Mode Control Panel","type":"number"},"nb":{"description":"NIC value from barometric source","type":"number"},"nh":{"description":"Selected heading","type":"number"},"np":{"description":"NAC-p value","type":"number"},"nq":{"description":"Altimeter setting","type":"number"},"nv":{"description":"NAC-v value","type":"number"},"oat":{"description":"Temperature outside aircraft","type":"number"},"port":{"type":"number"},"rc":{"description":"Position accuracy measure","type":"number"},"ro":{"description":"Roll angle","type":"number"},"rs":{"description":"Received Signal Strength Indicator","type":"number"},"s":{"description":"Source Integrity Level","type":"number"},"sda":{"description":"System Design Assurance level","type":"number"},"sn":{"description":"When message was last seen","type":"number"},"sp":{"description":"When position was last seen","type":"number"},"spi":{"description":"Special Position Indicator","type":"number"},"sq":{"description":"Transponder squawk code","type":"string"},"st":{"description":"Type of SIL","type":"string"},"t":{"description":"Message type","type":"string"},"tat":{"description":"Total air temperature","type":"number"},"trr":{"description":"Rate of change in track angle","type":"number"},"ts":{"type":"number"},"v":{"description":"ADS-B version","type":"number"},"nm":{"type":"array","items":{"type":"string"}}},"required":["la","lo","ra","h","og"],"additionalProperties":false},{"nullable":true,"enum":[null]}]},"hexId":{"type":"string"},"lastPosition":{"type":"object","properties":{"la":{"type":"number"},"lo":{"type":"number"},"alt":{"type":"number"},"timestamp":{"type":"number"}},"required":["la","lo"],"additionalProperties":false},"message":{"type":"string"}},"required":["flight"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}}}}
```

## GET /v1/flights/{id}/path

> Get a flight path by ID

```json
{"openapi":"3.0.3","info":{"title":"Wingbits Customer API","version":"1.0.0"},"servers":[{"url":"http://localhost:3002"},{"url":"https://customer-api.wingbits.com"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for accessing protected endpoints"}}},"paths":{"/v1/flights/{id}/path":{"get":{"tags":["Flights"],"description":"Get a flight path by ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"Item identifier"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"flight":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"path":{"type":"array","items":{"allOf":[{"type":"object","properties":{"altitude":{"type":"number"},"timestamp":{"type":"number"}},"required":["altitude","timestamp"],"additionalProperties":false},{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["latitude","longitude"],"additionalProperties":false}]}}},"required":["id","name","path"],"additionalProperties":false}},"required":["flight"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}}}}
```

## GET /v1/flights/search

> Search for a flight by callsign, ICAO hex, or registration

```json
{"openapi":"3.0.3","info":{"title":"Wingbits Customer API","version":"1.0.0"},"servers":[{"url":"http://localhost:3002"},{"url":"https://customer-api.wingbits.com"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for accessing protected endpoints"}}},"paths":{"/v1/flights/search":{"get":{"tags":["Flights"],"description":"Search for a flight by callsign, ICAO hex, or registration","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":15},"in":"query","name":"query","required":true,"description":"Flight callsign, ICAO hex, or registration"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"flight":{"anyOf":[{"type":"object","properties":{"h":{"type":"string"},"la":{"type":"number","minimum":-90,"maximum":90},"lo":{"type":"number","minimum":-180,"maximum":180},"c":{"type":"string"},"f":{"type":"string"},"th":{},"ab":{},"ro":{"type":"number"},"ra":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["h","la","lo"],"additionalProperties":false},{"nullable":true,"enum":[null]}]},"message":{"type":"string"}},"required":["flight"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}}}}
```

## GET /v1/flights/details/{icao24}

> Retrieve detailed information about an aircraft using its ICAO 24-bit address

```json
{"openapi":"3.0.3","info":{"title":"Wingbits Customer API","version":"1.0.0"},"servers":[{"url":"http://localhost:3002"},{"url":"https://customer-api.wingbits.com"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for accessing protected endpoints"}}},"paths":{"/v1/flights/details/{icao24}":{"get":{"tags":["Flights"],"description":"Retrieve detailed information about an aircraft using its ICAO 24-bit address","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"icao24","required":true,"description":"ICAO 24-bit address"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"icao24":{"type":"string"},"registration":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"manufacturerIcao":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"manufacturerName":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"model":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"typecode":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"serialNumber":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"lineNumber":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"icaoAircraftType":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"operator":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"operatorCallsign":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"operatorIcao":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"operatorIata":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"owner":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"registered":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"reguntil":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"status":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"built":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"firstFlightDate":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"engines":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"modes":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"adsb":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"acars":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"notes":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"categoryDescription":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"mil":{"anyOf":[{"type":"boolean"},{"nullable":true,"enum":[null]}]},"faaPia":{"anyOf":[{"type":"boolean"},{"nullable":true,"enum":[null]}]},"faaLadd":{"anyOf":[{"type":"boolean"},{"nullable":true,"enum":[null]}]},"shortType":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]}},"required":["icao24","registration","manufacturerIcao","manufacturerName","model","typecode","serialNumber","lineNumber","icaoAircraftType","operator","operatorCallsign","operatorIcao","operatorIata","owner","registered","reguntil","status","built","firstFlightDate","engines","modes","adsb","acars","notes","categoryDescription","mil","faaPia","faaLadd","shortType"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"description":"HTTP status code, like 200, 400, 401, 403, 404, 500","type":"number"},"error":{"description":"Error type. Textual representation of the status code, like \"Bad Request\", \"Unauthorized\", \"Forbidden\"","type":"string"},"message":{"description":"Error message. Detailed description of the error","type":"string"},"code":{"description":"Custom error code to further identify the error, like \"MFA_REQUIRED\", \"INVALID_CREDENTIALS\"","type":"string"},"validation":{"description":"Validation errors if any","type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","path"],"additionalProperties":false}}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}}}}
```
