{
 "openapi": "3.1.0",
 "info": {
  "title": "Confirmations (Manufacturing)",
  "version": "20261030b",
  "description": "What was made at each operation, by whom and on what. Good, scrap and rework are three quantities with three costs, and setup time is separated from run time."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "confirmations": {
    "type": "object",
    "required": [],
    "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
     },
     "confirmation_no": {
      "type": "string",
      "description": "Confirmation no",
      "readOnly": true
     },
     "production_order_id": {
      "type": "string",
      "format": "uuid",
      "description": "Production order id",
      "readOnly": true
     },
     "production_operation_id": {
      "type": "string",
      "format": "uuid",
      "description": "Production operation id",
      "readOnly": true
     },
     "op_no": {
      "type": "integer",
      "description": "Op no",
      "readOnly": true
     },
     "work_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Work center id",
      "readOnly": true
     },
     "equipment_id": {
      "type": "string",
      "format": "uuid",
      "description": "Equipment id",
      "readOnly": true
     },
     "shift_id": {
      "type": "string",
      "format": "uuid",
      "description": "Shift id",
      "readOnly": true
     },
     "employee_id": {
      "type": "string",
      "format": "uuid",
      "description": "Employee id",
      "readOnly": true
     },
     "operator_name": {
      "type": "string",
      "description": "Operator name",
      "readOnly": true
     },
     "confirmed_by": {
      "type": "string",
      "format": "uuid",
      "description": "Confirmed by",
      "readOnly": true
     },
     "qty_good": {
      "type": "string",
      "format": "decimal",
      "description": "Qty good",
      "readOnly": true
     },
     "qty_scrap": {
      "type": "string",
      "format": "decimal",
      "description": "Qty scrap",
      "readOnly": true
     },
     "qty_rework": {
      "type": "string",
      "format": "decimal",
      "description": "Qty rework",
      "readOnly": true
     },
     "scrap_reason_id": {
      "type": "string",
      "format": "uuid",
      "description": "Scrap reason id",
      "readOnly": true
     },
     "setup_minutes": {
      "type": "string",
      "format": "decimal",
      "description": "Setup minutes",
      "readOnly": true
     },
     "run_minutes": {
      "type": "string",
      "format": "decimal",
      "description": "Run minutes",
      "readOnly": true
     },
     "labor_minutes": {
      "type": "string",
      "format": "decimal",
      "description": "Labor minutes",
      "readOnly": true
     },
     "machine_minutes": {
      "type": "string",
      "format": "decimal",
      "description": "Machine minutes",
      "readOnly": true
     },
     "started_at": {
      "type": "string",
      "format": "date-time",
      "description": "Started at",
      "readOnly": true
     },
     "ended_at": {
      "type": "string",
      "format": "date-time",
      "description": "Ended at",
      "readOnly": true
     },
     "is_final": {
      "type": "boolean",
      "description": "Is final",
      "readOnly": true
     },
     "backflushed": {
      "type": "boolean",
      "description": "Backflushed",
      "readOnly": true
     },
     "journal_id": {
      "type": "string",
      "format": "uuid",
      "description": "Journal id",
      "readOnly": true
     },
     "source": {
      "type": "string",
      "description": "Source",
      "readOnly": true
     },
     "device_ref": {
      "type": "string",
      "description": "Device ref",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "reversed_by": {
      "type": "string",
      "format": "uuid",
      "description": "Reversed by",
      "readOnly": true
     },
     "notes": {
      "type": "string",
      "description": "Notes",
      "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/confirmations": {
   "get": {
    "summary": "list confirmations",
    "operationId": "list_confirmations_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post confirmations",
    "operationId": "action_confirmations_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/confirmations/{id}": {
   "get": {
    "summary": "get confirmations",
    "operationId": "get_confirmations_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put confirmations",
    "operationId": "action_confirmations_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete confirmations",
    "operationId": "action_confirmations_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/confirmations/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_confirmations_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/confirmations/post": {
   "post": {
    "summary": "Post",
    "operationId": "action_confirmations_0_5",
    "description": "Body keys: qtyGood, qtyScrap, qtyRework, setupMinutes, runMinutes, operationId, workCenterId, equipmentId, scrapReasonId, reworkReasonId, isFinal, endedAt, startedAt, shiftId, employeeId, operatorName, laborMinutes, machineMinutes, source, deviceRef, notes, backflush; source one of manual|terminal|barcode|plc|iot|api|import",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}