{
 "openapi": "3.1.0",
 "info": {
  "title": "Parameter Captures (Manufacturing)",
  "version": "20261030b",
  "description": "Every captured value against the specification that was fixed before the batch started. A correction does not overwrite — it points at the original, because an audit trail that can be edited is not one."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "batch-parameters": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "batch_record_id": {
      "type": "string",
      "format": "uuid",
      "description": "Batch record id",
      "readOnly": true
     },
     "batch_step_id": {
      "type": "string",
      "format": "uuid",
      "description": "Batch step id",
      "readOnly": true
     },
     "recipe_parameter_id": {
      "type": "string",
      "format": "uuid",
      "description": "Recipe parameter id",
      "readOnly": true
     },
     "parameter": {
      "type": "string",
      "description": "Parameter",
      "readOnly": true
     },
     "uom": {
      "type": "string",
      "description": "Uom",
      "readOnly": true
     },
     "value_number": {
      "type": "string",
      "format": "decimal",
      "description": "Value number",
      "readOnly": true
     },
     "value_text": {
      "type": "string",
      "description": "Value text",
      "readOnly": true
     },
     "spec_min": {
      "type": "string",
      "format": "decimal",
      "description": "Spec min",
      "readOnly": true
     },
     "spec_max": {
      "type": "string",
      "format": "decimal",
      "description": "Spec max",
      "readOnly": true
     },
     "target_value": {
      "type": "string",
      "format": "decimal",
      "description": "Target value",
      "readOnly": true
     },
     "is_critical": {
      "type": "boolean",
      "description": "Is critical",
      "readOnly": true
     },
     "in_spec": {
      "type": "boolean",
      "description": "In spec",
      "readOnly": true
     },
     "capture_source": {
      "type": "string",
      "description": "Capture source",
      "readOnly": true
     },
     "device_ref": {
      "type": "string",
      "description": "Device ref",
      "readOnly": true
     },
     "captured_by": {
      "type": "string",
      "format": "uuid",
      "description": "Captured by",
      "readOnly": true
     },
     "captured_at": {
      "type": "string",
      "format": "date-time",
      "description": "Captured at",
      "readOnly": true
     },
     "corrects_id": {
      "type": "string",
      "format": "uuid",
      "description": "Corrects id",
      "readOnly": true
     },
     "correction_reason": {
      "type": "string",
      "description": "Correction reason",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit 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_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "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/batch-parameters": {
   "get": {
    "summary": "list batch-parameters",
    "operationId": "list_batch_parameters_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post parameter captures",
    "operationId": "action_batch_parameters_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/batch-parameters/{id}": {
   "get": {
    "summary": "get batch-parameters",
    "operationId": "get_batch_parameters_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put parameter captures",
    "operationId": "action_batch_parameters_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete parameter captures",
    "operationId": "action_batch_parameters_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/batch-parameters/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_batch_parameters_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/batch-parameters/capture": {
   "post": {
    "summary": "Capture",
    "operationId": "action_batch_parameters_0_5",
    "description": "Body keys: batchStepId, recipeParameterId, parameter*, value, valueText, specMin, specMax, uom, source, deviceRef, correctsId, correctionReason",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}