{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quotebill-com/json-schema/quotebill-com-templates-schema.json",
  "title": "Templates",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quotebill-com-openapi.yml#/components/schemas/Templates",
  "type": "object",
  "properties": {
    "kinds": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "quotation",
              "invoice",
              "proforma",
              "receipt",
              "creditNote",
              "purchaseOrder",
              "deliveryNote",
              "workOrder",
              "commercialInvoice"
            ]
          },
          "name": {
            "type": "string"
          },
          "default_columns": {
            "type": "string",
            "enum": [
              "priced",
              "hours",
              "quantity"
            ]
          },
          "second_date": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "due_date",
                  "valid_until"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "kind",
          "name",
          "default_columns",
          "second_date"
        ],
        "additionalProperties": false
      }
    },
    "templates": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9._-]{0,80}$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "quotation",
              "invoice",
              "proforma",
              "receipt",
              "creditNote",
              "purchaseOrder",
              "deliveryNote",
              "workOrder",
              "commercialInvoice"
            ]
          },
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "layout": {
            "type": "string"
          },
          "columns": {
            "type": "string"
          },
          "language": {
            "type": "string"
          }
        },
        "required": [
          "slug",
          "kind",
          "name",
          "category",
          "layout"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "kinds",
    "templates"
  ],
  "additionalProperties": false
}