{
  "openapi": "3.1.0",
  "info": {
    "title": "Successiekompas agentacties",
    "version": "1.2.0",
    "description": "Stateless access to the Belgian Successiekompas inheritance intake. User facts must be supplied by the user; the API does not store a case. A possible saving is available before login; the concrete approach and personal AI continuation require authenticated advice."
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "paths": {
    "/api/agent/estimate": {
      "post": {
        "operationId": "estimateSuccessiekompasSaving",
        "summary": "Get a possible saving before sign-in, without the approach",
        "description": "Use a complete returned intake state. User confirmation and processing permission are required. Omitting values returns the required input contract. The server uses the same blue kernel and quotas as the website; a valid X-Erfwijzer-Proof (v1, 18 zero bits, route/minute/body-bound SHA256) is required. No strategy, private case or payment access.",
        "parameters": [
          {
            "in": "header",
            "name": "X-Erfwijzer-Proof",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^v1\\.[0-9]{1,10}\\.[0-9a-z]{1,32}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "state",
                  "estimate"
                ],
                "properties": {
                  "state": {
                    "type": "object"
                  },
                  "estimate": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "confirmed",
                      "processing_acknowledged"
                    ],
                    "properties": {
                      "confirmed": {
                        "const": true,
                        "description": "De gebruiker bevestigde de intake en opgegeven bedragen."
                      },
                      "processing_acknowledged": {
                        "const": true,
                        "description": "De gebruiker stemt in met verwerking door Successiekompas."
                      },
                      "values": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "movable_cents",
                          "home_cents",
                          "other_property_cents"
                        ],
                        "properties": {
                          "movable_cents": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100000000000000,
                            "description": "Eurocenten, expliciet door de gebruiker opgegeven. Nul alleen als de gebruiker dat bevestigt."
                          },
                          "home_cents": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100000000000000,
                            "description": "Eurocenten, expliciet door de gebruiker opgegeven. Nul alleen als de gebruiker dat bevestigt."
                          },
                          "other_property_cents": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100000000000000,
                            "description": "Eurocenten, expliciet door de gebruiker opgegeven. Nul alleen als de gebruiker dat bevestigt."
                          },
                          "home_ownership": {
                            "type": "string",
                            "description": "Gebruik uitsluitend een teruggegeven eigendomskeuze; vraag dit voor elk bezit met waarde."
                          },
                          "movable_ownership": {
                            "type": "string",
                            "description": "Gebruik uitsluitend een teruggegeven eigendomskeuze; vraag dit voor elk bezit met waarde."
                          },
                          "other_ownership": {
                            "type": "string",
                            "description": "Gebruik uitsluitend een teruggegeven eigendomskeuze; vraag dit voor elk bezit met waarde."
                          },
                          "home_share_percent": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 99
                          },
                          "movable_share_percent": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 99
                          },
                          "other_share_percent": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 99
                          },
                          "own_age_years": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 21,
                            "maximum": 110
                          },
                          "partner_age_years": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 21,
                            "maximum": 110
                          },
                          "home_last_shared": {
                            "enum": [
                              "ja",
                              "nee"
                            ]
                          },
                          "death_date": {
                            "type": "string",
                            "format": "date"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Input contract or numeric saving teaser only"
          },
          "400": {
            "description": "Invalid or unconfirmed input"
          },
          "403": {
            "description": "Missing, invalid or replayed proof-of-work"
          },
          "429": {
            "description": "Shared kernel capacity or day budget"
          },
          "503": {
            "description": "Kernel disabled or unavailable"
          }
        }
      }
    },
    "/api/agent/flows": {
      "get": {
        "operationId": "listErfkompasFlows",
        "summary": "Read the current Successiekompas intake contract",
        "responses": {
          "200": {
            "description": "Current Successiekompas intake",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/step": {
      "post": {
        "operationId": "advanceErfkompasFlow",
        "summary": "Get the next question or a completed scan result",
        "description": "Ask the user for every missing fact. Repeat with the returned state and a newly chosen answer. Use state.intent (planning or overlijden) and state.answers; flow defaults to erven. Structured questions include answerContract from the shared form definitions; ask for every missing value. Do not infer legal facts. Never submit without the user agreeing to share their answers with Successiekompas. An intake-complete response supplies estimateInput for the optional saving teaser. This routing endpoint never calculates amounts or transfers private answers to a browser.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "state"
                ],
                "properties": {
                  "flow": {
                    "type": "string",
                    "enum": [
                      "erven"
                    ],
                    "default": "erven"
                  },
                  "state": {
                    "type": "object",
                    "description": "Successiekompas: {intent:null|planning|overlijden,answers:{}}. Use returned normalized state.",
                    "properties": {
                      "intent": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "planning",
                          "overlijden",
                          null
                        ]
                      },
                      "country": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "be",
                          null
                        ]
                      },
                      "answers": {
                        "type": "object",
                        "maxProperties": 80
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Normalized state and next question or deterministic result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid answer"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    }
  }
}
