{"openapi":"3.1.0","info":{"title":"iudo Partner API (Consumer)","version":"1.0.0","description":"Consumer-facing endpoints only (no admin/back-office routes)."},"servers":[{"url":"https://api.iudo.co"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/api/v1/health":{"get":{"summary":"Health check","responses":{"200":{"description":"API is healthy"}}}},"/api/v1/openapi-public.json":{"get":{"summary":"Consumer OpenAPI specification","responses":{"200":{"description":"OpenAPI JSON document (consumer endpoints only)"}}}},"/api/v1/docs/public":{"get":{"summary":"Consumer Swagger UI documentation","description":"Redirects to /api/docs/public.","responses":{"302":{"description":"Redirect to consumer Swagger UI"}}}},"/api/v1/addresses/resolve":{"post":{"summary":"Resolve an address into parcel identifiers","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"street":{"type":"string"},"number":{"type":"string"},"postcode":{"type":"string"},"city":{"type":"string"},"city_code":{"type":"string"}}}}}},"responses":{"200":{"description":"Address normalized with parcel IDs"}}}},"/api/v1/land-units/geojson":{"post":{"summary":"Build aggregated GeoJSON for an address or parcel list","description":"History is always returned in properties.history (ADU urban authorizations + DVF sales).","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"object","properties":{"label":{"type":"string"},"street":{"type":"string"},"number":{"type":"string"},"postcode":{"type":"string"},"city":{"type":"string"}}},"parcel_ids":{"type":"array","items":{"type":"string"}},"include":{"type":"array","description":"Optional data blocks to include in response. Available values: land, urbanism, buildings, real_estate.","items":{"type":"string","enum":["land","urbanism","buildings","real_estate"]}}}}}}},"responses":{"200":{"description":"GeoJSON FeatureCollection","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["FeatureCollection"]},"features":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["Feature"]},"geometry":{"description":"Parcel union geometry as GeoJSON geometry object.","oneOf":[{"type":"object"},{"type":"null"}]},"properties":{"type":"object","properties":{"history":{"type":"object","description":"Historical data block, always returned.","properties":{"urban_authorizations":{"type":"array","description":"ADU records (urban authorizations linked to parcel cadastral identifiers).","items":{"type":"object","properties":{"parcelle_id":{"type":["string","null"]},"type_dau":{"type":["string","null"]},"num_dau":{"type":["string","null"]},"etat_dau":{"type":["string","null"]},"date_reelle_autorisation":{"type":["string","null"]},"date_reelle_doc":{"type":["string","null"]},"date_reelle_daact":{"type":["string","null"]},"nature_projet_declaree":{"type":["string","null"]},"nature_projet_completee":{"type":["string","null"]},"destination_principale":{"type":["string","null"]},"superficie_terrain":{"type":["string","null"]}}}},"dvf_sales":{"type":"array","description":"DVF transaction history on selected parcels.","items":{"type":"object","properties":{"id_mutation":{"type":"string"},"id_parcelle":{"type":"string"},"date_mutation":{"type":["string","null"]},"nature_mutation":{"type":["string","null"]},"type_local":{"type":["string","null"]},"has_dependance":{"type":"boolean"},"lot_count":{"type":"integer"},"surface_reelle_bati":{"type":["number","null"]},"surface_terrain":{"type":["number","null"]},"nombre_pieces_principales":{"type":["integer","null"]},"valeur_fonciere":{"type":["number","null"]},"adresse_numero":{"type":["string","null"]},"adresse_suffixe":{"type":["string","null"]},"adresse_nom_voie":{"type":["string","null"]},"code_postal":{"type":["string","null"]},"code_commune":{"type":["string","null"]},"nom_commune":{"type":["string","null"]}}}}}}}}}}}}},"examples":{"withHistory":{"summary":"History included","value":{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Polygon","coordinates":[]},"properties":{"history":{"urban_authorizations":[{"parcelle_id":"75056000AB0123","type_dau":"DP","num_dau":"07505624V0012","etat_dau":"Accordée","date_reelle_autorisation":"2024-03-11"}],"dvf_sales":[{"id_mutation":"2024-12345","id_parcelle":"75056000AB0123","date_mutation":"2023-12-01","nature_mutation":"Vente","valeur_fonciere":520000}]}}}]}}}}}},"400":{"description":"Invalid payload"}}}},"/api/v1/chatplu/divide-land":{"post":{"summary":"Run ChatPLU V2 \"Diviser un terrain\" prompt with live parcel context","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"object","properties":{"label":{"type":"string"},"street":{"type":"string"},"number":{"type":"string"},"postcode":{"type":"string"},"city":{"type":"string"}}},"parcel_ids":{"type":"array","items":{"type":"string"}},"question":{"type":"string","description":"Optional custom prompt sent to ChatPLU V2. Defaults to \"Diviser un terrain\"."}}}}}},"responses":{"200":{"description":"Prompt metadata, quick assessment, context payload and ChatPLU V2 answer"},"400":{"description":"Invalid payload"}}}}}}