{
 "openapi": "3.1.0",
 "info": {
  "title": "CAM / NC Programs (Manufacturing)",
  "version": "20261030b",
  "description": "Tied to an item REVISION, not to a part. A program posted against revision B and run against revision C makes a thousand parts that pass every check the machine makes."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "cam-programs": {
    "type": "object",
    "required": [
     "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
     },
     "program_no": {
      "type": "string",
      "description": "Program no",
      "readOnly": true
     },
     "name": {
      "type": "string",
      "description": "Name"
     },
     "item_id": {
      "type": "string",
      "format": "uuid",
      "description": "Item"
     },
     "item_revision": {
      "type": "string",
      "description": "Item revision"
     },
     "document_id": {
      "type": "string",
      "format": "uuid",
      "description": "Drawing"
     },
     "routing_id": {
      "type": "string",
      "format": "uuid",
      "description": "Routing"
     },
     "operation_no": {
      "type": "integer",
      "description": "Operation"
     },
     "work_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Work center"
     },
     "process": {
      "type": "string",
      "description": "Process",
      "enum": [
       "milling",
       "turning",
       "drilling",
       "grinding",
       "edm",
       "laser",
       "waterjet",
       "plasma",
       "punching",
       "bending",
       "additive",
       "welding",
       "robot",
       "coordinate_measuring",
       "pick_and_place",
       "other"
      ]
     },
     "controller": {
      "type": "string",
      "description": "Controller"
     },
     "post_processor": {
      "type": "string",
      "description": "Post processor"
     },
     "program_version": {
      "type": "string",
      "description": "Program version"
     },
     "cycle_time_seconds": {
      "type": "string",
      "format": "decimal",
      "description": "Cycle time (seconds)"
     },
     "setup_minutes": {
      "type": "string",
      "format": "decimal",
      "description": "Setup (minutes)"
     },
     "tool_count": {
      "type": "integer",
      "description": "Tool count"
     },
     "material_removal_cc": {
      "type": "string",
      "format": "decimal",
      "description": "Material removal cc"
     },
     "content_id": {
      "type": "string",
      "format": "uuid",
      "description": "Content id"
     },
     "file_name": {
      "type": "string",
      "description": "File name"
     },
     "checksum": {
      "type": "string",
      "description": "Checksum"
     },
     "proven_at": {
      "type": "string",
      "format": "date-time",
      "description": "Proven at",
      "readOnly": true
     },
     "proven_by": {
      "type": "string",
      "format": "uuid",
      "description": "Proven by",
      "readOnly": true
     },
     "first_article_no": {
      "type": "string",
      "description": "First article no",
      "readOnly": true
     },
     "change_order_id": {
      "type": "string",
      "format": "uuid",
      "description": "Authorized by change order"
     },
     "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_by": {
      "type": "string",
      "format": "uuid",
      "description": "Released by",
      "readOnly": true
     },
     "released_at": {
      "type": "string",
      "format": "date-time",
      "description": "Released at",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/mfg/cam-programs": {
   "get": {
    "summary": "list cam-programs",
    "operationId": "list_cam_programs_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create cam-programs",
    "operationId": "create_cam_programs_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/cam-programs/{id}": {
   "get": {
    "summary": "get cam-programs",
    "operationId": "get_cam_programs_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change cam-programs",
    "operationId": "change_cam_programs_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete cam-programs",
    "operationId": "delete_cam_programs_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/cam-programs/{parentId}/tools": {
   "get": {
    "summary": "Tools",
    "operationId": "action_cam_programs_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Tools",
    "operationId": "action_cam_programs_1_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/cam-programs/{parentId}/tools/{lineId}": {
   "put": {
    "summary": "Tools",
    "operationId": "action_cam_programs_0_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Tools",
    "operationId": "action_cam_programs_1_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/cam-programs/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_cam_programs_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/mfg/cam-programs/{id}/prove": {
   "post": {
    "summary": "Prove",
    "operationId": "action_cam_programs_0_6",
    "description": "Body keys: firstArticleNo*",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/cam-programs/{id}/release": {
   "post": {
    "summary": "Release",
    "operationId": "action_cam_programs_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/cam-programs/{id}/supersede": {
   "post": {
    "summary": "Supersede",
    "operationId": "action_cam_programs_0_6",
    "description": "Body keys: itemRevision, changeOrderId, notes",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}