{
  "components": {
    "schemas": {
      "ApiKeyCreate": {
        "description": "Request body for ``POST /auth/api-keys``.",
        "properties": {
          "name": {
            "description": "Human label, e.g. 'My laptop' or 'Claude Desktop — work'.",
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "ApiKeyCreate",
        "type": "object"
      },
      "ApiKeyCreatedResponse": {
        "description": "Returned only on POST — includes the plaintext key once.\n\nClients MUST store the ``full_key`` value at this moment; the server cannot\nrecover it after this response (only the HMAC hash is persisted).",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "full_key": {
            "description": "The full API key. Shown once. Cannot be recovered.",
            "title": "Full Key",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "last_four": {
            "title": "Last Four",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "prefix": {
            "title": "Prefix",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "last_four",
          "created_at",
          "full_key"
        ],
        "title": "ApiKeyCreatedResponse",
        "type": "object"
      },
      "ApiKeyResponse": {
        "description": "Safe-to-return shape — never includes the plaintext or the hash.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "last_four": {
            "title": "Last Four",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "prefix": {
            "title": "Prefix",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "last_four",
          "created_at"
        ],
        "title": "ApiKeyResponse",
        "type": "object"
      },
      "ColorPaletteResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "hex_code": {
            "maxLength": 7,
            "minLength": 7,
            "title": "Hex Code",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "is_active": {
            "default": true,
            "title": "Is Active",
            "type": "boolean"
          },
          "is_wood_like": {
            "default": false,
            "title": "Is Wood Like",
            "type": "boolean"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "name_en": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name En"
          },
          "name_he": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name He",
            "type": "string"
          },
          "name_i18n": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name I18N"
          },
          "sort_order": {
            "default": 0,
            "title": "Sort Order",
            "type": "integer"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "name_he",
          "hex_code",
          "id",
          "created_at"
        ],
        "title": "ColorPaletteResponse",
        "type": "object"
      },
      "CustomerContactResponse": {
        "properties": {
          "contact_type": {
            "title": "Contact Type",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "customer_id": {
            "title": "Customer Id",
            "type": "integer"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "is_primary": {
            "title": "Is Primary",
            "type": "boolean"
          },
          "mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "role_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role Title"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "id",
          "customer_id",
          "contact_type",
          "name",
          "is_primary",
          "created_at"
        ],
        "title": "CustomerContactResponse",
        "type": "object"
      },
      "CustomerCreate": {
        "properties": {
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "building_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Building Code"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "crane_contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Crane Contact"
          },
          "document_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "work_contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Contact"
          }
        },
        "required": [
          "name"
        ],
        "title": "CustomerCreate",
        "type": "object"
      },
      "CustomerResponse": {
        "properties": {
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "building_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Building Code"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "crane_contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Crane Contact"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "document_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "work_contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Contact"
          }
        },
        "required": [
          "name",
          "id",
          "created_at",
          "updated_at"
        ],
        "title": "CustomerResponse",
        "type": "object"
      },
      "DrawingSaveRequest": {
        "properties": {
          "expected_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Version"
          },
          "konva_json": {
            "additionalProperties": true,
            "title": "Konva Json",
            "type": "object"
          }
        },
        "required": [
          "konva_json"
        ],
        "title": "DrawingSaveRequest",
        "type": "object"
      },
      "DrawingSaveResponse": {
        "properties": {
          "explore_edits_remaining": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Explore Edits Remaining"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "version"
        ],
        "title": "DrawingSaveResponse",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "PaginatedProjectsResponse": {
        "description": "Paginated response for projects list",
        "properties": {
          "has_next": {
            "title": "Has Next",
            "type": "boolean"
          },
          "has_prev": {
            "title": "Has Prev",
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ProjectResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "page_size": {
            "title": "Page Size",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "total_pages": {
            "title": "Total Pages",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "total_pages",
          "has_next",
          "has_prev"
        ],
        "title": "PaginatedProjectsResponse",
        "type": "object"
      },
      "PaginatedQuotesResponse": {
        "properties": {
          "has_next": {
            "title": "Has Next",
            "type": "boolean"
          },
          "has_prev": {
            "title": "Has Prev",
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/QuoteResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "page_size": {
            "title": "Page Size",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "total_pages": {
            "title": "Total Pages",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "total_pages",
          "has_next",
          "has_prev"
        ],
        "title": "PaginatedQuotesResponse",
        "type": "object"
      },
      "ProjectCreate": {
        "properties": {
          "customer_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name"
          },
          "new_customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomerCreate"
              },
              {
                "type": "null"
              }
            ]
          },
          "products": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ProjectProductCreate"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": [],
            "title": "Products"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "title": "ProjectCreate",
        "type": "object"
      },
      "ProjectProductCreate": {
        "properties": {
          "label": {
            "title": "Label",
            "type": "string"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "label"
        ],
        "title": "ProjectProductCreate",
        "type": "object"
      },
      "ProjectProductResponse": {
        "properties": {
          "addons": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Addons"
          },
          "canvas_data": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Canvas Data"
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "columns": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Columns"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "custom_product_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Product Id"
          },
          "division_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Division Count"
          },
          "division_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Division Profile"
          },
          "division_profile_custom": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Division Profile Custom"
          },
          "division_spacing": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Division Spacing"
          },
          "division_t_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Division T Profile"
          },
          "electric_config": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Electric Config"
          },
          "explore_edits_remaining": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Explore Edits Remaining"
          },
          "explore_edits_used": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": 0,
            "title": "Explore Edits Used"
          },
          "fan_color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fan Color"
          },
          "fan_color_secondary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fan Color Secondary"
          },
          "frame_joint_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame Joint Type"
          },
          "frame_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame Profile"
          },
          "frame_profile_custom": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame Profile Custom"
          },
          "frame_subtype": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame Subtype"
          },
          "has_drawing": {
            "default": false,
            "title": "Has Drawing",
            "type": "boolean"
          },
          "height": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "is_demo_locked": {
            "default": false,
            "title": "Is Demo Locked",
            "type": "boolean"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "overhang_at_run_min": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overhang At Run Min"
          },
          "overhang_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overhang Enabled"
          },
          "overhang_length_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overhang Length Mm"
          },
          "pergola_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pergola Model"
          },
          "pillar_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pillar Profile"
          },
          "polygon_data": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Polygon Data"
          },
          "project_id": {
            "title": "Project Id",
            "type": "integer"
          },
          "shade_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shade Profile"
          },
          "shade_profile_custom": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shade Profile Custom"
          },
          "shade_spacing": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shade Spacing"
          },
          "shading_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shading Count"
          },
          "shading_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "uniform",
            "title": "Shading Mode"
          },
          "shading_profile_pattern": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shading Profile Pattern"
          },
          "slope_percentage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slope Percentage"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "suntuf_color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suntuf Color"
          },
          "thumbnail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail"
          },
          "thumbnail_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail Type"
          },
          "type": {
            "title": "Type",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "wall_flashing_config": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Wall Flashing Config"
          },
          "walls": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Walls"
          }
        },
        "required": [
          "type",
          "label",
          "id",
          "project_id",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "ProjectProductResponse",
        "type": "object"
      },
      "ProjectResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "creator_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Creator Name"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "customer_name": {
            "title": "Customer Name",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "is_demo_locked": {
            "default": false,
            "title": "Is Demo Locked",
            "type": "boolean"
          },
          "project_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Number"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "thumbnail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "title",
          "id",
          "customer_id",
          "customer_name",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "ProjectResponse",
        "type": "object"
      },
      "QuoteDetailResponse": {
        "properties": {
          "business_logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Business Logo Url"
          },
          "business_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Business Name"
          },
          "business_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Business Phone"
          },
          "business_tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Business Tax Id"
          },
          "change_order_total": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Order Total"
          },
          "contract_subtotal": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Subtotal"
          },
          "contract_total": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Total"
          },
          "contract_vat_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Vat Amount"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "creator_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Creator Name"
          },
          "customer_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Address"
          },
          "customer_city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer City"
          },
          "customer_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Email"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "customer_lang": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Lang"
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name"
          },
          "customer_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Phone"
          },
          "expiry_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expiry Date"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "items": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/QuoteItemResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "items_auto_population_failed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Items Auto Population Failed"
          },
          "legal_terms": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Terms"
          },
          "legal_terms_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Terms Override"
          },
          "legal_terms_snapshot": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Terms Snapshot"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "payment_terms": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Terms"
          },
          "payment_terms_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Terms Override"
          },
          "products": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/QuoteProductDetail"
            },
            "title": "Products",
            "type": "array"
          },
          "project_id": {
            "title": "Project Id",
            "type": "integer"
          },
          "project_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Title"
          },
          "quote_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quote Date"
          },
          "quote_number": {
            "title": "Quote Number",
            "type": "string"
          },
          "signature_image_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signature Image Path"
          },
          "signed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signed At"
          },
          "signed_pdf_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signed Pdf Path"
          },
          "signer_id_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Id Number"
          },
          "signer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Name"
          },
          "spec_product_notes": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spec Product Notes"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "subtotal": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subtotal"
          },
          "team_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Id"
          },
          "total": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_id": {
            "title": "User Id",
            "type": "integer"
          },
          "vat_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vat Amount"
          },
          "vat_rate": {
            "title": "Vat Rate",
            "type": "number"
          },
          "warranty_terms": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warranty Terms"
          },
          "warranty_terms_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warranty Terms Override"
          },
          "work_order_items": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WorkOrderItem"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Order Items"
          },
          "work_order_items_override": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WorkOrderItem"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Order Items Override"
          },
          "work_order_notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Order Notes"
          }
        },
        "required": [
          "id",
          "user_id",
          "project_id",
          "quote_number",
          "status",
          "vat_rate",
          "created_at"
        ],
        "title": "QuoteDetailResponse",
        "type": "object"
      },
      "QuoteItemResponse": {
        "properties": {
          "auto_quantity": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Quantity"
          },
          "boq_item_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Boq Item Id"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "custom_product_preview_image": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Product Preview Image"
          },
          "custom_product_thumbnail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Product Thumbnail"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "is_excluded": {
            "default": false,
            "title": "Is Excluded",
            "type": "boolean"
          },
          "item_name": {
            "title": "Item Name",
            "type": "string"
          },
          "pricing_method": {
            "default": "custom",
            "title": "Pricing Method",
            "type": "string"
          },
          "pricing_mode": {
            "title": "Pricing Mode",
            "type": "string"
          },
          "product_color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Color"
          },
          "product_frame_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Frame Profile"
          },
          "product_height": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Height"
          },
          "product_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id"
          },
          "product_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Label"
          },
          "product_pergola_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Pergola Model"
          },
          "product_preview_image": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Preview Image"
          },
          "product_thumbnail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Thumbnail"
          },
          "product_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Type"
          },
          "quantity": {
            "title": "Quantity",
            "type": "number"
          },
          "quote_id": {
            "title": "Quote Id",
            "type": "integer"
          },
          "sort_order": {
            "title": "Sort Order",
            "type": "integer"
          },
          "total_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Price"
          },
          "unit_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unit Price"
          }
        },
        "required": [
          "id",
          "quote_id",
          "item_name",
          "quantity",
          "pricing_mode",
          "sort_order"
        ],
        "title": "QuoteItemResponse",
        "type": "object"
      },
      "QuoteProductDetail": {
        "properties": {
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "division_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Division Profile"
          },
          "division_spacing": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Division Spacing"
          },
          "frame_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame Profile"
          },
          "height": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "pergola_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pergola Model"
          },
          "pillar_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pillar Profile"
          },
          "product_shots": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Shots"
          },
          "shade_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shade Profile"
          },
          "shade_spacing": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shade Spacing"
          },
          "thumbnail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "label",
          "type"
        ],
        "title": "QuoteProductDetail",
        "type": "object"
      },
      "QuoteResponse": {
        "properties": {
          "change_order_total": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Order Total"
          },
          "contract_subtotal": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Subtotal"
          },
          "contract_total": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Total"
          },
          "contract_vat_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Vat Amount"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "creator_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Creator Name"
          },
          "customer_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Address"
          },
          "customer_lang": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Lang"
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name"
          },
          "expiry_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expiry Date"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "items_auto_population_failed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Items Auto Population Failed"
          },
          "legal_terms": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Terms"
          },
          "legal_terms_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Terms Override"
          },
          "legal_terms_snapshot": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Terms Snapshot"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "payment_terms": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Terms"
          },
          "payment_terms_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Terms Override"
          },
          "project_id": {
            "title": "Project Id",
            "type": "integer"
          },
          "project_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Title"
          },
          "quote_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quote Date"
          },
          "quote_number": {
            "title": "Quote Number",
            "type": "string"
          },
          "signature_image_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signature Image Path"
          },
          "signed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signed At"
          },
          "signed_pdf_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signed Pdf Path"
          },
          "signer_id_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Id Number"
          },
          "signer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Name"
          },
          "spec_product_notes": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spec Product Notes"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "subtotal": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subtotal"
          },
          "team_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Id"
          },
          "total": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_id": {
            "title": "User Id",
            "type": "integer"
          },
          "vat_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vat Amount"
          },
          "vat_rate": {
            "title": "Vat Rate",
            "type": "number"
          },
          "warranty_terms": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warranty Terms"
          },
          "warranty_terms_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warranty Terms Override"
          },
          "work_order_items": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WorkOrderItem"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Order Items"
          },
          "work_order_items_override": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WorkOrderItem"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Order Items Override"
          },
          "work_order_notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Order Notes"
          }
        },
        "required": [
          "id",
          "user_id",
          "project_id",
          "quote_number",
          "status",
          "vat_rate",
          "created_at"
        ],
        "title": "QuoteResponse",
        "type": "object"
      },
      "ShapeDescriptionRequest": {
        "properties": {
          "description": {
            "title": "Description",
            "type": "string"
          }
        },
        "required": [
          "description"
        ],
        "title": "ShapeDescriptionRequest",
        "type": "object"
      },
      "ShapeDimensions": {
        "properties": {
          "A": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "A"
          },
          "B": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "B"
          },
          "C": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "C"
          },
          "D": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "D"
          },
          "E": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "E"
          },
          "F": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "F"
          }
        },
        "title": "ShapeDimensions",
        "type": "object"
      },
      "ShapeParseResponse": {
        "properties": {
          "dimensions": {
            "$ref": "#/components/schemas/ShapeDimensions"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "shape_type": {
            "title": "Shape Type",
            "type": "string"
          }
        },
        "required": [
          "shape_type",
          "dimensions",
          "label"
        ],
        "title": "ShapeParseResponse",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "WorkOrderItem": {
        "properties": {
          "key": {
            "title": "Key",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "state": {
            "default": "hide",
            "enum": [
              "include",
              "exclude",
              "hide"
            ],
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "key",
          "label"
        ],
        "title": "WorkOrderItem",
        "type": "object"
      }
    },
    "securitySchemes": {
      "AluFlowApiKey": {
        "bearerFormat": "aluflow_live_<64 hex chars>",
        "description": "Long-lived API key, sent as `Authorization: Bearer aluflow_live_...`.\n\nA key carries the FULL identity of the user who created it and is subject to that user's team permissions — see `x-required-permissions` on each operation, and /.well-known/oauth-protected-resource for the whole permission vocabulary.\n\nRate limit: 600 requests/minute per key. A 429 carries `Retry-After`.",
        "scheme": "bearer",
        "type": "http"
      },
      "AluFlowSessionJwt": {
        "bearerFormat": "JWT",
        "description": "First-party short-lived session token from POST /auth/login. Third-party automation should use AluFlowApiKey instead.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "externalDocs": {
    "description": "Authentication, rate limits, permission vocabulary",
    "url": "https://aluflow.co.il/docs"
  },
  "info": {
    "contact": {
      "email": "info@aluflow.co.il",
      "name": "AluFlow",
      "url": "https://aluflow.co.il/docs"
    },
    "description": "The subset of the AluFlow API intended for third-party automation and AI agents. Authenticate with an `aluflow_live_*` API key.\n\nThis is a CURATED subset — the full internal surface is not published. Endpoints listed here are contract-stable; anything not listed may change without notice.\n\nDocs: https://aluflow.co.il/docs",
    "license": {
      "identifier": "LicenseRef-AluFlow",
      "name": "Proprietary"
    },
    "summary": "Programmatic access to AluFlow projects, drawings, BOQ and quotes.",
    "termsOfService": "https://aluflow.co.il/terms",
    "title": "AluFlow API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/auth/api-keys": {
      "get": {
        "description": "List the current user's API keys (no plaintext, no hash).",
        "operationId": "list_api_keys_auth_api_keys_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyResponse"
                  },
                  "title": "Response List Api Keys Auth Api Keys Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission."
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "List Api Keys",
        "tags": [
          "api-keys"
        ]
      },
      "post": {
        "description": "Create a new API key for the current user. Plaintext returned once.",
        "operationId": "create_api_key_auth_api_keys_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreatedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Create Api Key",
        "tags": [
          "api-keys"
        ]
      }
    },
    "/auth/api-keys/{key_id}": {
      "delete": {
        "description": "Revoke an API key. Idempotent — revoking an already-revoked key is a no-op.",
        "operationId": "revoke_api_key_auth_api_keys__key_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "title": "Key Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Revoke Api Key",
        "tags": [
          "api-keys"
        ]
      }
    },
    "/auth/me": {
      "get": {
        "description": "Get current user profile with team context",
        "operationId": "get_me_auth_me_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission."
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Me",
        "tags": [
          "auth"
        ]
      }
    },
    "/colors": {
      "get": {
        "description": "Return all active colors sorted by sort_order. No authentication required.",
        "operationId": "get_color_palette_colors_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ColorPaletteResponse"
                  },
                  "title": "Response Get Color Palette Colors Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission."
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Color Palette",
        "tags": [
          "colors"
        ]
      }
    },
    "/customers/": {
      "get": {
        "description": "Get all customers (team-aware visibility)",
        "operationId": "get_customers_customers__get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CustomerResponse"
                  },
                  "title": "Response Get Customers Customers  Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (CUSTOMER_VIEW)."
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Customers",
        "tags": [
          "customers"
        ],
        "x-required-permissions": [
          "CUSTOMER_VIEW"
        ]
      },
      "post": {
        "description": "Create a new customer (team-aware)",
        "operationId": "create_customer_customers__post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (CUSTOMER_MANAGE)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Create Customer",
        "tags": [
          "customers"
        ],
        "x-required-permissions": [
          "CUSTOMER_MANAGE"
        ]
      }
    },
    "/customers/{customer_id}": {
      "get": {
        "description": "Get a specific customer (team-aware visibility)",
        "operationId": "get_customer_customers__customer_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "customer_id",
            "required": true,
            "schema": {
              "title": "Customer Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (CUSTOMER_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Customer",
        "tags": [
          "customers"
        ],
        "x-required-permissions": [
          "CUSTOMER_VIEW"
        ]
      }
    },
    "/customers/{customer_id}/contacts": {
      "get": {
        "description": "List all contacts for a customer",
        "operationId": "list_customer_contacts_customers__customer_id__contacts_get",
        "parameters": [
          {
            "in": "path",
            "name": "customer_id",
            "required": true,
            "schema": {
              "title": "Customer Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CustomerContactResponse"
                  },
                  "title": "Response List Customer Contacts Customers  Customer Id  Contacts Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (CUSTOMER_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "List Customer Contacts",
        "tags": [
          "customers"
        ],
        "x-required-permissions": [
          "CUSTOMER_VIEW"
        ]
      }
    },
    "/profiles/by-type/{profile_type}": {
      "get": {
        "description": "Get all active profiles of a specific type.\n\nArgs:\n    profile_type: One of: frame-beam, division-beam, division-beam-t, shading,\n                  pillar, angle, tensioner, u-profile, spider, hardware",
        "operationId": "get_profiles_by_type_profiles_by_type__profile_type__get",
        "parameters": [
          {
            "in": "path",
            "name": "profile_type",
            "required": true,
            "schema": {
              "title": "Profile Type",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "title": "Response Get Profiles By Type Profiles By Type  Profile Type  Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Profiles By Type",
        "tags": [
          "profiles"
        ]
      }
    },
    "/projects/": {
      "get": {
        "description": "Get paginated projects (team-aware visibility)\n\nParameters:\n- page: Page number (default: 1)\n- page_size: Number of items per page (default: 20, max: 100)\n- search: Search term for project title\n- status: Filter by status\n- sort_by: Sort field (created_at, updated_at, title)\n- sort_order: Sort order (asc, desc)\n- member_id: Owner-only filter — return only projects owned by this member",
        "operationId": "get_projects_projects__get",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 10,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "default": "created_at",
              "title": "Sort By",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort_order",
            "required": false,
            "schema": {
              "default": "desc",
              "title": "Sort Order",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "include_thumbnails",
            "required": false,
            "schema": {
              "default": false,
              "title": "Include Thumbnails",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "member_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "integer"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Member Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedProjectsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECTS_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Projects",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECTS_VIEW"
        ]
      },
      "post": {
        "description": "Create a new project with existing or new customer",
        "operationId": "create_project_projects__post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECT_CREATE)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Create Project",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECT_CREATE"
        ]
      }
    },
    "/projects/products/{product_id}": {
      "get": {
        "description": "Get a specific product (team-aware visibility)",
        "operationId": "get_product_projects_products__product_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "title": "Product Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectProductResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECTS_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Product",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECTS_VIEW"
        ]
      }
    },
    "/projects/products/{product_id}/boq": {
      "get": {
        "description": "Get the BOQ for a product with override metadata (team-aware, feature-gated).",
        "operationId": "get_product_boq_projects_products__product_id__boq_get",
        "parameters": [
          {
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "title": "Product Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (QUOTES_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Product Boq",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "QUOTES_VIEW"
        ]
      }
    },
    "/projects/products/{product_id}/boq:generate": {
      "post": {
        "description": "Generate BOQ from the latest drawing of a product (team-aware, feature-gated)\n\nArgs:\n    product_id: Product ID\n    angle_type: Type of angle profile (\"3x2\" or \"3x3\")\n    dry_run: When true, compute BOQ + cutting plan but write nothing to the DB\n        and emit no side effects. Used by the stale-BOQ alert flow to preview\n        what regeneration would produce without committing.",
        "operationId": "generate_boq_for_product_projects_products__product_id__boq_generate_post",
        "parameters": [
          {
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "title": "Product Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "angle_type",
            "required": false,
            "schema": {
              "default": "3x2",
              "title": "Angle Type",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dry_run",
            "required": false,
            "schema": {
              "default": false,
              "title": "Dry Run",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECT_CREATE)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Generate Boq For Product",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECT_CREATE"
        ]
      }
    },
    "/projects/products/{product_id}/drawings": {
      "get": {
        "description": "Get the latest drawing for a product (team-aware)",
        "operationId": "get_product_drawing_projects_products__product_id__drawings_get",
        "parameters": [
          {
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "title": "Product Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECTS_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Product Drawing",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECTS_VIEW"
        ]
      },
      "post": {
        "description": "Save a drawing with optimistic locking (team-aware)",
        "operationId": "save_product_drawing_projects_products__product_id__drawings_post",
        "parameters": [
          {
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "title": "Product Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DrawingSaveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DrawingSaveResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECT_CREATE)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Save Product Drawing",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECT_CREATE"
        ]
      }
    },
    "/projects/products/{product_id}/manufacturing-plan": {
      "get": {
        "description": "Get the Manufacturing Plan for a product (team-aware, feature-gated)",
        "operationId": "get_manufacturing_plan_projects_products__product_id__manufacturing_plan_get",
        "parameters": [
          {
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "title": "Product Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECTS_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Manufacturing Plan",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECTS_VIEW"
        ]
      }
    },
    "/projects/products/{product_id}/manufacturing-plan:generate": {
      "post": {
        "description": "Generate Manufacturing Plan (Cut List) from the latest drawing of a product.\nThis is the source of truth for production cuts. (team-aware, feature-gated)\n\nArgs:\n    product_id: Product ID\n    angle_type: Type of angle profile (\"3x2\" or \"3x3\")",
        "operationId": "generate_manufacturing_plan_projects_products__product_id__manufacturing_plan_generate_post",
        "parameters": [
          {
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "title": "Product Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "angle_type",
            "required": false,
            "schema": {
              "default": "3x2",
              "title": "Angle Type",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECT_CREATE)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Generate Manufacturing Plan",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECT_CREATE"
        ]
      }
    },
    "/projects/products/{product_id}/order-boq": {
      "get": {
        "description": "Get the Order BOQ for a product with cutting optimization results (team-aware, feature-gated)",
        "operationId": "get_order_boq_projects_products__product_id__order_boq_get",
        "parameters": [
          {
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "title": "Product Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECTS_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Order Boq",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECTS_VIEW"
        ]
      }
    },
    "/projects/products/{product_id}/order-boq:generate": {
      "post": {
        "description": "Generate Order BOQ with optimized cutting plan (team-aware, feature-gated).\nUses production-grade manufacturing service with:\n- Advanced beam splitting (>700cm) with angle inheritance\n- Strict FFD optimization (cuts must fit within stock length minus kerf)\n- SVG-ready metadata for precise diagram rendering\n- Optional offcut reuse from inventory (use_offcuts=True)\n\nNote: Will automatically generate Manufacturing Plan if it doesn't exist,\nto ensure beam names are available for display.\n\nArgs:\n    product_id: Product ID\n    angle_type: Type of angle profile (\"3x2\" or \"3x3\")\n    use_offcuts: If True, prefer existing offcuts from inventory over new stock bars",
        "operationId": "generate_order_boq_projects_products__product_id__order_boq_generate_post",
        "parameters": [
          {
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "title": "Product Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "angle_type",
            "required": false,
            "schema": {
              "default": "3x2",
              "title": "Angle Type",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "use_offcuts",
            "required": false,
            "schema": {
              "default": false,
              "title": "Use Offcuts",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (ORDER_CREATE)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Generate Order Boq",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "ORDER_CREATE"
        ]
      }
    },
    "/projects/{project_id}": {
      "get": {
        "description": "Get a specific project (team-aware visibility)",
        "operationId": "get_project_projects__project_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECTS_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Project",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECTS_VIEW"
        ]
      }
    },
    "/projects/{project_id}/products": {
      "get": {
        "description": "Get all products for a project (team-aware visibility)",
        "operationId": "get_project_products_projects__project_id__products_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ProjectProductResponse"
                  },
                  "title": "Response Get Project Products Projects  Project Id  Products Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECTS_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Project Products",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECTS_VIEW"
        ]
      },
      "post": {
        "description": "Add a product to a project (team-aware visibility)",
        "operationId": "add_project_product_projects__project_id__products_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectProductCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectProductResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECT_CREATE)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Add Project Product",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECT_CREATE"
        ]
      }
    },
    "/quotes/": {
      "get": {
        "description": "List quotes for current user.\nTeam owners also see all quotes belonging to their team.\nOptionally filter by project_id or member_id (owner-only).",
        "operationId": "list_quotes_quotes__get",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "member_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "integer"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Member Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedQuotesResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (QUOTES_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "List Quotes",
        "tags": [
          "quotes"
        ],
        "x-required-permissions": [
          "QUOTES_VIEW"
        ]
      }
    },
    "/quotes/{quote_id}": {
      "get": {
        "description": "Get a single quote by ID — full detail with items, products, and business info.",
        "operationId": "get_quote_quotes__quote_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "quote_id",
            "required": true,
            "schema": {
              "title": "Quote Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (QUOTES_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Quote",
        "tags": [
          "quotes"
        ],
        "x-required-permissions": [
          "QUOTES_VIEW"
        ]
      }
    },
    "/shapes/parse-description": {
      "post": {
        "description": "Parse a natural language shape description into shape type + dimensions.\nTier 1: regex (instant). Tier 2: Claude API (if ANTHROPIC_API_KEY set).",
        "operationId": "parse_shape_description_shapes_parse_description_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShapeDescriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShapeParseResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Parse Shape Description",
        "tags": [
          "shapes"
        ]
      }
    }
  },
  "security": [
    {
      "AluFlowApiKey": []
    }
  ],
  "servers": [
    {
      "description": "Israel (Hebrew, ILS)",
      "url": "https://aluflow.co.il/api"
    },
    {
      "description": "International (English, EUR)",
      "url": "https://aluflow.io/api"
    }
  ],
  "x-aluflow-permissions": {
    "description": "AluFlow team permission keys. These are IDENTITY permissions enforced per calling user, NOT token-narrowing OAuth scopes: an API key inherits its creator's permissions and cannot be narrower. Also published as `scopes_supported` at /.well-known/oauth-protected-resource (RFC 9728).",
    "implies": {
      "LEADS_ADMIN": [
        "LEADS_MANAGE",
        "LEADS_VIEW"
      ],
      "LEADS_MANAGE": [
        "LEADS_VIEW"
      ],
      "PAYMENTS_MANAGE": [
        "PAYMENTS_VIEW"
      ],
      "PRICING_EDIT": [
        "PRICING_VIEW"
      ],
      "SCHEDULE_MANAGE": [
        "SCHEDULE_VIEW"
      ]
    },
    "keys": [
      "ANALYTICS",
      "BUSINESS_PROFILE_EDIT",
      "CUSTOMER_MANAGE",
      "CUSTOMER_VIEW",
      "LEADS_ADMIN",
      "LEADS_MANAGE",
      "LEADS_VIEW",
      "LEGAL_TERMS_EDIT",
      "ORDER_CREATE",
      "PAYMENTS_MANAGE",
      "PAYMENTS_VIEW",
      "PDF_BOQ_NO_AMOUNTS",
      "PDF_BOQ_WITH_AMOUNTS",
      "PDF_CONTACT",
      "PDF_ENGINEERING",
      "PDF_MANUFACTURING_NAMED",
      "PDF_MANUFACTURING_VISUAL",
      "PDF_QUOTE",
      "PORTAL_USERS_MANAGE",
      "PRICE_LIST",
      "PRICING_EDIT",
      "PRICING_VIEW",
      "PROFITABILITY_REPORT",
      "PROJECTS_VIEW",
      "PROJECT_CREATE",
      "QUOTES_VIEW",
      "QUOTE_COSTS",
      "QUOTE_COSTS_NO_AMOUNTS",
      "QUOTE_DESIGN",
      "SCHEDULE_MANAGE",
      "SCHEDULE_VIEW",
      "TEAM_VIEW_ALL_ACTIVITY",
      "TEAM_VIEW_ALL_PROJECTS",
      "USER_SETTINGS",
      "WORK_ORDER_EDIT"
    ],
    "legacyAliases": {
      "PRICE_LIST": [
        "PRICING_EDIT",
        "PRICING_VIEW"
      ]
    }
  }
}
