{
  "$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-schema.json",
  "title": "FinanceKey.Entity.BusinessPartnerPkg.v_BusinessPartner",
  "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_BusinessPartner",
  "required": [
    "businessPartnerTypeId",
    "code",
    "localName",
    "name",
    "ownershipPercentage"
  ],
  "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
    },
    "businessPartnerId": {
      "type": "integer",
      "description": "BusinessPartnerId is an int data type field in the BusinessPartner table that uniquely identifies each business partner. This ID should remain consistent for the lifetime of the partner and should be used for all references in other tables associated with the partner.",
      "format": "int32",
      "readOnly": true
    },
    "logoImage": {
      "type": [
        "string",
        "null"
      ],
      "description": "LogoImage is a data field in the BusinessPartner table that stores the name of an image file in nvarchar data type. The field is used to store the logo image associated with each business partner."
    },
    "parentId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "References the parent in the business hierachy.",
      "format": "int32"
    },
    "code": {
      "maxLength": 128,
      "minLength": 1,
      "type": "string",
      "description": "A unique reference to the Business Partner"
    },
    "localName": {
      "minLength": 1,
      "type": "string",
      "description": "The name of the business partner used locally and in local script (character set)."
    },
    "name": {
      "minLength": 1,
      "type": "string",
      "description": "The name used to refer to the partner."
    },
    "comment": {
      "type": [
        "string",
        "null"
      ],
      "description": "Miscellaneous notes and information for the entry or record."
    },
    "businessPartnerTypeId": {
      "maxLength": 128,
      "minLength": 1,
      "type": "string",
      "description": "Indicates if the partner is an external or internal partner."
    },
    "businessPartnerTypeBadge": {
      "maxLength": 4000,
      "type": [
        "string",
        "null"
      ],
      "description": "The BusinessPartnerTypeBadge field in the BusinessPartner table is of type nvarchar with a maximum length of 4000 characters. It contains a badge signifying the type of business partner, such as 'Gold Member', 'Platinum Member', or 'Silver Member'."
    },
    "logoStorageId": {
      "type": "integer",
      "description": "The logo used by the business partner.",
      "format": "int32"
    },
    "parentName": {
      "type": [
        "string",
        "null"
      ],
      "description": "ParentName describes the name of the parent company of a given business partner with data type nvarchar in table BusinessPartner."
    },
    "instituteId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The InstituteId field in the BusinessPartner table stores the unique identifier of each institute associated with a partner. The data type is an int, which indicates that this identifier is a whole number.",
      "format": "int32"
    },
    "countryId": {
      "maxLength": 128,
      "type": [
        "string",
        "null"
      ],
      "description": "The country id from the main address on the business partner."
    },
    "city": {
      "maxLength": 64,
      "type": [
        "string",
        "null"
      ],
      "description": "The City field in the BusinessPartner table allows you to store the city of a business partner, up to a maximum of 64 characters in length, using the nvarchar data type. You should put the city name without postal code or abbreviations in this field."
    },
    "hierachy": {
      "type": [
        "string",
        "null"
      ],
      "description": "Hierachy is a field of varchar data type in the BusinessPartner table, which is used to maintain hierarchical relationships of business partners in the organization. The data in this field is composed of several levels/categories, with each level separated by a '|' (pipe) character. It is useful to determine the relationship between business partners based on their hierarchical positions."
    },
    "countryFlagImage": {
      "type": [
        "string",
        "null"
      ],
      "description": "CountryFlagImage is a nvarchar data type field in the BusinessPartner table, which stores the file name and relative path of the image of the country flag associated with the business partner."
    },
    "accountHolder": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "The AccountHolder field in the BusinessPartner table is a bit data type field which indicates whether the entity is an account holder with the business. A value of 1 indicates the entity is an account holder, while a value of 0 indicates the entity is not an account holder."
    },
    "accountProvider": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "The AccountProvider field in the BusinessPartner table stores a boolean value representing whether the Business Partner provides an account or not. A value of 0 represents that the Business Partner does not provide an account and a value of 1 represents that the Business Partner does provide an account."
    },
    "subsidiaries": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "The Subsidiaries field stores a boolean value (1/0 or true/false) indicating whether the BusinessPartner is a subsidiary of another business."
    },
    "ownershipPercentage": {
      "type": "number",
      "description": "OwnershipPercentage is a decimal field in the BusinessPartner table which indicates the percentage of the business a partner owns.",
      "format": "double"
    },
    "loanTaker": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "The LoanTaker field in the BusinessPartner table is a Boolean data type used to indicate whether the business partner is taking out a loan or not. It contain one of two values: 'True' (taken out a loan) or 'False' (not taken out a loan)."
    },
    "businessUnitDescription": {
      "maxLength": 256,
      "type": [
        "string",
        "null"
      ],
      "description": "The BusinessUnitDescription field contains the text description of the business unit associated with the business partner, up to a maximum of 256 characters."
    },
    "loanProvider": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "The LoanProvider field in the BusinessPartner table is a bit data type and is used to define whether the Business Partner provides loans. A value of '1' indicates that the Business Partner provides loans, while a value of '0' indicates that the Business Partner does not provide loans."
    },
    "correspondentBank": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Indicates whether the business partner is a correspondent bank (1 = Yes, 0 = No)."
    },
    "intermediary": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Indicates whether the business partner acts as an intermediary in transactions, where a value of 1 represents that they are an intermediary and a value of 0 indicates they are not."
    },
    "swiftBic": {
      "type": [
        "string",
        "null"
      ],
      "description": "The SwiftBic field is an nvarchar data type column in the BusinessPartner table that stores the Bank Identifier Code (BIC) or Society for Worldwide Interbank Financial Telecommunication (SWIFT) code associated with a business partner's financial institution. This code is used for international wire transfers and serves as a unique identifier for banks and financial institutions across the globe. The field supports alphanumeric characters and may vary in length to accommodate different BIC formats."
    }
  },
  "additionalProperties": false
}