{
 "openapi": "3.1.0",
 "info": {
  "title": "Availability · Lines (Manufacturing)",
  "version": "20261030b",
  "description": "Line by line: what is on hand, what of that is already promised, what is on order, what is on a production order, and what is genuinely short. The four are kept apart because “we have none” and “it is all promised elsewhere” want different things done about them."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "availability-lines": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "check_id": {
      "type": "string",
      "format": "uuid",
      "description": "Check id",
      "readOnly": true
     },
     "line_no": {
      "type": "integer",
      "description": "Line no",
      "readOnly": true
     },
     "item_id": {
      "type": "string",
      "format": "uuid",
      "description": "Item id",
      "readOnly": true
     },
     "component_kind": {
      "type": "string",
      "description": "Component kind",
      "readOnly": true
     },
     "required_qty": {
      "type": "string",
      "format": "decimal",
      "description": "Required qty",
      "readOnly": true
     },
     "uom": {
      "type": "string",
      "description": "Uom",
      "readOnly": true
     },
     "required_date": {
      "type": "string",
      "format": "date",
      "description": "Required date",
      "readOnly": true
     },
     "on_hand_qty": {
      "type": "string",
      "format": "decimal",
      "description": "On hand qty",
      "readOnly": true
     },
     "allocated_qty": {
      "type": "string",
      "format": "decimal",
      "description": "Allocated qty",
      "readOnly": true
     },
     "on_order_qty": {
      "type": "string",
      "format": "decimal",
      "description": "On order qty",
      "readOnly": true
     },
     "on_production_qty": {
      "type": "string",
      "format": "decimal",
      "description": "On production qty",
      "readOnly": true
     },
     "available_qty": {
      "type": "string",
      "format": "decimal",
      "description": "Available qty",
      "readOnly": true
     },
     "shortage_qty": {
      "type": "string",
      "format": "decimal",
      "description": "Shortage qty",
      "readOnly": true
     },
     "expected_date": {
      "type": "string",
      "format": "date",
      "description": "Expected date",
      "readOnly": true
     },
     "unit_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Unit cost",
      "readOnly": true
     },
     "action": {
      "type": "string",
      "description": "Action",
      "readOnly": true
     },
     "alternate_item_id": {
      "type": "string",
      "format": "uuid",
      "description": "Alternate item id",
      "readOnly": true
     },
     "reservation_id": {
      "type": "string",
      "format": "uuid",
      "description": "Reservation id",
      "readOnly": true
     },
     "requisition_line_id": {
      "type": "string",
      "format": "uuid",
      "description": "Requisition line id",
      "readOnly": true
     },
     "resolved_component_id": {
      "type": "string",
      "format": "uuid",
      "description": "Resolved component id",
      "readOnly": true
     },
     "notes": {
      "type": "string",
      "description": "Notes",
      "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/availability-lines": {
   "get": {
    "summary": "list availability-lines",
    "operationId": "list_availability_lines_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post availability · lines",
    "operationId": "action_availability_lines_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/availability-lines/{id}": {
   "get": {
    "summary": "get availability-lines",
    "operationId": "get_availability_lines_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put availability · lines",
    "operationId": "action_availability_lines_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete availability · lines",
    "operationId": "action_availability_lines_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/availability-lines/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_availability_lines_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"
     }
    }
   }
  }
 }
}