{
 "openapi": "3.1.0",
 "info": {
  "title": "Change Orders (Manufacturing)",
  "version": "20261030b",
  "description": "The decision, with an effectivity date, an affected-object list and a disposition for stock already made. Released only once every discipline has answered."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "change-orders": {
    "type": "object",
    "required": [
     "title"
    ],
    "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
     },
     "order_no": {
      "type": "string",
      "description": "Order no",
      "readOnly": true
     },
     "title": {
      "type": "string",
      "description": "Title"
     },
     "description": {
      "type": "string",
      "description": "Description"
     },
     "change_class": {
      "type": "string",
      "description": "Class",
      "enum": [
       "minor",
       "major",
       "documentation",
       "material",
       "process",
       "safety",
       "cost",
       "permanent_deviation"
      ]
     },
     "effectivity_type": {
      "type": "string",
      "description": "Effectivity",
      "enum": [
       "date",
       "serial",
       "lot",
       "order",
       "use_up",
       "immediate"
      ]
     },
     "effective_from": {
      "type": "string",
      "format": "date",
      "description": "Effective from"
     },
     "effective_serial": {
      "type": "string",
      "description": "Effective at serial"
     },
     "effective_lot": {
      "type": "string",
      "description": "Effective at lot"
     },
     "disposition_on_hand": {
      "type": "string",
      "description": "Stock on hand",
      "enum": [
       "use_up",
       "rework",
       "scrap",
       "return",
       "no_impact",
       "quarantine"
      ]
     },
     "disposition_wip": {
      "type": "string",
      "description": "Work in progress",
      "enum": [
       "use_up",
       "rework",
       "scrap",
       "complete_as_is",
       "no_impact"
      ]
     },
     "disposition_in_transit": {
      "type": "string",
      "description": "Disposition in transit"
     },
     "disposition_field": {
      "type": "string",
      "description": "Disposition field"
     },
     "requires_requalification": {
      "type": "boolean",
      "description": "Needs requalification"
     },
     "requires_customer_approval": {
      "type": "boolean",
      "description": "Needs customer approval"
     },
     "requires_ppap": {
      "type": "boolean",
      "description": "Needs PPAP"
     },
     "requires_first_article": {
      "type": "boolean",
      "description": "Needs a first article"
     },
     "implementation_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Implementation cost"
     },
     "scrap_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Scrap cost"
     },
     "annual_saving": {
      "type": "string",
      "format": "decimal",
      "description": "Annual saving"
     },
     "currency": {
      "type": "string",
      "description": "Currency"
     },
     "planned_at": {
      "type": "string",
      "format": "date",
      "description": "Planned for"
     },
     "implemented_at": {
      "type": "string",
      "format": "date-time",
      "description": "Implemented at",
      "readOnly": true
     },
     "raised_by": {
      "type": "string",
      "format": "uuid",
      "description": "Raised by",
      "readOnly": true
     },
     "owner_id": {
      "type": "string",
      "format": "uuid",
      "description": "Owner id"
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "notes": {
      "type": "string",
      "description": "Notes"
     },
     "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/change-orders": {
   "get": {
    "summary": "list change-orders",
    "operationId": "list_change_orders_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create change-orders",
    "operationId": "create_change_orders_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/change-orders/{id}": {
   "get": {
    "summary": "get change-orders",
    "operationId": "get_change_orders_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change change-orders",
    "operationId": "change_change_orders_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete change-orders",
    "operationId": "delete_change_orders_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/change-orders/{parentId}/affected": {
   "get": {
    "summary": "Affected",
    "operationId": "action_change_orders_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Affected",
    "operationId": "action_change_orders_1_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/change-orders/{parentId}/affected/{lineId}": {
   "put": {
    "summary": "Affected",
    "operationId": "action_change_orders_0_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Affected",
    "operationId": "action_change_orders_1_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/change-orders/{parentId}/approvals": {
   "get": {
    "summary": "Approvals",
    "operationId": "action_change_orders_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Approvals",
    "operationId": "action_change_orders_1_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/change-orders/{parentId}/approvals/{lineId}": {
   "put": {
    "summary": "Approvals",
    "operationId": "action_change_orders_0_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Approvals",
    "operationId": "action_change_orders_1_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/change-orders/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_change_orders_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/change-orders/create": {
   "post": {
    "summary": "Create",
    "operationId": "action_change_orders_0_5",
    "description": "Body keys: requestIds, requestId, title*, description, changeClass, effectivityType, effectiveFrom, dispositionOnHand, dispositionWip, ownerId; changeClass one of major|minor|documentation|material|process|safety|cost|permanent_deviation; effectivityType one of date|serial|lot|order|use_up|immediate; dispositionOnHand one of use_up|rework|scrap|return|no_impact|quarantine; dispositionWip one of use_up|rework|scrap|complete_as_is|no_impact",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/change-orders/{id}/impact": {
   "get": {
    "summary": "Impact",
    "operationId": "action_change_orders_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/change-orders/{id}/approve": {
   "post": {
    "summary": "Approve",
    "operationId": "action_change_orders_0_6",
    "description": "Body keys: decision",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/change-orders/{id}/assign-approvers": {
   "post": {
    "summary": "Assign approvers",
    "operationId": "action_change_orders_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/change-orders/{id}/release": {
   "post": {
    "summary": "Release",
    "operationId": "action_change_orders_0_6",
    "description": "Body keys: effectiveFrom",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/change-orders/{id}/implement": {
   "post": {
    "summary": "Implement",
    "operationId": "action_change_orders_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}