{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/4chems-com/json-schema/4chems-com-billing-in-schema.json",
  "title": "BillingIn",
  "description": "`complete_billing` body. `vat_id` is checked against the tenant's country in the service.",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/4chems-com-openapi.json#/components/schemas/BillingIn",
  "properties": {
    "name": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Name"
    },
    "legal_entity_type": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[A-Z]{2,3}_[A-Z0-9][A-Z0-9_]*$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Legal Entity Type"
    },
    "other_label": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 80,
          "minLength": 2
        },
        {
          "type": "null"
        }
      ],
      "title": "Other Label"
    },
    "vat_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 40
        },
        {
          "type": "null"
        }
      ],
      "title": "Vat Id"
    },
    "address_line1": {
      "type": "string",
      "maxLength": 200,
      "minLength": 1,
      "title": "Address Line1"
    },
    "address_line2": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ],
      "title": "Address Line2"
    },
    "postal_code": {
      "type": "string",
      "maxLength": 20,
      "minLength": 1,
      "title": "Postal Code"
    },
    "city": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1,
      "title": "City"
    },
    "invoice_email": {
      "type": "string",
      "format": "email",
      "title": "Invoice Email"
    },
    "po_reference": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Po Reference"
    }
  },
  "type": "object",
  "required": [
    "address_line1",
    "postal_code",
    "city",
    "invoice_email"
  ]
}