{
 "openapi": "3.1.0",
 "info": {
  "title": "Asset Register (Accounting)",
  "version": "20261030b",
  "description": "Every capitalized asset with its identity, its class, what it is worth now, and who is holding it. Issue it to a person or a unit, take it back, or record that it was seen where the register says it is."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "asset-register": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "asset_no": {
      "type": "string",
      "description": "Asset no",
      "readOnly": true
     },
     "name": {
      "type": "string",
      "description": "Name",
      "readOnly": true
     },
     "asset_class": {
      "type": "string",
      "description": "Asset class",
      "readOnly": true
     },
     "acquisition_date": {
      "type": "string",
      "format": "date",
      "description": "Acquisition date",
      "readOnly": true
     },
     "cost": {
      "type": "string",
      "format": "decimal",
      "description": "Cost",
      "readOnly": true
     },
     "useful_life_months": {
      "type": "integer",
      "description": "Useful life months",
      "readOnly": true
     },
     "accumulated_depreciation": {
      "type": "string",
      "format": "decimal",
      "description": "Accumulated depreciation",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "custodian": {
      "type": "string",
      "description": "Custodian",
      "readOnly": true
     },
     "location": {
      "type": "string",
      "description": "Location",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "cost_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Cost center id",
      "readOnly": true
     },
     "profit_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Profit center id",
      "readOnly": true
     },
     "asset_class_id": {
      "type": "string",
      "format": "uuid",
      "description": "Asset class id",
      "readOnly": true
     },
     "parent_asset_id": {
      "type": "string",
      "format": "uuid",
      "description": "Parent asset id",
      "readOnly": true
     },
     "sub_number": {
      "type": "integer",
      "description": "Sub number",
      "readOnly": true
     },
     "description": {
      "type": "string",
      "description": "Description",
      "readOnly": true
     },
     "serial_no": {
      "type": "string",
      "description": "Serial no",
      "readOnly": true
     },
     "inventory_no": {
      "type": "string",
      "description": "Inventory no",
      "readOnly": true
     },
     "manufacturer": {
      "type": "string",
      "description": "Manufacturer",
      "readOnly": true
     },
     "model": {
      "type": "string",
      "description": "Model",
      "readOnly": true
     },
     "quantity": {
      "type": "string",
      "format": "decimal",
      "description": "Quantity",
      "readOnly": true
     },
     "currency": {
      "type": "string",
      "description": "Currency",
      "readOnly": true
     },
     "salvage_value": {
      "type": "string",
      "format": "decimal",
      "description": "Salvage value",
      "readOnly": true
     },
     "in_service_date": {
      "type": "string",
      "format": "date",
      "description": "In service date",
      "readOnly": true
     },
     "capitalisation_date": {
      "type": "string",
      "format": "date",
      "description": "Capitalisation date",
      "readOnly": true
     },
     "retirement_date": {
      "type": "string",
      "format": "date",
      "description": "Retirement date",
      "readOnly": true
     },
     "disposal_date": {
      "type": "string",
      "format": "date",
      "description": "Disposal date",
      "readOnly": true
     },
     "disposal_proceeds": {
      "type": "string",
      "format": "decimal",
      "description": "Disposal proceeds",
      "readOnly": true
     },
     "disposal_reason": {
      "type": "string",
      "description": "Disposal reason",
      "readOnly": true
     },
     "supplier_id": {
      "type": "string",
      "format": "uuid",
      "description": "Supplier id",
      "readOnly": true
     },
     "purchase_order_id": {
      "type": "string",
      "format": "uuid",
      "description": "Purchase order id",
      "readOnly": true
     },
     "ap_invoice_id": {
      "type": "string",
      "format": "uuid",
      "description": "Ap invoice id",
      "readOnly": true
     },
     "custodian_employee_id": {
      "type": "string",
      "format": "uuid",
      "description": "Custodian employee id",
      "readOnly": true
     },
     "location_id": {
      "type": "string",
      "format": "uuid",
      "description": "Location id",
      "readOnly": true
     },
     "is_under_construction": {
      "type": "boolean",
      "description": "Is under construction",
      "readOnly": true
     },
     "wbs_element_id": {
      "type": "string",
      "format": "uuid",
      "description": "Wbs element id",
      "readOnly": true
     },
     "lease_id": {
      "type": "string",
      "format": "uuid",
      "description": "Lease id",
      "readOnly": true
     },
     "property_id": {
      "type": "string",
      "format": "uuid",
      "description": "Property id",
      "readOnly": true
     },
     "insured_value": {
      "type": "string",
      "format": "decimal",
      "description": "Insured value",
      "readOnly": true
     },
     "insurance_policy_no": {
      "type": "string",
      "description": "Insurance policy no",
      "readOnly": true
     },
     "barcode": {
      "type": "string",
      "description": "Barcode",
      "readOnly": true
     },
     "last_verified_at": {
      "type": "string",
      "format": "date",
      "description": "Last verified at",
      "readOnly": true
     },
     "notes": {
      "type": "string",
      "description": "Notes",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "class_code": {
      "type": "string",
      "description": "Class code",
      "readOnly": true
     },
     "class_name": {
      "type": "string",
      "description": "Class name",
      "readOnly": true
     },
     "category": {
      "type": "string",
      "description": "Category",
      "readOnly": true
     },
     "cost_center_code": {
      "type": "string",
      "description": "Cost center code",
      "readOnly": true
     },
     "cost_center_name": {
      "type": "string",
      "description": "Cost center name",
      "readOnly": true
     },
     "org_unit_name": {
      "type": "string",
      "description": "Org unit name",
      "readOnly": true
     },
     "custodian_name": {
      "type": "string",
      "description": "Custodian name",
      "readOnly": true
     },
     "supplier_name": {
      "type": "string",
      "description": "Supplier name",
      "readOnly": true
     },
     "leading_area_id": {
      "type": "string",
      "format": "uuid",
      "description": "Leading area id",
      "readOnly": true
     },
     "leading_area_code": {
      "type": "string",
      "description": "Leading area code",
      "readOnly": true
     },
     "gross_value": {
      "type": "string",
      "format": "decimal",
      "description": "Gross value",
      "readOnly": true
     },
     "accum_depreciation": {
      "type": "string",
      "format": "decimal",
      "description": "Accum depreciation",
      "readOnly": true
     },
     "net_book_value": {
      "type": "string",
      "format": "decimal",
      "description": "Net book value",
      "readOnly": true
     },
     "life_months": {
      "type": "integer",
      "description": "Life months",
      "readOnly": true
     },
     "remaining_life_months": {
      "type": "integer",
      "description": "Remaining life months",
      "readOnly": true
     },
     "depreciation_start": {
      "type": "string",
      "format": "date",
      "description": "Depreciation start",
      "readOnly": true
     },
     "depreciation_key": {
      "type": "string",
      "description": "Depreciation key",
      "readOnly": true
     },
     "depreciation_method": {
      "type": "string",
      "description": "Depreciation method",
      "readOnly": true
     },
     "depreciated_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Depreciated pct",
      "readOnly": true
     },
     "area_count": {
      "type": "integer",
      "description": "Area count",
      "readOnly": true
     },
     "movement_count": {
      "type": "integer",
      "description": "Movement count",
      "readOnly": true
     },
     "component_count": {
      "type": "integer",
      "description": "Component count",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/accounting/asset-register": {
   "get": {
    "summary": "list asset-register",
    "operationId": "list_asset_register_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post asset register",
    "operationId": "action_asset_register_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/asset-register/{id}": {
   "get": {
    "summary": "get asset-register",
    "operationId": "get_asset_register_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put asset register",
    "operationId": "action_asset_register_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete asset register",
    "operationId": "action_asset_register_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/asset-register/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_asset_register_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"
     }
    }
   }
  }
 }
}