{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aginera-ai/json-schema/aginera-ai-export-create-schema.json",
  "title": "ExportCreate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aginera-ai-exports-api-openapi.yml#/components/schemas/ExportCreate",
  "type": "object",
  "properties": {
    "takeoff_id": {
      "$ref": "#/$defs/TakeoffId"
    },
    "estimate_id": {
      "type": "string"
    },
    "format": {
      "$ref": "#/$defs/ExportFormat"
    },
    "external_ref": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "description": "Your own identifier for this resource; unique per tenant."
    },
    "options": {
      "type": "object",
      "properties": {
        "accepted_only": {
          "type": "boolean",
          "default": false
        },
        "include_evidence": {
          "type": "boolean",
          "default": false
        },
        "units": {
          "$ref": "#/$defs/UnitSystemPref"
        }
      },
      "default": {},
      "additionalProperties": false
    }
  },
  "required": [
    "format"
  ],
  "additionalProperties": false,
  "$defs": {
    "ExportFormat": {
      "type": "string",
      "enum": [
        "csv",
        "xlsx",
        "json",
        "accubid",
        "mccormick",
        "intellibid",
        "bluebeam_ost",
        "procore"
      ]
    },
    "TakeoffId": {
      "type": "string",
      "pattern": "^tko_[0-9A-Za-z]{22}$"
    },
    "UnitSystemPref": {
      "type": "string",
      "enum": [
        "imperial",
        "metric",
        "as_drawn"
      ],
      "default": "as_drawn"
    }
  }
}