{
  "schemaVersion": 1,
  "name": "Bilo — Cum ajungi la noi?",
  "description": "Embed train and coach search to a confirmed business address. Results and the final pedestrian leg open in Bilo.",
  "homepage": "https://bilo.ro/widget",
  "instructions": "https://bilo.ro/widget-integration.txt",
  "integration": {
    "type": "iframe",
    "accountRequired": false,
    "apiKeyRequired": false,
    "origin": "https://bilo.ro",
    "path": "/widget/embed",
    "encoding": "URLSearchParams / UTF-8 percent encoding; HTML-escape ampersands in iframe src",
    "requiredQueryParameters": [
      "business",
      "address",
      "lat",
      "lon",
      "placeSource"
    ],
    "querySchema": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "business",
        "address",
        "lat",
        "lon",
        "placeSource"
      ],
      "properties": {
        "business": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "description": "Public business name supplied by the owner"
        },
        "address": {
          "type": "string",
          "minLength": 1,
          "maxLength": 300,
          "description": "Owner-confirmed public address or honest label for an owner-selected map pin"
        },
        "lat": {
          "type": "number",
          "minimum": -90,
          "maximum": 90
        },
        "lon": {
          "type": "number",
          "minimum": -180,
          "maximum": 180
        },
        "placeSource": {
          "enum": [
            "owner",
            "google_maps_link",
            "geoapify"
          ]
        },
        "title": {
          "type": "string",
          "maxLength": 80
        },
        "mode": {
          "enum": [
            "all",
            "rail",
            "bus"
          ],
          "default": "all"
        },
        "layout": {
          "enum": [
            "card",
            "compact"
          ],
          "default": "card"
        },
        "lang": {
          "enum": [
            "ro",
            "en"
          ],
          "default": "ro"
        }
      },
      "$schema": "https://json-schema.org/draft/2020-12/schema"
    },
    "iframeAttributes": {
      "width": "100%",
      "heightByLayout": {
        "card": 620,
        "compact": 520
      },
      "allow": "geolocation https://bilo.ro",
      "referrerpolicy": "no-referrer",
      "loading": "lazy",
      "title": "Cum ajungi la noi? — Bilo",
      "style": "border:0;border-radius:16px;max-width:100%"
    },
    "hostRequirements": {
      "httpsForGeolocation": true,
      "cspFrameSrc": "https://bilo.ro",
      "permissionsPolicyIfRestricted": "geolocation=(self \"https://bilo.ro\")",
      "sandbox": "Do not add a sandbox by default. If the host requires it, preserve scripts, same-origin and user-activated new-tab navigation; verify browser geolocation separately."
    }
  },
  "workflow": [
    "Ask the owner for the public business name, street, building number, locality and county. The configurator sets the country to Romania.",
    "Have the owner enter the address fields in https://bilo.ro/widget and select the matching building result. The map displays its pin immediately. Use the generated code or explicitly supplied and confirmed coordinates.",
    "Never infer business coordinates from a city center, a similarly named business or an unrelated search result.",
    "Insert the generated iframe into the requested contact/location section. Keep width responsive. Never paste an example destination as the actual business.",
    "Preserve the visible Bilo credit and origin-scoped geolocation delegation. Explain restricted host headers to the site owner instead of silently weakening unrelated security settings.",
    "Verify at 360px and desktop widths, a manual departure search, opening results in Bilo and location-denied fallback. Request no real visitor GPS during automated integration testing."
  ],
  "privacy": {
    "visitorLocation": "Browser permission is requested only after the visitor clicks Use my location. Manual departure and Open in Bilo remain available.",
    "parentAccess": "No visitor coordinates are sent to the embedding site via postMessage.",
    "storage": "Do not store or log visitor GPS, embed it in iframe URLs or send it to an agent, analytics or a CMS. Public business coordinates are configuration data.",
    "walkingRoute": "Explicitly requested walking legs use Geoapify / OpenStreetMap. Unverified station positions do not generate a fabricated route."
  },
  "capabilities": {
    "transport": [
      "train",
      "coach"
    ],
    "resultsDestination": "Bilo",
    "lastLeg": "estimated pedestrian route from a verified mapped arrival stop",
    "localTransport": "Local bus, tram, metro and taxi services are not guaranteed; a separate local transfer may be needed.",
    "booking": "Published operator booking links or reservation phone numbers; no seat availability guarantee."
  },
  "boundaries": [
    "This is iframe integration documentation, separate from the existing Bilo HTTP v1 and MCP contracts.",
    "The configurator's widget-api geocoding and walking handlers are internal browser helpers, not a bulk geocoding service or a supported public automation API.",
    "No external JavaScript SDK, provider API key, account or payment is required to embed the widget."
  ]
}
