{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://arkid.researchark.eu/arkid-organization.schema.json",
	"title": "Organization ArkID",
	"description": "Schema for representing Organization ArkIDs with detailed information about type, location, and identifiers. The ArkID system is designed to provide a standardized way for research and academic organizations to be uniquely identified, with the goal of improving collaboration and data integration across the research ecosystem.",
	"type": "object",
	"version": "1.2.0",
	"lastUpdated": "2025-06-15",
	"properties": {
		"arkidOrg": {
			"allOf": [
				{ "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/arkoIdentifier" }
			],
			"description": "Unique ArkID for the organization, compliant with ISO 27729 (ISNI) standard. The ArkID is a 16-digit number prefixed with 'ARKO-' that uniquely identifies the organization."
		},
		"organizationDetails": {
			"type": "object",
			"properties": {
				"organizationName": {
					"type": "string",
					"description": "The full name of the organization in English."
				},
				"organizationAcronym": {
					"type": "string",
					"description": "The acronym or short name used to refer to the organization."
				},
				"organizationNativeName": {
					"type": ["string", "null"],
					"description": "The full name of the organization in its native language."
				},
				"nativeLanguageCode": {
					"type": ["string", "null"],
					"pattern": "^[a-z]{2}(-[A-Z]{2})?$",
					"description": "ISO 639-1 language code (with optional ISO 3166-1 country code) for the native language name."
				},
				"organizationType": {
					"allOf": [
						{ "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/organizationType" }
					],
					"description": "The type of organization, selected from a predefined list of options."
				}
			},
			"required": [
				"organizationName",
				"organizationAcronym",
				"organizationType"
			]
		},
		"organizationLocation": {
			"type": "object",
			"properties": {
				"city": {
					"type": "string",
					"description": "The city where the organization is located."
				},
				"country": {
					"allOf": [
						{ "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/countryCode" }
					],
					"description": "The ISO 3166-1 alpha-2 country code for the country where the organization is located."
				}
			},
			"required": ["city", "country"]
		},
		"externalIds": {
			"type": "object",
			"properties": {
				"rorId": {
					"type": ["string", "null"],
					"pattern": "^https://ror\\.org/[a-z0-9]{9}$",
					"description": "The unique Research Organization Registry (ROR) identifier for the organization."
				},
				"doiOrgId": {
					"type": ["string", "null"],
					"pattern": "^10\\.\\d{4,9}/[-._;()/A-Z0-9]+$",
					"description": "The unique Digital Object Identifier (DOI) for the organization (general purpose)."
				},
				"fundrefId": {
					"type": ["string", "null"],
					"pattern": "^10\\.13039/\\d{9,12}$",
					"description": "The Crossref Open Funder Registry identifier (formerly Fundref). Note: This registry is merging with ROR after 2024."
				},
				"picId": {
					"type": ["string", "null"],
					"allOf": [
						{ "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/picString" }
					],
					"description": "The unique Participant Identification Code (PIC) for the organization."
				},
				"gridId": {
					"type": ["string", "null"],
					"pattern": "^grid\\.[0-9]+\\.[a-f0-9]+$",
					"description": "The Global Research Identifier Database (GRID) identifier."
				},
				"isniId": {
					"type": ["string", "null"],
					"pattern": "^\\d{4} \\d{4} \\d{4} \\d{3}[0-9X]$",
					"description": "The International Standard Name Identifier (ISNI) for the organization."
				},
				"wikidataId": {
					"type": ["string", "null"],
					"pattern": "^Q\\d+$",
					"description": "The Wikidata identifier for the organization."
				}
			}
		},
		"relationships": {
			"type": "array",
			"items": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"enum": ["parent", "child", "related", "successor", "predecessor"],
						"description": "The type of relationship with another ARKO organization."
					},
					"arkidOrg": {
						"allOf": [
							{ "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/arkoIdentifier" }
						],
						"description": "The ARKO identifier of the related organization."
					},
					"relationshipDescription": {
						"type": ["string", "null"],
						"description": "Optional description of the relationship."
					}
				},
				"required": ["type", "arkidOrg"]
			},
			"description": "Relationships with other ARKO organizations."
		},
		"website": {
			"type": "string",
			"format": "uri",
			"description": "The website URL for the organization."
		},
		"managedBy": {
			"allOf": [
				{ "$ref": "https://arkid.researchark.eu/reference-catalogue.schema.json#/$defs/arkuIdentifier" }
			],
			"description": "The ARKU identifier of the user who is authorized to manage this organization. This is the primary manager/owner of the organization record."
		}
	},
	"required": ["arkidOrg", "organizationDetails", "organizationLocation", "managedBy"],
	"additionalProperties": false
}
