{
  "openapi": "3.1.0",
  "info": {
    "title": "Mandate Office REST API",
    "version": "0.3.20",
    "summary": "Read-only EU law links, company register lookups and formation guides.",
    "description": "Read-only lookups on official EU and national sources: law links, company registers of the 27 EU states, formation guides and the Mandate Office catalogue. Free during beta, no API key. No legal advice. Also over MCP: https://mandateoffice.com/mcp",
    "contact": {
      "name": "Mandate Office (Nukehive OÜ)",
      "email": "info@mandateoffice.com",
      "url": "https://mandateoffice.com/"
    },
    "termsOfService": "https://mandateoffice.com/terms/"
  },
  "servers": [
    {
      "url": "https://mandateoffice.com",
      "description": "Production"
    }
  ],
  "security": [],
  "externalDocs": {
    "description": "llms.txt",
    "url": "https://mandateoffice.com/llms.txt"
  },
  "paths": {
    "/api/law": {
      "get": {
        "operationId": "findLaw",
        "summary": "Find EU or national laws",
        "description": "Find EU or national legislation by title words, abbreviation or number. Returns official links (EUR-Lex/ELI or the national portal), title, date and in-force status where the source states it.",
        "responses": {
          "200": {
            "description": "JSON result. Every data item carries source_url and retrieved_at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Country search not supported yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Official source unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error (bad parameter or unknown path)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Title words, abbreviation or number, e.g. 'general data protection', '2016/679', 'GmbHG'.",
            "schema": {
              "type": "string"
            },
            "example": "GmbHG"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "EU (default), or an EU member state code or name in any language (DE, Germany, Deutschland). GB or UK: legislation.gov.uk. US and other non-EU countries return the official portals.",
            "schema": {
              "type": "string"
            },
            "example": "DE"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "EU only: two-letter language of title and link, default en.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1-25, default 10.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25
            }
          },
          {
            "name": "in_force_only",
            "in": "query",
            "required": false,
            "description": "Default true. Set false to include repealed acts.",
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    },
    "/api/law/{id}": {
      "get": {
        "operationId": "getLawLink",
        "summary": "Get one act by id",
        "description": "Resolve one act id to its official links, title and in-force status. Accepts CELEX (32016R0679), a popular EU name (GDPR), ELI, BOE id, de:<abbreviation> (de:GmbHG), uk:ukpga/2006/46 or a national id from findLaw. URL-encode the id.",
        "responses": {
          "200": {
            "description": "JSON result. Every data item carries source_url and retrieved_at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Act not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Official source unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error (bad parameter or unknown path)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Act id, e.g. 32016R0679, de:GmbHG, BOE-A-2015-10566 (URL-encoded).",
            "schema": {
              "type": "string"
            },
            "example": "de:GmbHG"
          },
          {
            "name": "article",
            "in": "query",
            "required": false,
            "description": "Optional article or section, e.g. '§ 71', '647', '1240'.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "EU only: two-letter language, default en.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "transposition",
            "in": "query",
            "required": false,
            "description": "EU directives: true for all national measures, or a country code.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/case-law": {
      "get": {
        "operationId": "findCaseLaw",
        "summary": "Find court decisions",
        "description": "Court decisions with official links and ECLI: EU Court of Justice and General Court, NL by ECLI, FR Cour de cassation, DE federal courts; GB returns a Find Case Law search link. No legal advice.",
        "responses": {
          "200": {
            "description": "JSON result. Every data item carries source_url and retrieved_at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Official source unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error (bad parameter or unknown path)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Case name or subject words, case number (C-131/12) or ECLI.",
            "schema": {
              "type": "string"
            },
            "example": "C-131/12"
          },
          {
            "name": "jurisdiction",
            "in": "query",
            "required": false,
            "description": "EU (default), NL, FR, DE or GB. Codes or names.",
            "schema": {
              "type": "string"
            },
            "example": "EU"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1-25, default 10.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25
            }
          }
        ]
      }
    },
    "/api/sources": {
      "get": {
        "operationId": "listSources",
        "summary": "List official legal sources",
        "description": "Official legislation portals, registers, APIs and authorities for the EU or one member state, with verified URLs and reuse licences.",
        "responses": {
          "200": {
            "description": "JSON result. Every data item carries source_url and retrieved_at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error (bad parameter or unknown path)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "EU or an EU member state code or name. Omit for all.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/sources/{country}": {
      "get": {
        "operationId": "listSourcesForCountry",
        "summary": "Official legal sources of one country",
        "description": "Official legislation portals, registers, APIs and authorities for one member state or the EU, with verified URLs and reuse licences.",
        "responses": {
          "200": {
            "description": "JSON result. Every data item carries source_url and retrieved_at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "404": {
            "description": "Unknown country",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error (bad parameter or unknown path)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "country",
            "in": "path",
            "required": true,
            "description": "EU or an EU member state ISO code.",
            "schema": {
              "type": "string"
            },
            "example": "EE"
          }
        ]
      }
    },
    "/api/company/{country}/{query}": {
      "get": {
        "operationId": "getCompany",
        "summary": "Look up a company in an EU or UK register",
        "description": "Look up a company in the official business register of an EU state by registry code, VAT number, LEI or name. Live registers for EE, FR, CZ, FI, PL, LV, IE, HR, DK, AT, NL and GB (Companies House); others, including non-EU countries, return the official lookup link and GLEIF LEI matches.",
        "responses": {
          "200": {
            "description": "JSON result. Every data item carries source_url and retrieved_at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Country not supported yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Register unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error (bad parameter or unknown path)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "country",
            "in": "path",
            "required": true,
            "description": "EU member state ISO code, e.g. DE, FR, EE (EL or GR for Greece). GB/UK for Companies House, EU for an LEI search; other non-EU codes return GLEIF LEI matches.",
            "schema": {
              "type": "string"
            },
            "example": "EE"
          },
          {
            "name": "query",
            "in": "path",
            "required": true,
            "description": "Registry code, VAT number, LEI or company name (URL-encoded).",
            "schema": {
              "type": "string"
            },
            "example": "12759581"
          },
          {
            "name": "id_type",
            "in": "query",
            "required": false,
            "description": "Optional: registry, vat (VIES check) or lei (GLEIF).",
            "schema": {
              "type": "string",
              "enum": [
                "registry",
                "vat",
                "lei"
              ]
            }
          }
        ]
      }
    },
    "/api/registries": {
      "get": {
        "operationId": "listRegistries",
        "summary": "Business register coverage",
        "description": "Overview of the official business registers of the 27 EU states: which are queried live, which by snapshot and which return a lookup link.",
        "responses": {
          "200": {
            "description": "JSON result. Every data item carries source_url and retrieved_at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error (bad parameter or unknown path)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/formation/{country}": {
      "get": {
        "operationId": "getFormationGuide",
        "summary": "How to form a company in an EU state",
        "description": "How to form a limited company in one EU state: legal forms, minimum capital, notary, online formation, portal, register and steps, each fact with a source URL. Information only.",
        "responses": {
          "200": {
            "description": "JSON result. Every data item carries source_url and retrieved_at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "404": {
            "description": "Unknown country or form",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error (bad parameter or unknown path)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "country",
            "in": "path",
            "required": true,
            "description": "EU member state ISO code, e.g. DE, FR, EE (EL or GR for Greece).",
            "schema": {
              "type": "string"
            },
            "example": "DE"
          },
          {
            "name": "legal_form",
            "in": "query",
            "required": false,
            "description": "Optional filter, e.g. GmbH, SAS, SRL, BV.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/post-formation/{country}": {
      "get": {
        "operationId": "getPostFormation",
        "summary": "Registrations after company formation",
        "description": "What a new company must register after formation in one EU state: VAT, EORI, beneficial ownership, tax and social security, with authority, official URL and contacts. Information only.",
        "responses": {
          "200": {
            "description": "JSON result. Every data item carries source_url and retrieved_at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "404": {
            "description": "Unknown country",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error (bad parameter or unknown path)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "country",
            "in": "path",
            "required": true,
            "description": "EU member state ISO code, e.g. DE, FR, EE (EL or GR for Greece).",
            "schema": {
              "type": "string"
            },
            "example": "FR"
          }
        ]
      }
    },
    "/api/actions": {
      "get": {
        "operationId": "listActions",
        "summary": "List Mandate Office actions",
        "description": "Legal document actions Mandate Office offers or is preparing, with status, audience, version and dates.",
        "responses": {
          "200": {
            "description": "JSON result. Every data item carries source_url and retrieved_at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error (bad parameter or unknown path)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Optional ISO country code, e.g. ES, DE, EU.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_eu",
            "in": "query",
            "required": false,
            "description": "With country: also EU-wide actions.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "changed_since",
            "in": "query",
            "required": false,
            "description": "Only actions updated on or after this date (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ]
      }
    },
    "/api/actions/{id}": {
      "get": {
        "operationId": "quoteAction",
        "summary": "Steps and price of one action",
        "description": "Steps, required inputs, who acts (client, partner, notary) and price for one action. Free during beta.",
        "responses": {
          "200": {
            "description": "JSON result. Every data item carries source_url and retrieved_at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "404": {
            "description": "Unknown action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error (bad parameter or unknown path)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Action id from listActions.",
            "schema": {
              "type": "string"
            },
            "example": "de_gmbh_data_package"
          }
        ]
      }
    },
    "/api/templates": {
      "get": {
        "operationId": "listTemplates",
        "summary": "List document templates",
        "description": "Fillable standard document templates (for example auction powers of attorney and sale contracts) with version and dates.",
        "responses": {
          "200": {
            "description": "JSON result. Every data item carries source_url and retrieved_at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error (bad parameter or unknown path)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Optional ISO country code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "changed_since",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ]
      }
    },
    "/api/templates/{id}": {
      "get": {
        "operationId": "getTemplate",
        "summary": "Get one template",
        "description": "One standard template by id: fields, clauses and legal basis with sources. To fill it, use POST /api/templates/{id}/fill or MCP fill_template.",
        "responses": {
          "200": {
            "description": "JSON result. Every data item carries source_url and retrieved_at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "404": {
            "description": "Unknown template",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error (bad parameter or unknown path)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Template id from listTemplates.",
            "schema": {
              "type": "string"
            },
            "example": "es_auction_poa_v2"
          }
        ]
      }
    },
    "/api/operations": {
      "get": {
        "operationId": "listOperations",
        "summary": "List document packages",
        "description": "Ready document packages (German GmbH, Italian SRLS, French EURL, Spanish auction power of attorney, apostille and translation for EU27) with what each needs.",
        "responses": {
          "200": {
            "description": "JSON result. Every data item carries source_url and retrieved_at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error (bad parameter or unknown path)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Optional ISO code (ES, DE, IT, FR) or EU.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/operations/{id}": {
      "get": {
        "operationId": "getOperation",
        "summary": "Input schema of one document package",
        "description": "One operation with its input schema and an example input. Ordering (POST) is not part of this read-only description; use MCP order_operation.",
        "responses": {
          "200": {
            "description": "JSON result. Every data item carries source_url and retrieved_at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "404": {
            "description": "Unknown operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error (bad parameter or unknown path)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Operation id, e.g. de_gmbh_formation.",
            "schema": {
              "type": "string"
            },
            "example": "de_gmbh_formation"
          }
        ]
      }
    },
    "/api/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Service status",
        "description": "Service status, version, build id and the latest change.",
        "responses": {
          "200": {
            "description": "JSON result. Every data item carries source_url and retrieved_at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error (bad parameter or unknown path)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/changelog": {
      "get": {
        "operationId": "getChangelog",
        "summary": "Service changelog",
        "description": "Service versions with their changes and the recorded deploys.",
        "responses": {
          "200": {
            "description": "JSON result. Every data item carries source_url and retrieved_at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error (bad parameter or unknown path)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Result": {
        "type": "object",
        "additionalProperties": true,
        "description": "Lookup result. Fields vary by endpoint; data items include source_url and retrieved_at."
      },
      "Error": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      }
    }
  }
}
