{
  "$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-business-unit-schema.json",
  "title": "FinanceKey.Entity.BusinessPartnerPkg.v_BusinessPartnerBusinessUnit",
  "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_BusinessPartnerBusinessUnit",
  "required": [
    "businessPartnerCode",
    "businessPartnerName",
    "businessUnitCode"
  ],
  "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
    },
    "businessPartnerBusinessUnitId": {
      "type": "integer",
      "description": "The BusinessPartnerBusinessUnitId field in the BusinessPartnerBusinessUnit table is an integer field used to uniquely identify each business partner business unit record. It is used in other tables to reference records in this table.",
      "format": "int32"
    },
    "businessUnitId": {
      "type": "integer",
      "description": "The BusinessUnitId is an int data type field stored in the BusinessPartnerBusinessUnit table. It associates a business unit with a business partner and is used to identify that relationship. It is a required field for all records in the table.",
      "format": "int32"
    },
    "businessPartnerId": {
      "type": "integer",
      "description": "The BusinessPartnerId field is an integer data type in the BusinessPartnerBusinessUnit table that identifies the primary business partner associated with the business unit.",
      "format": "int32"
    },
    "businessUnitCode": {
      "maxLength": 128,
      "minLength": 1,
      "type": "string",
      "description": "The BusinessUnitCode field is a string-based identifier associated with a specific business unit within the BusinessPartnerBusinessUnit table. This field is designed to store a unique code for each business unit, allowing for efficient categorization and retrieval of related business partner information. The code can contain up to 16 characters and is defined with the nvarchar data type to support a wide range of character sets and ensure compatibility with internationalization requirements."
    },
    "businessPartnerName": {
      "minLength": 1,
      "type": "string",
      "description": "BusinessPartnerName: This field stores the name of the business partner associated with the business unit. It is of data type nvarchar, allowing for the storage of Unicode characters, which enables the use of various international alphabets and symbols. The field is designed to accommodate names of varying lengths, providing flexibility for different business partner naming conventions. Proper indexing can enhance search performance for queries involving this field."
    },
    "businessPartnerCode": {
      "maxLength": 128,
      "minLength": 1,
      "type": "string",
      "description": "The BusinessPartnerCode field is an nvarchar data type, allowing for alphanumeric characters and special symbols, with a maximum length of 128 characters. This field serves as a unique identifier for business partners within the BusinessPartnerBusinessUnit table, facilitating the association of specific business units with their corresponding partners. The code is designed to ensure easy retrieval and management of partnerships while maintaining data integrity and consistency across related records."
    }
  },
  "additionalProperties": false
}