{
 "info": {
  "name": "Immobrille API v1",
  "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
  "description": "Doku: https://www.immobrille.ch/developers"
 },
 "variable": [
  {
   "key": "baseUrl",
   "value": "https://www.immobrille.ch/api/v1"
  },
  {
   "key": "apiKey",
   "value": "sk_test_…"
  },
  {
   "key": "tenantRef",
   "value": "makler-123"
  }
 ],
 "item": [
  {
   "name": "Konto",
   "item": [
    {
     "name": "Key prüfen",
     "request": {
      "method": "GET",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/me",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "me"
       ],
       "variable": []
      },
      "description": ""
     }
    }
   ]
  },
  {
   "name": "Projekt-Websites",
   "item": [
    {
     "name": "Projektseiten auflisten",
     "request": {
      "method": "GET",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       },
       {
        "key": "X-Tenant-Ref",
        "value": "{{tenantRef}}",
        "disabled": true
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/sites",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "sites"
       ],
       "variable": []
      },
      "description": ""
     }
    },
    {
     "name": "Projektseite anlegen",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       },
       {
        "key": "Content-Type",
        "value": "application/json"
       },
       {
        "key": "X-Tenant-Ref",
        "value": "{{tenantRef}}",
        "disabled": true
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/sites",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "sites"
       ],
       "variable": []
      },
      "body": {
       "mode": "raw",
       "raw": "{\n  \"name\": \"Wohnen am Bach\",\n  \"slug\": \"wohnen-am-bach\",\n  \"publish\": false,\n  \"content\": {\n    \"layout\": \"modern\",\n    \"headline\": \"Sechs Wohnungen am Dorfbach.\",\n    \"eyebrow\": \"Bachstrasse 4, 5600 Lenzburg\",\n    \"heroImage\": \"https://example.ch/bilder/hero.jpg\",\n    \"intro\": {\n      \"title\": \"Ruhig wohnen im Grünen\",\n      \"text\": \"Sechs Eigentumswohnungen mit Garten oder Terrasse.\",\n      \"cta\": {\n        \"label\": \"Wohnungen ansehen\",\n        \"href\": \"#wohnungen\"\n      }\n    },\n    \"inquiry\": {\n      \"title\": \"Interesse?\",\n      \"to\": \"verkauf@makler.ch\"\n    }\n  }\n}",
       "options": {
        "raw": {
         "language": "json"
        }
       }
      },
      "description": "Startet mit der Immobrille-Vorlage; mitgegebene `content`-Felder überschreiben die Vorlage. Mit `publish:true` sofort online."
     }
    },
    {
     "name": "Projektseite abrufen (inkl. Inhalt)",
     "request": {
      "method": "GET",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/sites/:id",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "sites",
        ":id"
       ],
       "variable": [
        {
         "key": "id",
         "value": ""
        }
       ]
      },
      "description": ""
     }
    },
    {
     "name": "Projektseite ändern oder veröffentlichen",
     "request": {
      "method": "PATCH",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/sites/:id",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "sites",
        ":id"
       ],
       "variable": [
        {
         "key": "id",
         "value": ""
        }
       ]
      },
      "description": "`content` wird mit dem bestehenden Inhalt zusammengeführt (oberste Ebene). `status: published` stellt die Seite online, `draft` nimmt sie offline."
     }
    },
    {
     "name": "Projektseite löschen",
     "request": {
      "method": "DELETE",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/sites/:id",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "sites",
        ":id"
       ],
       "variable": [
        {
         "key": "id",
         "value": ""
        }
       ]
      },
      "description": ""
     }
    }
   ]
  },
  {
   "name": "Video-Rundgänge",
   "item": [
    {
     "name": "Video-Rundgang bestellen",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       },
       {
        "key": "Content-Type",
        "value": "application/json"
       },
       {
        "key": "X-Tenant-Ref",
        "value": "{{tenantRef}}",
        "disabled": true
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/videos",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "videos"
       ],
       "variable": []
      },
      "body": {
       "mode": "raw",
       "raw": "{\n  \"reference\": \"INS-4711\",\n  \"source\": {\n    \"photos\": [\n      \"https://example.ch/1.jpg\",\n      \"https://example.ch/2.jpg\"\n    ]\n  },\n  \"template\": \"classic\"\n}",
       "options": {
        "raw": {
         "language": "json"
        }
       }
      },
      "description": ""
     }
    },
    {
     "name": "Status und Ergebnis",
     "request": {
      "method": "GET",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/videos/:jobId",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "videos",
        ":jobId"
       ],
       "variable": [
        {
         "key": "jobId",
         "value": ""
        }
       ]
      },
      "description": ""
     }
    }
   ]
  },
  {
   "name": "Virtual Staging",
   "item": [
    {
     "name": "Raum einrichten lassen",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       },
       {
        "key": "Content-Type",
        "value": "application/json"
       },
       {
        "key": "X-Tenant-Ref",
        "value": "{{tenantRef}}",
        "disabled": true
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/staging",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "staging"
       ],
       "variable": []
      },
      "body": {
       "mode": "raw",
       "raw": "{\n  \"imageUrl\": \"https://example.ch/wohnzimmer-leer.jpg\",\n  \"roomType\": \"wohnen\",\n  \"style\": \"skandinavisch\",\n  \"reference\": \"OBJ-12-WZ\"\n}",
       "options": {
        "raw": {
         "language": "json"
        }
       }
      },
      "description": "Liefert ein eingerichtetes Bild und automatisch einen Vorher/Nachher-Vergleich. Ergebnis per Webhook `staging.completed` oder Abfrage."
     }
    },
    {
     "name": "Letzte Staging-Aufträge",
     "request": {
      "method": "GET",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/staging",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "staging"
       ],
       "variable": []
      },
      "description": ""
     }
    },
    {
     "name": "Status und Ergebnis",
     "request": {
      "method": "GET",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/staging/:id",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "staging",
        ":id"
       ],
       "variable": [
        {
         "key": "id",
         "value": ""
        }
       ]
      },
      "description": ""
     }
    }
   ]
  },
  {
   "name": "Visualisierung",
   "item": [
    {
     "name": "Visualisierung bestellen",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       },
       {
        "key": "Content-Type",
        "value": "application/json"
       },
       {
        "key": "X-Tenant-Ref",
        "value": "{{tenantRef}}",
        "disabled": true
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/visualizations",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "visualizations"
       ],
       "variable": []
      },
      "body": {
       "mode": "raw",
       "raw": "{\n  \"imageUrl\": \"https://example.ch/ansicht-sued.pdf.png\",\n  \"view\": \"exterior\",\n  \"style\": \"warmes Abendlicht\",\n  \"reference\": \"HAUS-4\"\n}",
       "options": {
        "raw": {
         "language": "json"
        }
       }
      },
      "description": "Aus Plan, Ansicht, Skizze oder Foto entsteht ein realistisches Bild. `view` = exterior oder interior."
     }
    },
    {
     "name": "Letzte Visualisierungs-Aufträge",
     "request": {
      "method": "GET",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/visualizations",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "visualizations"
       ],
       "variable": []
      },
      "description": ""
     }
    },
    {
     "name": "Status und Ergebnis",
     "request": {
      "method": "GET",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/visualizations/:id",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "visualizations",
        ":id"
       ],
       "variable": [
        {
         "key": "id",
         "value": ""
        }
       ]
      },
      "description": ""
     }
    }
   ]
  },
  {
   "name": "Vorher/Nachher",
   "item": [
    {
     "name": "Vorher/Nachher-Vergleich erstellen",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       },
       {
        "key": "X-Tenant-Ref",
        "value": "{{tenantRef}}",
        "disabled": true
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/comparisons",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "comparisons"
       ],
       "variable": []
      },
      "description": "Zwei Bilder (z. B. vor/nach Renovation oder Staging) als Schieberegler zum Einbetten per iframe."
     }
    },
    {
     "name": "Vergleich abrufen",
     "request": {
      "method": "GET",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/comparisons/:id",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "comparisons",
        ":id"
       ],
       "variable": [
        {
         "key": "id",
         "value": ""
        }
       ]
      },
      "description": ""
     }
    },
    {
     "name": "Vergleich löschen",
     "request": {
      "method": "DELETE",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/comparisons/:id",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "comparisons",
        ":id"
       ],
       "variable": [
        {
         "key": "id",
         "value": ""
        }
       ]
      },
      "description": ""
     }
    }
   ]
  },
  {
   "name": "Bewertung",
   "item": [
    {
     "name": "Indikative Bewertung",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       },
       {
        "key": "Content-Type",
        "value": "application/json"
       },
       {
        "key": "X-Tenant-Ref",
        "value": "{{tenantRef}}",
        "disabled": true
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/valuations",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "valuations"
       ],
       "variable": []
      },
      "body": {
       "mode": "raw",
       "raw": "{\n  \"reference\": \"BEW-1\",\n  \"property\": {\n    \"address\": {\n      \"zip\": \"5600\",\n      \"city\": \"Lenzburg\"\n    },\n    \"type\": \"apartment\",\n    \"livingArea\": 112,\n    \"rooms\": 4.5,\n    \"buildYear\": 2016\n  },\n  \"options\": {\n    \"report\": true\n  }\n}",
       "options": {
        "raw": {
         "language": "json"
        }
       }
      },
      "description": ""
     }
    }
   ]
  },
  {
   "name": "Leads",
   "item": [
    {
     "name": "Anfragen abrufen",
     "request": {
      "method": "GET",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/leads",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "leads"
       ],
       "variable": []
      },
      "description": "Anfragen aus Ihren Projektseiten und Funnels, neueste zuerst. Für Echtzeit zusätzlich Webhook `lead.created`."
     }
    },
    {
     "name": "Eine Anfrage",
     "request": {
      "method": "GET",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/leads/:id",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "leads",
        ":id"
       ],
       "variable": [
        {
         "key": "id",
         "value": ""
        }
       ]
      },
      "description": ""
     }
    }
   ]
  },
  {
   "name": "Marktplatz & 3D",
   "item": [
    {
     "name": "Möbel und Materialien",
     "request": {
      "method": "GET",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/marketplace/products",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "marketplace",
        "products"
       ],
       "variable": []
      },
      "description": ""
     }
    },
    {
     "name": "Ein Produkt",
     "request": {
      "method": "GET",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/marketplace/products/:id",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "marketplace",
        "products",
        ":id"
       ],
       "variable": [
        {
         "key": "id",
         "value": ""
        }
       ]
      },
      "description": ""
     }
    },
    {
     "name": "Einrichtungs-Anfrage senden",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/marketplace/inquiries",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "marketplace",
        "inquiries"
       ],
       "variable": []
      },
      "description": "Kunde fragt Produkte an; Immobrille leitet an die Händler weiter."
     }
    },
    {
     "name": "3D-Rundgänge",
     "request": {
      "method": "GET",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/scenes",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "scenes"
       ],
       "variable": []
      },
      "description": ""
     }
    },
    {
     "name": "Einrichtung eines 3D-Rundgangs + Einbett-Code",
     "request": {
      "method": "GET",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/scenes/:slug",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "scenes",
        ":slug"
       ],
       "variable": [
        {
         "key": "slug",
         "value": ""
        }
       ]
      },
      "description": ""
     }
    }
   ]
  },
  {
   "name": "Webhooks",
   "item": [
    {
     "name": "Registrierte Endpoints",
     "request": {
      "method": "GET",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/webhooks",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "webhooks"
       ],
       "variable": []
      },
      "description": ""
     }
    },
    {
     "name": "Endpoint registrieren",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/webhooks",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "webhooks"
       ],
       "variable": []
      },
      "description": "Das `secret` wird nur in dieser Antwort ausgegeben – sicher speichern."
     }
    },
    {
     "name": "Endpoint entfernen",
     "request": {
      "method": "DELETE",
      "header": [
       {
        "key": "Authorization",
        "value": "Bearer {{apiKey}}"
       }
      ],
      "url": {
       "raw": "{{baseUrl}}/webhooks/:id",
       "host": [
        "{{baseUrl}}"
       ],
       "path": [
        "webhooks",
        ":id"
       ],
       "variable": [
        {
         "key": "id",
         "value": ""
        }
       ]
      },
      "description": ""
     }
    }
   ]
  }
 ]
}