{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/wsystem-dev/json-schema/wsystem-dev-mandate-in-schema.json",
  "title": "MandateIn",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wsystem-dev-openapi.json#/components/schemas/MandateIn",
  "properties": {
    "company_name": {
      "type": "string",
      "maxLength": 200,
      "minLength": 2,
      "title": "Company Name"
    },
    "company_id": {
      "type": "string",
      "maxLength": 40,
      "minLength": 4,
      "title": "Company Id",
      "description": "EU VAT number or national enterprise number"
    },
    "peppol_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 80
        },
        {
          "type": "null"
        }
      ],
      "title": "Peppol Id",
      "description": "Optional Peppol participant id, e.g. 0208:0403170701"
    },
    "company_email": {
      "type": "string",
      "maxLength": 200,
      "title": "Company Email"
    },
    "company_phone": {
      "type": "string",
      "maxLength": 40,
      "minLength": 5,
      "title": "Company Phone"
    },
    "signer_name": {
      "type": "string",
      "maxLength": 120,
      "minLength": 2,
      "title": "Signer Name",
      "description": "Person granting the mandate"
    },
    "signer_role": {
      "type": "string",
      "maxLength": 120,
      "minLength": 2,
      "title": "Signer Role",
      "description": "Their role, e.g. Managing Director"
    },
    "representative_name": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ],
      "title": "Representative Name",
      "description": "Company representative (defaults to signer)"
    },
    "terms_version": {
      "type": "string",
      "title": "Terms Version",
      "description": "Version shown to the signer (GET /einvoice/mandate-terms)"
    },
    "terms_sha256": {
      "type": "string",
      "title": "Terms Sha256",
      "description": "sha256 of the exact terms text shown"
    },
    "accept": {
      "type": "boolean",
      "title": "Accept",
      "description": "Must be true: the signer ticked the acceptance box shown with the key terms (section 0)"
    },
    "authority_confirmed": {
      "type": "boolean",
      "title": "Authority Confirmed",
      "description": "Must be true: signer confirms they may bind the company"
    }
  },
  "type": "object",
  "required": [
    "company_name",
    "company_id",
    "company_email",
    "company_phone",
    "signer_name",
    "signer_role",
    "terms_version",
    "terms_sha256",
    "accept",
    "authority_confirmed"
  ]
}