{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/arcnm-io/json-schema/arcnm-io-subcontractor-update-schema.json",
  "title": "SubcontractorUpdate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/arcnm-io-subcontractors-api-openapi.yml#/components/schemas/SubcontractorUpdate",
  "properties": {
    "name": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ],
      "title": "Name"
    },
    "region": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ],
      "title": "Region"
    },
    "lead_time_days": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 365.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Lead Time Days"
    },
    "notes": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ],
      "title": "Notes"
    },
    "is_active": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Is Active"
    },
    "capabilities": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/SubcontractorCapability"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Capabilities"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "$defs": {
    "SubcontractorCapability": {
      "properties": {
        "operation_kind": {
          "type": "string",
          "maxLength": 64,
          "title": "Operation Kind"
        },
        "pricing_unit": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 16
            },
            {
              "type": "null"
            }
          ],
          "title": "Pricing Unit"
        },
        "lot_minimum_eur": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 1000000.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Lot Minimum Eur",
          "description": "Minimum order value this shop states for the operation: an order is invoiced at the larger of its work and this."
        },
        "order_fee_eur": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 1000000.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Order Fee Eur",
          "description": "Fee this shop charges on every order of the operation, on top of the work or the minimum."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "operation_kind"
      ],
      "title": "SubcontractorCapability"
    }
  }
}