{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/financekey/json-schema/financekey-finance-key-entity-business-partner-pkg-v-business-partner-document-schema.json",
  "title": "FinanceKey.Entity.BusinessPartnerPkg.v_BusinessPartnerDocument",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/financekey-business-partners-api-openapi.yml#/components/schemas/FinanceKey.Entity.BusinessPartnerPkg.v_BusinessPartnerDocument",
  "required": [
    "documentTypeId",
    "name"
  ],
  "type": "object",
  "properties": {
    "createdById": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The identity of the account that created the initial record.",
      "format": "int32",
      "readOnly": true
    },
    "createdOn": {
      "type": "string",
      "description": "The date and time the record was initially created.",
      "format": "date-time",
      "readOnly": true
    },
    "updatedById": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The identity of the account that last modified the record.",
      "format": "int32",
      "readOnly": true
    },
    "updateOn": {
      "type": "string",
      "description": "The date and time the record was last modified.",
      "format": "date-time",
      "readOnly": true
    },
    "closedById": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The identity of the account that deactivated and closed the record.",
      "format": "int32",
      "readOnly": true
    },
    "closedOn": {
      "type": "string",
      "description": "The date and time the record is to be considered as inactive and closed.",
      "format": "date-time",
      "readOnly": true
    },
    "active": {
      "type": "boolean",
      "description": "A flag that shows if the record is currently active. This values is calculated based on the current date and the record closed date.",
      "readOnly": true
    },
    "rowVersion": {
      "type": [
        "string",
        "null"
      ],
      "description": "A unique version stamp of the record.",
      "format": "byte",
      "readOnly": true
    },
    "sessionId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The identity of the session that last modified the record.",
      "readOnly": true
    },
    "name": {
      "minLength": 1,
      "type": "string",
      "description": "The Name of data type nvarchar field in the BusinessPartnerDocument table stores a Unicode character string, typically used to store alphanumeric text data. The maximum allowed memory for this field is up to 4,000 characters. This is used to store strings such as business partner names and addresses."
    },
    "documentId": {
      "type": "integer",
      "description": "The DocumentId field is an int data type and is used to uniquely identify documents stored in the BusinessPartnerDocument table. This document id is generated by the system when the document is inserted into the table and is used to point to the document in that table. It is important that this field never be changed as it ensures the continuity of the document.",
      "format": "int32",
      "readOnly": true
    },
    "businessPartnerId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "BusinessPartnerId is an integer field in the BusinessPartnerDocument table that stores a unique identifier for each business partner associated with a document. It is used to link a document to the business partner it belongs to.",
      "format": "int32"
    },
    "entityId": {
      "maxLength": 450,
      "type": [
        "string",
        "null"
      ],
      "description": "EntityId of data type nvarchar with a maximum length of 450 in the BusinessPartnerDocument table is a unique identifier assigned to each business partner's associated documents within the table. It links their documents to the primary key of the business partner."
    },
    "entityKeyValue": {
      "type": [
        "string",
        "null"
      ],
      "description": "EntityKeyValue is an nvarchar data field in the BusinessPartnerDocument table and contains values that represent the key of the entity associated with a specific document. This key can be used to reference and identify the document's association with the related entity."
    },
    "documentTypeId": {
      "maxLength": 450,
      "minLength": 1,
      "type": "string",
      "description": "DocumentTypeId is an nvarchar field with a maximum length of 450 that stores the unique identifier for a document type associated with a business partner in the BusinessPartnerDocument table."
    },
    "fileName": {
      "type": [
        "string",
        "null"
      ],
      "description": "FileName is an nvarchar data type field in the BusinessPartnerDocument table. It is used to store the file name for each document associated to the business partner."
    }
  },
  "additionalProperties": false
}