{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/pagopa/main/json-schema/pagopa-new-debt-position-request-schema.json",
  "title": "NewDebtPositionRequest",
  "description": "Request body for creating a new transaction",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pagopa-aca-openapi.yml#/components/schemas/NewDebtPositionRequest",
  "required": [
    "paFiscalCode",
    "entityType",
    "entityFiscalCode",
    "entityFullName",
    "iuv",
    "amount",
    "description",
    "expirationDate"
  ],
  "type": "object",
  "properties": {
    "paFiscalCode": {
      "maxLength": 11,
      "minLength": 11,
      "type": "string"
    },
    "entityType": {
      "enum": [
        "F",
        "G"
      ],
      "type": "string"
    },
    "entityFiscalCode": {
      "minLength": 2,
      "type": "string"
    },
    "entityFullName": {
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "iuv": {
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "nav": {
      "maxLength": 255,
      "minLength": 1,
      "type": "string",
      "description": "notice number, if not specified it will created using the following pattern: 3 + iuv"
    },
    "amount": {
      "$ref": "#/$defs/AmountEuroCents"
    },
    "description": {
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "expirationDate": {
      "type": "string",
      "format": "date-time"
    },
    "iban": {
      "maxLength": 27,
      "minLength": 27,
      "type": "string"
    },
    "postalIban": {
      "maxLength": 27,
      "minLength": 27,
      "type": "string"
    },
    "switchToExpired": {
      "type": "boolean",
      "default": false
    },
    "payStandIn": {
      "type": "boolean",
      "default": true
    }
  },
  "$defs": {
    "AmountEuroCents": {
      "maximum": 99999999999.0,
      "minimum": 0.0,
      "type": "integer",
      "description": "Amount for payments, in eurocents"
    }
  }
}