{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://arkid.researchark.eu/arkid-project.schema.json",
  "title": "ArkID Project Record",
  "description": "ArkID representation of funded projects (ARKP) aligned with the European Commission Partnership Project template v2.5. Captures core EC-mandated attributes while linking to ArkID graph entities and the shared reference catalogue.",
  "type": "object",
  "version": "2.0.0",
  "$comment": "EC template reference: Submission and Integration of Partnerships Data XML FILE, Project XSD v2.5 (published 2024-06-26).",
  "properties": {
    "metadata": {
      "type": "object",
      "properties": {
        "arkidProject": {
          "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/arkpIdentifier",
          "description": "Primary ArkID assigned to this project."
        },
        "ecTemplateVersion": {
          "type": "string",
          "const": "2.5",
          "description": "Version of the EC project template this record conforms to."
        },
        "referenceCatalogueVersion": {
          "type": "string",
          "description": "Version tag of the ArkID reference catalogue used to validate enumerations."
        },
        "lastUpdated": {
          "type": "string",
          "format": "date-time",
          "description": "ISO-8601 timestamp of the last modification."
        },
        "sourceSystem": {
          "type": "string",
          "description": "Internal ArkID subsystem or external connector that supplied the data."
        }
      },
      "required": [
        "arkidProject",
        "ecTemplateVersion",
        "referenceCatalogueVersion"
      ],
      "additionalProperties": false
    },
    "projectCore": {
      "type": "object",
      "properties": {
        "abstract": {
          "type": "string",
          "minLength": 1,
          "maxLength": 4000
        },
        "acronym": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        },
        "actionType": {
          "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/actionType"
        },
        "callId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "durationMonths": {
          "type": "integer",
          "minimum": 1,
          "description": "Project duration expressed in months."
        },
        "startDate": {
          "type": "string",
          "format": "date",
          "description": "Project start date (>= 2021-01-01).",
          "allOf": [
            { "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/ecDate" }
          ]
        },
        "endDate": {
          "type": "string",
          "format": "date",
          "description": "Project end date (>= 2021-01-01).",
          "allOf": [
            { "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/ecDate" }
          ]
        },
        "signatureDate": {
          "type": "string",
          "format": "date",
          "allOf": [
            { "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/ecDate" }
          ]
        },
        "status": {
          "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/projectStatus"
        },
        "nbParticipants": {
          "type": "integer",
          "minimum": 1
        },
        "multipleProposals": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "networkWebPage": {
          "type": "string"
        },
        "partnershipName": {
          "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/partnershipName"
        },
        "partnershipType": {
          "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/partnershipType"
        },
        "partnershipWebPage": {
          "type": "string",
          "maxLength": 200
        },
        "projectEuContribution": {
          "type": "number",
          "minimum": 0
        },
        "projectNationalContribution": {
          "type": "number",
          "minimum": 0
        },
        "totalCostProject": {
          "type": "number",
          "minimum": 1
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "url": {
          "type": "string",
          "maxLength": 255
        },
        "sourceProjectNumber": {
          "type": "string",
          "minLength": 1
        },
        "sourceProposalNumbers": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "eGrantsProposalNumbers": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0
          }
        },
        "linkedFundingArkf": {
          "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/arkfIdentifier",
          "description": "ArkID of the funding call (ARKF) that awarded this project."
        },
        "originatingIdea": {
          "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/arkiIdentifier",
          "description": "ArkID of the idea (ARKI) that originated this project."
        }
      },
      "required": [
        "abstract",
        "acronym",
        "actionType",
        "callId",
        "durationMonths",
        "startDate",
        "endDate",
        "nbParticipants",
        "partnershipName",
        "title",
        "sourceProjectNumber",
        "totalCostProject"
      ],
      "additionalProperties": false
    },
    "eit": {
      "type": "object",
      "properties": {
        "coFundingOther": {
          "type": "number"
        },
        "coFundingPartner": {
          "type": "number"
        },
        "coFundingPrivate": {
          "type": "number"
        },
        "activityCategory": {
          "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/eitActivityCategory"
        },
        "area": {
          "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/eitArea"
        },
        "segment": {
          "type": "string"
        },
        "nefa": {
          "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/booleanYesNo"
        },
        "risActivity": {
          "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/booleanYesNo"
        },
        "socialMedia": {
          "type": "string",
          "minLength": 1
        },
        "outputs": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "deliverable": {
                "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/booleanYesNo"
              },
              "description": {
                "type": "string",
                "minLength": 1
              },
              "name": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "deliverable",
              "description",
              "name"
            ],
            "additionalProperties": false
          },
          "minItems": 1
        }
      },
      "additionalProperties": false
    },
    "eitKpis": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/kpiCode"
          },
          "coreKpiArea": {
            "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/coreKpiArea"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "kpiType": {
            "type": "string"
          },
          "targetValue": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "code",
          "coreKpiArea",
          "name",
          "targetValue"
        ],
        "additionalProperties": false
      }
    },
    "fixedKeywords": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0
      },
      "minItems": 1
    },
    "freeKeywords": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "minItems": 1
    },
    "participants": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "properties": {
          "orderNumber": {
            "type": "integer",
            "minimum": 1
          },
          "partnerRole": {
            "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/participantRole"
          },
          "partnerType": {
            "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/participantType"
          },
          "partnerRemovalStatus": {
            "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/partnerRemovalStatus"
          },
          "organization": {
            "type": "object",
            "properties": {
              "arkidOrganisation": {
                "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/arkoIdentifier"
              },
              "legalName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "businessName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "pic": {
                "allOf": [
                  { "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/picNumber" }
                ]
              },
              "parentPic": {
                "allOf": [
                  { "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/picNumber" }
                ]
              },
              "vat": {
                "type": "string",
                "maxLength": 30
              },
              "naceCode": {
                "type": "string",
                "maxLength": 30
              },
              "legalRegistrationNumber": {
                "type": "string",
                "maxLength": 30
              },
              "sme": {
                "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/booleanYesNo"
              },
              "countryCode": {
                "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/countryCode"
              },
              "city": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "street": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "streetNumber": {
                "type": "string"
              },
              "postalCode": {
                "type": "string",
                "minLength": 1,
                "maxLength": 20
              },
              "poBox": {
                "type": "string",
                "maxLength": 20
              },
              "cedex": {
                "type": "string",
                "maxLength": 20
              },
              "email": {
                "type": "string",
                "format": "email",
                "maxLength": 100,
                "allOf": [
                  { "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/ecEmail" }
                ]
              },
              "phone": {
                "type": "string",
                "maxLength": 30
              },
              "webPage": {
                "type": "string"
              },
              "latitude": {
                "type": "number"
              },
              "longitude": {
                "type": "number"
              },
              "nutsCode": {
                "type": "string",
                "maxLength": 10
              }
            },
            "required": [
              "legalName",
              "businessName",
              "countryCode",
              "city",
              "street",
              "postalCode",
              "email",
              "sme"
            ],
            "additionalProperties": false
          },
          "financials": {
            "type": "object",
            "properties": {
              "participantEuContribution": {
                "type": "number",
                "minimum": 0
              },
              "participantNationalContribution": {
                "type": "number",
                "minimum": 0
              },
              "participantNetEuContribution": {
                "type": "number",
                "minimum": 0
              },
              "totalCosts": {
                "type": "number",
                "minimum": 0
              },
              "directFinancialSupportThirdParty": {
                "type": "array",
                "items": {
                  "type": "number"
                }
              }
            },
            "additionalProperties": false
          },
          "contactPersons": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string",
                  "format": "email",
                  "maxLength": 200,
                  "allOf": [
                    { "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/ecEmail" }
                  ]
                },
                "firstName": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "familyName": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "gender": {
                  "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/genderCode"
                },
                "title": {
                  "type": "string"
                }
              },
              "required": [
                "email",
                "firstName",
                "familyName"
              ],
              "additionalProperties": false
            }
          },
          "departments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "departmentName": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "orderNumber": {
                  "type": "integer",
                  "minimum": 0
                },
                "city": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "countryCode": {
                  "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/countryCode"
                },
                "street": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "streetNumber": {
                  "type": "string"
                },
                "postalCode": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 30
                },
                "latitude": {
                  "type": "number"
                },
                "longitude": {
                  "type": "number"
                },
                "nutsCode": {
                  "type": "string",
                  "maxLength": 10
                }
              },
              "required": [
                "departmentName",
                "city",
                "countryCode",
                "street",
                "postalCode"
              ],
              "additionalProperties": false
            }
          },
          "eit": {
            "type": "object",
            "properties": {
              "areaKTI": {
                "type": "string",
                "enum": [
                  "BUSINESS",
                  "CITIES_REGIONS_NGOS",
                  "HIGHER_EDUCATION",
                  "KIC_LE_AND_CLCS",
                  "OTHERS",
                  "RESEARCH"
                ]
              },
              "heiMember": {
                "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/booleanYesNo"
              },
              "justificationThirdCountry": {
                "type": "string"
              },
              "partnerRoleDescription": {
                "type": "string"
              },
              "partnershipStatusKIC": {
                "type": "string"
              },
              "risCountry": {
                "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/booleanYesNoMissing"
              },
              "costs": {
                "type": "object",
                "properties": {
                  "aPersonnel": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  },
                  "bSubcontracting": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  },
                  "c1Travel": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  },
                  "c2Equipment": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  },
                  "c3Other": {
                    "type": "number"
                  },
                  "cPurchaseCosts": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  },
                  "d1ThirdParties": {
                    "type": "number"
                  },
                  "d1aGrants": {
                    "type": "number"
                  },
                  "d1bPrizes": {
                    "type": "number"
                  },
                  "d2InternallyInvoiced": {
                    "type": "number"
                  },
                  "eIndirectCosts": {
                    "type": "number"
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          "projectResearchers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "careerStage": {
                  "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/careerStage"
                },
                "contractDuration": {
                  "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/contractDuration"
                },
                "contribution": {
                  "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/contributionScale"
                },
                "role": {
                  "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/researcherRole"
                },
                "arkidUser": {
                  "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/arkuIdentifier"
                },
                "identifierType": {
                  "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/identifierType"
                },
                "identifierValue": {
                  "type": "string",
                  "maxLength": 256
                },
                "identifierOtherName": {
                  "type": "string",
                  "maxLength": 256
                },
                "firstName": {
                  "type": "string",
                  "maxLength": 200
                },
                "lastName": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "nationality": {
                  "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/countryCode"
                },
                "gender": {
                  "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/genderCode"
                },
                "email": {
                  "type": "string",
                  "format": "email",
                  "maxLength": 256,
                  "allOf": [
                    { "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/ecEmail" }
                  ]
                },
                "title": {
                  "type": "string",
                  "maxLength": 50
                }
              },
              "additionalProperties": false
            }
          },
          "projectEnterDate": {
            "type": "string",
            "format": "date"
          },
          "projectExitDate": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "orderNumber",
          "partnerRole",
          "partnerType",
          "organization"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "metadata",
    "projectCore",
    "participants"
  ],
  "additionalProperties": false
}
