{
 "openapi": "3.1.0",
 "info": {
  "title": "Configurations (Supply Chain)",
  "version": "20261030b",
  "description": "What customers actually configured, what it came to, and whether it can be made yet."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "configurations": {
    "type": "object",
    "required": [
     "model_id"
    ],
    "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"
     },
     "config_no": {
      "type": "string",
      "description": "Config no",
      "readOnly": true
     },
     "model_id": {
      "type": "string",
      "format": "uuid",
      "description": "Model id"
     },
     "account_id": {
      "type": "string",
      "format": "uuid",
      "description": "Account id"
     },
     "quotation_id": {
      "type": "string",
      "format": "uuid",
      "description": "Quotation id"
     },
     "sales_order_id": {
      "type": "string",
      "format": "uuid",
      "description": "Sales order id"
     },
     "quantity": {
      "type": "string",
      "format": "decimal",
      "description": "Quantity"
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "is_complete": {
      "type": "boolean",
      "description": "Is complete",
      "readOnly": true
     },
     "violation_count": {
      "type": "integer",
      "description": "Violation count",
      "readOnly": true
     },
     "configured_price": {
      "type": "string",
      "format": "decimal",
      "description": "Configured price",
      "readOnly": true
     },
     "configured_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Configured cost",
      "readOnly": true
     },
     "lead_time_days": {
      "type": "integer",
      "description": "Lead time days",
      "readOnly": true
     },
     "configured_weight_kg": {
      "type": "string",
      "format": "decimal",
      "description": "Configured weight kg",
      "readOnly": true
     },
     "effective_fulfilment": {
      "type": "string",
      "description": "Effective fulfilment",
      "readOnly": true
     },
     "configured_item_id": {
      "type": "string",
      "format": "uuid",
      "description": "Configured item id",
      "readOnly": true
     },
     "configured_bom_id": {
      "type": "string",
      "format": "uuid",
      "description": "Configured bom id",
      "readOnly": true
     },
     "production_order_id": {
      "type": "string",
      "format": "uuid",
      "description": "Production order id",
      "readOnly": true
     },
     "revision_id": {
      "type": "string",
      "format": "uuid",
      "description": "Revision id",
      "readOnly": true
     },
     "configured_at": {
      "type": "string",
      "format": "date-time",
      "description": "Configured at",
      "readOnly": true
     },
     "configured_by": {
      "type": "string",
      "format": "uuid",
      "description": "Configured by",
      "readOnly": true
     },
     "model_version": {
      "type": "string",
      "description": "Model version",
      "readOnly": true
     },
     "notes": {
      "type": "string",
      "description": "Notes"
     },
     "parent_config_id": {
      "type": "string",
      "format": "uuid",
      "description": "Parent config id",
      "readOnly": true
     },
     "parent_rule_id": {
      "type": "string",
      "format": "uuid",
      "description": "Parent rule id",
      "readOnly": true
     },
     "structure_level": {
      "type": "integer",
      "description": "Structure level",
      "readOnly": true
     },
     "material_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Material cost",
      "readOnly": true
     },
     "labor_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Labor cost",
      "readOnly": true
     },
     "machine_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Machine cost",
      "readOnly": true
     },
     "setup_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Setup cost",
      "readOnly": true
     },
     "outside_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Outside cost",
      "readOnly": true
     },
     "consumable_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Consumable cost",
      "readOnly": true
     },
     "packaging_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Packaging cost",
      "readOnly": true
     },
     "scrap_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Scrap cost",
      "readOnly": true
     },
     "freight_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Freight cost",
      "readOnly": true
     },
     "overhead_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Overhead cost",
      "readOnly": true
     },
     "total_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Total cost",
      "readOnly": true
     },
     "applied_markup_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Applied markup pct",
      "readOnly": true
     },
     "quoted_price": {
      "type": "string",
      "format": "decimal",
      "description": "Quoted price",
      "readOnly": true
     },
     "configured_routing_id": {
      "type": "string",
      "format": "uuid",
      "description": "Configured routing id",
      "readOnly": true
     },
     "structure_resolved_at": {
      "type": "string",
      "format": "date-time",
      "description": "Structure resolved at",
      "readOnly": true
     },
     "resolve_note": {
      "type": "string",
      "description": "Resolve note",
      "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
     },
     "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
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/scm/configurations": {
   "get": {
    "summary": "list configurations",
    "operationId": "list_configurations_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create configurations",
    "operationId": "create_configurations_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/configurations/{id}": {
   "get": {
    "summary": "get configurations",
    "operationId": "get_configurations_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change configurations",
    "operationId": "change_configurations_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete configurations",
    "operationId": "delete_configurations_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/configurations/import-template": {
   "get": {
    "summary": "Import template",
    "operationId": "action_configurations_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/configurations/import": {
   "post": {
    "summary": "Import",
    "operationId": "action_configurations_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/configurations/{id}/price": {
   "get": {
    "summary": "Price",
    "operationId": "action_configurations_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/configurations/{id}/cost-price": {
   "get": {
    "summary": "Cost price",
    "operationId": "action_configurations_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/configurations/{id}/select": {
   "post": {
    "summary": "Select",
    "operationId": "action_configurations_0_6",
    "description": "Body keys: optionId*, quantity, instanceNo, remove, value",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/configurations/{id}/resolve": {
   "post": {
    "summary": "Resolve",
    "operationId": "action_configurations_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/configurations/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_configurations_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/scm/configurations/{id}/resolve-structure": {
   "post": {
    "summary": "Resolve structure",
    "operationId": "action_configurations_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/configurations/{id}/structure": {
   "get": {
    "summary": "Structure",
    "operationId": "action_configurations_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/configurations/{id}/explosion": {
   "get": {
    "summary": "Explosion",
    "operationId": "action_configurations_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/configurations/{id}/preview": {
   "get": {
    "summary": "Preview",
    "operationId": "action_configurations_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/configurations/{id}/explain": {
   "get": {
    "summary": "Explain",
    "operationId": "action_configurations_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/configurations/{id}/quote": {
   "post": {
    "summary": "Quote",
    "operationId": "action_configurations_0_6",
    "description": "Body keys: accountId*, markupPct, currency, exchangeRate, unitPrice, validUntil, notes",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/configurations/{id}/production-order": {
   "post": {
    "summary": "Production order",
    "operationId": "action_configurations_0_6",
    "description": "Body keys: quantity, dueDate, plannedStart, plannedEnd, currency",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}