{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/penneo/json-schema/penneo-com-penneo-collect-api-customer-dto-submissions-user-submission-response-schema.json",
  "title": "UserSubmissionResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/penneo-penneo-collect-api-api-openapi.yml#/components/schemas/com.penneo.collect.api.customer.dto.submissions.UserSubmissionResponse",
  "type": "object",
  "properties": {
    "casefileCompletedAt": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/java.time.Instant"
        }
      ]
    },
    "casefileId": {
      "type": [
        "null",
        "integer"
      ],
      "format": "int32",
      "title": "Int"
    },
    "formId": {
      "$ref": "#/$defs/java.util.UUID"
    },
    "requestId": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/java.util.UUID"
        }
      ]
    },
    "respondents": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/com.penneo.collect.api.customer.dto.submissions.SubmissionSignerResponse"
      },
      "title": "List<SubmissionSignerResponse>"
    },
    "sections": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/com.penneo.collect.api.customer.dto.submissions.UserSectionResponse"
      },
      "title": "List<UserSectionResponse>"
    },
    "submissionCompletedAt": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/java.time.Instant"
        }
      ]
    },
    "submissionId": {
      "$ref": "#/$defs/java.util.UUID"
    },
    "submissionStartedAt": {
      "$ref": "#/$defs/java.time.Instant"
    },
    "version": {
      "type": "integer",
      "format": "int64",
      "title": "Long"
    }
  },
  "required": [
    "formId",
    "respondents",
    "sections",
    "submissionId",
    "submissionStartedAt",
    "version"
  ],
  "$defs": {
    "com.penneo.collect.api.customer.dto.submissions.SubmissionSignerResponse": {
      "type": "object",
      "properties": {
        "added": {
          "type": "boolean",
          "title": "Boolean"
        },
        "email": {
          "type": "string",
          "title": "String"
        },
        "fullName": {
          "type": "string",
          "title": "String"
        },
        "initiator": {
          "type": "boolean",
          "title": "Boolean"
        }
      },
      "required": [
        "added",
        "email",
        "fullName",
        "initiator"
      ],
      "title": "SubmissionSignerResponse"
    },
    "com.penneo.collect.api.customer.dto.submissions.UserAnswerResponse": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string",
          "title": "String"
        },
        "multipleEntries": {
          "type": "boolean",
          "title": "Boolean"
        },
        "name": {
          "type": "string",
          "title": "String"
        },
        "type": {
          "$ref": "#/$defs/com.penneo.collect.dal.entities.FieldType"
        },
        "value": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/com.penneo.collect.api.customer.dto.submissions.UserAnswerValue"
            }
          ]
        },
        "values": {
          "type": [
            "null",
            "array"
          ],
          "items": {
            "$ref": "#/$defs/com.penneo.collect.api.customer.dto.submissions.UserAnswerValue"
          },
          "title": "List<UserAnswerValue>"
        }
      },
      "required": [
        "label",
        "multipleEntries",
        "name",
        "type"
      ],
      "title": "UserAnswerResponse"
    },
    "com.penneo.collect.api.customer.dto.submissions.UserAnswerValue": {
      "anyOf": [
        {
          "$ref": "#/$defs/com.penneo.collect.api.customer.dto.submissions.UserAnswerValue.BusinessId"
        },
        {
          "$ref": "#/$defs/com.penneo.collect.api.customer.dto.submissions.UserAnswerValue.Choice"
        },
        {
          "$ref": "#/$defs/com.penneo.collect.api.customer.dto.submissions.UserAnswerValue.File"
        },
        {
          "$ref": "#/$defs/com.penneo.collect.api.customer.dto.submissions.UserAnswerValue.Nin"
        },
        {
          "$ref": "#/$defs/com.penneo.collect.api.customer.dto.submissions.UserAnswerValue.Numeric"
        },
        {
          "$ref": "#/$defs/com.penneo.collect.api.customer.dto.submissions.UserAnswerValue.Text"
        }
      ],
      "title": "UserAnswerValue"
    },
    "com.penneo.collect.api.customer.dto.submissions.UserAnswerValue.BusinessId": {
      "type": "object",
      "properties": {
        "countryCode": {
          "$ref": "#/$defs/com.penneo.collect.dal.models.CountryCode"
        },
        "value": {
          "type": "string",
          "title": "String"
        }
      },
      "required": [
        "countryCode",
        "value"
      ],
      "title": "UserAnswerValue.BusinessId"
    },
    "com.penneo.collect.api.customer.dto.submissions.UserAnswerValue.Choice": {
      "type": "object",
      "properties": {
        "values": {
          "type": "array",
          "items": {
            "type": "string",
            "title": "String"
          },
          "title": "List<String>"
        }
      },
      "required": [
        "values"
      ],
      "title": "UserAnswerValue.Choice"
    },
    "com.penneo.collect.api.customer.dto.submissions.UserAnswerValue.File": {
      "type": "object",
      "properties": {
        "filename": {
          "type": "string",
          "title": "String"
        },
        "link": {
          "type": "string",
          "title": "String"
        },
        "size": {
          "type": "integer",
          "format": "int64",
          "title": "Long"
        }
      },
      "required": [
        "filename",
        "link",
        "size"
      ],
      "title": "UserAnswerValue.File"
    },
    "com.penneo.collect.api.customer.dto.submissions.UserAnswerValue.Nin": {
      "type": "object",
      "properties": {
        "countryCode": {
          "$ref": "#/$defs/com.penneo.collect.dal.models.CountryCode"
        },
        "value": {
          "type": "string",
          "title": "String"
        }
      },
      "required": [
        "countryCode",
        "value"
      ],
      "title": "UserAnswerValue.Nin"
    },
    "com.penneo.collect.api.customer.dto.submissions.UserAnswerValue.Numeric": {
      "type": "object",
      "properties": {
        "value": {
          "type": "number",
          "title": "Number"
        }
      },
      "required": [
        "value"
      ],
      "title": "UserAnswerValue.Numeric"
    },
    "com.penneo.collect.api.customer.dto.submissions.UserAnswerValue.Text": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string",
          "title": "String"
        }
      },
      "required": [
        "value"
      ],
      "title": "UserAnswerValue.Text"
    },
    "com.penneo.collect.api.customer.dto.submissions.UserSectionInstanceResponse": {
      "type": "object",
      "properties": {
        "answers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/com.penneo.collect.api.customer.dto.submissions.UserAnswerResponse"
          },
          "title": "List<UserAnswerResponse>"
        }
      },
      "required": [
        "answers"
      ],
      "title": "UserSectionInstanceResponse"
    },
    "com.penneo.collect.api.customer.dto.submissions.UserSectionResponse": {
      "type": "object",
      "properties": {
        "answers": {
          "type": [
            "null",
            "array"
          ],
          "items": {
            "$ref": "#/$defs/com.penneo.collect.api.customer.dto.submissions.UserAnswerResponse"
          },
          "title": "List<UserAnswerResponse>"
        },
        "instances": {
          "type": [
            "null",
            "array"
          ],
          "items": {
            "$ref": "#/$defs/com.penneo.collect.api.customer.dto.submissions.UserSectionInstanceResponse"
          },
          "title": "List<UserSectionInstanceResponse>"
        },
        "multipleEntries": {
          "type": "boolean",
          "title": "Boolean"
        },
        "title": {
          "type": "string",
          "title": "String"
        }
      },
      "required": [
        "multipleEntries",
        "title"
      ],
      "title": "UserSectionResponse"
    },
    "com.penneo.collect.dal.entities.FieldType": {
      "type": "string",
      "enum": [
        "TEXT",
        "NUMBER",
        "DATE",
        "DATETIME",
        "NIN",
        "PHONE",
        "CHOICE",
        "HTML",
        "EMAIL",
        "BUSINESS_ID",
        "FILE",
        "IBAN"
      ],
      "title": "FieldType"
    },
    "com.penneo.collect.dal.models.CountryCode": {
      "type": "string",
      "enum": [
        "DK",
        "NO",
        "BE",
        "SE",
        "DE",
        "FI",
        "GB",
        "US",
        "AG",
        "AI",
        "AS",
        "BB",
        "BM",
        "BS",
        "CA",
        "DM",
        "DO",
        "GD",
        "GU",
        "JM",
        "KN",
        "KY",
        "LC",
        "MP",
        "MS",
        "PR",
        "SX",
        "TC",
        "TT",
        "VC",
        "VG",
        "VI",
        "KZ",
        "RU",
        "EG",
        "ZA",
        "GR",
        "NL",
        "FR",
        "ES",
        "HU",
        "IT",
        "VA",
        "RO",
        "CH",
        "AT",
        "GG",
        "IM",
        "JE",
        "SJ",
        "PL",
        "PE",
        "MX",
        "CU",
        "AR",
        "BR",
        "CL",
        "CO",
        "VE",
        "MY",
        "AU",
        "CC",
        "CX",
        "ID",
        "PH",
        "NZ",
        "SG",
        "TH",
        "JP",
        "KR",
        "VN",
        "CN",
        "TR",
        "IN",
        "PK",
        "AF",
        "LK",
        "MM",
        "IR",
        "SS",
        "EH",
        "MA",
        "DZ",
        "TN",
        "LY",
        "GM",
        "SN",
        "MR",
        "ML",
        "GN",
        "CI",
        "BF",
        "NE",
        "TG",
        "BJ",
        "MU",
        "LR",
        "SL",
        "GH",
        "NG",
        "TD",
        "CF",
        "CM",
        "CV",
        "ST",
        "GQ",
        "GA",
        "CG",
        "CD",
        "AO",
        "GW",
        "IO",
        "AC",
        "SC",
        "SD",
        "RW",
        "ET",
        "SO",
        "DJ",
        "KE",
        "TZ",
        "UG",
        "BI",
        "MZ",
        "ZM",
        "MG",
        "RE",
        "YT",
        "ZW",
        "NA",
        "MW",
        "LS",
        "BW",
        "SZ",
        "KM",
        "SH",
        "TA",
        "ER",
        "AW",
        "FO",
        "GL",
        "GI",
        "PT",
        "LU",
        "IE",
        "IS",
        "AL",
        "MT",
        "CY",
        "AX",
        "BG",
        "LT",
        "LV",
        "EE",
        "MD",
        "AM",
        "BY",
        "AD",
        "MC",
        "SM",
        "UA",
        "RS",
        "ME",
        "XK",
        "HR",
        "SI",
        "BA",
        "MK",
        "CZ",
        "SK",
        "LI",
        "FK",
        "BZ",
        "GT",
        "SV",
        "HN",
        "NI",
        "CR",
        "PA",
        "PM",
        "HT",
        "BL",
        "GP",
        "MF",
        "BO",
        "GY",
        "EC",
        "GF",
        "PY",
        "MQ",
        "SR",
        "UY",
        "BQ",
        "CW",
        "TL",
        "NF",
        "BN",
        "NR",
        "PG",
        "TO",
        "SB",
        "VU",
        "FJ",
        "PW",
        "WF",
        "CK",
        "NU",
        "WS",
        "KI",
        "NC",
        "TV",
        "PF",
        "TK",
        "FM",
        "MH",
        "KP",
        "HK",
        "MO",
        "KH",
        "LA",
        "BD",
        "TW",
        "MV",
        "LB",
        "JO",
        "SY",
        "IQ",
        "KW",
        "SA",
        "YE",
        "OM",
        "PS",
        "AE",
        "IL",
        "BH",
        "QA",
        "BT",
        "MN",
        "NP",
        "TJ",
        "TM",
        "AZ",
        "GE",
        "KG",
        "UZ"
      ],
      "title": "CountryCode"
    },
    "java.time.Instant": {
      "type": "object",
      "properties": {},
      "title": "Instant"
    },
    "java.util.UUID": {
      "type": "object",
      "properties": {},
      "title": "UUID"
    }
  }
}