{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/invoicepdfs-com/json-schema/invoicepdfs-com-customer-create-schema.json",
  "title": "CustomerCreate",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/invoicepdfs-com-openapi.json#/components/schemas/CustomerCreate",
  "properties": {
    "name": {
      "type": "string",
      "title": "Name"
    },
    "contact_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Contact Name",
      "description": "Who to ask about an invoice — a person or a department, not the company. EN 16931 calls it the contact point (BT-41 for the seller, BT-56 for the buyer); some national rulesets require it."
    },
    "email": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Email"
    },
    "phone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Phone"
    },
    "tax_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tax Id"
    },
    "billing_address": {
      "anyOf": [
        {
          "$ref": "#/$defs/PostalAddress"
        },
        {
          "type": "null"
        }
      ]
    },
    "shipping_address": {
      "anyOf": [
        {
          "$ref": "#/$defs/PostalAddress"
        },
        {
          "type": "null"
        }
      ]
    },
    "electronic_address": {
      "anyOf": [
        {
          "$ref": "#/$defs/ElectronicAddress"
        },
        {
          "type": "null"
        }
      ],
      "description": "Network address for e-invoicing. Required by Peppol; not the tax id."
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Metadata"
    }
  },
  "type": "object",
  "required": [
    "name"
  ],
  "$defs": {
    "ElectronicAddress": {
      "properties": {
        "value": {
          "type": "string",
          "minLength": 1,
          "title": "Value"
        },
        "scheme_id": {
          "type": "string",
          "minLength": 1,
          "title": "Scheme Id",
          "description": "EAS code list identifier — 0088 is GLN, 9930 a German VAT number."
        }
      },
      "type": "object",
      "required": [
        "value",
        "scheme_id"
      ],
      "title": "ElectronicAddress",
      "description": "BT-34 / BT-49 — where a document is routed on Peppol or DBNA.\n\nBoth halves are required: an identifier without its scheme cannot be\nresolved, because the same string means different things in different code\nlists. This is not the tax id, which identifies a company to a tax\nauthority rather than a mailbox on a network."
    },
    "PostalAddress": {
      "properties": {
        "line1": {
          "type": "string",
          "title": "Line1"
        },
        "line2": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Line2"
        },
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "City"
        },
        "state": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "State"
        },
        "postal_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Postal Code"
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Country"
        }
      },
      "type": "object",
      "required": [
        "line1"
      ],
      "title": "PostalAddress"
    }
  }
}