{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/recurly/json-schema/recurly-business-entity-schema.json",
  "title": "BusinessEntity",
  "description": "Business entity details",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/recurly-business-entities-api-openapi.yml#/components/schemas/BusinessEntity",
  "type": "object",
  "properties": {
    "id": {
      "title": "Business entity ID",
      "type": "string",
      "maxLength": 13,
      "readOnly": true
    },
    "object": {
      "title": "Object type",
      "type": "string",
      "readOnly": true
    },
    "code": {
      "title": "Business entity code",
      "type": "string",
      "maxLength": 50,
      "description": "The entity code of the business entity."
    },
    "name": {
      "type": "string",
      "title": "Name",
      "description": "This name describes your business entity and will appear on the invoice.",
      "maxLength": 255
    },
    "invoice_display_address": {
      "title": "Invoice display address",
      "description": "Address information for the business entity that will appear on the invoice.",
      "$ref": "#/$defs/Address"
    },
    "tax_address": {
      "title": "Tax address",
      "description": "Address information for the business entity that will be used for calculating taxes.",
      "$ref": "#/$defs/Address"
    },
    "origin_tax_address_source": {
      "$ref": "#/$defs/OriginTaxAddressSourceEnum"
    },
    "destination_tax_address_source": {
      "$ref": "#/$defs/DestinationTaxAddressSourceEnum"
    },
    "default_vat_number": {
      "type": "string",
      "title": "Default VAT number",
      "description": "VAT number for the customer used on the invoice.",
      "maxLength": 20
    },
    "default_registration_number": {
      "type": "string",
      "title": "Default registration number",
      "description": "Registration number for the customer used on the invoice.",
      "maxLength": 30
    },
    "subscriber_location_countries": {
      "type": "array",
      "title": "Subscriber location countries",
      "description": "List of countries for which the business entity will be used.",
      "items": {
        "type": "string",
        "title": "Country code"
      }
    },
    "default_liability_gl_account_id": {
      "type": "string",
      "title": "General Ledger Account ID",
      "description": "The ID of a general ledger account. General ledger accounts are\nonly accessible as a part of the Recurly RevRec Standard and\nRecurly RevRec Advanced features.\n",
      "maxLength": 13
    },
    "default_revenue_gl_account_id": {
      "type": "string",
      "title": "General Ledger Account ID",
      "description": "The ID of a general ledger account. General ledger accounts are\nonly accessible as a part of the Recurly RevRec Standard and\nRecurly RevRec Advanced features.\n",
      "maxLength": 13
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created at",
      "readOnly": true
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Last updated at",
      "readOnly": true
    }
  },
  "$defs": {
    "Address": {
      "type": "object",
      "properties": {
        "phone": {
          "type": "string",
          "title": "Phone number"
        },
        "street1": {
          "type": "string",
          "title": "Street 1",
          "maxLength": 50
        },
        "street2": {
          "type": "string",
          "title": "Street 2",
          "maxLength": 50
        },
        "city": {
          "type": "string",
          "title": "City"
        },
        "region": {
          "type": "string",
          "title": "State/Province",
          "description": "State or province."
        },
        "postal_code": {
          "type": "string",
          "title": "Zip/Postal code",
          "description": "Zip or postal code."
        },
        "country": {
          "type": "string",
          "title": "Country",
          "description": "Country, 2-letter ISO 3166-1 alpha-2 code."
        },
        "geo_code": {
          "type": "string",
          "maxLength": 20,
          "description": "Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled."
        }
      }
    },
    "DestinationTaxAddressSourceEnum": {
      "type": "string",
      "title": "Destination tax address source",
      "description": "The source of the address that will be used as the destinaion in determining taxes. Available only when the site is on an Elite plan. A value of \"destination\" refers to the \"Customer tax address\". A value of \"origin\" refers to the \"Business entity tax address\".",
      "default": "destination",
      "enum": [
        "destination",
        "origin"
      ]
    },
    "OriginTaxAddressSourceEnum": {
      "type": "string",
      "title": "Origin tax address source",
      "description": "The source of the address that will be used as the origin in determining taxes. Available only when the site is on an Elite plan. A value of \"origin\" refers to the \"Business entity tax address\". A value of \"destination\" refers to the \"Customer tax address\".",
      "default": "origin",
      "enum": [
        "origin",
        "destination"
      ]
    }
  }
}