{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/telenor-sverige/json-schema/telenor-sverige-core-api-invoices-invoice-models-create-invoice-input-schema.json",
  "title": "CoreApi.Invoices.Invoice.Models.CreateInvoiceInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/telenor-sverige-invoice-api-openapi.yml#/components/schemas/CoreApi.Invoices.Invoice.Models.CreateInvoiceInput",
  "required": [
    "Address",
    "AgreementId",
    "BillingCycle",
    "BillingFrequency",
    "CostCentres",
    "CreditLimitCode",
    "InvoiceName",
    "InvoiceType"
  ],
  "type": "object",
  "properties": {
    "InvoiceName": {
      "type": [
        "string",
        "null"
      ]
    },
    "AgreementId": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int32"
    },
    "CostCentres": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/CoreApi.Invoices.Invoice.Models.CostCentreInput"
      }
    },
    "Address": {
      "$ref": "#/$defs/CoreApi.Invoices.Invoice.Models.InvoiceAddressInput"
    },
    "BillingFrequency": {
      "type": [
        "string",
        "null"
      ]
    },
    "BillingCycle": {
      "type": [
        "string",
        "null"
      ]
    },
    "InvoiceType": {
      "type": [
        "string",
        "null"
      ]
    },
    "CreditLimitCode": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "additionalProperties": false,
  "$defs": {
    "CoreApi.Invoices.Invoice.Models.CostCentreInput": {
      "required": [
        "Name"
      ],
      "type": "object",
      "properties": {
        "Name": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "CoreApi.Invoices.Invoice.Models.InvoiceAddressInput": {
      "required": [
        "City",
        "CountryCode",
        "Zip"
      ],
      "type": "object",
      "properties": {
        "Address1": {
          "maxLength": 30,
          "type": [
            "string",
            "null"
          ]
        },
        "Address2": {
          "maxLength": 30,
          "type": [
            "string",
            "null"
          ]
        },
        "Reference": {
          "maxLength": 20,
          "type": [
            "string",
            "null"
          ]
        },
        "City": {
          "maxLength": 20,
          "minLength": 1,
          "type": "string"
        },
        "Zip": {
          "maxLength": 9,
          "minLength": 1,
          "type": "string"
        },
        "CountryCode": {
          "maxLength": 3,
          "minLength": 2,
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  }
}