{
  "info": {
    "name": "AI Boat Buddy v1 API",
    "_postman_id": "aibb-v1-001",
    "description": "Official Postman collection for AI Boat Buddy v1 B2B API. Set your `api_key` variable, then run any request.\n\nDocs: https://api.aiboatbuddy.com/docs\nSupport: kim@aiboatbuddy.com",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {"key": "base_url", "value": "https://api.aiboatbuddy.com/v1", "type": "string"},
    {"key": "api_key", "value": "aibb_live_REPLACE_WITH_YOUR_KEY", "type": "string"}
  ],
  "auth": {
    "type": "apikey",
    "apikey": [
      {"key": "key", "value": "X-API-Key", "type": "string"},
      {"key": "value", "value": "{{api_key}}", "type": "string"},
      {"key": "in", "value": "header", "type": "string"}
    ]
  },
  "item": [
    {
      "name": "Healthz",
      "request": {
        "method": "GET",
        "url": {"raw": "{{base_url}}/healthz", "host": ["{{base_url}}"], "path": ["healthz"]},
        "description": "Health check — no auth required."
      }
    },
    {
      "name": "Valuation",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{base_url}}/valuation?brand=Beneteau&model=Oceanis 41.1&year=2018",
          "host": ["{{base_url}}"],
          "path": ["valuation"],
          "query": [
            {"key": "brand", "value": "Beneteau"},
            {"key": "model", "value": "Oceanis 41.1"},
            {"key": "year", "value": "2018"},
            {"key": "length_m", "value": "", "disabled": true},
            {"key": "region", "value": "EU", "disabled": true}
          ]
        },
        "description": "Get cross-source market valuation for a single boat model. Returns median, p25/p75 range, n_comps, and confidence level.\n\nRequired: `brand`, `model`. Optional: `year`, `length_m`, `region` (default EU)."
      }
    },
    {
      "name": "Valuation Comps",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{base_url}}/valuation/comps?brand=Beneteau&model=Oceanis 41.1&year=2018&limit=10",
          "host": ["{{base_url}}"],
          "path": ["valuation", "comps"],
          "query": [
            {"key": "brand", "value": "Beneteau"},
            {"key": "model", "value": "Oceanis 41.1"},
            {"key": "year", "value": "2018"},
            {"key": "limit", "value": "10"}
          ]
        },
        "description": "Get the underlying comparable listings used in the valuation. Anonymised (source-name removed) — price, year, length, region, listed_at, last_seen_at, freshness flag."
      }
    },
    {
      "name": "Listings Search",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{base_url}}/listings/search?brand=Beneteau&year_min=2015&year_max=2020&limit=25",
          "host": ["{{base_url}}"],
          "path": ["listings", "search"],
          "query": [
            {"key": "brand", "value": "Beneteau"},
            {"key": "model", "value": "", "disabled": true},
            {"key": "year_min", "value": "2015"},
            {"key": "year_max", "value": "2020"},
            {"key": "price_min", "value": "", "disabled": true},
            {"key": "price_max", "value": "", "disabled": true},
            {"key": "limit", "value": "25"},
            {"key": "offset", "value": "0", "disabled": true}
          ]
        },
        "description": "Search across all listings. Filter by brand, model, year range, price range. Returns paginated results with total_matching + next_offset."
      }
    },
    {
      "name": "Trends",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{base_url}}/trends?brand=Beneteau&model=Oceanis 41.1",
          "host": ["{{base_url}}"],
          "path": ["trends"],
          "query": [
            {"key": "brand", "value": "Beneteau"},
            {"key": "model", "value": "Oceanis 41.1"},
            {"key": "region", "value": "EU", "disabled": true}
          ]
        },
        "description": "Monthly price trend (up to 12 months) with median, sample-size, and 3/6/12-month change percentages."
      }
    },
    {
      "name": "Insurance PDF Report",
      "request": {
        "method": "POST",
        "header": [{"key": "Content-Type", "value": "application/json"}],
        "url": {"raw": "{{base_url}}/reports/insurance-pdf", "host": ["{{base_url}}"], "path": ["reports", "insurance-pdf"]},
        "body": {
          "mode": "raw",
          "raw": "{\n  \"brand\": \"Beneteau\",\n  \"model\": \"Oceanis 41.1\",\n  \"year\": 2018,\n  \"generated_for\": \"Your client name\"\n}"
        },
        "description": "Generate an insurance-grade valuation PDF report. Returns `report_id` + `pdf_url` (download via GET /reports/{id}.pdf)."
      }
    },
    {
      "name": "Usage",
      "request": {
        "method": "GET",
        "url": {"raw": "{{base_url}}/usage", "host": ["{{base_url}}"], "path": ["usage"]},
        "description": "Your current month's API call count, PDF count, and remaining quota."
      }
    },
    {
      "name": "Account",
      "request": {
        "method": "GET",
        "url": {"raw": "{{base_url}}/account", "host": ["{{base_url}}"], "path": ["account"]},
        "description": "Your account info: tier, account_id, key creation date, last-used timestamp."
      }
    }
  ]
}
