{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/foxnfe-com-br/json-schema/foxnfe-com-br-patch-api-v1-tenant-request-schema.json",
  "title": "patch_api_v1_tenantRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": [
    "app/app/Http/Controllers/Api/V1/TenantController.php:27"
  ],
  "type": "object",
  "properties": {
    "cnpj": {
      "x-laravel-rules": [
        "sometimes",
        "string",
        "max:18"
      ],
      "type": "string",
      "maxLength": 18
    },
    "razao_social": {
      "x-laravel-rules": [
        "sometimes",
        "string",
        "max:255"
      ],
      "type": "string",
      "maxLength": 255
    },
    "inscricao_estadual": {
      "x-laravel-rules": [
        "sometimes",
        "nullable",
        "string",
        "max:60"
      ],
      "type": [
        "string",
        "null"
      ],
      "maxLength": 60
    },
    "crt": {
      "x-laravel-rules": [
        "sometimes",
        "integer",
        "in:1,2,3,4"
      ],
      "type": "integer",
      "enum": [
        1,
        2,
        3,
        4
      ]
    },
    "endereco": {
      "x-laravel-rules": [
        "sometimes",
        "array"
      ],
      "type": "object",
      "properties": {
        "logradouro": {
          "x-laravel-rules": [
            "sometimes",
            "string",
            "max:255"
          ],
          "type": "string",
          "maxLength": 255
        },
        "numero": {
          "x-laravel-rules": [
            "sometimes",
            "string",
            "max:60"
          ],
          "type": "string",
          "maxLength": 60
        },
        "bairro": {
          "x-laravel-rules": [
            "sometimes",
            "string",
            "max:255"
          ],
          "type": "string",
          "maxLength": 255
        },
        "municipio": {
          "x-laravel-rules": [
            "sometimes",
            "string",
            "max:255"
          ],
          "type": "string",
          "maxLength": 255
        },
        "uf": {
          "x-laravel-rules": [
            "sometimes",
            "string",
            "size:2"
          ],
          "type": "string",
          "minLength": 2,
          "maxLength": 2
        },
        "cep": {
          "x-laravel-rules": [
            "sometimes",
            "string",
            "max:9"
          ],
          "type": "string",
          "maxLength": 9
        }
      }
    },
    "nfe_serie_padrao": {
      "x-laravel-rules": [
        "sometimes",
        "integer",
        "min:1",
        "max:999"
      ],
      "type": "integer",
      "minimum": 1,
      "maximum": 999
    },
    "nfe_ambiente": {
      "x-laravel-rules": [
        "sometimes",
        "integer",
        "in:1,2"
      ],
      "type": "integer",
      "enum": [
        1,
        2
      ]
    },
    "cnae_principal": {
      "x-laravel-rules": [
        "sometimes",
        "nullable",
        "string",
        "max:20"
      ],
      "type": [
        "string",
        "null"
      ],
      "maxLength": 20
    }
  }
}