{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dabradata-com/json-schema/dabradata-com-nfse-emissor-alteracao-schema.json",
  "title": "EmissorAlteracao",
  "description": "PATCH do emissor: só os campos enviados mudam; `null` limpa os opcionais. CNPJ, série, próximo número, ambiente e\ntenant nunca mudam (422 `campo_nao_editavel`): numeração e identidade fiscal são do serviço.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dabradata-com-openapi.yaml#/components/schemas/NfseEmissorAlteracao",
  "properties": {
    "razao": {
      "type": "string",
      "maxLength": 300,
      "minLength": 1,
      "title": "Razao"
    },
    "im": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9A-Za-z]{1,15}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Im"
    },
    "c_trib_nac": {
      "type": "string",
      "pattern": "^[0-9]{6}$",
      "title": "C Trib Nac"
    },
    "p_tot_trib_sn": {
      "anyOf": [
        {
          "type": "number",
          "exclusiveMaximum": 100.0,
          "minimum": 0.0
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "P Tot Trib Sn"
    },
    "op_simp_nac": {
      "type": "integer",
      "enum": [
        1,
        2,
        3,
        4
      ],
      "title": "Op Simp Nac"
    },
    "reg_ap_trib_sn": {
      "anyOf": [
        {
          "type": "integer",
          "enum": [
            1,
            2,
            3
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Reg Ap Trib Sn"
    },
    "reg_esp_trib": {
      "type": "integer",
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        9
      ],
      "title": "Reg Esp Trib"
    },
    "reg_ap_ibscbs_sn": {
      "anyOf": [
        {
          "type": "integer",
          "enum": [
            1,
            2,
            3
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Reg Ap Ibscbs Sn"
    },
    "c_atv_sn": {
      "anyOf": [
        {
          "type": "integer",
          "enum": [
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            90
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "C Atv Sn"
    },
    "c_nbs": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{9}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "C Nbs"
    },
    "com_ext_padrao": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Com Ext Padrao",
      "description": "mdPrestacao, vincPrest, mecAFComexP, mecAFComexT, movTempBens, mdic"
    },
    "email": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 80,
          "minLength": 3
        },
        {
          "type": "null"
        }
      ],
      "title": "Email"
    },
    "fone": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{6,20}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Fone"
    }
  },
  "additionalProperties": false,
  "type": "object"
}