{"openapi":"3.1.0","info":{"title":"Avion Desk API","description":"Read your operator's data from your own tools.\n\n**Keys.** An Admin makes a key under Settings > API keys. Send it on every request as\n`Authorization: Bearer <key>`. A key reads only its own operator's data. Keep it secret:\nanyone holding it can read what it can. Revoke a key you no longer use; it stops at once.\n\n**What a key can read.** When an Admin makes a key, they check what it can read. A key can't be\nchanged afterwards: to read more, make a new key with more checked and revoke the old one. A\nrequest for something the key wasn't given answers 403 `missing_scope`, naming the box to check\non a new key.\n\n- Aircraft (`aircraft.read`): Aircraft, their times and flight logs, squawks, due items, downtime and scheduled flights.\n- Trips (`trips.read`): Trips and legs across the fleet, with the client.\n- Passenger names (`trips.passengers`): Who is aboard each leg, by name only.\n- Crew (`crew.read`): Crew and staff with their work email and phone, the legs they are on, their duty and rest, and pilot currency where you track it.\n- Money (`money.read`): Expenses and invoices.\n- Reports (`reports.read`): Your reports, run for any period, with their rows, totals and headline figures.\n- Risk scores (`risk.write`): Send a risk score for a leg.\n- Bookings (`bookings.write`): Send hotel, car, catering and handling confirmations.\n- Vendor invoices (`invoices.write`): Send handler and fuel invoices for review.\n\n**What you can send.** Your tools can send some things back in. Each arrives where your\noffice already reviews that kind of thing, under the tool's name (the key's name, or the\npartner's), and shows in the operator's Activity log as the tool's. Every send carries your own\n`external_id`: sending it again with the same content answers 200 with what the first send\nmade (201) and never makes a second one, so a retry is always safe. Sends count toward the\nusual limit and have their own of 60 a minute per key.\n\n- Risk scores (`risk.write`, Trips on): `POST /v1/legs/{leg_id}/risk-scores` with your score\n  for the leg (`score` 0 to 10000 on your own scale, `level` low, medium or high, a `summary`,\n  an optional https `url` and `scored_at`). It shows on the trip's Release tab beside the\n  operator's own risk assessment, and a high one puts a caution on the trip and emails the\n  people who approve risk. It never stops a release and never changes the operator's own\n  assessment. New content for the leg (a new `external_id`, or the same one changed) replaces\n  your earlier score; an `external_id` you used on another leg is a 409. `GET` the same path\n  for your own scores on the leg.\n\n- Bookings (`bookings.write`, Trips on): `POST /v1/bookings` sends a hotel, car, ground\n  transport, catering or handling booking your tool made. Naming a leg, it lands on that leg at\n  once and fills the leg's open item for it (Requested or Confirmed, as you send it); an item\n  the office already closed is left alone. Naming none, it waits in the operator's Trips >\n  Reservations for the office to put on a leg, and your alert address hears `booking.attached`\n  when it does (or at once, when you named the leg). Send the same `external_id` again to\n  change it (times, provider, confirmation, status) or to cancel it (`canceled: true`): the\n  leg's item then goes back to the office to arrange again, unless someone there has changed it\n  since. `GET /v1/bookings/{booking_id}` reads one back. The confirmation number is kept\n  encrypted and never sent back out.\n\n- Vendor invoices (`invoices.write`, Accounting and Expenses on): `POST /v1/vendor-invoices`\n  sends a handler's or fuel vendor's invoice, with its file (one PDF, JPEG or PNG, base64, up\n  to 10 MB) if you have it; amounts are whole numbers in minor units, as the money reads, and\n  the lines are before tax, adding up with `tax` to `amount`. It waits in the app as To\n  review, on its trip's Expenses when it names a trip or leg, until someone who manages\n  expenses saves it as an expense or discards it; nothing reaches the operator's books before\n  that. A changed send updates it while it waits, and is a 409\n  `already_reviewed` once the office has acted. `GET /v1/vendor-invoices/{id}` says where one\n  you sent stands, and the `invoice.saved` and `invoice.discarded` alerts tell you.\n\nMore is coming: trip requests.\n\n**When a key stops.** A key works only while the person who made it is still an Admin of your\noperator. If they leave or lose Admin, the key stops; it works again if they are made Admin\nagain, or an Admin can make a new key. While your operator's subscription has ended, keys are\npaused and answer 402; they work again as soon as a plan is chosen.\n\n**Errors.** Every error is `{\"error\": {\"code\": \"...\", \"message\": \"...\"}}`. 401: the key is\nmissing, wrong or revoked, or whoever made it is no longer an Admin. 402: the subscription has\nended, so keys are paused. 403: the key can't read this (`missing_scope`), or this part of the\napp is off for your operator (flights also need the Trips part on, as trips and legs do; for\ncrew, the list and currency need People, a person's legs need Trips, and duty needs Trips and\nDuty). 404: no such record (a deactivated aircraft or person too). 422: a parameter isn't\nvalid; the message says which. 429: too many requests; wait the `Retry-After` seconds.\n\n**Paging.** Lists that page return `next_cursor`. Pass it back as `cursor` for the next page;\nit is null on the last one. Flight logs, trips, legs, people, expenses and invoices also take\n`since`, so a sync can ask only for what changed after its last run.\n\n**Times** are UTC, in ISO 8601.\n\n**What you can read.** Your active aircraft and their current times; each aircraft's flight\nlogs, its defects (squawks), its maintenance items and when they come due, its downtime, and\nits scheduled flights. These carry no contact details, passengers, clients, crew or money.\n\nWith Trips, the whole fleet's schedule: each trip (option, confirmed, or canceled when you ask)\nwith its client's name, its aircraft and its legs, and each leg's airports, times, FBOs at both\nends, the time estimate, who is crewing it (an id and seat; names only if the key can also read\nCrew), how many passengers, and what is arranged (handler, catering, hotels, transport) with\nthe vendor and confirmation. `/v1/legs` lists the legs on their own for keeping a calendar in\nstep, and with `since` returns removed legs too, with `removed_at` set. Passenger names only\nwith Passenger names checked, and nothing else about a passenger. A quote nobody has booked\nnever shows. Never a client's contact details or notes, the trip's notes, or prices.\n\nWith Crew: your crew (and, if you ask, all your staff) with their roles, crew positions, base,\nand the email and phone on their record at your operator; the legs each one is on; their duty\nand rest as the app works them out; and pilot currency where you track it (currency is\noptional, so for someone it isn't tracked for you get `tracked: false` and no items). Work\ndetails only: never a personal contact, home address, date of birth, passport, medical,\ncertificate number, emergency contact or pay. A passenger or client contact is never a person\nhere.\n\nWith Money (`money.read`, Accounting on): your expenses, each receipt with its lines, category,\nvendor, trip, aircraft, how it was paid, review status and where its billing stands, voided ones\ntoo; and your issued and voided invoices with their lines, totals, balance, payments and credit\nnotes (drafts aren't listed). Every amount is a whole number in the currency's minor units\n(cents for USD: 41260 is 412.60) with its currency code, never a decimal. Never card or bank\ndetails or what a card or account is called, payment references, notes, who spent or recorded\nsomething, or a client's contact details. Their `since` goes by `changed_at`.\n\nWith Reports checked, your operator's reports: list them, then run one for a period and read\nits rows a page at a time, with the same totals and headline figures the app shows. Running a\nreport counts 30 a minute per key, on top of the usual limit. A report about money needs Money\nchecked too, and one about the crew needs Crew. Inside a report, a column of money needs\nMoney, a client's or owner's name Trips or Money, a passenger's name Passenger names, and a\npilot's or team member's name Crew; without the box the column is left out and listed in\n`hidden_columns` with the box that shows it. Reports on your team's use of the app, on safety,\nand on crew records and training are not offered. Each person's saved filters, starred\nreports and emailed reports stay theirs, in the app.\n\n**Versioning.** v1 only grows: we may add paths, fields and optional parameters, and new values\nto a list of words such as a status, so read what you know and ignore what you don't. We never\nrename, remove or retype anything in v1. A change that would break that comes as v2, and v1\nkeeps working for a notice period announced well ahead.\n\n**Alerts.** Instead of asking for changes, your tool can be told. An Admin adds an https\naddress under Settings > API keys (up to five), chooses what it hears, and gets a signing\nsecret, shown once. For each change we POST a JSON body to every address that chose it:\n`{\"id\", \"type\", \"created_at\", \"aircraft_id\", \"data\"}`, where `data` is the object exactly as\nthe matching read above returns it, and `operator_id`, the operator whose change it is (see\nWebhooks below for each type and its shape):\n\n- Flight logs: `flight_log.created`, `.updated`, `.voided` (data: a flight logs entry).\n- Times: `times.changed`, a time set by hand or by a file import (data: a current times item\n  plus `aircraft_id`). A time moved by a logged flight is told as `flight_log.*` only.\n- Squawks: `discrepancy.reported`, `.updated`, `.cleared`, `.removed` (data: a defect).\n- Due items: `due_item.changed` (added, edited, signed off), `due_item.state_changed` (it\n  crossed between ok, due_soon and overdue on its own, told once per crossing),\n  `due_item.removed` (data: a due item).\n- Downtime: `downtime.created`, `.updated`, `.removed` (data: a downtime).\n- Flights: `flight.created`, `.updated`, `.canceled`, `.removed` (data: a scheduled flight;\n  the same trips the flights read shows). A leg moved to another aircraft is `flight.removed`\n  for the old one and `flight.created` for the new.\n\nA `.removed` (or `.voided`) alert carries the object as it was last, with when it left\n(`removed_at`, `voided_at`): drop it from your copy. One save that changes several things sends\none alert per object it changed. Nothing is sent for a part of the app that is off for your\noperator. An Admin can change what an address hears, pause, resume, test and remove it there,\nand see its latest deliveries.\n\nAnswer with a 2xx status within 10 seconds; redirects are not followed. Anything else is tried\nagain after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 12 hours, for up to a day. An\naddress that fails for a day, or 50 times in a row, is switched off and your Admins are emailed;\nresume it under Settings > API keys. Nothing is sent while your subscription has ended (those\nchanges are dropped, not held: read them with `since` once a plan is chosen). A delivery can\narrive more than once: ignore an `id` you have already handled.\n\n**Checking the signature.** Every request carries `X-Signature: t=<unix seconds>,v1=<hex>`.\nCompute HMAC-SHA256 of `<t>.<raw body>` with your secret and compare it to `v1` in constant\ntime; refuse a `t` more than five minutes old. In Python:\n\n```python\nimport hashlib, hmac, time\n\ndef verified(secret: str, header: str, body: bytes) -> bool:\n    parts = dict(p.split(\"=\", 1) for p in header.split(\",\"))\n    signed = parts[\"t\"].encode() + b\".\" + body\n    expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()\n    fresh = abs(time.time() - int(parts[\"t\"])) < 300\n    return fresh and hmac.compare_digest(expected, parts[\"v1\"])\n```\n\nUse the raw bytes you received, before any JSON parsing.\n\n**Partners.** A company we approve as a partner reads the data of each operator that allows it,\nand hears its changes. An operator's Admin allows a partner under Settings > Connections, sees\nexactly what it reads and hears, chooses all of its aircraft or some, and can revoke it at any\ntime; a change or a revoke takes effect at once. Partners read, and send what the operator\nallowed (see What you can send).\n\n- A partner's key starts `adk_partner_`. We hand it over once, privately; a partner has at most\n  two active keys, so one can replace the other without a gap.\n- `GET /v1/operators` lists the operators that allow you, with what each one allowed: all\n  aircraft or the listed ones, the scopes, and the changes it tells you of.\n- The aircraft reads above (aircraft, times, flight logs, squawks, due items, downtime and\n  scheduled flights), and the sends, are served again under `/v1/operators/{operator_id}/`,\n  answering the same shapes: `/v1/operators/{operator_id}/aircraft`,\n  `.../aircraft/{aircraft_id}/logs`, `.../legs/{leg_id}/risk-scores` and so on. A send may\n  name only a leg on an aircraft the operator allowed.\n  Trips, crew, money and reports are an operator's own keys' only.\n  Only the aircraft the operator allowed are there; any other is a 404, as another operator's\n  is. An operator that revokes you, or stops using the app, leaves `/v1/operators` and its\n  paths answer 404. While an operator's subscription has ended, its paths answer 402 (the\n  others still work).\n- Bookings are sent the same way, `POST /v1/operators/{operator_id}/bookings`, and may name\n  only a leg on an aircraft the operator allowed (any other is a 404). One naming no leg is\n  allowed from any grant with the Bookings box.\n- A partner key on the operator paths above (`/v1/aircraft/...`) is a 403, and so is an\n  operator's own key on `/v1/operators/...`. A partner we suspend gets 401 everywhere.\n- Partner keys are counted apart, each with a higher limit (600 requests a minute).\n- Alerts go to the one address we set for you, signed with its own secret, for every operator\n  that allows you, only for the aircraft and changes it allowed. `operator_id` in each body\n  says whose change it is. Retries are the same; an address that keeps failing is switched off\n  for every operator, and we get in touch.","version":"1.0.0"},"paths":{"/v1/aircraft":{"get":{"tags":["Aircraft"],"summary":"List aircraft","description":"The operator's active aircraft and the times each one tracks.","operationId":"list_aircraft","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AircraftListOut"}}}}},"security":[{"ApiKey":[]}]}},"/v1/aircraft/{aircraft_id}/times":{"get":{"tags":["Aircraft"],"summary":"Current times","description":"Each tracked time's current total, and who or what changed it last.","operationId":"read_times","security":[{"ApiKey":[]}],"parameters":[{"name":"aircraft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aircraft Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/aircraft/{aircraft_id}/logs":{"get":{"tags":["Aircraft"],"summary":"Flight logs","description":"The flight log entries of this aircraft's legs, oldest change first. Corrections move an\nentry to the end, so syncing with `since` set to your last copy's newest `updated_at` picks\nthem up. Voided entries come back with `voided_at` set.","operationId":"read_logs","security":[{"ApiKey":[]}],"parameters":[{"name":"aircraft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aircraft Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only entries changed at or after this time (ISO 8601).","title":"Since"},"description":"Only entries changed at or after this time (ISO 8601)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Entries per page, 1 to 500.","default":100,"title":"Limit"},"description":"Entries per page, 1 to 500."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"The next_cursor of the page before.","title":"Cursor"},"description":"The next_cursor of the page before."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/aircraft/{aircraft_id}/discrepancies":{"get":{"tags":["Maintenance"],"summary":"Defects","description":"The aircraft's defects (squawks). Open ones come in one page, most urgent first; cleared\nones and `all` page with `cursor`. A defect withdrawn as a mistake never shows.","operationId":"read_discrepancies","security":[{"ApiKey":[]}],"parameters":[{"name":"aircraft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aircraft Id"}},{"name":"status","in":"query","required":false,"schema":{"enum":["open","cleared","all"],"type":"string","description":"open (the default): not yet cleared. cleared: fixed and signed for. all: both.","default":"open","title":"Status"},"description":"open (the default): not yet cleared. cleared: fixed and signed for. all: both."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Items per page, 1 to 500.","default":100,"title":"Limit"},"description":"Items per page, 1 to 500."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"The next_cursor of the page before.","title":"Cursor"},"description":"The next_cursor of the page before."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscrepanciesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/aircraft/{aircraft_id}/due-items":{"get":{"tags":["Maintenance"],"summary":"Maintenance items coming due","description":"The aircraft's active maintenance items and when each comes due, by date or at a\nreading, most urgent first, with the operator's due-soon windows. One page.","operationId":"read_due_items","security":[{"ApiKey":[]}],"parameters":[{"name":"aircraft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aircraft Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DueItemsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/aircraft/{aircraft_id}/downtime":{"get":{"tags":["Maintenance"],"summary":"Downtime","description":"The aircraft's current and upcoming downtime (maintenance windows), earliest start\nfirst; with `include_past`, the ended ones too. Removed downtime never shows.","operationId":"read_downtime","security":[{"ApiKey":[]}],"parameters":[{"name":"aircraft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aircraft Id"}},{"name":"include_past","in":"query","required":false,"schema":{"type":"boolean","description":"Also the downtime that has ended. Off by default.","default":false,"title":"Include Past"},"description":"Also the downtime that has ended. Off by default."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Items per page, 1 to 500.","default":100,"title":"Limit"},"description":"Items per page, 1 to 500."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"The next_cursor of the page before.","title":"Cursor"},"description":"The next_cursor of the page before."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DowntimesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/aircraft/{aircraft_id}/flights":{"get":{"tags":["Flights"],"summary":"Scheduled flights","description":"The aircraft's scheduled legs in the range: each leg whose time in the air touches it.\nOptions and confirmed trips; canceled ones on request; never a quote nobody booked.","operationId":"read_flights","security":[{"ApiKey":[]}],"parameters":[{"name":"aircraft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aircraft Id"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The start of the range (ISO 8601 with a zone). Default: now.","title":"From"},"description":"The start of the range (ISO 8601 with a zone). Default: now."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The end of the range (ISO 8601 with a zone). Default: 30 days after `from`. At most 90 days after `from`.","title":"To"},"description":"The end of the range (ISO 8601 with a zone). Default: 30 days after `from`. At most 90 days after `from`."},{"name":"include_canceled","in":"query","required":false,"schema":{"type":"boolean","description":"Also the legs of canceled trips. Off by default.","default":false,"title":"Include Canceled"},"description":"Also the legs of canceled trips. Off by default."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Items per page, 1 to 500.","default":100,"title":"Limit"},"description":"Items per page, 1 to 500."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"The next_cursor of the page before.","title":"Cursor"},"description":"The next_cursor of the page before."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlightsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/trips":{"get":{"tags":["Trips"],"summary":"List trips","description":"The fleet's trips with a leg in the air during the range (now to 30 days on by\ndefault), earliest first; or, with `since`, every trip that changed since then, oldest\nchange first. Each with its client, aircraft and legs in brief; read one trip for its legs\nin full. Never a quote nobody booked.","operationId":"list_trips","security":[{"ApiKey":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The start of the range (ISO 8601 with a zone). Default: now.","title":"From"},"description":"The start of the range (ISO 8601 with a zone). Default: now."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The end of the range (ISO 8601 with a zone). Default: 30 days after `from`. At most 90 days after `from`.","title":"To"},"description":"The end of the range (ISO 8601 with a zone). Default: 30 days after `from`. At most 90 days after `from`."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["option","confirmed","canceled"],"type":"string"}},{"type":"null"}],"description":"Which trips: option, confirmed, canceled; repeat it for more than one. Default: option and confirmed.","title":"Status"},"description":"Which trips: option, confirmed, canceled; repeat it for more than one. Default: option and confirmed."},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only what changed at or after this time (ISO 8601 with a zone), oldest change first, for syncing. Use it on its own, without `from` and `to`.","title":"Since"},"description":"Only what changed at or after this time (ISO 8601 with a zone), oldest change first, for syncing. Use it on its own, without `from` and `to`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Items per page, 1 to 500.","default":100,"title":"Limit"},"description":"Items per page, 1 to 500."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"The next_cursor of the page before.","title":"Cursor"},"description":"The next_cursor of the page before."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TripsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/trips/{trip_id}":{"get":{"tags":["Trips"],"summary":"One trip","description":"A trip with its legs in full: FBOs, crew, passenger count, services and the time\nestimate. A canceled trip reads too (status canceled).","operationId":"read_trip","security":[{"ApiKey":[]}],"parameters":[{"name":"trip_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trip Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TripDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/legs":{"get":{"tags":["Trips"],"summary":"List legs","description":"Every leg of the fleet in the air during the range (now to 30 days on by default),\nearliest departure first, in full; or, with `since`, every leg that changed since then,\noldest change first, removed ones included (with `removed_at` set). For keeping a\nschedule in step.","operationId":"list_legs","security":[{"ApiKey":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The start of the range (ISO 8601 with a zone). Default: now.","title":"From"},"description":"The start of the range (ISO 8601 with a zone). Default: now."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The end of the range (ISO 8601 with a zone). Default: 30 days after `from`. At most 90 days after `from`.","title":"To"},"description":"The end of the range (ISO 8601 with a zone). Default: 30 days after `from`. At most 90 days after `from`."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["option","confirmed","canceled"],"type":"string"}},{"type":"null"}],"description":"Which trips: option, confirmed, canceled; repeat it for more than one. Default: option and confirmed.","title":"Status"},"description":"Which trips: option, confirmed, canceled; repeat it for more than one. Default: option and confirmed."},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only what changed at or after this time (ISO 8601 with a zone), oldest change first, for syncing. Use it on its own, without `from` and `to`.","title":"Since"},"description":"Only what changed at or after this time (ISO 8601 with a zone), oldest change first, for syncing. Use it on its own, without `from` and `to`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Items per page, 1 to 500.","default":100,"title":"Limit"},"description":"Items per page, 1 to 500."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"The next_cursor of the page before.","title":"Cursor"},"description":"The next_cursor of the page before."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/reports":{"get":{"tags":["Reports"],"summary":"Reports","description":"The reports this key can run: the operator's reports that are switched on and in its\nplan, less those needing a box the key doesn't have (Money for money reports, Crew for\ncrew reports, Passenger names for the passengers carried).","operationId":"list_reports","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportListOut"}}}}},"security":[{"ApiKey":[]}]}},"/v1/reports/{report_id}/rows":{"get":{"tags":["Reports"],"summary":"Run a report","description":"One page of a report's table, with its totals and the report's headline figures, for\nthe period and filters given. Columns this key can't read are left out and listed in\n`hidden_columns`. At most 100,000 rows in a table; ask for a shorter period beyond.","operationId":"read_report_rows","security":[{"ApiKey":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"description":"The report's id, from the reports list.","title":"Report Id"},"description":"The report's id, from the reports list."},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The period's first day (YYYY-MM-DD), in the operator's days. Default: the first day of the month eleven months before `to`.","title":"From"},"description":"The period's first day (YYYY-MM-DD), in the operator's days. Default: the first day of the month eleven months before `to`."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The period's last day, included. Default: today. At most five years after `from`.","title":"To"},"description":"The period's last day, included. Default: today. At most five years after `from`."},{"name":"group","in":"query","required":false,"schema":{"enum":["month","quarter","year"],"type":"string","description":"How a table by period is split: month, quarter or year.","default":"month","title":"Group"},"description":"How a table by period is split: month, quarter or year."},{"name":"aircraft_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only this aircraft, for a report that takes it.","title":"Aircraft Id"},"description":"Only this aircraft, for a report that takes it."},{"name":"client_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only this client, for a report that takes it.","title":"Client Id"},"description":"Only this client, for a report that takes it."},{"name":"table","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":0,"description":"Which of the report's tables. Default: the first.","default":0,"title":"Table"},"description":"Which of the report's tables. Default: the first."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Items per page, 1 to 500.","default":100,"title":"Limit"},"description":"Items per page, 1 to 500."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"The next_cursor of the page before.","title":"Cursor"},"description":"The next_cursor of the page before."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRowsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/expenses":{"get":{"tags":["Money"],"summary":"Expenses","description":"The operator's receipts with their lines, oldest change first. `from` and `to` go by\nthe receipt's date, both included. A change moves a receipt to the end, so syncing with\n`since` set to your last copy's newest `changed_at` picks it up; voided receipts come\nback with `voided_at` set. A line's billing changes when an invoice bills it or is voided;\nread the invoices with `since` for that.","operationId":"read_expenses","security":[{"ApiKey":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first date to include (YYYY-MM-DD).","title":"From"},"description":"The first date to include (YYYY-MM-DD)."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last date to include (YYYY-MM-DD).","title":"To"},"description":"The last date to include (YYYY-MM-DD)."},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only what changed at or after this time (ISO 8601 with a zone).","title":"Since"},"description":"Only what changed at or after this time (ISO 8601 with a zone)."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["recorded","submitted","returned","approved","paid_back","rejected"],"type":"string"},{"type":"null"}],"description":"Only receipts in this status.","title":"Status"},"description":"Only receipts in this status."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Items per page, 1 to 500.","default":100,"title":"Limit"},"description":"Items per page, 1 to 500."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"The next_cursor of the page before.","title":"Cursor"},"description":"The next_cursor of the page before."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpensesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices":{"get":{"tags":["Money"],"summary":"Invoices","description":"The operator's issued and voided invoices, oldest change first, without their lines\n(read one invoice for its lines, payments and credit notes). `from` and `to` go by the\nissue date, both included. A payment or a credit note moves an invoice to the end, so\nsyncing with `since` set to your last copy's newest `changed_at` picks it up.","operationId":"read_invoices","security":[{"ApiKey":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first date to include (YYYY-MM-DD).","title":"From"},"description":"The first date to include (YYYY-MM-DD)."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last date to include (YYYY-MM-DD).","title":"To"},"description":"The last date to include (YYYY-MM-DD)."},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only what changed at or after this time (ISO 8601 with a zone).","title":"Since"},"description":"Only what changed at or after this time (ISO 8601 with a zone)."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["due","part_paid","paid","overdue","credited","refund_due","void"],"type":"string"},{"const":"unpaid","type":"string"},{"type":"null"}],"description":"Only invoices in this status, as the Invoices page shows it; unpaid is due, part_paid and overdue together.","title":"Status"},"description":"Only invoices in this status, as the Invoices page shows it; unpaid is due, part_paid and overdue together."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Items per page, 1 to 500.","default":100,"title":"Limit"},"description":"Items per page, 1 to 500."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"The next_cursor of the page before.","title":"Cursor"},"description":"The next_cursor of the page before."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices/{invoice_id}":{"get":{"tags":["Money"],"summary":"One invoice","description":"One issued or voided invoice with its lines, payments and credit notes; its amounts\nare the invoice page's own. A draft's id is a 404, as an unknown one.","operationId":"read_invoice","security":[{"ApiKey":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/people":{"get":{"tags":["Crew"],"summary":"List crew and staff","description":"The operator's crew (and with who=everyone, its staff), oldest change first. Work\ndetails only: their roles, crew positions, base, and the email and phone on their record.\nPassengers and client contacts are not listed.","operationId":"list_people","security":[{"ApiKey":[]}],"parameters":[{"name":"who","in":"query","required":false,"schema":{"enum":["crew","everyone"],"type":"string","description":"crew (the default): everyone with a crew position. everyone: crew and every member with a sign-in, office staff too.","default":"crew","title":"Who"},"description":"crew (the default): everyone with a crew position. everyone: crew and every member with a sign-in, office staff too."},{"name":"include_deactivated","in":"query","required":false,"schema":{"type":"boolean","description":"Also people who were deactivated or whose sign-in here was removed (`active` false), so a sync can drop them. Off by default.","default":false,"title":"Include Deactivated"},"description":"Also people who were deactivated or whose sign-in here was removed (`active` false), so a sync can drop them. Off by default."},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only people changed at or after this time (ISO 8601).","title":"Since"},"description":"Only people changed at or after this time (ISO 8601)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Items per page, 1 to 500.","default":100,"title":"Limit"},"description":"Items per page, 1 to 500."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"The next_cursor of the page before.","title":"Cursor"},"description":"The next_cursor of the page before."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrewMembersOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/people/{person_id}/assignments":{"get":{"tags":["Crew"],"summary":"A person's legs","description":"The legs this person is seated on whose time in the air touches the range, with their\nseat. Options and confirmed trips; canceled ones on request; never a quote nobody booked,\nas the aircraft's scheduled flights.","operationId":"read_assignments","security":[{"ApiKey":[]}],"parameters":[{"name":"person_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Person Id"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The start of the range (ISO 8601 with a zone). Default: now.","title":"From"},"description":"The start of the range (ISO 8601 with a zone). Default: now."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The end of the range (ISO 8601 with a zone). Default: 30 days after `from`. At most 90 days after `from`.","title":"To"},"description":"The end of the range (ISO 8601 with a zone). Default: 30 days after `from`. At most 90 days after `from`."},{"name":"include_canceled","in":"query","required":false,"schema":{"type":"boolean","description":"Also legs of canceled trips. Off by default.","default":false,"title":"Include Canceled"},"description":"Also legs of canceled trips. Off by default."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Items per page, 1 to 500.","default":100,"title":"Limit"},"description":"Items per page, 1 to 500."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"The next_cursor of the page before.","title":"Cursor"},"description":"The next_cursor of the page before."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrewAssignmentsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/people/{person_id}/duty":{"get":{"tags":["Crew"],"summary":"A person's duty and rest","description":"Duty periods, rest, each day and the flight time limits for the days asked for, as the\napp's Crew duty view works them out from the schedule, flight logs and crew events.","operationId":"read_duty","security":[{"ApiKey":[]}],"parameters":[{"name":"person_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Person Id"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day, in the operator's time zone. Default: today.","title":"From"},"description":"The first day, in the operator's time zone. Default: today."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The day after the last day (not included). Default: 7 days after `from`. At most 31 days after `from`.","title":"To"},"description":"The day after the last day (not included). Default: 7 days after `from`. At most 31 days after `from`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrewDutyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/people/{person_id}/currency":{"get":{"tags":["Crew"],"summary":"A pilot's currency","description":"Their currency items where currency is tracked for them, as the app's People screen\nshows them. Tracking is optional: when it is off for them, `tracked` is false and there\nare no items. Advisory only.","operationId":"read_currency","security":[{"ApiKey":[]}],"parameters":[{"name":"person_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Person Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrewCurrencyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookings":{"post":{"tags":["Bookings"],"summary":"Send a booking","description":"Send a booking your tool made. The first send of an `external_id` answers 201; sending\nit again answers 200 with the same booking, updated with any changes (times, provider,\nconfirmation, status, canceled). A leg outside what the operator allowed you, or not\ntheirs, is a 404.","operationId":"send_booking","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingOut"}}}},"201":{"description":"The booking, new.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/v1/bookings/{booking_id}":{"get":{"tags":["Bookings"],"summary":"One booking you sent","description":"A booking this key (or partner) sent, as it is now: whether the office has put it on a\nleg or set it aside. Anyone else's booking is a 404.","operationId":"read_booking","security":[{"ApiKey":[]}],"parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/legs/{leg_id}/risk-scores":{"post":{"tags":["Risk scores"],"summary":"Send a risk score for a leg","description":"Shows on the trip beside the operator's own risk assessment; a high one is flagged for the people who approve risk. It never stops a release. 201 when it is new; 200 when you send the same `external_id` with the same content again. Send the same `external_id` with new content, or a new one, and it replaces your earlier score for the leg. An `external_id` already used for another leg is a 409.","operationId":"send_risk_score","security":[{"ApiKey":[]}],"parameters":[{"name":"leg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The leg's id, from the trips or legs reads.","title":"Leg Id"},"description":"The leg's id, from the trips or legs reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskScoreIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskScoreOut"}}}},"201":{"description":"The score, new.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskScoreOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Risk scores"],"summary":"Your risk scores for a leg","description":"The scores you sent for the leg, newest first (the latest 100). Another tool's never show.","operationId":"list_risk_scores","security":[{"ApiKey":[]}],"parameters":[{"name":"leg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The leg's id, from the trips or legs reads.","title":"Leg Id"},"description":"The leg's id, from the trips or legs reads."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskScoresOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/vendor-invoices":{"post":{"tags":["Vendor invoices"],"summary":"Send a vendor invoice","description":"A handler's or fuel vendor's invoice, for the office to review. It waits as To review\nunder the trip's Expenses (or under Accounting when it names no trip) until someone saves\nit as an expense or discards it; you hear which by alert. 201 the first time, 200 when the\nsame `external_id` is sent again.","operationId":"send_vendor_invoice","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorInvoiceIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorInvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/v1/vendor-invoices/{invoice_id}":{"get":{"tags":["Vendor invoices"],"summary":"One vendor invoice you sent","description":"Where an invoice you sent stands: waiting, saved as an expense, or discarded.","operationId":"read_vendor_invoice","security":[{"ApiKey":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorInvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/operators":{"get":{"tags":["Partners"],"summary":"Operators that allow you","description":"The operators whose Admins allowed your partner key's partner, with what each one\nallowed. One that revokes you, or stops using the app, leaves this list at once.","operationId":"list_operators","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorsOut"}}}}},"security":[{"ApiKey":[]}]}},"/v1/operators/{operator_id}/aircraft":{"get":{"tags":["Partners"],"summary":"List aircraft (partner)","description":"The operator's active aircraft and the times each one tracks.","operationId":"operator_list_aircraft","security":[{"ApiKey":[]}],"parameters":[{"name":"operator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The operator's id, from /v1/operators.","title":"Operator Id"},"description":"The operator's id, from /v1/operators."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AircraftListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/operators/{operator_id}/aircraft/{aircraft_id}/times":{"get":{"tags":["Partners"],"summary":"Current times (partner)","description":"Each tracked time's current total, and who or what changed it last.","operationId":"operator_read_times","security":[{"ApiKey":[]}],"parameters":[{"name":"aircraft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aircraft Id"}},{"name":"operator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The operator's id, from /v1/operators.","title":"Operator Id"},"description":"The operator's id, from /v1/operators."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/operators/{operator_id}/aircraft/{aircraft_id}/logs":{"get":{"tags":["Partners"],"summary":"Flight logs (partner)","description":"The flight log entries of this aircraft's legs, oldest change first. Corrections move an\nentry to the end, so syncing with `since` set to your last copy's newest `updated_at` picks\nthem up. Voided entries come back with `voided_at` set.","operationId":"operator_read_logs","security":[{"ApiKey":[]}],"parameters":[{"name":"aircraft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aircraft Id"}},{"name":"operator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The operator's id, from /v1/operators.","title":"Operator Id"},"description":"The operator's id, from /v1/operators."},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only entries changed at or after this time (ISO 8601).","title":"Since"},"description":"Only entries changed at or after this time (ISO 8601)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Entries per page, 1 to 500.","default":100,"title":"Limit"},"description":"Entries per page, 1 to 500."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"The next_cursor of the page before.","title":"Cursor"},"description":"The next_cursor of the page before."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/operators/{operator_id}/aircraft/{aircraft_id}/discrepancies":{"get":{"tags":["Partners"],"summary":"Defects (partner)","description":"The aircraft's defects (squawks). Open ones come in one page, most urgent first; cleared\nones and `all` page with `cursor`. A defect withdrawn as a mistake never shows.","operationId":"operator_read_discrepancies","security":[{"ApiKey":[]}],"parameters":[{"name":"aircraft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aircraft Id"}},{"name":"operator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The operator's id, from /v1/operators.","title":"Operator Id"},"description":"The operator's id, from /v1/operators."},{"name":"status","in":"query","required":false,"schema":{"enum":["open","cleared","all"],"type":"string","description":"open (the default): not yet cleared. cleared: fixed and signed for. all: both.","default":"open","title":"Status"},"description":"open (the default): not yet cleared. cleared: fixed and signed for. all: both."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Items per page, 1 to 500.","default":100,"title":"Limit"},"description":"Items per page, 1 to 500."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"The next_cursor of the page before.","title":"Cursor"},"description":"The next_cursor of the page before."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscrepanciesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/operators/{operator_id}/aircraft/{aircraft_id}/due-items":{"get":{"tags":["Partners"],"summary":"Maintenance items coming due (partner)","description":"The aircraft's active maintenance items and when each comes due, by date or at a\nreading, most urgent first, with the operator's due-soon windows. One page.","operationId":"operator_read_due_items","security":[{"ApiKey":[]}],"parameters":[{"name":"aircraft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aircraft Id"}},{"name":"operator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The operator's id, from /v1/operators.","title":"Operator Id"},"description":"The operator's id, from /v1/operators."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DueItemsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/operators/{operator_id}/aircraft/{aircraft_id}/downtime":{"get":{"tags":["Partners"],"summary":"Downtime (partner)","description":"The aircraft's current and upcoming downtime (maintenance windows), earliest start\nfirst; with `include_past`, the ended ones too. Removed downtime never shows.","operationId":"operator_read_downtime","security":[{"ApiKey":[]}],"parameters":[{"name":"aircraft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aircraft Id"}},{"name":"operator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The operator's id, from /v1/operators.","title":"Operator Id"},"description":"The operator's id, from /v1/operators."},{"name":"include_past","in":"query","required":false,"schema":{"type":"boolean","description":"Also the downtime that has ended. Off by default.","default":false,"title":"Include Past"},"description":"Also the downtime that has ended. Off by default."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Items per page, 1 to 500.","default":100,"title":"Limit"},"description":"Items per page, 1 to 500."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"The next_cursor of the page before.","title":"Cursor"},"description":"The next_cursor of the page before."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DowntimesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/operators/{operator_id}/aircraft/{aircraft_id}/flights":{"get":{"tags":["Partners"],"summary":"Scheduled flights (partner)","description":"The aircraft's scheduled legs in the range: each leg whose time in the air touches it.\nOptions and confirmed trips; canceled ones on request; never a quote nobody booked.","operationId":"operator_read_flights","security":[{"ApiKey":[]}],"parameters":[{"name":"aircraft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aircraft Id"}},{"name":"operator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The operator's id, from /v1/operators.","title":"Operator Id"},"description":"The operator's id, from /v1/operators."},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The start of the range (ISO 8601 with a zone). Default: now.","title":"From"},"description":"The start of the range (ISO 8601 with a zone). Default: now."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The end of the range (ISO 8601 with a zone). Default: 30 days after `from`. At most 90 days after `from`.","title":"To"},"description":"The end of the range (ISO 8601 with a zone). Default: 30 days after `from`. At most 90 days after `from`."},{"name":"include_canceled","in":"query","required":false,"schema":{"type":"boolean","description":"Also the legs of canceled trips. Off by default.","default":false,"title":"Include Canceled"},"description":"Also the legs of canceled trips. Off by default."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Items per page, 1 to 500.","default":100,"title":"Limit"},"description":"Items per page, 1 to 500."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"The next_cursor of the page before.","title":"Cursor"},"description":"The next_cursor of the page before."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlightsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/operators/{operator_id}/legs/{leg_id}/risk-scores":{"post":{"tags":["Partners"],"summary":"Send a risk score for a leg (partner)","description":"Shows on the trip beside the operator's own risk assessment; a high one is flagged for the people who approve risk. It never stops a release. 201 when it is new; 200 when you send the same `external_id` with the same content again. Send the same `external_id` with new content, or a new one, and it replaces your earlier score for the leg. An `external_id` already used for another leg is a 409.","operationId":"operator_send_risk_score","security":[{"ApiKey":[]}],"parameters":[{"name":"leg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The leg's id, from the trips or legs reads.","title":"Leg Id"},"description":"The leg's id, from the trips or legs reads."},{"name":"operator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The operator's id, from /v1/operators.","title":"Operator Id"},"description":"The operator's id, from /v1/operators."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskScoreIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskScoreOut"}}}},"201":{"description":"The score, new.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskScoreOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Partners"],"summary":"Your risk scores for a leg (partner)","description":"The scores you sent for the leg, newest first (the latest 100). Another tool's never show.","operationId":"operator_list_risk_scores","security":[{"ApiKey":[]}],"parameters":[{"name":"leg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The leg's id, from the trips or legs reads.","title":"Leg Id"},"description":"The leg's id, from the trips or legs reads."},{"name":"operator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The operator's id, from /v1/operators.","title":"Operator Id"},"description":"The operator's id, from /v1/operators."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskScoresOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/operators/{operator_id}/vendor-invoices":{"post":{"tags":["Partners"],"summary":"Send a vendor invoice (partner)","description":"A handler's or fuel vendor's invoice, for the office to review. It waits as To review\nunder the trip's Expenses (or under Accounting when it names no trip) until someone saves\nit as an expense or discards it; you hear which by alert. 201 the first time, 200 when the\nsame `external_id` is sent again.","operationId":"operator_send_vendor_invoice","security":[{"ApiKey":[]}],"parameters":[{"name":"operator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The operator's id, from /v1/operators.","title":"Operator Id"},"description":"The operator's id, from /v1/operators."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorInvoiceIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorInvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/operators/{operator_id}/vendor-invoices/{invoice_id}":{"get":{"tags":["Partners"],"summary":"One vendor invoice you sent (partner)","description":"Where an invoice you sent stands: waiting, saved as an expense, or discarded.","operationId":"operator_read_vendor_invoice","security":[{"ApiKey":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invoice Id"}},{"name":"operator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The operator's id, from /v1/operators.","title":"Operator Id"},"description":"The operator's id, from /v1/operators."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorInvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/operators/{operator_id}/bookings":{"post":{"tags":["Partners"],"summary":"Send a booking (partner)","description":"Send a booking your tool made. The first send of an `external_id` answers 201; sending\nit again answers 200 with the same booking, updated with any changes (times, provider,\nconfirmation, status, canceled). A leg outside what the operator allowed you, or not\ntheirs, is a 404.","operationId":"operator_send_booking","security":[{"ApiKey":[]}],"parameters":[{"name":"operator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The operator's id, from /v1/operators.","title":"Operator Id"},"description":"The operator's id, from /v1/operators."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingOut"}}}},"201":{"description":"The booking, new.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/operators/{operator_id}/bookings/{booking_id}":{"get":{"tags":["Partners"],"summary":"One booking you sent (partner)","description":"A booking this key (or partner) sent, as it is now: whether the office has put it on a\nleg or set it aside. Anyone else's booking is a 404.","operationId":"operator_read_booking","security":[{"ApiKey":[]}],"parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Booking Id"}},{"name":"operator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The operator's id, from /v1/operators.","title":"Operator Id"},"description":"The operator's id, from /v1/operators."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"webhooks":{"flight_log.created":{"post":{"summary":"A flight was logged","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"flight_log_createdflight_log_created_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlightLogEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"flight_log.updated":{"post":{"summary":"A flight log was corrected","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"flight_log_updatedflight_log_updated_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlightLogEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"flight_log.voided":{"post":{"summary":"A flight log was voided","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"flight_log_voidedflight_log_voided_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlightLogEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"times.changed":{"post":{"summary":"A time was set by hand or imported","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"times_changedtimes_changed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimesEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"discrepancy.reported":{"post":{"summary":"A defect was reported","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"discrepancy_reporteddiscrepancy_reported_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscrepancyEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"discrepancy.updated":{"post":{"summary":"A defect changed","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"discrepancy_updateddiscrepancy_updated_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscrepancyEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"discrepancy.cleared":{"post":{"summary":"A defect was cleared","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"discrepancy_cleareddiscrepancy_cleared_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscrepancyEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"discrepancy.removed":{"post":{"summary":"A defect was withdrawn","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"discrepancy_removeddiscrepancy_removed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscrepancyRemovedEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"due_item.changed":{"post":{"summary":"A maintenance item changed","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"due_item_changeddue_item_changed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DueItemEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"due_item.state_changed":{"post":{"summary":"A maintenance item came due","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"due_item_state_changeddue_item_state_changed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DueItemEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"due_item.removed":{"post":{"summary":"A maintenance item left the list","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"due_item_removeddue_item_removed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DueItemRemovedEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"downtime.created":{"post":{"summary":"Downtime was planned","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"downtime_createddowntime_created_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DowntimeEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"downtime.updated":{"post":{"summary":"Downtime changed","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"downtime_updateddowntime_updated_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DowntimeEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"downtime.removed":{"post":{"summary":"Downtime was removed","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"downtime_removeddowntime_removed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DowntimeRemovedEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"flight.created":{"post":{"summary":"A flight was scheduled","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"flight_createdflight_created_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlightEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"flight.updated":{"post":{"summary":"A scheduled flight changed","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"flight_updatedflight_updated_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlightEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"flight.canceled":{"post":{"summary":"A scheduled flight was canceled","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"flight_canceledflight_canceled_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlightEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"flight.removed":{"post":{"summary":"A flight left the schedule","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"flight_removedflight_removed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlightRemovedEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"request.accepted":{"post":{"summary":"A trip request you sent was accepted","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"request_acceptedrequest_accepted_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"request.declined":{"post":{"summary":"A trip request you sent was declined","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"request_declinedrequest_declined_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"invoice.saved":{"post":{"summary":"An invoice you sent was saved as an expense","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"invoice_savedinvoice_saved_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"invoice.discarded":{"post":{"summary":"An invoice you sent was discarded","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"invoice_discardedinvoice_discarded_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"booking.attached":{"post":{"summary":"A booking you sent was attached to a trip","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"booking_attachedbooking_attached_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"test":{"post":{"summary":"A test from Settings > API keys","description":"Headers on every request:\n\n- `X-Signature`: `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` keyed\n  with your address's signing secret.\n- `X-Delivery-Id`: the same as `id` in the body. Keep the ids you have handled: a delivery\n  can arrive more than once.\n- `X-Event-Type`: the same as `type` in the body.\n\nAnswer with any 2xx status within 10 seconds. Anything else is tried again.","operationId":"testtest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AircraftListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AircraftOut"},"type":"array","title":"Items","description":"Active aircraft, by tail."}},"type":"object","required":["items"],"title":"AircraftListOut"},"AircraftOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The aircraft's id, used in the other paths."},"tail":{"type":"string","title":"Tail","description":"The registration, such as N123AB."},"model":{"type":"string","title":"Model","description":"The make and model as the operator wrote it."},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"The aircraft category, when set."},"base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base","description":"The home base airport code, when set."},"counters":{"items":{"$ref":"#/components/schemas/CounterOut"},"type":"array","title":"Counters","description":"The times this aircraft tracks, in display order."},"components":{"items":{"$ref":"#/components/schemas/ComponentOut"},"type":"array","title":"Components","description":"Its engines, then propellers, then APU, each with its serial number: those it tracks times for, and any with a serial number recorded."}},"type":"object","required":["id","tail","model","category","base","counters","components"],"title":"AircraftOut"},"BookingIn":{"properties":{"external_id":{"type":"string","maxLength":100,"minLength":1,"pattern":"^[\\x21-\\x7e]+$","title":"External Id","description":"Your own id for this item. Sending the same id again never makes a second one."},"kind":{"type":"string","enum":["hotel","car","ground","catering","fbo","other"],"title":"Kind","description":"What was booked: hotel, car (a rental), ground (a ride), catering, fbo (handling) or other."},"provider":{"type":"string","maxLength":120,"title":"Provider","description":"Who provides it: the hotel, car company, caterer or FBO."},"confirmation":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Confirmation","description":"The provider's confirmation number. Kept encrypted, shown only to the operator's staff, and never sent back out."},"starts_at":{"type":"string","format":"date-time","title":"Starts At","description":"When it starts (check-in, pickup, delivery), with its UTC offset."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"When it ends (check-out, drop-off), with its UTC offset; not before starts_at."},"place":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Place","description":"The address or where to meet."},"airport":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Airport","description":"The airport it is at, as a code (KAUS, AUS). When it names a leg and this is left out, the leg's arrival airport."},"guest_names":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Guest Names","description":"Who it is for, as written on the booking."},"leg_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Leg Id","description":"The leg it is for. Given, the booking lands on that leg at once and fills the leg's open item for it (a hotel the crew or passenger hotel, a car or ground the transport, catering the catering). Left out, it waits in the operator's Trips > Reservations for the office to put on a leg. Once on a leg, a booking never moves by a send: cancel it and send a new one."},"status":{"type":"string","enum":["requested","confirmed"],"title":"Status","description":"Requested while the provider hasn't confirmed it yet.","default":"confirmed"},"canceled":{"type":"boolean","title":"Canceled","description":"True when it was canceled. It stays, marked canceled, and the item it filled goes back to the office to arrange again, unless someone there has changed it since.","default":false}},"additionalProperties":false,"type":"object","required":["external_id","kind","provider","starts_at"],"title":"BookingIn","description":"A hotel, car, ground transport, catering, handling (FBO) or other booking your tool\nmade for the operator."},"BookingOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The booking's id here."},"external_id":{"type":"string","title":"External Id","description":"Your own id for it, as you sent it."},"kind":{"type":"string","enum":["hotel","car","ground","airline","catering","fbo","other"],"title":"Kind","description":"What was booked, as the operator's office last set it (it may correct it, to airline too)."},"provider":{"type":"string","title":"Provider","description":"Who provides it."},"has_confirmation":{"type":"boolean","title":"Has Confirmation","description":"Whether a confirmation number is held (it is never sent back out)."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"When it starts (UTC)."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"When it ends (UTC)."},"place":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place","description":"The address or where to meet."},"airport":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airport","description":"The code of the airport it is at."},"guest_names":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guest Names","description":"Who it is for, as you sent it."},"status":{"type":"string","enum":["requested","confirmed"],"title":"Status","description":"As you last sent it."},"canceled":{"type":"boolean","title":"Canceled","description":"Whether you sent it canceled."},"canceled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Canceled At","description":"When it was first sent canceled."},"state":{"type":"string","enum":["pending","attached","dismissed"],"title":"State","description":"Where it is: pending (waiting in Trips > Reservations for the office), attached (on a leg), or dismissed (the office set it aside)."},"trip_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trip Id","description":"The trip it is on, when attached."},"leg_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Leg Id","description":"The leg it is on, when attached."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When it was first sent (UTC)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When it last changed (UTC)."}},"type":"object","required":["id","external_id","kind","provider","has_confirmation","starts_at","ends_at","place","airport","guest_names","status","canceled","canceled_at","state","trip_id","leg_id","created_at","updated_at"],"title":"BookingOut"},"ClearanceOut":{"properties":{"cleared_on":{"type":"string","format":"date","title":"Cleared On","description":"The day the work was done."},"signed_by":{"type":"string","title":"Signed By","description":"The name of the certificated person who signed for the work."},"certificate_kind":{"type":"string","enum":["mechanic","inspection_authorization","repair_station","pilot","other"],"title":"Certificate Kind","description":"Their certificate: mechanic, inspection_authorization, repair_station, pilot or other."},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference","description":"Work order or logbook entry, when given."},"corrective_action":{"type":"string","title":"Corrective Action","description":"What was done to fix it."},"entered_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entered By","description":"The name of who entered the clearance; null when the system did."}},"type":"object","required":["cleared_on","signed_by","certificate_kind","reference","corrective_action","entered_by"],"title":"ClearanceOut"},"ComponentOut":{"properties":{"type":{"type":"string","enum":["engine","propeller","apu"],"title":"Type","description":"engine, propeller or apu."},"position":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position","description":"The engine number (1 to 4); a propeller's is the engine it is on. Null for the APU."},"serial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial","description":"Its serial number; null when not recorded."}},"type":"object","required":["type","position","serial"],"title":"ComponentOut"},"CounterOut":{"properties":{"kind":{"type":"string","title":"Kind","description":"What is counted: airframe_hours, landings, engine_hours, engine_cycles, prop_hours, apu_hours, apu_cycles or hobbs_hours. More kinds may be added: show one you don't know by its label."},"engine":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Engine","description":"The engine number (1 to 4) for engine hours and cycles, and for prop_hours the engine the propeller is on; null otherwise."},"label":{"type":"string","title":"Label","description":"A name to show, such as \"Engine 2 cycles\"."},"unit":{"type":"string","enum":["hours","count"],"title":"Unit","description":"hours (to a tenth) or count (whole numbers)."}},"type":"object","required":["kind","engine","label","unit"],"title":"CounterOut"},"CrewAssignmentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The leg's id."},"trip_id":{"type":"string","format":"uuid","title":"Trip Id","description":"The trip's id; a trip has one or more legs."},"trip_number":{"type":"string","title":"Trip Number","description":"The trip's number."},"status":{"type":"string","enum":["option","confirmed","canceled"],"title":"Status","description":"The trip's status: option (held, not yet confirmed), confirmed, or canceled (only with include_canceled)."},"from_airport":{"type":"string","title":"From Airport","description":"The departure airport code."},"to_airport":{"type":"string","title":"To Airport","description":"The arrival airport code."},"departs_at":{"type":"string","format":"date-time","title":"Departs At","description":"Scheduled departure (UTC)."},"arrives_at":{"type":"string","format":"date-time","title":"Arrives At","description":"Scheduled arrival (UTC)."},"has_flight_log":{"type":"boolean","title":"Has Flight Log","description":"True once the leg's flight log is entered (see the logs path)."},"seat":{"type":"string","enum":["pic","sic","attendant","other"],"title":"Seat","description":"Their seat on the leg: pic (pilot in command), sic (second in command), attendant or other."},"aircraft_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Aircraft Id","description":"The trip's aircraft, when one is chosen."}},"type":"object","required":["id","trip_id","trip_number","status","from_airport","to_airport","departs_at","arrives_at","has_flight_log","seat","aircraft_id"],"title":"CrewAssignmentOut"},"CrewAssignmentsOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CrewAssignmentOut"},"type":"array","title":"Items","description":"Legs they are on, earliest departure first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor` for the next page; null on the last page."}},"type":"object","required":["items","next_cursor"],"title":"CrewAssignmentsOut"},"CrewCurrencyCountsOut":{"properties":{"takeoffs":{"type":"integer","title":"Takeoffs","description":"Takeoffs counted."},"landings":{"type":"integer","title":"Landings","description":"Landings counted."},"approaches":{"type":"integer","title":"Approaches","description":"Instrument approaches counted."},"holds":{"type":"integer","title":"Holds","description":"Holds counted."}},"type":"object","required":["takeoffs","landings","approaches","holds"],"title":"CrewCurrencyCountsOut"},"CrewCurrencyItemOut":{"properties":{"kind":{"type":"string","enum":["passengers_day","passengers_night","instrument"],"title":"Kind","description":"passengers_day, passengers_night (per aircraft model) or instrument (per category)."},"name":{"type":"string","title":"Name","description":"A name to show, such as \"Passengers by day, CE-560XL\"."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"The aircraft model, for passenger items."},"category":{"anyOf":[{"type":"string","enum":["airplane","helicopter"]},{"type":"null"}],"title":"Category","description":"The category, for instrument items."},"state":{"type":"string","enum":["current","due_soon","grace","expired"],"title":"State","description":"current, due_soon (lapses within 14 days, or 30 for instrument), grace (instrument lapsed but can still be regained) or expired."},"until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Until","description":"The last day current, in the operator's zone; null when never current."},"grace_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Grace Until","description":"For instrument, the last day it can be regained without a check."},"counts":{"$ref":"#/components/schemas/CrewCurrencyCountsOut","description":"What the item counted."}},"type":"object","required":["kind","name","model","category","state","until","grace_until","counts"],"title":"CrewCurrencyItemOut"},"CrewCurrencyOut":{"properties":{"person_id":{"type":"string","format":"uuid","title":"Person Id","description":"The person's id."},"tracked":{"type":"boolean","title":"Tracked","description":"Whether currency is tracked for this person. Tracking is optional: off unless the operator turns it on for everyone or lets each pilot choose. When false, `items` is empty and says nothing about their currency."},"items":{"items":{"$ref":"#/components/schemas/CrewCurrencyItemOut"},"type":"array","title":"Items","description":"Each item with something counted. Advisory: counts what is logged."},"includes_other_organizations":{"type":"boolean","title":"Includes Other Organizations","description":"True when the counts include flying they logged with another organization (never which, where or what)."}},"type":"object","required":["person_id","tracked","items","includes_other_organizations"],"title":"CrewCurrencyOut"},"CrewDaysOffOut":{"properties":{"count":{"type":"integer","title":"Count","description":"Whole 24 hour rest periods in the quarter."},"needed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Needed","description":"How many the rules need; null as for limits."}},"type":"object","required":["count","needed"],"title":"CrewDaysOffOut"},"CrewDutyDayOut":{"properties":{"date":{"type":"string","format":"date","title":"Date","description":"The day, in the operator's time zone."},"duty_from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Duty From","description":"Duty's first moment that day (UTC)."},"duty_to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Duty To","description":"Duty's last moment that day (UTC)."},"duty_minutes":{"type":"integer","title":"Duty Minutes","description":"Minutes on duty that day."},"rest_minutes":{"type":"integer","title":"Rest Minutes","description":"Minutes of rest that day (positioning is neither duty nor rest)."},"flight_minutes_by_rule":{"$ref":"#/components/schemas/CrewRuleMinutesOut","description":"Pilot flight minutes that day, by rule."}},"type":"object","required":["date","duty_from","duty_to","duty_minutes","rest_minutes","flight_minutes_by_rule"],"title":"CrewDutyDayOut"},"CrewDutyEventOut":{"properties":{"kind":{"type":"string","enum":["standby","other_duty","flying_elsewhere","positioning","day_off","none"],"title":"Kind","description":"What it counts as: standby, other_duty, flying_elsewhere, positioning, day_off or none (a day type that means no duty)."},"day_type":{"type":"string","title":"Day Type","description":"The day type's name as the operator calls it."},"starts_at":{"type":"string","format":"date-time","title":"Starts At","description":"When it starts (UTC)."},"ends_at":{"type":"string","format":"date-time","title":"Ends At","description":"When it ends (UTC)."},"flight_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Flight Minutes","description":"Block time flown, for flying elsewhere; null otherwise."}},"type":"object","required":["kind","day_type","starts_at","ends_at","flight_minutes"],"title":"CrewDutyEventOut"},"CrewDutyLegOut":{"properties":{"leg_id":{"type":"string","format":"uuid","title":"Leg Id","description":"The leg's id."},"trip_id":{"type":"string","format":"uuid","title":"Trip Id","description":"The trip's id."},"trip_number":{"type":"string","title":"Trip Number","description":"The trip's number."},"route":{"type":"string","title":"Route","description":"The airports, such as \"KADS → KAUS\"."},"seat":{"type":"string","enum":["pic","sic","attendant","other"],"title":"Seat","description":"Their seat on the leg."},"rule":{"type":"string","enum":["part_91","part_91k","part_135"],"title":"Rule","description":"The rule the leg flies under: part_91, part_91k or part_135."},"departs_at":{"type":"string","format":"date-time","title":"Departs At","description":"Block out (UTC): as logged once the flight log is in, else scheduled."},"arrives_at":{"type":"string","format":"date-time","title":"Arrives At","description":"Block in (UTC), the same way."},"logged":{"type":"boolean","title":"Logged","description":"True when the times come from the flight log."}},"type":"object","required":["leg_id","trip_id","trip_number","route","seat","rule","departs_at","arrives_at","logged"],"title":"CrewDutyLegOut"},"CrewDutyOut":{"properties":{"person_id":{"type":"string","format":"uuid","title":"Person Id","description":"The person's id."},"name":{"type":"string","title":"Name","description":"Their name."},"from":{"type":"string","format":"date","title":"From","description":"The first day shown (operator's zone)."},"to":{"type":"string","format":"date","title":"To","description":"The day after the last day shown."},"periods":{"items":{"$ref":"#/components/schemas/CrewDutyPeriodOut"},"type":"array","title":"Periods","description":"Duty periods touching the range, as the app works them out."},"days":{"items":{"$ref":"#/components/schemas/CrewDutyDayOut"},"type":"array","title":"Days","description":"One a day of the range."},"totals":{"$ref":"#/components/schemas/CrewDutyTotalsOut","description":"Flight time and rest against the limits."},"rules":{"$ref":"#/components/schemas/CrewDutyRulesOut","description":"The duty settings in force."}},"type":"object","required":["person_id","name","from","to","periods","days","totals","rules"],"title":"CrewDutyOut"},"CrewDutyPeriodOut":{"properties":{"starts_at":{"type":"string","format":"date-time","title":"Starts At","description":"Report time (UTC)."},"ends_at":{"type":"string","format":"date-time","title":"Ends At","description":"Planned release (UTC)."},"duty_minutes":{"type":"integer","title":"Duty Minutes","description":"Report to release, in minutes."},"flight_minutes":{"type":"integer","title":"Flight Minutes","description":"Flight time inside the period, in minutes."},"rest_before_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rest Before Minutes","description":"Unbroken rest before report, in minutes; null when nothing is scheduled before it."},"legs":{"items":{"$ref":"#/components/schemas/CrewDutyLegOut"},"type":"array","title":"Legs","description":"Their legs in the period."},"events":{"items":{"$ref":"#/components/schemas/CrewDutyEventOut"},"type":"array","title":"Events","description":"Standby, other duty, flying elsewhere and positioning in the period."}},"type":"object","required":["starts_at","ends_at","duty_minutes","flight_minutes","rest_before_minutes","legs","events"],"title":"CrewDutyPeriodOut"},"CrewDutyRulesOut":{"properties":{"report_minutes":{"type":"integer","title":"Report Minutes","description":"Minutes before block out that duty starts."},"release_minutes":{"type":"integer","title":"Release Minutes","description":"Minutes after block in that duty ends."},"part_135_track":{"anyOf":[{"type":"string","enum":["b","c"]},{"type":"null"}],"title":"Part 135 Track","description":"The Part 135 rest rule the operator follows (135.267(b) or (c)); null unless it flies Part 135."},"company_policy":{"anyOf":[{"$ref":"#/components/schemas/CrewPolicyOut"},{"type":"null"}],"description":"The operator's own Part 91 limits; null unless it flies Part 91 with them turned on."}},"type":"object","required":["report_minutes","release_minutes","part_135_track","company_policy"],"title":"CrewDutyRulesOut"},"CrewDutyTotalsOut":{"properties":{"quarter":{"$ref":"#/components/schemas/CrewHoursOut","description":"The quarter holding the last day asked for."},"two_quarters":{"$ref":"#/components/schemas/CrewHoursOut","description":"That quarter and the one before it."},"year":{"$ref":"#/components/schemas/CrewHoursOut","description":"That day's calendar year."},"days_off":{"$ref":"#/components/schemas/CrewDaysOffOut","description":"Rest periods in that quarter."}},"type":"object","required":["quarter","two_quarters","year","days_off"],"title":"CrewDutyTotalsOut"},"CrewHoursOut":{"properties":{"minutes":{"type":"integer","title":"Minutes","description":"Flight minutes, planned flying included."},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"The limit in minutes; null for someone who flies no Part 135 or 91K legs."}},"type":"object","required":["minutes","limit"],"title":"CrewHoursOut"},"CrewMemberOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The person's id, used in the other people paths."},"name":{"type":"string","title":"Name","description":"Their name as the app shows it, such as \"Ava M. Stone\"."},"preferred_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Name","description":"The name they go by, when it differs."},"roles":{"items":{"$ref":"#/components/schemas/CrewRoleOut"},"type":"array","title":"Roles","description":"What they can do in the app; empty for someone without a sign-in here."},"crew_positions":{"items":{"type":"string","enum":["pilot","attendant","mechanic","medical"]},"type":"array","title":"Crew Positions","description":"What they can be put on a leg as: pilot, attendant, mechanic or medical. Empty for office staff."},"base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base","description":"The airport code nights away are counted from, when set."},"work_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Work Email","description":"The email address on their record at your operator, when set."},"work_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Work Phone","description":"The phone number on their record at your operator, when set."},"active":{"type":"boolean","title":"Active","description":"False once they are deactivated, or once they leave your operator (their sign-in here removed) while holding no crew position."},"deactivated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deactivated At","description":"When their record was deactivated (UTC); null otherwise."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When their record or their roles last changed (UTC); what `since` and paging go by."}},"type":"object","required":["id","name","preferred_name","roles","crew_positions","base","work_email","work_phone","active","deactivated_at","updated_at"],"title":"CrewMemberOut"},"CrewMembersOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CrewMemberOut"},"type":"array","title":"Items","description":"People, oldest change first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor` for the next page; null on the last page."}},"type":"object","required":["items","next_cursor"],"title":"CrewMembersOut"},"CrewPolicyOut":{"properties":{"duty_hours":{"type":"integer","title":"Duty Hours","description":"Most hours on duty in a day."},"flight_hours":{"type":"integer","title":"Flight Hours","description":"Most flight hours in a day."},"rest_hours":{"type":"integer","title":"Rest Hours","description":"Least rest before duty, in hours."}},"type":"object","required":["duty_hours","flight_hours","rest_hours"],"title":"CrewPolicyOut"},"CrewRoleOut":{"properties":{"key":{"type":"string","title":"Key","description":"The role: admin, scheduler, trip_builder, pilot, attendant, maintenance, medical, accountant or view_only."},"name":{"type":"string","title":"Name","description":"The role's name as the app shows it, such as \"Admin\"."}},"type":"object","required":["key","name"],"title":"CrewRoleOut"},"CrewRuleMinutesOut":{"properties":{"part_91":{"type":"integer","title":"Part 91","description":"Pilot flight minutes on Part 91 legs."},"part_91k":{"type":"integer","title":"Part 91K","description":"Pilot flight minutes on Part 91K legs."},"part_135":{"type":"integer","title":"Part 135","description":"Pilot flight minutes on Part 135 legs."}},"type":"object","required":["part_91","part_91k","part_135"],"title":"CrewRuleMinutesOut"},"CrewSeatOut":{"properties":{"role":{"type":"string","enum":["pic","sic","attendant","other"],"title":"Role","description":"The seat: pic, sic, attendant, or other (such as a mechanic flying as crew)."},"person_id":{"type":"string","format":"uuid","title":"Person Id","description":"The crew member's id; the same person has the same id on every leg."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Their name, when the key can also read Crew; null otherwise."}},"type":"object","required":["role","person_id","name"],"title":"CrewSeatOut"},"DeferralOut":{"properties":{"mel_item":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mel Item","description":"The MEL item it is carried under, as written, such as \"33-41-01\"."},"mel_category":{"anyOf":[{"type":"string","enum":["A","B","C","D"]},{"type":"null"}],"title":"Mel Category","description":"The MEL category, A to D."},"deferred_on":{"type":"string","format":"date","title":"Deferred On","description":"The day it was deferred."},"expires_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expires On","description":"The last day the deferral runs; null when it has no end date."},"state":{"anyOf":[{"type":"string","enum":["ok","expiring","expired","open_ended"]},{"type":"null"}],"title":"State","description":"ok, expiring (close to its last day), expired, or open_ended (no end date). Null once the defect is cleared."},"days_left":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Left","description":"Days until the deferral ends, negative once past; null with no end date or once cleared."}},"type":"object","required":["mel_item","mel_category","deferred_on","expires_on","state","days_left"],"title":"DeferralOut"},"DiscrepanciesOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DiscrepancyOut"},"type":"array","title":"Items","description":"open: every defect not yet cleared, most urgent first (grounding, expired deferrals, reported, then the other deferrals). cleared: newest clearance first. all: both, oldest change first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor` for the next page; null on the last page. open is always one page."}},"type":"object","required":["items","next_cursor"],"title":"DiscrepanciesOut"},"DiscrepancyEvent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The delivery's id. The same delivery can arrive more than once: ignore an id you have already handled."},"type":{"type":"string","enum":["discrepancy.reported","discrepancy.updated","discrepancy.cleared"],"title":"Type","description":"discrepancy.reported (a new defect), discrepancy.updated (edited, deferred, grounded, or reopened) or discrepancy.cleared (fixed and signed for)."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the change happened (UTC)."},"aircraft_id":{"type":"string","format":"uuid","title":"Aircraft Id","description":"The defect's aircraft."},"operator_id":{"type":"string","format":"uuid","title":"Operator Id","description":"The operator whose change it is: your own for your own addresses; for a partner, one of the operators listed by /v1/operators."},"data":{"$ref":"#/components/schemas/DiscrepancyOut","description":"The defect as the defects read returns it, as it was when the first attempt was made."}},"type":"object","required":["id","type","created_at","aircraft_id","operator_id","data"],"title":"DiscrepancyEvent"},"DiscrepancyOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The defect's id."},"title":{"type":"string","title":"Title","description":"What was found, in one line."},"details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Details","description":"More about it, when given."},"status":{"type":"string","enum":["reported","deferred","grounding","cleared"],"title":"Status","description":"reported (found, not yet dealt with), deferred (carried under the MEL or similar), grounding (the aircraft can't fly) or cleared (fixed)."},"found_on":{"type":"string","format":"date","title":"Found On","description":"The day it was found."},"reported_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reported By","description":"The name of who reported it; null when it was imported."},"deferral":{"anyOf":[{"$ref":"#/components/schemas/DeferralOut"},{"type":"null"}],"description":"The deferral, when it is or was deferred; a cleared defect keeps it."},"clearance":{"anyOf":[{"$ref":"#/components/schemas/ClearanceOut"},{"type":"null"}],"description":"How it was cleared; null until it is."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When it was first saved (UTC)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When it last changed (UTC)."}},"type":"object","required":["id","title","details","status","found_on","reported_by","deferral","clearance","created_at","updated_at"],"title":"DiscrepancyOut"},"DiscrepancyRemovedEvent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The delivery's id. The same delivery can arrive more than once: ignore an id you have already handled."},"type":{"type":"string","const":"discrepancy.removed","title":"Type","description":"The defect was withdrawn as reported in error."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the change happened (UTC)."},"aircraft_id":{"type":"string","format":"uuid","title":"Aircraft Id","description":"The defect's aircraft."},"operator_id":{"type":"string","format":"uuid","title":"Operator Id","description":"The operator whose change it is: your own for your own addresses; for a partner, one of the operators listed by /v1/operators."},"data":{"$ref":"#/components/schemas/RemovedDiscrepancyOut","description":"The defect as it was last, with removed_at."}},"type":"object","required":["id","type","created_at","aircraft_id","operator_id","data"],"title":"DiscrepancyRemovedEvent"},"DowntimeEvent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The delivery's id. The same delivery can arrive more than once: ignore an id you have already handled."},"type":{"type":"string","enum":["downtime.created","downtime.updated"],"title":"Type","description":"downtime.created or downtime.updated (its times, title or place changed, or it was ended)."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the change happened (UTC)."},"aircraft_id":{"type":"string","format":"uuid","title":"Aircraft Id","description":"The downtime's aircraft."},"operator_id":{"type":"string","format":"uuid","title":"Operator Id","description":"The operator whose change it is: your own for your own addresses; for a partner, one of the operators listed by /v1/operators."},"data":{"$ref":"#/components/schemas/DowntimeOut","description":"The downtime as the downtime read returns it, as it was when the first attempt was made."}},"type":"object","required":["id","type","created_at","aircraft_id","operator_id","data"],"title":"DowntimeEvent"},"DowntimeOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The downtime's id."},"title":{"type":"string","title":"Title","description":"What the aircraft is down for."},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location","description":"The shop or airport, as entered."},"starts_at":{"type":"string","format":"date-time","title":"Starts At","description":"When it starts (UTC)."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"When it ends (UTC); null when the end isn't known yet."},"state":{"type":"string","enum":["upcoming","current","past"],"title":"State","description":"upcoming, current or past, as of now."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When it was first saved (UTC)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When it last changed (UTC)."}},"type":"object","required":["id","title","location","starts_at","ends_at","state","created_at","updated_at"],"title":"DowntimeOut"},"DowntimeRemovedEvent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The delivery's id. The same delivery can arrive more than once: ignore an id you have already handled."},"type":{"type":"string","const":"downtime.removed","title":"Type","description":"The downtime was removed."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the change happened (UTC)."},"aircraft_id":{"type":"string","format":"uuid","title":"Aircraft Id","description":"The downtime's aircraft."},"operator_id":{"type":"string","format":"uuid","title":"Operator Id","description":"The operator whose change it is: your own for your own addresses; for a partner, one of the operators listed by /v1/operators."},"data":{"$ref":"#/components/schemas/RemovedDowntimeOut","description":"The downtime as it was last, with removed_at."}},"type":"object","required":["id","type","created_at","aircraft_id","operator_id","data"],"title":"DowntimeRemovedEvent"},"DowntimesOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DowntimeOut"},"type":"array","title":"Items","description":"Downtime, earliest start first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor` for the next page; null on the last page."}},"type":"object","required":["items","next_cursor"],"title":"DowntimesOut"},"DueItemEvent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The delivery's id. The same delivery can arrive more than once: ignore an id you have already handled."},"type":{"type":"string","enum":["due_item.changed","due_item.state_changed"],"title":"Type","description":"due_item.changed (added, edited or signed off) or due_item.state_changed (it crossed between ok, due_soon and overdue as time passed or its time moved, with nobody editing it; told once per crossing, either way)."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the change happened (UTC)."},"aircraft_id":{"type":"string","format":"uuid","title":"Aircraft Id","description":"The item's aircraft."},"operator_id":{"type":"string","format":"uuid","title":"Operator Id","description":"The operator whose change it is: your own for your own addresses; for a partner, one of the operators listed by /v1/operators."},"data":{"$ref":"#/components/schemas/DueItemOut","description":"The item as the due items read returns it, as it was when the first attempt was made."}},"type":"object","required":["id","type","created_at","aircraft_id","operator_id","data"],"title":"DueItemEvent"},"DueItemOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The maintenance item's id."},"title":{"type":"string","title":"Title","description":"What has to be done, such as Annual inspection."},"task_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Ref","description":"The task's reference in the maintenance program, when given."},"limit":{"type":"string","enum":["date","airframe_hours","landings","engine_hours","engine_cycles","apu_hours","apu_cycles","hobbs_hours","prop_hours"],"title":"Limit","description":"date for an item due on a day; otherwise the time it is due at: airframe_hours, landings, engine_hours, engine_cycles, apu_hours, apu_cycles or hobbs_hours."},"engine":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Engine","description":"The engine number (1 to 4) for engine items; null otherwise."},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"The time it is due at, to show, such as \"Engine 2 cycles\"; null for a date item."},"interval":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Interval","description":"How often it repeats; null for a one-time item."},"interval_unit":{"anyOf":[{"type":"string","enum":["days","months"]},{"type":"null"}],"title":"Interval Unit","description":"days or months, for a date item that repeats. An item due at a reading repeats in its counter's unit (remaining_unit), and this is null."},"next_due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Due Date","description":"The day it is next due (date items)."},"next_due_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Next Due Value","description":"The reading it is next due at (items due at a reading)."},"state":{"type":"string","enum":["ok","due_soon","overdue"],"title":"State","description":"ok, due_soon (inside the operator's due-soon window, see due_soon_within) or overdue."},"remaining":{"type":"number","title":"Remaining","description":"How much is left before it is due, in remaining_unit; negative once overdue. Days count from today in the operator's time zone."},"remaining_unit":{"type":"string","enum":["days","hours","cycles","landings"],"title":"Remaining Unit","description":"days, hours, cycles or landings."},"predicted_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Predicted On","description":"For items due at a reading: the day it should come due at the aircraft's recent use. Null for date items, when it is already due, or when there isn't enough recent use to tell."},"last_done":{"anyOf":[{"$ref":"#/components/schemas/LastDoneOut"},{"type":"null"}],"description":"When it was last done; null when that was never recorded."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the item last changed (UTC)."}},"type":"object","required":["id","title","task_ref","limit","engine","label","interval","interval_unit","next_due_date","next_due_value","state","remaining","remaining_unit","predicted_on","last_done","updated_at"],"title":"DueItemOut"},"DueItemRemovedEvent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The delivery's id. The same delivery can arrive more than once: ignore an id you have already handled."},"type":{"type":"string","const":"due_item.removed","title":"Type","description":"The item left the list: removed, or a one-time item signed off."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the change happened (UTC)."},"aircraft_id":{"type":"string","format":"uuid","title":"Aircraft Id","description":"The item's aircraft."},"operator_id":{"type":"string","format":"uuid","title":"Operator Id","description":"The operator whose change it is: your own for your own addresses; for a partner, one of the operators listed by /v1/operators."},"data":{"$ref":"#/components/schemas/RemovedDueItemOut","description":"The item as it was last, with removed_at."}},"type":"object","required":["id","type","created_at","aircraft_id","operator_id","data"],"title":"DueItemRemovedEvent"},"DueItemsOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DueItemOut"},"type":"array","title":"Items","description":"Active maintenance items, most urgent first."},"due_soon_within":{"$ref":"#/components/schemas/DueSoonOut","description":"The operator's due-soon windows, which set each item's state."}},"type":"object","required":["items","due_soon_within"],"title":"DueItemsOut"},"DueSoonOut":{"properties":{"days":{"type":"integer","title":"Days","description":"A date item is due soon this many days ahead."},"hours":{"type":"integer","title":"Hours","description":"An hours item is due soon this many hours ahead."},"cycles":{"type":"integer","title":"Cycles","description":"A cycles or landings item is due soon this many ahead."}},"type":"object","required":["days","hours","cycles"],"title":"DueSoonOut"},"ExpenseCategoryRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The category's id."},"name":{"type":"string","title":"Name","description":"The category's name, such as Fuel."}},"type":"object","required":["id","name"],"title":"ExpenseCategoryRef"},"ExpenseItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The receipt's id."},"date":{"type":"string","format":"date","title":"Date","description":"The date on the receipt."},"vendor":{"anyOf":[{"$ref":"#/components/schemas/ExpenseVendor"},{"type":"null"}],"description":"Who was paid, when set."},"trip":{"anyOf":[{"$ref":"#/components/schemas/MoneyTripRef"},{"type":"null"}],"description":"The trip it was for; null for a general expense."},"aircraft_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Aircraft Id","description":"The aircraft it was for, when set."},"aircraft_tail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aircraft Tail","description":"That aircraft's registration."},"paid_with":{"type":"string","enum":["company_card","company_account","own_money","cash_advance","aircraft_owner"],"title":"Paid With","description":"How it was paid: company_card, company_account, own_money (a person's own card or cash, paid back to them), cash_advance or aircraft_owner (the aircraft owner's card or account: not the operator's spend)."},"currency":{"type":"string","title":"Currency","description":"The receipt's currency."},"exchange_rate":{"type":"string","title":"Exchange Rate","description":"Units of the operator's currency for one of the receipt's, as text, such as \"1.084\"; \"1\" at home."},"total":{"$ref":"#/components/schemas/MoneyAmount","description":"The lines and the tax, in the receipt's currency."},"home_total":{"$ref":"#/components/schemas/MoneyAmount","description":"The same in the operator's currency."},"tax":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}],"description":"The receipt's tax, in its currency; null when it has none."},"home_tax":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}],"description":"The same in the operator's currency."},"status":{"type":"string","enum":["recorded","submitted","returned","approved","paid_back","rejected"],"title":"Status","description":"recorded (the office's own), submitted (sent for review or payback), returned (sent back for changes), approved, paid_back or rejected."},"reimbursable":{"type":"boolean","title":"Reimbursable","description":"Paid with a person's own money, so it is paid back to them."},"paid_back_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Paid Back On","description":"When it was paid back, if it was."},"receipt_attached":{"type":"boolean","title":"Receipt Attached","description":"True when a receipt file is attached."},"lines":{"items":{"$ref":"#/components/schemas/ExpenseLineItem"},"type":"array","title":"Lines","description":"The receipt's lines, in order."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When it was recorded (UTC)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the receipt itself last changed (UTC)."},"changed_at":{"type":"string","format":"date-time","title":"Changed At","description":"When it, a line or its receipt files last changed (UTC); what `since` and paging go by."},"voided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Voided At","description":"Set when it was voided: drop it from your copy."}},"type":"object","required":["id","date","vendor","trip","aircraft_id","aircraft_tail","paid_with","currency","exchange_rate","total","home_total","tax","home_tax","status","reimbursable","paid_back_on","receipt_attached","lines","created_at","updated_at","changed_at","voided_at"],"title":"ExpenseItem"},"ExpenseLineItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The line's id."},"position":{"type":"integer","title":"Position","description":"Its place on the receipt, from 0."},"category":{"$ref":"#/components/schemas/ExpenseCategoryRef","description":"What kind of cost it is."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"What was bought, when written."},"amount":{"$ref":"#/components/schemas/MoneyAmount","description":"Before tax, in the receipt's currency."},"home_amount":{"$ref":"#/components/schemas/MoneyAmount","description":"The same in the operator's currency, at the receipt's exchange rate."},"tax":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}],"description":"The line's own tax, in the receipt's currency, when it has one."},"leg_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Leg Id","description":"The trip leg it was for, when set."},"airport":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airport","description":"The airport code it was bought at, when set."},"quantity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantity","description":"Fuel only: how much, as text with one decimal, such as \"60.0\"."},"unit":{"anyOf":[{"type":"string","enum":["usgal","l"]},{"type":"null"}],"title":"Unit","description":"Fuel only: usgal (US gallons) or l (liters)."},"billable":{"type":"boolean","title":"Billable","description":"To be billed to the trip's client."},"billing":{"type":"string","enum":["not_billable","to_bill","on_draft","invoiced"],"title":"Billing","description":"Where its billing stands: not_billable, to_bill (billable, on no invoice yet), on_draft (on an invoice not yet issued) or invoiced."},"invoice_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Invoice Id","description":"The issued invoice that bills it (see the invoices path); null otherwise."},"invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Number","description":"That invoice's number."}},"type":"object","required":["id","position","category","description","amount","home_amount","tax","leg_id","airport","quantity","unit","billable","billing","invoice_id","invoice_number"],"title":"ExpenseLineItem"},"ExpenseVendor":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id","description":"The vendor's id in the operator's vendor list; null when the name was typed on the receipt instead."},"name":{"type":"string","title":"Name","description":"The vendor's name."}},"type":"object","required":["id","name"],"title":"ExpenseVendor"},"ExpensesOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ExpenseItem"},"type":"array","title":"Items","description":"Receipts, oldest change first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor` for the next page; null on the last page."}},"type":"object","required":["items","next_cursor"],"title":"ExpensesOut"},"FboOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The FBO's id."},"name":{"type":"string","title":"Name","description":"The FBO's name."},"airport":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airport","description":"The code of the airport it is at."}},"type":"object","required":["id","name","airport"],"title":"FboOut"},"FlightEvent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The delivery's id. The same delivery can arrive more than once: ignore an id you have already handled."},"type":{"type":"string","enum":["flight.created","flight.updated","flight.canceled"],"title":"Type","description":"flight.created (a leg came onto this aircraft's schedule: added, booked from a quote, or moved here from another aircraft), flight.updated (its times, airports, trip number or status changed, or its canceled trip was reinstated) or flight.canceled (its trip was canceled). Never a quote nobody booked. A flight log entered on it comes as flight_log.*."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the change happened (UTC)."},"aircraft_id":{"type":"string","format":"uuid","title":"Aircraft Id","description":"The aircraft whose schedule it is on."},"operator_id":{"type":"string","format":"uuid","title":"Operator Id","description":"The operator whose change it is: your own for your own addresses; for a partner, one of the operators listed by /v1/operators."},"data":{"$ref":"#/components/schemas/FlightOut","description":"The leg as the scheduled flights read returns it, as it was when the first attempt was made."}},"type":"object","required":["id","type","created_at","aircraft_id","operator_id","data"],"title":"FlightEvent"},"FlightLogEvent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The delivery's id. The same delivery can arrive more than once: ignore an id you have already handled."},"type":{"type":"string","enum":["flight_log.created","flight_log.updated","flight_log.voided"],"title":"Type","description":"flight_log.created (a flight was logged), flight_log.updated (it was corrected) or flight_log.voided (it was voided: drop it)."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the change happened (UTC)."},"aircraft_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Aircraft Id","description":"The aircraft the flight was logged on."},"operator_id":{"type":"string","format":"uuid","title":"Operator Id","description":"The operator whose change it is: your own for your own addresses; for a partner, one of the operators listed by /v1/operators."},"data":{"$ref":"#/components/schemas/LogOut","description":"The entry as the flight logs list returns it, as it was when the first attempt was made."}},"type":"object","required":["id","type","created_at","aircraft_id","operator_id","data"],"title":"FlightLogEvent"},"FlightOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The leg's id."},"trip_id":{"type":"string","format":"uuid","title":"Trip Id","description":"The trip's id; a trip has one or more legs."},"trip_number":{"type":"string","title":"Trip Number","description":"The trip's number."},"status":{"type":"string","enum":["option","confirmed","canceled"],"title":"Status","description":"The trip's status: option (held, not yet confirmed), confirmed, or canceled (only with include_canceled)."},"from_airport":{"type":"string","title":"From Airport","description":"The departure airport code."},"to_airport":{"type":"string","title":"To Airport","description":"The arrival airport code."},"departs_at":{"type":"string","format":"date-time","title":"Departs At","description":"Scheduled departure (UTC)."},"arrives_at":{"type":"string","format":"date-time","title":"Arrives At","description":"Scheduled arrival (UTC)."},"has_flight_log":{"type":"boolean","title":"Has Flight Log","description":"True once the leg's flight log is entered (see the logs path)."}},"type":"object","required":["id","trip_id","trip_number","status","from_airport","to_airport","departs_at","arrives_at","has_flight_log"],"title":"FlightOut"},"FlightRemovedEvent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The delivery's id. The same delivery can arrive more than once: ignore an id you have already handled."},"type":{"type":"string","const":"flight.removed","title":"Type","description":"The leg left this aircraft's schedule: removed, moved to another aircraft (that one gets flight.created), or its trip lost its tail."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the change happened (UTC)."},"aircraft_id":{"type":"string","format":"uuid","title":"Aircraft Id","description":"The aircraft it left."},"operator_id":{"type":"string","format":"uuid","title":"Operator Id","description":"The operator whose change it is: your own for your own addresses; for a partner, one of the operators listed by /v1/operators."},"data":{"$ref":"#/components/schemas/RemovedFlightOut","description":"The leg as it was last, with removed_at."}},"type":"object","required":["id","type","created_at","aircraft_id","operator_id","data"],"title":"FlightRemovedEvent"},"FlightsOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FlightOut"},"type":"array","title":"Items","description":"Legs, earliest departure first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor` for the next page; null on the last page."}},"type":"object","required":["items","next_cursor"],"title":"FlightsOut"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HiddenColumn":{"properties":{"id":{"type":"string","title":"Id","description":"The column's id."},"label":{"type":"string","title":"Label","description":"The column's heading."},"needs":{"items":{"type":"string"},"type":"array","title":"Needs","description":"The boxes that show it: a key with any one of them checked gets it."},"reason":{"type":"string","title":"Reason","description":"Why it was left out, in words."}},"type":"object","required":["id","label","needs","reason"],"title":"HiddenColumn"},"HiddenFigure":{"properties":{"label":{"type":"string","title":"Label","description":"The headline figure's name."},"needs":{"items":{"type":"string"},"type":"array","title":"Needs","description":"The boxes that show it."},"reason":{"type":"string","title":"Reason","description":"Why it was left out, in words."}},"type":"object","required":["label","needs","reason"],"title":"HiddenFigure"},"InvoiceClient":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The client account's id."},"name":{"type":"string","title":"Name","description":"The client's name. Never their contact details."}},"type":"object","required":["id","name"],"title":"InvoiceClient"},"InvoiceCreditNote":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The credit note's id."},"number":{"type":"string","title":"Number","description":"The credit note's number."},"issued_on":{"type":"string","format":"date","title":"Issued On","description":"Its date."},"total":{"$ref":"#/components/schemas/MoneyAmount","description":"What it takes off the invoice."}},"type":"object","required":["id","number","issued_on","total"],"title":"InvoiceCreditNote"},"InvoiceDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The invoice's id, used in the invoice's own path."},"number":{"type":"string","title":"Number","description":"The invoice number."},"status":{"type":"string","enum":["due","part_paid","paid","overdue","credited","refund_due","void"],"title":"Status","description":"As the Invoices page shows it, by the operator's today: due, part_paid, paid, overdue (past due with money owed), credited (credited in full), refund_due (the client paid more than they owe) or void."},"client":{"$ref":"#/components/schemas/InvoiceClient","description":"Who is billed."},"trip":{"anyOf":[{"$ref":"#/components/schemas/MoneyTripRef"},{"type":"null"}],"description":"The trip it bills; null for an invoice made blank."},"issued_on":{"type":"string","format":"date","title":"Issued On","description":"The issue date."},"due_on":{"type":"string","format":"date","title":"Due On","description":"The due date."},"currency":{"type":"string","title":"Currency","description":"The operator's currency; every amount is in it."},"subtotal":{"$ref":"#/components/schemas/MoneyAmount","description":"The lines before tax."},"tax":{"$ref":"#/components/schemas/MoneyAmount","description":"The tax lines together."},"total":{"$ref":"#/components/schemas/MoneyAmount","description":"Subtotal plus tax."},"credited":{"$ref":"#/components/schemas/MoneyAmount","description":"What credit notes took off."},"paid":{"$ref":"#/components/schemas/MoneyAmount","description":"Payments less refunds, voided ones left out."},"balance_due":{"$ref":"#/components/schemas/MoneyAmount","description":"Total less credited and paid; negative when the client is owed money."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When it was started (UTC)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the invoice itself last changed (UTC)."},"changed_at":{"type":"string","format":"date-time","title":"Changed At","description":"When it, a payment or a credit note on it last changed (UTC); what `since` and paging go by. A status that moves with the date alone (due to overdue) doesn't move it."},"lines":{"items":{"$ref":"#/components/schemas/InvoiceLineItem"},"type":"array","title":"Lines","description":"The invoice's lines, in order."},"payments":{"items":{"$ref":"#/components/schemas/InvoicePaymentItem"},"type":"array","title":"Payments","description":"Payments and refunds recorded, voided ones too, oldest first."},"credit_notes":{"items":{"$ref":"#/components/schemas/InvoiceCreditNote"},"type":"array","title":"Credit Notes","description":"Credit notes against it, oldest first."}},"type":"object","required":["id","number","status","client","trip","issued_on","due_on","currency","subtotal","tax","total","credited","paid","balance_due","created_at","updated_at","changed_at","lines","payments","credit_notes"],"title":"InvoiceDetail"},"InvoiceFileIn":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"The file's name, such as INV-1042.pdf."},"type":{"type":"string","enum":["application/pdf","image/jpeg","image/png"],"title":"Type","description":"What the file is: a PDF, JPEG or PNG."},"data":{"type":"string","maxLength":13981016,"minLength":4,"title":"Data","description":"The file itself, base64 encoded, up to 10 MB before encoding."}},"additionalProperties":false,"type":"object","required":["name","type","data"],"title":"InvoiceFileIn"},"InvoiceLineIn":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Description","description":"What the line is for."},"amount":{"type":"integer","maximum":999999999.0,"minimum":1.0,"title":"Amount","description":"The line's amount before tax, in minor units of the invoice's currency (cents for USD: 25000 is 250.00)."}},"additionalProperties":false,"type":"object","required":["amount"],"title":"InvoiceLineIn"},"InvoiceLineItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The line's id."},"position":{"type":"integer","title":"Position","description":"Its place on the invoice, from 0."},"kind":{"type":"string","enum":["hourly","positioning","fee","minimum","fuel","expense","custom","tax_fet","tax_segment","tax_intl","aircraft_cost","fuel_charge"],"title":"Kind","description":"What it bills, such as hourly, fee, fuel or expense; tax_fet, tax_segment and tax_intl are tax lines."},"description":{"type":"string","title":"Description","description":"The line as printed."},"quantity":{"type":"string","title":"Quantity","description":"How many, as text, such as \"1.7\" hours or \"4\"."},"unit":{"type":"string","title":"Unit","description":"What is counted: h, leg, pax, night, day, trip or each."},"unit_price":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}],"description":"The price of one; null on a percentage tax line."},"tax_rate_bp":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tax Rate Bp","description":"A percentage tax line's rate in basis points: 750 is 7.5 %."},"tax_base":{"anyOf":[{"$ref":"#/components/schemas/MoneyAmount"},{"type":"null"}],"description":"What a percentage tax line taxes."},"amount":{"$ref":"#/components/schemas/MoneyAmount","description":"The line's amount."},"taxable":{"type":"boolean","title":"Taxable","description":"Counted in what a percentage tax taxes."},"leg_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Leg Id","description":"The trip leg it bills, when one."},"expense_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Expense Id","description":"The receipt it bills (see the expenses path), when one."}},"type":"object","required":["id","position","kind","description","quantity","unit","unit_price","tax_rate_bp","tax_base","amount","taxable","leg_id","expense_id"],"title":"InvoiceLineItem"},"InvoicePaymentItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The payment's id."},"kind":{"type":"string","enum":["payment","refund"],"title":"Kind","description":"payment, or refund (money paid back)."},"received_on":{"type":"string","format":"date","title":"Received On","description":"When it was received, or a refund paid out."},"amount":{"$ref":"#/components/schemas/MoneyAmount","description":"How much."},"method":{"type":"string","enum":["ach","wire","check","card","cash","other"],"title":"Method","description":"How: ach, wire, check, card, cash or other. Never card or bank details."},"voided":{"type":"boolean","title":"Voided","description":"Recorded in error and voided: it counts toward nothing."}},"type":"object","required":["id","kind","received_on","amount","method","voided"],"title":"InvoicePaymentItem"},"InvoiceSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The invoice's id, used in the invoice's own path."},"number":{"type":"string","title":"Number","description":"The invoice number."},"status":{"type":"string","enum":["due","part_paid","paid","overdue","credited","refund_due","void"],"title":"Status","description":"As the Invoices page shows it, by the operator's today: due, part_paid, paid, overdue (past due with money owed), credited (credited in full), refund_due (the client paid more than they owe) or void."},"client":{"$ref":"#/components/schemas/InvoiceClient","description":"Who is billed."},"trip":{"anyOf":[{"$ref":"#/components/schemas/MoneyTripRef"},{"type":"null"}],"description":"The trip it bills; null for an invoice made blank."},"issued_on":{"type":"string","format":"date","title":"Issued On","description":"The issue date."},"due_on":{"type":"string","format":"date","title":"Due On","description":"The due date."},"currency":{"type":"string","title":"Currency","description":"The operator's currency; every amount is in it."},"subtotal":{"$ref":"#/components/schemas/MoneyAmount","description":"The lines before tax."},"tax":{"$ref":"#/components/schemas/MoneyAmount","description":"The tax lines together."},"total":{"$ref":"#/components/schemas/MoneyAmount","description":"Subtotal plus tax."},"credited":{"$ref":"#/components/schemas/MoneyAmount","description":"What credit notes took off."},"paid":{"$ref":"#/components/schemas/MoneyAmount","description":"Payments less refunds, voided ones left out."},"balance_due":{"$ref":"#/components/schemas/MoneyAmount","description":"Total less credited and paid; negative when the client is owed money."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When it was started (UTC)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the invoice itself last changed (UTC)."},"changed_at":{"type":"string","format":"date-time","title":"Changed At","description":"When it, a payment or a credit note on it last changed (UTC); what `since` and paging go by. A status that moves with the date alone (due to overdue) doesn't move it."}},"type":"object","required":["id","number","status","client","trip","issued_on","due_on","currency","subtotal","tax","total","credited","paid","balance_due","created_at","updated_at","changed_at"],"title":"InvoiceSummary"},"InvoicesOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InvoiceSummary"},"type":"array","title":"Items","description":"Invoices, oldest change first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor` for the next page; null on the last page."}},"type":"object","required":["items","next_cursor"],"title":"InvoicesOut"},"LastDoneOut":{"properties":{"on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"On","description":"The day it was last done."},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value","description":"The counter's reading when it was done, for items due at a reading."},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference","description":"Work order or logbook entry, when given."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"A note given when it was signed off."},"signed_off_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed Off By","description":"The name of who signed it off; null when the system did or it was only recorded."}},"type":"object","required":["on","value","reference","note","signed_off_by"],"title":"LastDoneOut"},"LegOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The leg's id."},"trip_id":{"type":"string","format":"uuid","title":"Trip Id","description":"The trip's id."},"trip_number":{"type":"string","title":"Trip Number","description":"The trip's number."},"status":{"type":"string","enum":["option","confirmed","canceled"],"title":"Status","description":"The trip's status, as on the trip."},"position":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position","description":"Its place in the trip, 1 for the first leg; null once removed."},"from_airport":{"type":"string","title":"From Airport","description":"The departure airport code."},"to_airport":{"type":"string","title":"To Airport","description":"The arrival airport code."},"departs_at":{"type":"string","format":"date-time","title":"Departs At","description":"Scheduled departure (UTC)."},"arrives_at":{"type":"string","format":"date-time","title":"Arrives At","description":"Scheduled arrival (UTC)."},"estimated_block_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Block Minutes","description":"The app's block time estimate for the aircraft, in minutes; null without an aircraft or its cruise figures."},"distance_nm":{"type":"integer","title":"Distance Nm","description":"Great circle distance, in nautical miles."},"departure_fbo":{"anyOf":[{"$ref":"#/components/schemas/FboOut"},{"type":"null"}],"description":"Who handles the departure: the FBO chosen on the leg, else the one the leg before arrived at, else the operator's usual FBO there."},"arrival_fbo":{"anyOf":[{"$ref":"#/components/schemas/FboOut"},{"type":"null"}],"description":"The FBO at arrival, when chosen."},"has_flight_log":{"type":"boolean","title":"Has Flight Log","description":"True once the leg's flight log is entered."},"crew":{"items":{"$ref":"#/components/schemas/CrewSeatOut"},"type":"array","title":"Crew","description":"Who is seated, PIC first."},"passenger_count":{"type":"integer","title":"Passenger Count","description":"Passengers aboard: the count entered or the passengers named, whichever is more."},"passengers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Passengers","description":"The named passengers' names, by name, when the key can read Passenger names; null otherwise. Never anything else about them."},"services":{"items":{"$ref":"#/components/schemas/LegServiceOut"},"type":"array","title":"Services","description":"What is arranged for the leg (handler, catering, hotels, transport, flight plan); empty when the operator doesn't track these."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the leg, its trip, crew, passengers, services or flight log last changed (UTC); what `since` goes by."},"removed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Removed At","description":"Set when the leg was taken off its trip: drop it from your copy. Only `since` returns removed legs."}},"type":"object","required":["id","trip_id","trip_number","status","position","from_airport","to_airport","departs_at","arrives_at","estimated_block_minutes","distance_nm","departure_fbo","arrival_fbo","has_flight_log","crew","passenger_count","passengers","services","updated_at","removed_at"],"title":"LegOut"},"LegServiceOut":{"properties":{"type":{"type":"string","enum":["arrival_handler","crew_catering","pax_catering","crew_hotel","pax_hotel","crew_transport","pax_transport","flight_plan","passenger_ids"],"title":"Type","description":"What is arranged: arrival_handler, crew_catering, pax_catering, crew_hotel, pax_hotel, crew_transport, pax_transport, flight_plan or passenger_ids (the ID check)."},"label":{"type":"string","title":"Label","description":"A name to show, such as \"Crew hotel\"."},"status":{"type":"string","enum":["todo","requested","confirmed","done","not_needed"],"title":"Status","description":"todo, requested, confirmed, done or not_needed."},"needed":{"type":"boolean","title":"Needed","description":"False when it was set once but the leg no longer calls for it."},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor","description":"The name of who provides it, when set (and the operator uses Accounting)."},"confirmation_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirmation Number","description":"The booking's confirmation or reference, when given."}},"type":"object","required":["type","label","status","needed","vendor","confirmation_number"],"title":"LegServiceOut"},"LegSummaryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The leg's id."},"from_airport":{"type":"string","title":"From Airport","description":"The departure airport code."},"to_airport":{"type":"string","title":"To Airport","description":"The arrival airport code."},"departs_at":{"type":"string","format":"date-time","title":"Departs At","description":"Scheduled departure (UTC)."},"arrives_at":{"type":"string","format":"date-time","title":"Arrives At","description":"Scheduled arrival (UTC)."},"has_flight_log":{"type":"boolean","title":"Has Flight Log","description":"True once the leg's flight log is entered."}},"type":"object","required":["id","from_airport","to_airport","departs_at","arrives_at","has_flight_log"],"title":"LegSummaryOut"},"LegsOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LegOut"},"type":"array","title":"Items","description":"Legs, earliest departure first; with `since`, oldest change first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor` for the next page; null on the last page."}},"type":"object","required":["items","next_cursor"],"title":"LegsOut"},"LogOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The flight log entry's id."},"trip_number":{"type":"string","title":"Trip Number","description":"The trip's number."},"from_airport":{"type":"string","title":"From Airport","description":"The departure airport code."},"to_airport":{"type":"string","title":"To Airport","description":"The arrival airport code."},"block_out_at":{"type":"string","format":"date-time","title":"Block Out At","description":"Block out (UTC)."},"block_in_at":{"type":"string","format":"date-time","title":"Block In At","description":"Block in (UTC)."},"air_hours":{"type":"number","title":"Air Hours","description":"Takeoff to landing, in hours."},"hobbs_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hobbs Hours","description":"Hobbs hours, when logged."},"landings":{"type":"integer","title":"Landings","description":"Landings."},"night_landings":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Night Landings","description":"Night landings, when logged."},"engine_cycles":{"type":"integer","title":"Engine Cycles","description":"Cycles on each engine."},"engine_cycles_each":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Engine Cycles Each","description":"Cycles per engine, engine 1 first, when they differ by engine."},"apu_cycles":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Apu Cycles","description":"APU cycles, when logged."},"fuel_out":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fuel Out","description":"Fuel at block out."},"fuel_in":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fuel In","description":"Fuel at block in."},"fuel_uplift":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fuel Uplift","description":"Fuel taken on before the flight."},"fuel_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fuel Unit","description":"The unit of the three fuel figures."},"distance_nm":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Distance Nm","description":"Distance flown, in nautical miles."},"approaches":{"items":{"type":"string"},"type":"array","title":"Approaches","description":"The kinds of instrument approach flown."},"instrument_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Instrument Hours","description":"Instrument time, in hours, when logged."},"recorded_at":{"type":"string","format":"date-time","title":"Recorded At","description":"When the entry was first saved (UTC)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the entry last changed (UTC); what `since` and paging go by."},"voided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Voided At","description":"Set when the entry was voided: drop it from your copy."}},"type":"object","required":["id","trip_number","from_airport","to_airport","block_out_at","block_in_at","air_hours","hobbs_hours","landings","night_landings","engine_cycles","engine_cycles_each","apu_cycles","fuel_out","fuel_in","fuel_uplift","fuel_unit","distance_nm","approaches","instrument_hours","recorded_at","updated_at","voided_at"],"title":"LogOut"},"LogsOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LogOut"},"type":"array","title":"Items","description":"Entries, oldest change first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor` for the next page; null on the last page."}},"type":"object","required":["items","next_cursor"],"title":"LogsOut"},"MoneyAmount":{"properties":{"amount":{"type":"integer","title":"Amount","description":"A whole number in the currency's minor units: cents for USD, so 41260 is 412.60. Never a decimal; format it by the currency's decimal places."},"currency":{"type":"string","title":"Currency","description":"The ISO 4217 code, such as USD."}},"type":"object","required":["amount","currency"],"title":"MoneyAmount"},"MoneyTripRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The trip's id."},"number":{"type":"string","title":"Number","description":"The trip's number."}},"type":"object","required":["id","number"],"title":"MoneyTripRef"},"OperatorOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The operator's id, used in the other paths."},"name":{"type":"string","title":"Name","description":"The operator's name."},"all_aircraft":{"type":"boolean","title":"All Aircraft","description":"True when the operator allowed every aircraft, including ones it adds later."},"aircraft_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Aircraft Ids","description":"When all_aircraft is false, the aircraft you may read; empty otherwise."},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","description":"What you may read of this operator, such as aircraft.read."},"alert_groups":{"items":{"type":"string"},"type":"array","title":"Alert Groups","description":"The changes this operator's alerts tell you of: flight_logs, times, discrepancies, due_items, downtime, flights."},"allowed_since":{"type":"string","format":"date-time","title":"Allowed Since","description":"When the operator first allowed you, or last changed what (UTC)."},"paused_reason":{"anyOf":[{"type":"string","const":"read_only"},{"type":"null"}],"title":"Paused Reason","description":"read_only while the operator's subscription has ended: its paths answer 402 and no alerts are sent until a plan is chosen. Null otherwise."}},"type":"object","required":["id","name","all_aircraft","aircraft_ids","scopes","alert_groups","allowed_since","paused_reason"],"title":"OperatorOut"},"OperatorsOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OperatorOut"},"type":"array","title":"Items","description":"The operators that allow you, by name."}},"type":"object","required":["items"],"title":"OperatorsOut"},"RemovedDiscrepancyOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The defect's id."},"title":{"type":"string","title":"Title","description":"What was found, in one line."},"details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Details","description":"More about it, when given."},"status":{"type":"string","enum":["reported","deferred","grounding","cleared"],"title":"Status","description":"reported (found, not yet dealt with), deferred (carried under the MEL or similar), grounding (the aircraft can't fly) or cleared (fixed)."},"found_on":{"type":"string","format":"date","title":"Found On","description":"The day it was found."},"reported_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reported By","description":"The name of who reported it; null when it was imported."},"deferral":{"anyOf":[{"$ref":"#/components/schemas/DeferralOut"},{"type":"null"}],"description":"The deferral, when it is or was deferred; a cleared defect keeps it."},"clearance":{"anyOf":[{"$ref":"#/components/schemas/ClearanceOut"},{"type":"null"}],"description":"How it was cleared; null until it is."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When it was first saved (UTC)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When it last changed (UTC)."},"removed_at":{"type":"string","format":"date-time","title":"Removed At","description":"When it was withdrawn as reported in error (UTC): drop it from your copy."}},"type":"object","required":["id","title","details","status","found_on","reported_by","deferral","clearance","created_at","updated_at","removed_at"],"title":"RemovedDiscrepancyOut"},"RemovedDowntimeOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The downtime's id."},"title":{"type":"string","title":"Title","description":"What the aircraft is down for."},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location","description":"The shop or airport, as entered."},"starts_at":{"type":"string","format":"date-time","title":"Starts At","description":"When it starts (UTC)."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"When it ends (UTC); null when the end isn't known yet."},"state":{"type":"string","enum":["upcoming","current","past"],"title":"State","description":"upcoming, current or past, as of now."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When it was first saved (UTC)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When it last changed (UTC)."},"removed_at":{"type":"string","format":"date-time","title":"Removed At","description":"When it was removed (UTC): drop it from your copy."}},"type":"object","required":["id","title","location","starts_at","ends_at","state","created_at","updated_at","removed_at"],"title":"RemovedDowntimeOut"},"RemovedDueItemOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The maintenance item's id."},"title":{"type":"string","title":"Title","description":"What has to be done, such as Annual inspection."},"task_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Ref","description":"The task's reference in the maintenance program, when given."},"limit":{"type":"string","enum":["date","airframe_hours","landings","engine_hours","engine_cycles","apu_hours","apu_cycles","hobbs_hours","prop_hours"],"title":"Limit","description":"date for an item due on a day; otherwise the time it is due at: airframe_hours, landings, engine_hours, engine_cycles, apu_hours, apu_cycles or hobbs_hours."},"engine":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Engine","description":"The engine number (1 to 4) for engine items; null otherwise."},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"The time it is due at, to show, such as \"Engine 2 cycles\"; null for a date item."},"interval":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Interval","description":"How often it repeats; null for a one-time item."},"interval_unit":{"anyOf":[{"type":"string","enum":["days","months"]},{"type":"null"}],"title":"Interval Unit","description":"days or months, for a date item that repeats. An item due at a reading repeats in its counter's unit (remaining_unit), and this is null."},"next_due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Due Date","description":"The day it is next due (date items)."},"next_due_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Next Due Value","description":"The reading it is next due at (items due at a reading)."},"state":{"type":"string","enum":["ok","due_soon","overdue"],"title":"State","description":"ok, due_soon (inside the operator's due-soon window, see due_soon_within) or overdue."},"remaining":{"type":"number","title":"Remaining","description":"How much is left before it is due, in remaining_unit; negative once overdue. Days count from today in the operator's time zone."},"remaining_unit":{"type":"string","enum":["days","hours","cycles","landings"],"title":"Remaining Unit","description":"days, hours, cycles or landings."},"predicted_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Predicted On","description":"For items due at a reading: the day it should come due at the aircraft's recent use. Null for date items, when it is already due, or when there isn't enough recent use to tell."},"last_done":{"anyOf":[{"$ref":"#/components/schemas/LastDoneOut"},{"type":"null"}],"description":"When it was last done; null when that was never recorded."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the item last changed (UTC)."},"removed_at":{"type":"string","format":"date-time","title":"Removed At","description":"When it left the list (UTC): removed, or a one-time item signed off (see last_done). Drop it from your copy."}},"type":"object","required":["id","title","task_ref","limit","engine","label","interval","interval_unit","next_due_date","next_due_value","state","remaining","remaining_unit","predicted_on","last_done","updated_at","removed_at"],"title":"RemovedDueItemOut"},"RemovedFlightOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The leg's id."},"trip_id":{"type":"string","format":"uuid","title":"Trip Id","description":"The trip's id; a trip has one or more legs."},"trip_number":{"type":"string","title":"Trip Number","description":"The trip's number."},"status":{"type":"string","enum":["option","confirmed","canceled"],"title":"Status","description":"The trip's status: option (held, not yet confirmed), confirmed, or canceled (only with include_canceled)."},"from_airport":{"type":"string","title":"From Airport","description":"The departure airport code."},"to_airport":{"type":"string","title":"To Airport","description":"The arrival airport code."},"departs_at":{"type":"string","format":"date-time","title":"Departs At","description":"Scheduled departure (UTC)."},"arrives_at":{"type":"string","format":"date-time","title":"Arrives At","description":"Scheduled arrival (UTC)."},"has_flight_log":{"type":"boolean","title":"Has Flight Log","description":"True once the leg's flight log is entered (see the logs path)."},"removed_at":{"type":"string","format":"date-time","title":"Removed At","description":"When it left this aircraft's schedule (UTC): the leg was removed, moved to another aircraft, or its trip lost its tail. Drop it from your copy."}},"type":"object","required":["id","trip_id","trip_number","status","from_airport","to_airport","departs_at","arrives_at","has_flight_log","removed_at"],"title":"RemovedFlightOut"},"ReplyEvent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The delivery's id. The same delivery can arrive more than once: ignore an id you have already handled."},"type":{"type":"string","enum":["request.accepted","request.declined","invoice.saved","invoice.discarded","booking.attached"],"title":"Type","description":"What the office did with something your tool sent in. Sent only to whoever sent the item: a partner's own address, or every address of the operator for its own keys, whatever changes each chose. Nothing is sent once the key or the partner's access is revoked."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the office did it (UTC)."},"aircraft_id":{"type":"null","title":"Aircraft Id","description":"Always null."},"operator_id":{"type":"string","format":"uuid","title":"Operator Id","description":"The operator whose change it is: your own for your own addresses; for a partner, one of the operators listed by /v1/operators."},"data":{"$ref":"#/components/schemas/ReplyOut"}},"type":"object","required":["id","type","created_at","aircraft_id","operator_id","data"],"title":"ReplyEvent"},"ReplyOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The item's id here, as the send answered it."},"external_id":{"type":"string","title":"External Id","description":"Your own id for the item, as you sent it."},"state":{"type":"string","enum":["accepted","declined","saved","discarded","attached"],"title":"State","description":"What the office did: accepted or declined a trip request, saved or discarded an invoice, attached a booking."},"trip_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trip Id","description":"The trip it is on now: an accepted request's new trip, or the trip a booking was attached to."},"expense_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Expense Id","description":"A saved invoice's expense."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"The office's note, when it declined a request."}},"type":"object","required":["id","external_id","state"],"title":"ReplyOut","description":"What the office did with something your tool sent in (webhooks/replies.py builds it)."},"ReportColumn":{"properties":{"id":{"type":"string","title":"Id","description":"The column's id: each row's key for its value."},"label":{"type":"string","title":"Label","description":"The column's heading, as the app shows it."},"type":{"type":"string","enum":["text","integer","hours","money","percent","date","days","status","number"],"title":"Type","description":"What its values are. text, status (a word such as Overdue) and date (YYYY-MM-DD) are strings; integer and days are whole numbers; hours, number and percent are decimal numbers (12.3 hours, 93.4 percent); money is a whole number of minor units (cents) of the report's currency. Any value can be null."}},"type":"object","required":["id","label","type"],"title":"ReportColumn"},"ReportFigure":{"properties":{"label":{"type":"string","title":"Label","description":"The headline figure's name, as the app shows it."},"type":{"type":"string","enum":["text","integer","hours","money","percent","date","days","status","number"],"title":"Type","description":"What its value is, as a column's type."},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"null"}],"title":"Value","description":"Its value for the whole period and filters."}},"type":"object","required":["label","type","value"],"title":"ReportFigure"},"ReportListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReportOut"},"type":"array","title":"Items","description":"The reports this key can run, in the app's order."}},"type":"object","required":["items"],"title":"ReportListOut"},"ReportOut":{"properties":{"id":{"type":"string","title":"Id","description":"The report's id, such as `flight-hours`. It never changes."},"number":{"type":"string","title":"Number","description":"The report's number in the app's list of reports, such as B1."},"name":{"type":"string","title":"Name","description":"The report's name, as the app shows it."},"description":{"type":"string","title":"Description","description":"The question the report answers."},"group":{"type":"string","enum":["summary","flying","aircraft","money_in","money_out","owners","crew","clients"],"title":"Group","description":"Which part of Reports it sits in. New parts may be added."},"group_name":{"type":"string","title":"Group Name","description":"That part's name, as the app shows it."},"filters":{"items":{"type":"string","enum":["from","to","group","aircraft_id","client_id"]},"type":"array","title":"Filters","description":"The parameters this report takes when run. Others are ignored."}},"type":"object","required":["id","number","name","description","group","group_name","filters"],"title":"ReportOut"},"ReportRowsOut":{"properties":{"id":{"type":"string","title":"Id","description":"The report's id."},"name":{"type":"string","title":"Name","description":"The report's name."},"currency":{"type":"string","title":"Currency","description":"The operator's currency (ISO 4217). Every money value is in its minor units."},"from_date":{"type":"string","format":"date","title":"From Date","description":"The period's first day, in the operator's days."},"to_date":{"type":"string","format":"date","title":"To Date","description":"The period's last day, included."},"as_of":{"type":"string","format":"date-time","title":"As Of","description":"When the report was worked out (UTC)."},"tables":{"items":{"$ref":"#/components/schemas/ReportTable"},"type":"array","title":"Tables","description":"Every table the report has."},"table":{"type":"integer","title":"Table","description":"Which table these rows are from."},"columns":{"items":{"$ref":"#/components/schemas/ReportColumn"},"type":"array","title":"Columns","description":"The table's columns this key may read, in the app's order."},"hidden_columns":{"items":{"$ref":"#/components/schemas/HiddenColumn"},"type":"array","title":"Hidden Columns","description":"The table's columns left out for this key, and which box shows each."},"rows":{"items":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"null"}]},"type":"object"},"type":"array","title":"Rows","description":"One page of rows, in the app's order: each an object of column id to value."},"row_count":{"type":"integer","title":"Row Count","description":"How many rows the whole table has."},"totals":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Totals","description":"The table's totals row over every row, not just this page, by column id; null when the table has none."},"figures":{"items":{"$ref":"#/components/schemas/ReportFigure"},"type":"array","title":"Figures","description":"The report's headline figures, for the whole period and filters."},"hidden_figures":{"items":{"$ref":"#/components/schemas/HiddenFigure"},"type":"array","title":"Hidden Figures","description":"Headline figures left out for this key, and which box shows each."},"left_out":{"items":{"type":"string"},"type":"array","title":"Left Out","description":"What the figures don't include, in sentences, as the app says it."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor` for the next page; null on the last page."}},"type":"object","required":["id","name","currency","from_date","to_date","as_of","tables","table","columns","hidden_columns","rows","row_count","totals","figures","hidden_figures","left_out","next_cursor"],"title":"ReportRowsOut"},"ReportTable":{"properties":{"index":{"type":"integer","title":"Index","description":"Pass as `table` to read this table's rows."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"The table's heading; null when the report has one table."}},"type":"object","required":["index","title"],"title":"ReportTable"},"RiskScoreIn":{"properties":{"external_id":{"type":"string","maxLength":100,"minLength":1,"pattern":"^[\\x21-\\x7e]+$","title":"External Id","description":"Your own id for this item. Sending the same id again never makes a second one."},"score":{"type":"number","maximum":10000.0,"minimum":0.0,"title":"Score","description":"The score on your own scale, 0 to 10000, kept to two decimal places."},"level":{"type":"string","enum":["low","medium","high"],"title":"Level","description":"What the score means: low, medium or high. A high score is flagged for the people who approve risk."},"summary":{"type":"string","maxLength":500,"minLength":1,"title":"Summary","description":"What drives the score, in a line or two (up to 500 characters)."},"url":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^https://\\S+$"},{"type":"null"}],"title":"Url","description":"An https link to the full assessment in your tool (optional)."},"scored_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scored At","description":"When you scored it (ISO 8601 with a zone). Default: when it arrives."}},"additionalProperties":false,"type":"object","required":["external_id","score","level","summary"],"title":"RiskScoreIn"},"RiskScoreOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Our id for this score."},"leg_id":{"type":"string","format":"uuid","title":"Leg Id","description":"The leg it scores."},"external_id":{"type":"string","title":"External Id","description":"Your id for it, as you sent it."},"score":{"type":"number","title":"Score","description":"The score, as you sent it, to two decimal places."},"level":{"type":"string","enum":["low","medium","high"],"title":"Level","description":"low, medium or high."},"summary":{"type":"string","title":"Summary","description":"What drives the score."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Your link to the full assessment."},"scored_at":{"type":"string","format":"date-time","title":"Scored At","description":"When it was scored (UTC)."},"received_at":{"type":"string","format":"date-time","title":"Received At","description":"When it arrived (UTC)."},"superseded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Superseded At","description":"When a newer score of yours for the leg replaced it; null while it is the one shown."}},"type":"object","required":["id","leg_id","external_id","score","level","summary","url","scored_at","received_at","superseded_at"],"title":"RiskScoreOut"},"RiskScoresOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RiskScoreOut"},"type":"array","title":"Items","description":"Your scores for the leg, newest first: the current one has `superseded_at` null."}},"type":"object","required":["items"],"title":"RiskScoresOut"},"TestEvent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The delivery's id."},"type":{"type":"string","const":"test","title":"Type","description":"Always test."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the test was asked for (UTC)."},"aircraft_id":{"type":"null","title":"Aircraft Id","description":"Always null."},"operator_id":{"type":"string","format":"uuid","title":"Operator Id","description":"The operator whose change it is: your own for your own addresses; for a partner, one of the operators listed by /v1/operators."},"data":{"$ref":"#/components/schemas/TestMessage"}},"type":"object","required":["id","type","created_at","aircraft_id","operator_id","data"],"title":"TestEvent"},"TestMessage":{"properties":{"message":{"type":"string","title":"Message","description":"A line saying this is a test."}},"type":"object","required":["message"],"title":"TestMessage"},"TimeChangeOut":{"properties":{"kind":{"type":"string","title":"Kind","description":"What is counted: airframe_hours, landings, engine_hours, engine_cycles, prop_hours, apu_hours, apu_cycles or hobbs_hours. More kinds may be added: show one you don't know by its label."},"engine":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Engine","description":"The engine number (1 to 4) for engine hours and cycles, and for prop_hours the engine the propeller is on; null otherwise."},"label":{"type":"string","title":"Label","description":"A name to show, such as \"Engine 2 cycles\"."},"unit":{"type":"string","enum":["hours","count"],"title":"Unit","description":"hours (to a tenth) or count (whole numbers)."},"value":{"type":"number","title":"Value","description":"The current total."},"changed_at":{"type":"string","format":"date-time","title":"Changed At","description":"When the total last changed (UTC)."},"source":{"type":"string","enum":["manual","flight_log","import"],"title":"Source","description":"What changed it last: manual (someone typed it), flight_log (a logged flight) or import (a file import)."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"The reason given for the last change."},"changed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changed By","description":"The name of who changed it last; null when the system did."},"aircraft_id":{"type":"string","format":"uuid","title":"Aircraft Id","description":"The aircraft whose time it is."}},"type":"object","required":["kind","engine","label","unit","value","changed_at","source","reason","changed_by","aircraft_id"],"title":"TimeChangeOut"},"TimeOut":{"properties":{"kind":{"type":"string","title":"Kind","description":"What is counted: airframe_hours, landings, engine_hours, engine_cycles, prop_hours, apu_hours, apu_cycles or hobbs_hours. More kinds may be added: show one you don't know by its label."},"engine":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Engine","description":"The engine number (1 to 4) for engine hours and cycles, and for prop_hours the engine the propeller is on; null otherwise."},"label":{"type":"string","title":"Label","description":"A name to show, such as \"Engine 2 cycles\"."},"unit":{"type":"string","enum":["hours","count"],"title":"Unit","description":"hours (to a tenth) or count (whole numbers)."},"value":{"type":"number","title":"Value","description":"The current total."},"changed_at":{"type":"string","format":"date-time","title":"Changed At","description":"When the total last changed (UTC)."},"source":{"type":"string","enum":["manual","flight_log","import"],"title":"Source","description":"What changed it last: manual (someone typed it), flight_log (a logged flight) or import (a file import)."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"The reason given for the last change."},"changed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changed By","description":"The name of who changed it last; null when the system did."}},"type":"object","required":["kind","engine","label","unit","value","changed_at","source","reason","changed_by"],"title":"TimeOut"},"TimesEvent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The delivery's id. The same delivery can arrive more than once: ignore an id you have already handled."},"type":{"type":"string","const":"times.changed","title":"Type","description":"A time was set by hand or by a file import. A time moved by a logged flight comes as flight_log.* instead, never as this."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the change happened (UTC)."},"aircraft_id":{"type":"string","format":"uuid","title":"Aircraft Id","description":"The aircraft whose time it is."},"operator_id":{"type":"string","format":"uuid","title":"Operator Id","description":"The operator whose change it is: your own for your own addresses; for a partner, one of the operators listed by /v1/operators."},"data":{"$ref":"#/components/schemas/TimeChangeOut","description":"The time as the current times read returns it, with its aircraft, as it was when the first attempt was made."}},"type":"object","required":["id","type","created_at","aircraft_id","operator_id","data"],"title":"TimesEvent"},"TimesOut":{"properties":{"aircraft_id":{"type":"string","format":"uuid","title":"Aircraft Id","description":"The aircraft's id."},"tail":{"type":"string","title":"Tail","description":"The registration."},"items":{"items":{"$ref":"#/components/schemas/TimeOut"},"type":"array","title":"Items","description":"Each tracked time, in display order."}},"type":"object","required":["aircraft_id","tail","items"],"title":"TimesOut"},"TripAircraftOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The aircraft's id, as the aircraft paths use it."},"tail":{"type":"string","title":"Tail","description":"The registration, such as N123AB."}},"type":"object","required":["id","tail"],"title":"TripAircraftOut"},"TripClientOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The client's id."},"name":{"type":"string","title":"Name","description":"The client's name."}},"type":"object","required":["id","name"],"title":"TripClientOut"},"TripDetailOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The trip's id."},"number":{"type":"string","title":"Number","description":"The trip's number."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"The trip's name, when it has one."},"status":{"type":"string","enum":["option","confirmed","canceled"],"title":"Status","description":"option (held, not yet confirmed), confirmed, or canceled (only when asked for)."},"client":{"anyOf":[{"$ref":"#/components/schemas/TripClientOut"},{"type":"null"}],"description":"Who the trip is for, when set: a name and id only."},"aircraft":{"anyOf":[{"$ref":"#/components/schemas/TripAircraftOut"},{"type":"null"}],"description":"The aircraft, once one is assigned; an option may not have one yet."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"The first leg's scheduled departure (UTC); null when no legs are left."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"The last leg's scheduled arrival (UTC); null when no legs are left."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the trip was made (UTC)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the trip or anything on its legs (times, airports, FBOs, crew, passengers, services, flight logs) last changed (UTC); what `since` goes by."},"legs":{"items":{"$ref":"#/components/schemas/LegOut"},"type":"array","title":"Legs","description":"Its legs, in order."}},"type":"object","required":["id","number","title","status","client","aircraft","starts_at","ends_at","created_at","updated_at","legs"],"title":"TripDetailOut"},"TripOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The trip's id."},"number":{"type":"string","title":"Number","description":"The trip's number."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"The trip's name, when it has one."},"status":{"type":"string","enum":["option","confirmed","canceled"],"title":"Status","description":"option (held, not yet confirmed), confirmed, or canceled (only when asked for)."},"client":{"anyOf":[{"$ref":"#/components/schemas/TripClientOut"},{"type":"null"}],"description":"Who the trip is for, when set: a name and id only."},"aircraft":{"anyOf":[{"$ref":"#/components/schemas/TripAircraftOut"},{"type":"null"}],"description":"The aircraft, once one is assigned; an option may not have one yet."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"The first leg's scheduled departure (UTC); null when no legs are left."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"The last leg's scheduled arrival (UTC); null when no legs are left."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the trip was made (UTC)."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the trip or anything on its legs (times, airports, FBOs, crew, passengers, services, flight logs) last changed (UTC); what `since` goes by."},"legs":{"items":{"$ref":"#/components/schemas/LegSummaryOut"},"type":"array","title":"Legs","description":"Its legs, in order."}},"type":"object","required":["id","number","title","status","client","aircraft","starts_at","ends_at","created_at","updated_at","legs"],"title":"TripOut"},"TripsOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TripOut"},"type":"array","title":"Items","description":"Trips, earliest first; with `since`, oldest change first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor` for the next page; null on the last page."}},"type":"object","required":["items","next_cursor"],"title":"TripsOut"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VendorInvoiceIn":{"properties":{"external_id":{"type":"string","maxLength":100,"minLength":1,"pattern":"^[\\x21-\\x7e]+$","title":"External Id","description":"Your own id for this item. Sending the same id again never makes a second one."},"vendor_name":{"type":"string","maxLength":200,"minLength":1,"title":"Vendor Name","description":"Who the invoice is from."},"spent_on":{"type":"string","format":"date","title":"Spent On","description":"The invoice's date (YYYY-MM-DD)."},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency","description":"The ISO 4217 code, such as USD."},"amount":{"type":"integer","maximum":999999999.0,"minimum":1.0,"title":"Amount","description":"The total to pay, tax included, in minor units of `currency`."},"tax":{"anyOf":[{"type":"integer","maximum":999999999.0,"minimum":0.0},{"type":"null"}],"title":"Tax","description":"The tax included in `amount`, in minor units of `currency`; less than `amount`."},"lines":{"anyOf":[{"items":{"$ref":"#/components/schemas/InvoiceLineIn"},"type":"array","maxItems":30},{"type":"null"}],"title":"Lines","description":"Its items before tax, up to 30: with `tax` they add up to `amount`. Without them it waits as one line for `amount` less `tax`."},"category_hint":{"anyOf":[{"type":"string","enum":["handling","fuel","other"]},{"type":"null"}],"title":"Category Hint","description":"What kind of spend it is. The office's own matching category is suggested; they can change it."},"trip_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trip Id","description":"The trip it is for, when you know it."},"leg_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Leg Id","description":"The leg it is for, when you know it. Its trip is filled in."},"note":{"anyOf":[{"type":"string","maxLength":300,"minLength":1},{"type":"null"}],"title":"Note","description":"A short note for whoever reviews it."},"file":{"anyOf":[{"$ref":"#/components/schemas/InvoiceFileIn"},{"type":"null"}],"description":"The invoice itself: one PDF, JPEG or PNG."}},"additionalProperties":false,"type":"object","required":["external_id","vendor_name","spent_on","currency","amount"],"title":"VendorInvoiceIn","description":"A handler's or fuel vendor's invoice, sent for the office to review."},"VendorInvoiceOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The invoice's id here."},"external_id":{"type":"string","title":"External Id","description":"Your own id for it, as you sent it."},"state":{"type":"string","enum":["to_review","saved","discarded"],"title":"State","description":"to_review: waiting for the office. saved: it is an expense now. discarded: the office won't record it."},"vendor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Name","description":"Who the invoice is from."},"spent_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Spent On","description":"The invoice's date."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"The ISO 4217 code, such as USD."},"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount","description":"The total, in minor units of `currency`."},"trip_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trip Id","description":"The trip it is for, if any."},"leg_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Leg Id","description":"The leg it is for, if any."},"expense_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Expense Id","description":"The expense it became, once saved."},"received_at":{"type":"string","format":"date-time","title":"Received At","description":"When it first arrived."}},"type":"object","required":["id","external_id","state","vendor_name","spent_on","currency","amount","trip_id","leg_id","expense_id","received_at"],"title":"VendorInvoiceOut"}},"securitySchemes":{"ApiKey":{"type":"http","description":"An API key an Admin makes under Settings > API keys.","scheme":"bearer"}}},"servers":[{"url":"/api/public"}]}