{
 "openapi": "3.1.0",
 "info": {
  "title": "Work Breakdown (Accounting)",
  "version": "20261030b",
  "description": "Both a piece of work and an account assignment. A summary element plans and does not accept postings; a work package accepts them and is where the money actually lands."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "wbs-elements": {
    "type": "object",
    "required": [
     "project_id",
     "wbs_code",
     "name"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "project_id": {
      "type": "string",
      "format": "uuid",
      "description": "Project"
     },
     "parent_id": {
      "type": "string",
      "format": "uuid",
      "description": "Parent element"
     },
     "wbs_code": {
      "type": "string",
      "description": "WBS code"
     },
     "outline_no": {
      "type": "string",
      "description": "Outline number"
     },
     "level_no": {
      "type": "integer",
      "description": "Level no"
     },
     "sort_path": {
      "type": "string",
      "description": "Sort path",
      "readOnly": true
     },
     "name": {
      "type": "string",
      "description": "Name"
     },
     "element_type": {
      "type": "string",
      "description": "Type"
     },
     "is_planning_element": {
      "type": "boolean",
      "description": "Plans"
     },
     "is_account_assignment": {
      "type": "boolean",
      "description": "Accepts postings"
     },
     "is_billing_element": {
      "type": "boolean",
      "description": "Bills"
     },
     "cost_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Cost center"
     },
     "profit_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Profit center"
     },
     "asset_id": {
      "type": "string",
      "format": "uuid",
      "description": "Asset under construction"
     },
     "responsible_employee_id": {
      "type": "string",
      "format": "uuid",
      "description": "Responsible"
     },
     "baseline_start": {
      "type": "string",
      "format": "date",
      "description": "Baseline start"
     },
     "baseline_end": {
      "type": "string",
      "format": "date",
      "description": "Baseline end"
     },
     "planned_start": {
      "type": "string",
      "format": "date",
      "description": "Planned start"
     },
     "planned_end": {
      "type": "string",
      "format": "date",
      "description": "Planned end"
     },
     "actual_start": {
      "type": "string",
      "format": "date",
      "description": "Actual start"
     },
     "actual_end": {
      "type": "string",
      "format": "date",
      "description": "Actual end"
     },
     "planned_hours": {
      "type": "string",
      "format": "decimal",
      "description": "Planned hours"
     },
     "actual_hours": {
      "type": "string",
      "format": "decimal",
      "description": "Actual hours"
     },
     "currency": {
      "type": "string",
      "description": "Currency"
     },
     "budget_amount": {
      "type": "string",
      "format": "decimal",
      "description": "Budget"
     },
     "planned_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Planned cost"
     },
     "planned_revenue": {
      "type": "string",
      "format": "decimal",
      "description": "Planned revenue"
     },
     "percent_complete": {
      "type": "string",
      "format": "decimal",
      "description": "Percent complete"
     },
     "progress_method": {
      "type": "string",
      "description": "Progress method"
     },
     "weight": {
      "type": "string",
      "format": "decimal",
      "description": "Weight"
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "notes": {
      "type": "string",
      "description": "Notes"
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "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_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
     },
     "released_at": {
      "type": "string",
      "format": "date-time",
      "description": "Released at",
      "readOnly": true
     },
     "closed_at": {
      "type": "string",
      "format": "date-time",
      "description": "Closed at",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/accounting/wbs-elements": {
   "get": {
    "summary": "list wbs-elements",
    "operationId": "list_wbs_elements_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create wbs-elements",
    "operationId": "create_wbs_elements_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/wbs-elements/{id}": {
   "get": {
    "summary": "get wbs-elements",
    "operationId": "get_wbs_elements_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change wbs-elements",
    "operationId": "change_wbs_elements_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete wbs-elements",
    "operationId": "delete_wbs_elements_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/wbs-elements/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_wbs_elements_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"
     }
    }
   }
  },
  "/api/accounting/wbs-elements/{id}/release": {
   "post": {
    "summary": "Release",
    "operationId": "action_wbs_elements_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/wbs-elements/{id}/complete": {
   "post": {
    "summary": "Complete",
    "operationId": "action_wbs_elements_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/wbs-elements/{id}/lock": {
   "post": {
    "summary": "Lock",
    "operationId": "action_wbs_elements_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/wbs-elements/{id}/unlock": {
   "post": {
    "summary": "Unlock",
    "operationId": "action_wbs_elements_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/wbs-elements/{id}/close": {
   "post": {
    "summary": "Close",
    "operationId": "action_wbs_elements_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/wbs-elements/{id}/cancel": {
   "post": {
    "summary": "Cancel",
    "operationId": "action_wbs_elements_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}