{
 "openapi": "3.1.0",
 "info": {
  "title": "Document Intelligence (Manufacturing)",
  "version": "20261030b",
  "description": "Certificates, mill reports and packing lists read into fields — and, the part that matters, CHECKED against the item’s specification. A certificate transcribed perfectly and compared with nothing has saved typing and nothing else."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "document-extractions": {
    "type": "object",
    "required": [
     "document_kind"
    ],
    "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
     },
     "extraction_no": {
      "type": "string",
      "description": "Extraction no",
      "readOnly": true
     },
     "document_kind": {
      "type": "string",
      "description": "Kind",
      "enum": [
       "certificate_of_analysis",
       "certificate_of_conformance",
       "mill_test_report",
       "packing_list",
       "supplier_drawing",
       "customer_specification",
       "inspection_report",
       "calibration_certificate",
       "safety_data_sheet",
       "work_instruction",
       "purchase_order",
       "other"
      ]
     },
     "content_id": {
      "type": "string",
      "format": "uuid",
      "description": "Content id"
     },
     "file_name": {
      "type": "string",
      "description": "File name"
     },
     "page_count": {
      "type": "integer",
      "description": "Pages"
     },
     "supplier_id": {
      "type": "string",
      "format": "uuid",
      "description": "Supplier"
     },
     "customer_id": {
      "type": "string",
      "format": "uuid",
      "description": "Customer id"
     },
     "item_id": {
      "type": "string",
      "format": "uuid",
      "description": "Item"
     },
     "lot_no": {
      "type": "string",
      "description": "Lot"
     },
     "receipt_id": {
      "type": "string",
      "format": "uuid",
      "description": "Goods receipt"
     },
     "purchase_order_id": {
      "type": "string",
      "format": "uuid",
      "description": "Purchase order id"
     },
     "inspection_id": {
      "type": "string",
      "format": "uuid",
      "description": "Inspection id"
     },
     "gauge_id": {
      "type": "string",
      "format": "uuid",
      "description": "Gauge, for a calibration certificate"
     },
     "extracted": {
      "type": "object",
      "description": "Extracted fields"
     },
     "field_count": {
      "type": "integer",
      "description": "Field count",
      "readOnly": true
     },
     "low_confidence_count": {
      "type": "integer",
      "description": "Low confidence count",
      "readOnly": true
     },
     "overall_confidence": {
      "type": "string",
      "format": "decimal",
      "description": "Overall confidence",
      "readOnly": true
     },
     "spec_checked": {
      "type": "boolean",
      "description": "Spec checked",
      "readOnly": true
     },
     "spec_result": {
      "type": "string",
      "description": "Spec result",
      "readOnly": true
     },
     "spec_failures": {
      "type": "object",
      "description": "Spec failures",
      "readOnly": true
     },
     "reviewed_by": {
      "type": "string",
      "format": "uuid",
      "description": "Reviewed by",
      "readOnly": true
     },
     "reviewed_at": {
      "type": "string",
      "format": "date-time",
      "description": "Reviewed at",
      "readOnly": true
     },
     "corrections": {
      "type": "object",
      "description": "Corrections",
      "readOnly": true
     },
     "posted_to": {
      "type": "string",
      "description": "Posted to",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "error_text": {
      "type": "string",
      "description": "Error text",
      "readOnly": true
     },
     "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
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/mfg/document-extractions": {
   "get": {
    "summary": "list document-extractions",
    "operationId": "list_document_extractions_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create document-extractions",
    "operationId": "create_document_extractions_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/document-extractions/{id}": {
   "get": {
    "summary": "get document-extractions",
    "operationId": "get_document_extractions_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change document-extractions",
    "operationId": "change_document_extractions_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete document-extractions",
    "operationId": "delete_document_extractions_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/document-extractions/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_document_extractions_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/document-extractions/{id}/check-spec": {
   "post": {
    "summary": "Check spec",
    "operationId": "action_document_extractions_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}