{
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      }
    }
  },
  "info": {
    "title": "ExportSonar Tariff API",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v1/checkout/{plan}": {
      "get": {
        "operationId": "checkout_api_v1_checkout__plan__get",
        "parameters": [
          {
            "in": "path",
            "name": "plan",
            "required": true,
            "schema": {
              "title": "Plan",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Checkout"
      }
    },
    "/api/v1/citation/export": {
      "get": {
        "operationId": "citation_export_api_v1_citation_export_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Citation Export"
      }
    },
    "/api/v1/health": {
      "get": {
        "operationId": "health_api_v1_health_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Health"
      }
    },
    "/api/v1/healthz": {
      "get": {
        "operationId": "healthz_api_v1_healthz_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Healthz"
      }
    },
    "/api/v1/hs/describe": {
      "get": {
        "description": "Return candidate HS headings for a natural-language product description.\n\nResponse shape (this docstring and ``site/api-docs.html``; the page\nrenders it)::\n\n    {\"query\": \"...\",\n     \"candidates\": [{\"hs4\",\"hs6\",\"hts\",\"description\",\n       \"heading_description\",\"chapter\",\"chapter_title\",\"general\",\n       \"special\",\"column2\",\"unit\",\"score\",\"matched_terms\",\n       \"confidence\",\n       \"justification\": {\"ruling_ids\": [\"N334695\", ...],\n                         \"ruling_links\": [{\"id\": \"N334695\",\n                           \"url\": \"https://rulings.cbp.gov/ruling/N334695\",\n                           \"date\": \"2023-08-31\"}, ...],\n                         \"ruling_urls_missing\": 0,\n                         \"ruling_reason\": \"RULINGS_CITED_FOR_HS6\",\n                         \"ruling_key\": \"848180\",\n                         \"rulings_available\": 5,\n                         \"rulings_revoked_excluded\": 0}}],\n     \"latency_ms\": \"...\", \"index_version\": \"hts-...-1228\",\n     \"index_source\": \"https://hts.usitc.gov/...\",\n     \"k\": 3, \"declined\": false,\n     \"confidence\": 0.4968, \"confidence_basis\": {\"share\", \"lead\",\n       \"excess_share\", \"window\", \"families_matched\", \"threshold\",\n       \"product_support\", \"family_lines\", \"breadth\", \"shape\"},\n     \"abstain\": false, \"abstain_reason\": null,\n     \"min_confidence\": null, \"candidates_filtered\": 0,\n     \"coverage\": {...}, \"disclaimer\": \"...\"}\n\nThe example above is not decorative: ``N334695``, its ``url``, its\n``date`` and the ``rulings_available`` count are the shipped dataset's\nown values for ``8481.80``, re-read from\n``data/cross_rulings_full.json`` by\n``TestDocstringMatchesImplementation::test_the_response_example_quotes_the_dataset_record``,\nwhich also asserts the cited ruling is the newest live one for that\nfamily. An earlier revision of this example said ``\"date\":\n\"2024-03-14\"``; the record says ``2023-08-31``. A date a buyer can only\ndisprove by checking is worse than no example -- the whole point of the\ncitation layer is that every field survives being looked up.\n\n``latency_ms`` is the ONE value written as a wildcard, because it is a\nper-request wall-clock measurement and no two calls agree on it (the\nsame reason ``scripts/hs_describe_sample.py`` declares it the only\nvolatile leaf). Every other leaf -- ``confidence`` (0.4968) included --\nis the shipped answer to ``q=brass ball valve&k=3``, pinned against a\nlive capture by\n``tests/test_hs_describe_contract_1110.py::TestDocstring::test_the_response_example_values_are_the_captured_ones``.\nAn earlier revision of this paragraph carried two numbers that no\ncapture ever produced -- one for ``confidence`` and one for\n``latency_ms`` -- the second presenting a single wall-clock measurement\nas a contract constant. Neither literal is restated here on purpose: a\nmachine-readable contract is read by code generators and by buyers\ngrepping for the value they were served, so the description must\ncontain the shipped number and no other. The pre-fix values live in\nthat test's negative controls instead, where a predicate that is always\ntrue cannot pass.\n\nRefusals never carry a partial answer -- they are ``{\"error\": \"<CODE>\"}``\nand nothing else: ``400 MISSING_PARAM`` when ``q`` is blank or absent,\n``400 INVALID_VALUE`` when ``q`` is longer than ``MAX_Q`` (256)\ncharacters or ``k`` is not an integer in ``[1, MAX_K]`` (10), and ``503\nINDEX_UNAVAILABLE`` when this deployment could not build its HTS index\n(a loud refusal rather than an empty list that would read as \"no such\nproduct\").\n\nEvery field that existed before this revision is still here, unchanged\nin name and type: the additions are ``candidates[].justification`` and\nthe four top-level ``confidence``/``confidence_basis``/``abstain``/\n``abstain_reason`` keys. ``tests/test_hs_describe_1109.py`` asserts the\nold shape as a subset of the new one.\n\nA2 (2026-11-11) added the second half of the confidence contract, which\n``docs/research/SERVICE-GAP-MATRIX-1106.md`` states as\n``candidates[0].confidence ∈ [0,1]`` plus a caller-settable bar. Three\nadditions, all backward compatible -- no existing field changed name,\ntype or meaning:\n\n  * ``candidates[].confidence`` -- every row carries one. Row 0 is the\n    top-level ``confidence`` (same number, asserted in\n    ``tests/test_confidence_threshold_1111.py``); each lower row is\n    ``confidence * row score / top score``, so the ranking's own evidence\n    ratio is what scales it. Before this, a caller iterating the rows had\n    no way to tell the second candidate from the third.\n  * ``min_confidence`` (query parameter, optional, 0-1) -- the caller's\n    own bar. When given, no row below it is returned: rows are DROPPED\n    (never re-ordered, re-scored or padded) and counted in\n    ``candidates_filtered``. Omitted, it filters nothing and the response\n    echoes ``null``, so \"no bar was applied\" stays distinguishable from\n    \"the bar passed everything\". A value outside 0-1, or not a number,\n    answers ``400 INVALID_VALUE`` -- never silently ignored, which was\n    the state of the world before this parameter existed.\n  * ``BELOW_CALLER_THRESHOLD`` -- a fifth abstention reason. It fires when\n    the top row does not clear the caller's bar. The tool's own verdict\n    outranks the caller's bar: if the answer already abstains on\n    ``CONFIDENCE_THRESHOLD``, that reason is kept, because telling a\n    caller \"your bar was the obstacle\" when the tool itself was unsure\n    would be a false attribution.\n\n``matched_terms`` is FAMILY vocabulary, not line vocabulary: it lists the\nquery terms that carried the match for the candidate's HS4 family, so a\nterm can be absent from the cited line's own ``description``. The example\nabove shows it -- ``8481.80.90.05`` reads \"Solenoid valves\" while\n``matched_terms`` is ``[\"ball\", \"valve\"]``, because sibling lines under\n8481 (``8481.80.10.85`` \"Ball type\") supply \"ball\". Measured on the\n98-row eval fixture: 58 of 363 matched-term instances are not explained\nby the candidate's own line or heading text. The rates, ``hts`` and\n``description`` always belong to the quoted line; only the terms are\nfamily-scoped. (Re-measured 2026-11-12 twice: the count moved 55 -> 58\nwhen the heading corpus was completed -- see\n``scripts/build_hts_data.py::heading_texts`` -- and the denominator moved\n362 -> 363 when the buyer-phrase table started answering \"air fryer\",\n\"plastic bag\", \"power drill\" and \"microwave oven\" with a heading they\nwere previously missing, which adds one candidate whose terms are\nfamily-scoped. The unexplained count itself did not move.)\n\n``confidence`` is in [0,1] and its scale is documented at\n``hs_describe_justify.CONFIDENCE_THRESHOLD``: the ranking's shape\n(``0.5 * excess + 0.5 * lead`` over the FULL ranked family-score list,\nnever over the caller's ``k`` slice; only its first\n``CONFIDENCE_WINDOW`` (5) entries enter the arithmetic) multiplied by\nproduct support, multiplied -- when exactly one family matched -- by a\nbreadth factor over that family's line count. A query that names no\nproduct scores 0.0, and an answer below ``CONFIDENCE_THRESHOLD`` (0.15)\nabstains instead of being presented as a match.\n\nOne matched family takes ``CONFIDENCE_SINGLE_FAMILY`` (1.0) for the shape\nhalf, because with no runner-up the shape inputs have no internal\ncomparison to make. That 1.0 used to be the whole answer and made\n``almonds`` a certainty at 2008 (hs-abstain-1109, 2026-11-09); what keeps\nit honest now is the breadth factor\n``FAMILY_BREADTH_REF / (FAMILY_BREADTH_REF + family_lines)``, which asks\nhow much of the schedule the query actually pinned down. At the shipped\n``FAMILY_BREADTH_REF`` of 17, ``almonds`` (2008 has 105 lines) scores\n0.14 and abstains, ``toaster`` (8516, 50 lines, its own line reads\n\"Toasters\") scores 0.25 and answers, and ``shampoo`` (3305, 4 lines)\nscores 0.81 and answers as a strong match. The neutral-0.5 shape variant\nwas tried earlier and reverted, but NOT for the reason an earlier\nrevision of this sentence gave (\"measured worse on both AUC and\nwrong-answers-caught\"): re-measured 2026-11-12 over the same 92\nanswerable fixture rows it catches the SAME 8 of 14 wrong answers and\nonly adds one flagged correct answer (16 of 78 vs 15). What actually\nrejects it is that halving the shape half pushes real products under the\nthreshold -- ``toaster`` 0.2537 -> 0.1269, ``photocopier`` 0.2656 ->\n0.1328, ``stethoscope`` 0.2576 -> 0.1288 all start abstaining, and\n``toaster`` is one of the 13 queries ``scripts/hs_confidence_gate.py``\nrequires to answer. The measurement table lives at that constant\n(``hs_describe_justify.CONFIDENCE_SINGLE_FAMILY``), which is the single\nplace either copy is derived from.\n\nThree abstention shapes that still return candidates, each with a named\nreason -- preceded by the two empty-list declines:\n\n  * ``declined: true`` + empty ``candidates`` -- the schedule's\n    vocabulary cannot see the query (``NO_SCHEDULE_VOCABULARY``) or the\n    head noun is unknown while most of the query matched nothing\n    (``HEAD_NOUN_UNKNOWN``). Rendered by the page as \"no match\" instead\n    of a confident wrong heading. (An earlier version of this docstring\n    attributed every decline to \"none of the query's content words are\n    in the schedule\"; that was only one of the two gates, which is why\n    ``abstain_reason`` now names which one fired.)\n  * ``declined: false`` + ``abstain: true`` +\n    ``NO_PRODUCT_IN_QUERY`` -- the query names no product at all, so no\n    heading can be stood behind however clean the ranking looks.\n    Candidates are returned -- ``min(k, families_matched)`` of them, so\n    at most ``k`` and never a padded list (``batch`` at ``k=10`` returns\n    one) -- whenever the schedule matched anything at all. Two ways in,\n    both re-measurable against the shipped vocabularies: a generic term\n    (\"item\", \"merchandise\", \"goods\") and a MATERIAL word with no product\n    noun (\"steel\", \"plastic\", \"cotton\", \"stainless steel\") --\n    ``Index.product_terms`` drops those on the same footing as\n    :data:`GENERIC_TERMS`.\n\n    The part of this a caller can check per request is not a membership\n    count but the promise behind it: a query made only of such words is\n    never ANSWERED. It takes ``NO_PRODUCT_IN_QUERY`` when the schedule\n    recognises the words and declines one gate earlier as\n    ``NO_SCHEDULE_VOCABULARY`` when it does not. HOW THE SHIPPED LISTS\n    SPLIT between those two states is a fact about the data, not about\n    this route, and it moves whenever the vocabulary moves -- so no\n    figure for it is quoted here. A number in this paragraph would be a\n    promise this document cannot keep: the split was measured at two\n    different values on two trees the same week (the plural-stem\n    question in :meth:`hs_describe_index.Index.product_terms` moves it by\n    three words), and a buyer's code generator cannot act on either.\n    What a caller CAN act on, and what the two test modules named below\n    re-derive from the shipped lists on every run, is the invariant: no\n    vocabulary-only query is ever ANSWERED, and the answer carries\n    ``min(k, families_matched)`` rows and no padding.\n  * ``declined: false`` + ``abstain: true`` + ``AMBIGUOUS_FAMILY`` -- one\n    heading matched and it is broad enough that the LINE inside it is\n    undetermined (``almonds``: 2008 is defensible, 0802 is defensible,\n    and the corpus cannot see 0802 because its lines read \"In shell\" /\n    \"Shelled\"). The buyer's next question is \"which preparation or\n    material variant?\", which is why this word is not ``LOW_CONFIDENCE``.\n  * ``declined: false`` + ``abstain: true`` + ``LOW_CONFIDENCE`` --\n    several FAMILIES matched (``families_matched >= 2``, measured 2 to\n    100 over the ``LOW_CONFIDENCE`` answers of the 98-row fixture -- over\n    all answers with at least two families matched the same fixture\n    spans 2 to 102, so the figure is a fact about this answer shape, not\n    about the fixture) but\n    ``confidence`` is below\n    ``CONFIDENCE_THRESHOLD``, i.e. the ranking cannot separate them.\n    The scope words are load-bearing: measured 2026-11-11, the 94\n    answered fixture rows span 1 to 102, not 2 to 102, because nine of\n    them match exactly one family (``wireless earbuds``, ``airpods``,\n    ``sunglasses``, ``shampoo``, ``padlock``, ``toaster``,\n    ``deodorant``, ``sunscreen``, ``almonds``). An earlier revision said\n    \"the same fixture's range over ALL answers is 2 to 100\", which is\n    false as written; the range is 1 to 102 over all answers and 2 to\n    102 over the ``families_matched >= 2`` answers this bullet is about.\n    (Re-measured 2026-11-12 after the heading corpus was completed: the\n    upper bound moved 100 -> 102 and the LOW_CONFIDENCE lower bound\n    97 -> 100, because the recovered heading text adds matches to\n    families that previously had no heading field at all.)\n    \"Several\" is a fact about the RANKING, not about the returned list:\n    the response carries ``k`` candidates, so at ``k=1`` a\n    ``LOW_CONFIDENCE`` answer ships one row (measured 24 of 24 such\n    calls at ``k=1``). The candidates are NOT dropped: they are the only\n    evidence the tool has, and hiding them would delete the reason to\n    look at the page at all.\n\nA candidate with no precedent returns ``ruling_ids: []`` plus a reason\n(``NO_RULING_FOR_HS6`` / ``RULINGS_ALL_REVOKED`` /\n``RULING_SOURCE_UNAVAILABLE``) -- never an empty array with no\nexplanation. When ids ARE present, ``ruling_links`` carries the same\nentries in the same order with a resolvable ``url`` from the dataset's\nown ``source_url`` (never synthesised); ``ruling_urls_missing`` counts\nany entry whose record had none.",
        "operationId": "hs_describe_api_v1_hs_describe_get",
        "parameters": [
          {
            "description": "Product description. Blank or absent answers 400 MISSING_PARAM; over 256 characters answers 400 INVALID_VALUE.",
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "maxLength": 256,
              "title": "Q",
              "type": "string"
            }
          },
          {
            "description": "How many candidates to return. Outside 1-10, or not an integer, answers 400 INVALID_VALUE.",
            "in": "query",
            "name": "k",
            "required": false,
            "schema": {
              "default": 3,
              "maximum": 10,
              "minimum": 1,
              "title": "K",
              "type": "integer"
            }
          },
          {
            "description": "Your own confidence bar, 0-1. When given, no candidate below it is returned (rows are dropped and counted in candidates_filtered); if the top row does not clear it the response abstains with BELOW_CALLER_THRESHOLD. Omitted, it filters nothing and the response echoes null. Outside 0-1, or not a number, answers 400 INVALID_VALUE.",
            "in": "query",
            "name": "min_confidence",
            "required": false,
            "schema": {
              "maximum": 1,
              "minimum": 0,
              "title": "Min Confidence",
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "MISSING_PARAM when q is blank or absent; INVALID_VALUE when q is over 256 characters, k is not an integer in 1-10, or min_confidence is not a number in 0-1."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "INDEX_UNAVAILABLE -- this deployment could not build its HTS index. A loud refusal rather than an empty list that would read as 'no such product'."
          }
        },
        "summary": "Hs Describe"
      }
    },
    "/api/v1/lookup": {
      "get": {
        "description": "Prefix-first HS search.\n\n``limit`` is declared as a string on purpose (api-contract audit\n2026-10-29): typed as int, FastAPI rejected ``limit=abc`` with its own\n422 ``{\"detail\": [...]}`` body, which matches neither the documented\nerror table nor the site-wide ``{\"error\": CODE}`` convention every\nother rejection on this API uses. Parsing here keeps one error shape\nfor the whole surface: blank/invalid limit -> 400 INVALID_VALUE.",
        "operationId": "lookup_api_v1_lookup_get",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "title": "Q",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": "10",
              "title": "Limit",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Lookup"
      }
    },
    "/api/v1/nonus-tariff": {
      "get": {
        "operationId": "nonus_tariff_route_api_v1_nonus_tariff_get",
        "parameters": [
          {
            "in": "query",
            "name": "dest",
            "required": false,
            "schema": {
              "title": "Dest",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "hs",
            "required": false,
            "schema": {
              "title": "Hs",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "value",
            "required": false,
            "schema": {
              "title": "Value",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Nonus Tariff Route"
      }
    },
    "/api/v1/notify-me": {
      "post": {
        "operationId": "notify_me_api_v1_notify_me_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Notify Me"
      }
    },
    "/api/v1/remedies": {
      "get": {
        "description": "Trade-remedy cases whose scope references this HTS code or family.\n\n``hs`` takes a 4-, 6-, 8- or 10-digit code (dots optional). The code is\nmatched against the index at whichever depth the two share -- an\n8-digit code reaches the 6-digit subheading the AD/CVD order was filed\nagainst, and a 4-digit heading reaches both tiers -- so a caller can\npass the code they actually hold instead of first truncating it. Every\nresult names ``match_granularity`` (the depth it was matched at) and\n``matched_key`` (the key that produced it); the envelope repeats the\ndepths present as ``matched_granularities``. A code with no case in\nscope answers 200 with ``count: 0`` and an empty ``matched_granularities``\n-- an empty list is a real answer, never a refusal.",
        "operationId": "api_remedies_api_v1_remedies_get",
        "parameters": [
          {
            "description": "4-, 6-, 8- or 10-digit HTS code or prefix, dots optional (7208, 7208.40, 7208.40.30, 7208.40.3000). Matched at the depth the code and the index share, so an 8- or 10-digit code also reaches a case filed against its 6-digit subheading. Absent or unusable answers 400 BAD_HS.",
            "in": "query",
            "name": "hs",
            "required": true,
            "schema": {
              "default": "",
              "title": "Hs",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "BAD_HS -- the hs parameter is absent, is not all digits after stripping dots/spaces, is not 4/6/8/10 digits long, or names no HS chapter."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "REMEDIES_UNAVAILABLE -- this deployment could not build its AD/CVD index. A loud refusal rather than an empty list that would read as 'no case covers this code'."
          }
        },
        "summary": "Api Remedies"
      }
    },
    "/api/v1/subscribe": {
      "post": {
        "operationId": "subscribe_api_v1_subscribe_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Subscribe"
      }
    },
    "/api/v1/tariff": {
      "get": {
        "operationId": "tariff_api_v1_tariff_get",
        "parameters": [
          {
            "in": "query",
            "name": "hs",
            "required": false,
            "schema": {
              "title": "Hs",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "origin",
            "required": false,
            "schema": {
              "title": "Origin",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "value",
            "required": false,
            "schema": {
              "title": "Value",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "qty",
            "required": false,
            "schema": {
              "title": "Qty",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "unit",
            "required": false,
            "schema": {
              "title": "Unit",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dest",
            "required": false,
            "schema": {
              "title": "Dest",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "freight",
            "required": false,
            "schema": {
              "title": "Freight",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "insurance",
            "required": false,
            "schema": {
              "title": "Insurance",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "title": "Mode",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "as_of",
            "required": false,
            "schema": {
              "title": "As Of",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Tariff"
      }
    },
    "/api/v1/tariff/batch": {
      "post": {
        "operationId": "tariff_batch_api_v1_tariff_batch_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Tariff Batch"
      }
    },
    "/api/v1/tariff/reverse": {
      "get": {
        "operationId": "tariff_reverse_api_v1_tariff_reverse_get",
        "parameters": [
          {
            "in": "query",
            "name": "hs",
            "required": false,
            "schema": {
              "title": "Hs",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "origin",
            "required": false,
            "schema": {
              "title": "Origin",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "paid",
            "required": false,
            "schema": {
              "title": "Paid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "basis",
            "required": false,
            "schema": {
              "title": "Basis",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "qty",
            "required": false,
            "schema": {
              "title": "Qty",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "unit",
            "required": false,
            "schema": {
              "title": "Unit",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Tariff Reverse"
      }
    },
    "/api/v1/trade-flow": {
      "get": {
        "operationId": "api_trade_flow_api_v1_trade_flow_get",
        "parameters": [
          {
            "in": "query",
            "name": "hs",
            "required": false,
            "schema": {
              "default": "",
              "title": "Hs",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "month",
            "required": false,
            "schema": {
              "default": "",
              "title": "Month",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "flow",
            "required": false,
            "schema": {
              "default": "imports",
              "title": "Flow",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Api Trade Flow"
      }
    },
    "/api/v1/trade-flow/origins.csv": {
      "get": {
        "description": "The Pro export. 401 anonymous / 403 free / 200 CSV for Pro.",
        "operationId": "api_trade_flow_origins_csv_api_v1_trade_flow_origins_csv_get",
        "parameters": [
          {
            "in": "query",
            "name": "hs",
            "required": false,
            "schema": {
              "default": "",
              "title": "Hs",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "month",
            "required": false,
            "schema": {
              "default": "",
              "title": "Month",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "flow",
            "required": false,
            "schema": {
              "default": "imports",
              "title": "Flow",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Api Trade Flow Origins Csv"
      }
    },
    "/api/v1/usage": {
      "get": {
        "description": "Usage-dashboard MVP: balance + recent metered calls for one key.",
        "operationId": "usage_api_v1_usage_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Usage"
      }
    }
  }
}
