{
 "openapi": "3.1.0",
 "info": {
  "title": "Item · Engineering Revisions (Supply Chain)",
  "version": "20261030b",
  "description": "What changed, when it took effect, what authorized it, and what happens to the stock that already exists. Geometry links to the model viewer."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "item-revisions": {
    "type": "object",
    "required": [
     "item_id",
     "revision"
    ],
    "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": "Org unit id"
     },
     "revision": {
      "type": "string",
      "description": "Revision"
     },
     "description": {
      "type": "string",
      "description": "Description"
     },
     "supersedes_id": {
      "type": "string",
      "format": "uuid",
      "description": "Supersedes revision"
     },
     "status": {
      "type": "string",
      "description": "Status",
      "enum": [
       "draft",
       "in_review",
       "approved",
       "released",
       "superseded",
       "cancelled"
      ]
     },
     "change_type": {
      "type": "string",
      "description": "Kind of change",
      "enum": [
       "major",
       "minor",
       "documentation",
       "material",
       "process",
       "safety",
       "cost"
      ]
     },
     "change_order_no": {
      "type": "string",
      "description": "Engineering change order"
     },
     "change_reason": {
      "type": "string",
      "description": "Why"
     },
     "disposition_on_hand": {
      "type": "string",
      "description": "What happens to stock on hand",
      "enum": [
       "use_up",
       "rework",
       "scrap",
       "return",
       "no_impact"
      ]
     },
     "disposition_in_transit": {
      "type": "string",
      "description": "Disposition in transit"
     },
     "affects_form_fit_function": {
      "type": "boolean",
      "description": "Affects form, fit or function"
     },
     "requires_requalification": {
      "type": "boolean",
      "description": "Requires requalification"
     },
     "bom_id": {
      "type": "string",
      "format": "uuid",
      "description": "Bill of material at this revision"
     },
     "routing_id": {
      "type": "string",
      "format": "uuid",
      "description": "Routing id"
     },
     "requested_by": {
      "type": "string",
      "format": "uuid",
      "description": "Requested by"
     },
     "approved_by": {
      "type": "string",
      "format": "uuid",
      "description": "Approved by"
     },
     "approved_at": {
      "type": "string",
      "format": "date-time",
      "description": "Approved at"
     },
     "released_at": {
      "type": "string",
      "format": "date-time",
      "description": "Released at"
     },
     "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"
     },
     "change_order_id": {
      "type": "string",
      "format": "uuid",
      "description": "Change order 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_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-revisions": {
   "get": {
    "summary": "list item-revisions",
    "operationId": "list_item_revisions_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-revisions",
    "operationId": "create_item_revisions_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/item-revisions/{id}": {
   "get": {
    "summary": "get item-revisions",
    "operationId": "get_item_revisions_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-revisions",
    "operationId": "change_item_revisions_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-revisions",
    "operationId": "delete_item_revisions_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/item-revisions/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_item_revisions_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"
     }
    }
   }
  }
 }
}