{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/foxnfe-com-br/json-schema/foxnfe-com-br-post-api-v1-rtc-parameterization-operation-rules-request-schema.json",
  "title": "post_api_v1_rtc_parameterization_operation_rulesRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": [
    "app/app/Modules/Fiscal/Rtc/Http/Controllers/RtcParameterizationController.php:110"
  ],
  "type": "object",
  "properties": {
    "establishment_key": {
      "x-laravel-rules": [
        "nullable",
        "string",
        "max:32"
      ],
      "type": [
        "string",
        "null"
      ],
      "maxLength": 32
    },
    "dfe_type": {
      "x-laravel-rules": [
        "required",
        "in:NFE,NFCE,NFSE"
      ],
      "enum": [
        "NFE",
        "NFCE",
        "NFSE"
      ]
    },
    "operation_code": {
      "x-laravel-rules": [
        "nullable",
        "string",
        "max:12"
      ],
      "type": [
        "string",
        "null"
      ],
      "maxLength": 12
    },
    "origin_uf": {
      "x-laravel-rules": [
        "nullable",
        "regex:/^[A-Z]{2}$/"
      ],
      "pattern": "^[A-Z]{2}$"
    },
    "destination_uf": {
      "x-laravel-rules": [
        "nullable",
        "regex:/^[A-Z]{2}$/"
      ],
      "pattern": "^[A-Z]{2}$"
    },
    "recipient_indicator": {
      "x-laravel-rules": [
        "nullable",
        "string",
        "max:24"
      ],
      "type": [
        "string",
        "null"
      ],
      "maxLength": 24
    },
    "purpose": {
      "x-laravel-rules": [
        "nullable",
        "string",
        "max:32"
      ],
      "type": [
        "string",
        "null"
      ],
      "maxLength": 32
    },
    "priority": {
      "x-laravel-rules": [
        "required",
        "integer",
        "min:0",
        "max:65535"
      ],
      "type": "integer",
      "minimum": 0,
      "maximum": 65535
    },
    "valid_from": {
      "x-laravel-rules": [
        "required",
        "date_format:Y-m-d"
      ],
      "type": "string",
      "format": "date"
    },
    "valid_until": {
      "x-laravel-rules": [
        "nullable",
        "date_format:Y-m-d",
        "after_or_equal:valid_from"
      ],
      "type": [
        "string",
        "null"
      ],
      "format": "date",
      "description": "Deve ser posterior ou igual a valid_from."
    },
    "active": {
      "x-laravel-rules": [
        "sometimes",
        "boolean"
      ],
      "type": "boolean"
    }
  },
  "required": [
    "dfe_type",
    "priority",
    "valid_from"
  ]
}