{
 "openapi": "3.1.0",
 "info": {
  "title": "Production Order Cost (Manufacturing)",
  "version": "20261030b",
  "description": "What a production order actually consumed, from what was posted rather than from an estimate: material issued, time confirmed, outside processing received and rework done."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "order-actual-cost": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "order_no": {
      "type": "string",
      "description": "Order no",
      "readOnly": true
     },
     "item_id": {
      "type": "string",
      "format": "uuid",
      "description": "Item id",
      "readOnly": true
     },
     "bom_id": {
      "type": "string",
      "format": "uuid",
      "description": "Bom id",
      "readOnly": true
     },
     "routing_id": {
      "type": "string",
      "format": "uuid",
      "description": "Routing id",
      "readOnly": true
     },
     "quantity": {
      "type": "string",
      "format": "decimal",
      "description": "Quantity",
      "readOnly": true
     },
     "qty_completed": {
      "type": "string",
      "format": "decimal",
      "description": "Qty completed",
      "readOnly": true
     },
     "qty_scrapped": {
      "type": "string",
      "format": "decimal",
      "description": "Qty scrapped",
      "readOnly": true
     },
     "due_date": {
      "type": "string",
      "format": "date",
      "description": "Due date",
      "readOnly": true
     },
     "priority": {
      "type": "integer",
      "description": "Priority",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "source_demand": {
      "type": "string",
      "description": "Source demand",
      "readOnly": true
     },
     "wip_journal_id": {
      "type": "string",
      "format": "uuid",
      "description": "Wip journal id",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "cost_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Cost center id",
      "readOnly": true
     },
     "profit_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Profit center id",
      "readOnly": true
     },
     "cancelled_at": {
      "type": "string",
      "format": "date-time",
      "description": "Cancelled at",
      "readOnly": true
     },
     "cancelled_by": {
      "type": "string",
      "format": "uuid",
      "description": "Cancelled by",
      "readOnly": true
     },
     "cancel_reason": {
      "type": "string",
      "description": "Cancel reason",
      "readOnly": true
     },
     "reversed_by_id": {
      "type": "string",
      "format": "uuid",
      "description": "Reversed by id",
      "readOnly": true
     },
     "reverses_id": {
      "type": "string",
      "format": "uuid",
      "description": "Reverses id",
      "readOnly": true
     },
     "order_type": {
      "type": "string",
      "description": "Order type",
      "readOnly": true
     },
     "qty_reworked": {
      "type": "string",
      "format": "decimal",
      "description": "Qty reworked",
      "readOnly": true
     },
     "scheduled_start": {
      "type": "string",
      "format": "date-time",
      "description": "Scheduled start",
      "readOnly": true
     },
     "scheduled_end": {
      "type": "string",
      "format": "date-time",
      "description": "Scheduled end",
      "readOnly": true
     },
     "actual_start": {
      "type": "string",
      "format": "date-time",
      "description": "Actual start",
      "readOnly": true
     },
     "actual_end": {
      "type": "string",
      "format": "date-time",
      "description": "Actual end",
      "readOnly": true
     },
     "work_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Work center id",
      "readOnly": true
     },
     "recipe_id": {
      "type": "string",
      "format": "uuid",
      "description": "Recipe id",
      "readOnly": true
     },
     "batch_no": {
      "type": "string",
      "description": "Batch no",
      "readOnly": true
     },
     "output_lot_no": {
      "type": "string",
      "description": "Output lot no",
      "readOnly": true
     },
     "master_schedule_id": {
      "type": "string",
      "format": "uuid",
      "description": "Master schedule id",
      "readOnly": true
     },
     "planned_order_id": {
      "type": "string",
      "format": "uuid",
      "description": "Planned order id",
      "readOnly": true
     },
     "kanban_card_id": {
      "type": "string",
      "format": "uuid",
      "description": "Kanban card id",
      "readOnly": true
     },
     "sales_order_id": {
      "type": "string",
      "format": "uuid",
      "description": "Sales order id",
      "readOnly": true
     },
     "sales_order_line_id": {
      "type": "string",
      "format": "uuid",
      "description": "Sales order line id",
      "readOnly": true
     },
     "config_id": {
      "type": "string",
      "format": "uuid",
      "description": "Config id",
      "readOnly": true
     },
     "account_id": {
      "type": "string",
      "format": "uuid",
      "description": "Account id",
      "readOnly": true
     },
     "planned_start": {
      "type": "string",
      "format": "date",
      "description": "Planned start",
      "readOnly": true
     },
     "planned_end": {
      "type": "string",
      "format": "date",
      "description": "Planned end",
      "readOnly": true
     },
     "released_at": {
      "type": "string",
      "format": "date-time",
      "description": "Released at",
      "readOnly": true
     },
     "released_by": {
      "type": "string",
      "format": "uuid",
      "description": "Released by",
      "readOnly": true
     },
     "estimated_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Estimated cost",
      "readOnly": true
     },
     "currency": {
      "type": "string",
      "description": "Currency",
      "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
     },
     "parent_order_id": {
      "type": "string",
      "format": "uuid",
      "description": "Parent order id",
      "readOnly": true
     },
     "over_delivery_tolerance_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Over delivery tolerance pct",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/mfg/order-actual-cost": {
   "get": {
    "summary": "list order-actual-cost",
    "operationId": "list_order_actual_cost_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post production order cost",
    "operationId": "action_order_actual_cost_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/order-actual-cost/{production_order_id}": {
   "get": {
    "summary": "get order-actual-cost",
    "operationId": "get_order_actual_cost_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/order-actual-cost/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_order_actual_cost_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/order-actual-cost/{id}": {
   "put": {
    "summary": "Put production order cost",
    "operationId": "action_order_actual_cost_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete production order cost",
    "operationId": "action_order_actual_cost_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}