{
  "$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-scenarios-request-schema.json",
  "title": "post_api_v1_rtc_parameterization_scenariosRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": [
    "app/app/Modules/Fiscal/Rtc/Http/Controllers/RtcScenarioController.php:29"
  ],
  "type": "object",
  "properties": {
    "name": {
      "x-laravel-rules": [
        "required",
        "string",
        "regex:/^[A-Za-z0-9][A-Za-z0-9._-]{1,79}$/"
      ],
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{1,79}$"
    },
    "dfe_type": {
      "x-laravel-rules": [
        "required",
        "string",
        "in:NFE,NFCE,NFSE"
      ],
      "type": "string",
      "enum": [
        "NFE",
        "NFCE",
        "NFSE"
      ]
    },
    "input": {
      "x-laravel-rules": [
        "required",
        "array"
      ],
      "type": "object",
      "properties": {
        "sku": {
          "x-laravel-rules": [
            "required",
            "string",
            "max:80"
          ],
          "type": "string",
          "maxLength": 80
        },
        "tax_date": {
          "x-laravel-rules": [
            "required",
            "date"
          ],
          "type": "string",
          "format": "date-time"
        },
        "item_number": {
          "x-laravel-rules": [
            "required",
            "integer",
            "min:1"
          ],
          "type": "integer",
          "minimum": 1
        },
        "calculator_payload": {
          "x-laravel-rules": [
            "required",
            "array"
          ],
          "type": [
            "array",
            "object"
          ],
          "items": {},
          "additionalProperties": true
        },
        "establishment_key": {
          "x-laravel-rules": [
            "nullable",
            "string",
            "max:32"
          ],
          "type": [
            "string",
            "null"
          ],
          "maxLength": 32
        },
        "operation_code": {
          "x-laravel-rules": [
            "nullable",
            "string",
            "max:12"
          ],
          "type": [
            "string",
            "null"
          ],
          "maxLength": 12
        },
        "origin_uf": {
          "x-laravel-rules": [
            "nullable",
            "string",
            "size:2"
          ],
          "type": [
            "string",
            "null"
          ],
          "minLength": 2,
          "maxLength": 2
        },
        "destination_uf": {
          "x-laravel-rules": [
            "nullable",
            "string",
            "size:2"
          ],
          "type": [
            "string",
            "null"
          ],
          "minLength": 2,
          "maxLength": 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
        }
      },
      "required": [
        "sku",
        "tax_date",
        "item_number",
        "calculator_payload"
      ]
    },
    "expected_cst": {
      "x-laravel-rules": [
        "nullable",
        "regex:/^\\d{3}$/"
      ],
      "pattern": "^\\d{3}$"
    },
    "expected_cclass_trib": {
      "x-laravel-rules": [
        "nullable",
        "regex:/^\\d{6}$/"
      ],
      "pattern": "^\\d{6}$"
    }
  },
  "required": [
    "name",
    "dfe_type",
    "input"
  ]
}