{
 "openapi": "3.1.0",
 "info": {
  "title": "Item · Work Definition (Supply Chain)",
  "version": "20261030b",
  "description": "How it is built: the bill of material and routing it is built against, the lot sizes, the yield and how components are consumed."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "item-manufacturing": {
    "type": "object",
    "required": [
     "item_id"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "item_id": {
      "type": "string",
      "format": "uuid",
      "description": "Item"
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Applies in"
     },
     "is_manufacturable": {
      "type": "boolean",
      "description": "Manufacturable"
     },
     "build_type": {
      "type": "string",
      "description": "Build type",
      "enum": [
       "standard",
       "process",
       "repetitive",
       "project",
       "configured",
       "repair"
      ]
     },
     "default_bom_id": {
      "type": "string",
      "format": "uuid",
      "description": "Default bill of material"
     },
     "default_routing_id": {
      "type": "string",
      "format": "uuid",
      "description": "Default routing"
     },
     "work_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Work center"
     },
     "standard_lot_size": {
      "type": "string",
      "format": "decimal",
      "description": "Standard lot size"
     },
     "minimum_lot_size": {
      "type": "string",
      "format": "decimal",
      "description": "Minimum lot size"
     },
     "maximum_lot_size": {
      "type": "string",
      "format": "decimal",
      "description": "Maximum lot size"
     },
     "yield_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Yield %"
     },
     "scrap_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Scrap %"
     },
     "supply_type": {
      "type": "string",
      "description": "Component supply",
      "enum": [
       "push",
       "pull",
       "operation_pull",
       "bulk",
       "phantom",
       "supplier"
      ]
     },
     "backflush": {
      "type": "boolean",
      "description": "Backflush components"
     },
     "requires_inspection": {
      "type": "boolean",
      "description": "Completion needs inspection"
     },
     "shrinkage_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Shrinkage pct"
     },
     "setup_hours": {
      "type": "string",
      "format": "decimal",
      "description": "Setup hours"
     },
     "run_hours_per_unit": {
      "type": "string",
      "format": "decimal",
      "description": "Run hours per unit"
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "effective_from": {
      "type": "string",
      "format": "date",
      "description": "In force from"
     },
     "effective_to": {
      "type": "string",
      "format": "date",
      "description": "Until"
     },
     "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
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/scm/item-manufacturing": {
   "get": {
    "summary": "list item-manufacturing",
    "operationId": "list_item_manufacturing_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create item-manufacturing",
    "operationId": "create_item_manufacturing_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/item-manufacturing/{id}": {
   "get": {
    "summary": "get item-manufacturing",
    "operationId": "get_item_manufacturing_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change item-manufacturing",
    "operationId": "change_item_manufacturing_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete item-manufacturing",
    "operationId": "delete_item_manufacturing_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/item-manufacturing/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_item_manufacturing_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"
     }
    }
   }
  }
 }
}