{
 "openapi": "3.1.0",
 "info": {
  "title": "Cost Itemisation (Accounting)",
  "version": "20261030b",
  "description": "One row per input, at whatever level of the bill of material it came from — which is what makes \"why does this cost 42.60\" answerable rather than merely assertable."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "cost-estimate-lines": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "estimate_id": {
      "type": "string",
      "format": "uuid",
      "description": "Estimate id",
      "readOnly": true
     },
     "line_no": {
      "type": "integer",
      "description": "Line no",
      "readOnly": true
     },
     "level_no": {
      "type": "integer",
      "description": "Level no",
      "readOnly": true
     },
     "parent_line_no": {
      "type": "integer",
      "description": "Parent line no",
      "readOnly": true
     },
     "line_type": {
      "type": "string",
      "description": "Line type",
      "readOnly": true
     },
     "component_code": {
      "type": "string",
      "description": "Component code",
      "readOnly": true
     },
     "cost_element_id": {
      "type": "string",
      "format": "uuid",
      "description": "Cost element id",
      "readOnly": true
     },
     "item_id": {
      "type": "string",
      "format": "uuid",
      "description": "Item id",
      "readOnly": true
     },
     "activity_type_id": {
      "type": "string",
      "format": "uuid",
      "description": "Activity type id",
      "readOnly": true
     },
     "cost_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Cost center id",
      "readOnly": true
     },
     "work_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Work center id",
      "readOnly": true
     },
     "operation_no": {
      "type": "integer",
      "description": "Operation no",
      "readOnly": true
     },
     "description": {
      "type": "string",
      "description": "Description",
      "readOnly": true
     },
     "quantity": {
      "type": "string",
      "format": "decimal",
      "description": "Quantity",
      "readOnly": true
     },
     "uom": {
      "type": "string",
      "description": "Uom",
      "readOnly": true
     },
     "price": {
      "type": "string",
      "format": "decimal",
      "description": "Price",
      "readOnly": true
     },
     "price_source": {
      "type": "string",
      "description": "Price source",
      "readOnly": true
     },
     "scrap_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Scrap pct",
      "readOnly": true
     },
     "gross_quantity": {
      "type": "string",
      "format": "decimal",
      "description": "Gross quantity",
      "readOnly": true
     },
     "fixed_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Fixed cost",
      "readOnly": true
     },
     "variable_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Variable cost",
      "readOnly": true
     },
     "total_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Total cost",
      "readOnly": true
     },
     "currency": {
      "type": "string",
      "description": "Currency",
      "readOnly": true
     },
     "source_estimate_id": {
      "type": "string",
      "format": "uuid",
      "description": "Source estimate id",
      "readOnly": true
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/accounting/cost-estimate-lines": {
   "get": {
    "summary": "list cost-estimate-lines",
    "operationId": "list_cost_estimate_lines_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create cost-estimate-lines",
    "operationId": "create_cost_estimate_lines_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/cost-estimate-lines/{id}": {
   "get": {
    "summary": "get cost-estimate-lines",
    "operationId": "get_cost_estimate_lines_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change cost-estimate-lines",
    "operationId": "change_cost_estimate_lines_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete cost-estimate-lines",
    "operationId": "delete_cost_estimate_lines_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/cost-estimate-lines/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_cost_estimate_lines_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}