{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/arcnm-io/json-schema/arcnm-io-part-create-schema.json",
  "title": "PartCreate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/arcnm-io-parts-api-openapi.yml#/components/schemas/PartCreate",
  "properties": {
    "part_number": {
      "type": "string",
      "maxLength": 64,
      "title": "Part Number",
      "description": "Stable identifier (≈ SAP MATNR). Unique per org."
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 512
        },
        {
          "type": "null"
        }
      ],
      "title": "Description",
      "description": "Human-readable description of the part."
    },
    "base_uom": {
      "type": "string",
      "maxLength": 16,
      "title": "Base Uom",
      "description": "Base unit of measure for the part (ISO unit code, e.g. EA, KG, M).",
      "default": "EA"
    },
    "make_or_buy": {
      "type": "string",
      "maxLength": 16,
      "title": "Make Or Buy",
      "description": "Whether the part is manufactured in-house ('make') or a catalogue part ('buy'). A component of an assembly is always 'make' here: its sourcing is set in the assembly's parts list.",
      "default": "make"
    },
    "purchase_price": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 10000000.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Purchase Price",
      "description": "Purchase price per piece for a catalogue part, in the part's default currency. Used as the quote for parts marked 'buy'; leave empty to receive a material-floor estimate flagged for review. Not set on a component of an assembly."
    },
    "procurement_type": {
      "type": "string",
      "maxLength": 32,
      "title": "Procurement Type",
      "description": "How the part is sourced (e.g. in-house production or external supplier) — a label to filter the parts list by and to sync with your ERP. It does not change a price: whether a part is priced as a catalogue part or as manufactured follows make_or_buy.",
      "default": "in_house"
    },
    "lead_time_days": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Lead Time Days",
      "description": "Expected lead time to obtain the part, in days."
    },
    "default_currency": {
      "type": "string",
      "maxLength": 3,
      "title": "Default Currency",
      "description": "Default currency for the part's pricing (ISO 4217 code, e.g. EUR, USD).",
      "default": "EUR"
    },
    "classification_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Classification Id",
      "description": "ID of the classification category this part belongs to, if any."
    },
    "folder_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Folder Id",
      "description": "ID of the workspace folder this part is filed in; null is unfiled."
    },
    "attributes": {
      "additionalProperties": true,
      "type": "object",
      "title": "Attributes",
      "description": "Free-form key/value metadata for the part."
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "part_number"
  ]
}