{
  "info": {
    "name": "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",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://app.aviondesk.com/api/public",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "<your key>",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Aircraft",
      "item": [
        {
          "name": "List aircraft",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/aircraft",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "aircraft"
              ]
            },
            "description": "The operator's active aircraft and the times each one tracks."
          },
          "response": []
        },
        {
          "name": "Current times",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/aircraft/:aircraft_id/times",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "aircraft",
                ":aircraft_id",
                "times"
              ],
              "variable": [
                {
                  "key": "aircraft_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Each tracked time's current total, and who or what changed it last."
          },
          "response": []
        },
        {
          "name": "Flight logs",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/aircraft/:aircraft_id/logs?since=&limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "aircraft",
                ":aircraft_id",
                "logs"
              ],
              "query": [
                {
                  "key": "since",
                  "value": "",
                  "description": "Only entries changed at or after this time (ISO 8601).",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Entries per page, 1 to 500.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The next_cursor of the page before.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "aircraft_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Maintenance",
      "item": [
        {
          "name": "Defects",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/aircraft/:aircraft_id/discrepancies?status=&limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "aircraft",
                ":aircraft_id",
                "discrepancies"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "",
                  "description": "open (the default): not yet cleared. cleared: fixed and signed for. all: both.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Items per page, 1 to 500.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The next_cursor of the page before.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "aircraft_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          },
          "response": []
        },
        {
          "name": "Maintenance items coming due",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/aircraft/:aircraft_id/due-items",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "aircraft",
                ":aircraft_id",
                "due-items"
              ],
              "variable": [
                {
                  "key": "aircraft_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          },
          "response": []
        },
        {
          "name": "Downtime",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/aircraft/:aircraft_id/downtime?include_past=&limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "aircraft",
                ":aircraft_id",
                "downtime"
              ],
              "query": [
                {
                  "key": "include_past",
                  "value": "",
                  "description": "Also the downtime that has ended. Off by default.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Items per page, 1 to 500.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The next_cursor of the page before.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "aircraft_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "The aircraft's current and upcoming downtime (maintenance windows), earliest start\nfirst; with `include_past`, the ended ones too. Removed downtime never shows."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Flights",
      "item": [
        {
          "name": "Scheduled flights",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/aircraft/:aircraft_id/flights?from=&to=&include_canceled=&limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "aircraft",
                ":aircraft_id",
                "flights"
              ],
              "query": [
                {
                  "key": "from",
                  "value": "",
                  "description": "The start of the range (ISO 8601 with a zone). Default: now.",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "description": "The end of the range (ISO 8601 with a zone). Default: 30 days after `from`. At most 90 days after `from`.",
                  "disabled": true
                },
                {
                  "key": "include_canceled",
                  "value": "",
                  "description": "Also the legs of canceled trips. Off by default.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Items per page, 1 to 500.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The next_cursor of the page before.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "aircraft_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Trips",
      "item": [
        {
          "name": "List trips",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/trips?from=&to=&status=&since=&limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "trips"
              ],
              "query": [
                {
                  "key": "from",
                  "value": "",
                  "description": "The start of the range (ISO 8601 with a zone). Default: now.",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "description": "The end of the range (ISO 8601 with a zone). Default: 30 days after `from`. At most 90 days after `from`.",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "description": "Which trips: option, confirmed, canceled; repeat it for more than one. Default: option and confirmed.",
                  "disabled": true
                },
                {
                  "key": "since",
                  "value": "",
                  "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`.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Items per page, 1 to 500.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The next_cursor of the page before.",
                  "disabled": true
                }
              ]
            },
            "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."
          },
          "response": []
        },
        {
          "name": "One trip",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/trips/:trip_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "trips",
                ":trip_id"
              ],
              "variable": [
                {
                  "key": "trip_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "A trip with its legs in full: FBOs, crew, passenger count, services and the time\nestimate. A canceled trip reads too (status canceled)."
          },
          "response": []
        },
        {
          "name": "List legs",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/legs?from=&to=&status=&since=&limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "legs"
              ],
              "query": [
                {
                  "key": "from",
                  "value": "",
                  "description": "The start of the range (ISO 8601 with a zone). Default: now.",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "description": "The end of the range (ISO 8601 with a zone). Default: 30 days after `from`. At most 90 days after `from`.",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "description": "Which trips: option, confirmed, canceled; repeat it for more than one. Default: option and confirmed.",
                  "disabled": true
                },
                {
                  "key": "since",
                  "value": "",
                  "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`.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Items per page, 1 to 500.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The next_cursor of the page before.",
                  "disabled": true
                }
              ]
            },
            "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."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Reports",
      "item": [
        {
          "name": "Reports",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/reports",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "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)."
          },
          "response": []
        },
        {
          "name": "Run a report",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/reports/:report_id/rows?from=&to=&group=&aircraft_id=&client_id=&table=&limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "reports",
                ":report_id",
                "rows"
              ],
              "query": [
                {
                  "key": "from",
                  "value": "",
                  "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`.",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "description": "The period's last day, included. Default: today. At most five years after `from`.",
                  "disabled": true
                },
                {
                  "key": "group",
                  "value": "",
                  "description": "How a table by period is split: month, quarter or year.",
                  "disabled": true
                },
                {
                  "key": "aircraft_id",
                  "value": "",
                  "description": "Only this aircraft, for a report that takes it.",
                  "disabled": true
                },
                {
                  "key": "client_id",
                  "value": "",
                  "description": "Only this client, for a report that takes it.",
                  "disabled": true
                },
                {
                  "key": "table",
                  "value": "",
                  "description": "Which of the report's tables. Default: the first.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Items per page, 1 to 500.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The next_cursor of the page before.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "report_id",
                  "value": "",
                  "description": "The report's id, from the reports list."
                }
              ]
            },
            "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."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Money",
      "item": [
        {
          "name": "Expenses",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/expenses?from=&to=&since=&status=&limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "expenses"
              ],
              "query": [
                {
                  "key": "from",
                  "value": "",
                  "description": "The first date to include (YYYY-MM-DD).",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "description": "The last date to include (YYYY-MM-DD).",
                  "disabled": true
                },
                {
                  "key": "since",
                  "value": "",
                  "description": "Only what changed at or after this time (ISO 8601 with a zone).",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "description": "Only receipts in this status.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Items per page, 1 to 500.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The next_cursor of the page before.",
                  "disabled": true
                }
              ]
            },
            "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."
          },
          "response": []
        },
        {
          "name": "Invoices",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices?from=&to=&since=&status=&limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices"
              ],
              "query": [
                {
                  "key": "from",
                  "value": "",
                  "description": "The first date to include (YYYY-MM-DD).",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "description": "The last date to include (YYYY-MM-DD).",
                  "disabled": true
                },
                {
                  "key": "since",
                  "value": "",
                  "description": "Only what changed at or after this time (ISO 8601 with a zone).",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "description": "Only invoices in this status, as the Invoices page shows it; unpaid is due, part_paid and overdue together.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Items per page, 1 to 500.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The next_cursor of the page before.",
                  "disabled": true
                }
              ]
            },
            "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."
          },
          "response": []
        },
        {
          "name": "One invoice",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:invoice_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":invoice_id"
              ],
              "variable": [
                {
                  "key": "invoice_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Crew",
      "item": [
        {
          "name": "List crew and staff",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/people?who=&include_deactivated=&since=&limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "people"
              ],
              "query": [
                {
                  "key": "who",
                  "value": "",
                  "description": "crew (the default): everyone with a crew position. everyone: crew and every member with a sign-in, office staff too.",
                  "disabled": true
                },
                {
                  "key": "include_deactivated",
                  "value": "",
                  "description": "Also people who were deactivated or whose sign-in here was removed (`active` false), so a sync can drop them. Off by default.",
                  "disabled": true
                },
                {
                  "key": "since",
                  "value": "",
                  "description": "Only people changed at or after this time (ISO 8601).",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Items per page, 1 to 500.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The next_cursor of the page before.",
                  "disabled": true
                }
              ]
            },
            "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."
          },
          "response": []
        },
        {
          "name": "A person's legs",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/people/:person_id/assignments?from=&to=&include_canceled=&limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "people",
                ":person_id",
                "assignments"
              ],
              "query": [
                {
                  "key": "from",
                  "value": "",
                  "description": "The start of the range (ISO 8601 with a zone). Default: now.",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "description": "The end of the range (ISO 8601 with a zone). Default: 30 days after `from`. At most 90 days after `from`.",
                  "disabled": true
                },
                {
                  "key": "include_canceled",
                  "value": "",
                  "description": "Also legs of canceled trips. Off by default.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Items per page, 1 to 500.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The next_cursor of the page before.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "person_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          },
          "response": []
        },
        {
          "name": "A person's duty and rest",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/people/:person_id/duty?from=&to=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "people",
                ":person_id",
                "duty"
              ],
              "query": [
                {
                  "key": "from",
                  "value": "",
                  "description": "The first day, in the operator's time zone. Default: today.",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "description": "The day after the last day (not included). Default: 7 days after `from`. At most 31 days after `from`.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "person_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          },
          "response": []
        },
        {
          "name": "A pilot's currency",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/people/:person_id/currency",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "people",
                ":person_id",
                "currency"
              ],
              "variable": [
                {
                  "key": "person_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Bookings",
      "item": [
        {
          "name": "Send a booking",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/bookings",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "bookings"
              ]
            },
            "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."
          },
          "response": []
        },
        {
          "name": "One booking you sent",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/bookings/:booking_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "bookings",
                ":booking_id"
              ],
              "variable": [
                {
                  "key": "booking_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Risk scores",
      "item": [
        {
          "name": "Your risk scores for a leg",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/legs/:leg_id/risk-scores",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "legs",
                ":leg_id",
                "risk-scores"
              ],
              "variable": [
                {
                  "key": "leg_id",
                  "value": "",
                  "description": "The leg's id, from the trips or legs reads."
                }
              ]
            },
            "description": "The scores you sent for the leg, newest first (the latest 100). Another tool's never show."
          },
          "response": []
        },
        {
          "name": "Send a risk score for a leg",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/legs/:leg_id/risk-scores",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "legs",
                ":leg_id",
                "risk-scores"
              ],
              "variable": [
                {
                  "key": "leg_id",
                  "value": "",
                  "description": "The leg's id, from the trips or legs reads."
                }
              ]
            },
            "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."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Vendor invoices",
      "item": [
        {
          "name": "Send a vendor invoice",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/vendor-invoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "vendor-invoices"
              ]
            },
            "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."
          },
          "response": []
        },
        {
          "name": "One vendor invoice you sent",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/vendor-invoices/:invoice_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "vendor-invoices",
                ":invoice_id"
              ],
              "variable": [
                {
                  "key": "invoice_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Where an invoice you sent stands: waiting, saved as an expense, or discarded."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Partners",
      "item": [
        {
          "name": "Operators that allow you",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/operators",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "operators"
              ]
            },
            "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."
          },
          "response": []
        },
        {
          "name": "List aircraft (partner)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/operators/:operator_id/aircraft",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "operators",
                ":operator_id",
                "aircraft"
              ],
              "variable": [
                {
                  "key": "operator_id",
                  "value": "",
                  "description": "The operator's id, from /v1/operators."
                }
              ]
            },
            "description": "The operator's active aircraft and the times each one tracks."
          },
          "response": []
        },
        {
          "name": "Current times (partner)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/operators/:operator_id/aircraft/:aircraft_id/times",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "operators",
                ":operator_id",
                "aircraft",
                ":aircraft_id",
                "times"
              ],
              "variable": [
                {
                  "key": "aircraft_id",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "operator_id",
                  "value": "",
                  "description": "The operator's id, from /v1/operators."
                }
              ]
            },
            "description": "Each tracked time's current total, and who or what changed it last."
          },
          "response": []
        },
        {
          "name": "Flight logs (partner)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/operators/:operator_id/aircraft/:aircraft_id/logs?since=&limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "operators",
                ":operator_id",
                "aircraft",
                ":aircraft_id",
                "logs"
              ],
              "query": [
                {
                  "key": "since",
                  "value": "",
                  "description": "Only entries changed at or after this time (ISO 8601).",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Entries per page, 1 to 500.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The next_cursor of the page before.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "aircraft_id",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "operator_id",
                  "value": "",
                  "description": "The operator's id, from /v1/operators."
                }
              ]
            },
            "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."
          },
          "response": []
        },
        {
          "name": "Defects (partner)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/operators/:operator_id/aircraft/:aircraft_id/discrepancies?status=&limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "operators",
                ":operator_id",
                "aircraft",
                ":aircraft_id",
                "discrepancies"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "",
                  "description": "open (the default): not yet cleared. cleared: fixed and signed for. all: both.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Items per page, 1 to 500.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The next_cursor of the page before.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "aircraft_id",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "operator_id",
                  "value": "",
                  "description": "The operator's id, from /v1/operators."
                }
              ]
            },
            "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."
          },
          "response": []
        },
        {
          "name": "Maintenance items coming due (partner)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/operators/:operator_id/aircraft/:aircraft_id/due-items",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "operators",
                ":operator_id",
                "aircraft",
                ":aircraft_id",
                "due-items"
              ],
              "variable": [
                {
                  "key": "aircraft_id",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "operator_id",
                  "value": "",
                  "description": "The operator's id, from /v1/operators."
                }
              ]
            },
            "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."
          },
          "response": []
        },
        {
          "name": "Downtime (partner)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/operators/:operator_id/aircraft/:aircraft_id/downtime?include_past=&limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "operators",
                ":operator_id",
                "aircraft",
                ":aircraft_id",
                "downtime"
              ],
              "query": [
                {
                  "key": "include_past",
                  "value": "",
                  "description": "Also the downtime that has ended. Off by default.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Items per page, 1 to 500.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The next_cursor of the page before.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "aircraft_id",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "operator_id",
                  "value": "",
                  "description": "The operator's id, from /v1/operators."
                }
              ]
            },
            "description": "The aircraft's current and upcoming downtime (maintenance windows), earliest start\nfirst; with `include_past`, the ended ones too. Removed downtime never shows."
          },
          "response": []
        },
        {
          "name": "Scheduled flights (partner)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/operators/:operator_id/aircraft/:aircraft_id/flights?from=&to=&include_canceled=&limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "operators",
                ":operator_id",
                "aircraft",
                ":aircraft_id",
                "flights"
              ],
              "query": [
                {
                  "key": "from",
                  "value": "",
                  "description": "The start of the range (ISO 8601 with a zone). Default: now.",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "description": "The end of the range (ISO 8601 with a zone). Default: 30 days after `from`. At most 90 days after `from`.",
                  "disabled": true
                },
                {
                  "key": "include_canceled",
                  "value": "",
                  "description": "Also the legs of canceled trips. Off by default.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Items per page, 1 to 500.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The next_cursor of the page before.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "aircraft_id",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "operator_id",
                  "value": "",
                  "description": "The operator's id, from /v1/operators."
                }
              ]
            },
            "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."
          },
          "response": []
        },
        {
          "name": "Your risk scores for a leg (partner)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/operators/:operator_id/legs/:leg_id/risk-scores",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "operators",
                ":operator_id",
                "legs",
                ":leg_id",
                "risk-scores"
              ],
              "variable": [
                {
                  "key": "leg_id",
                  "value": "",
                  "description": "The leg's id, from the trips or legs reads."
                },
                {
                  "key": "operator_id",
                  "value": "",
                  "description": "The operator's id, from /v1/operators."
                }
              ]
            },
            "description": "The scores you sent for the leg, newest first (the latest 100). Another tool's never show."
          },
          "response": []
        },
        {
          "name": "Send a risk score for a leg (partner)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/operators/:operator_id/legs/:leg_id/risk-scores",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "operators",
                ":operator_id",
                "legs",
                ":leg_id",
                "risk-scores"
              ],
              "variable": [
                {
                  "key": "leg_id",
                  "value": "",
                  "description": "The leg's id, from the trips or legs reads."
                },
                {
                  "key": "operator_id",
                  "value": "",
                  "description": "The operator's id, from /v1/operators."
                }
              ]
            },
            "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."
          },
          "response": []
        },
        {
          "name": "Send a vendor invoice (partner)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/operators/:operator_id/vendor-invoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "operators",
                ":operator_id",
                "vendor-invoices"
              ],
              "variable": [
                {
                  "key": "operator_id",
                  "value": "",
                  "description": "The operator's id, from /v1/operators."
                }
              ]
            },
            "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."
          },
          "response": []
        },
        {
          "name": "One vendor invoice you sent (partner)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/operators/:operator_id/vendor-invoices/:invoice_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "operators",
                ":operator_id",
                "vendor-invoices",
                ":invoice_id"
              ],
              "variable": [
                {
                  "key": "invoice_id",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "operator_id",
                  "value": "",
                  "description": "The operator's id, from /v1/operators."
                }
              ]
            },
            "description": "Where an invoice you sent stands: waiting, saved as an expense, or discarded."
          },
          "response": []
        },
        {
          "name": "Send a booking (partner)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/operators/:operator_id/bookings",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "operators",
                ":operator_id",
                "bookings"
              ],
              "variable": [
                {
                  "key": "operator_id",
                  "value": "",
                  "description": "The operator's id, from /v1/operators."
                }
              ]
            },
            "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."
          },
          "response": []
        },
        {
          "name": "One booking you sent (partner)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/operators/:operator_id/bookings/:booking_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "operators",
                ":operator_id",
                "bookings",
                ":booking_id"
              ],
              "variable": [
                {
                  "key": "booking_id",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "operator_id",
                  "value": "",
                  "description": "The operator's id, from /v1/operators."
                }
              ]
            },
            "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."
          },
          "response": []
        }
      ]
    }
  ]
}