{
 "openapi": "3.1.0",
 "info": {
  "title": "Configurator · Options (Supply Chain)",
  "version": "20261030b",
  "description": "The answers. An option with an item puts a part in the product; one without is a characteristic that changes price and paperwork."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "config-options": {
    "type": "object",
    "required": [
     "model_id",
     "class_id",
     "code",
     "name"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "model_id": {
      "type": "string",
      "format": "uuid",
      "description": "Model"
     },
     "class_id": {
      "type": "string",
      "format": "uuid",
      "description": "Question"
     },
     "code": {
      "type": "string",
      "description": "Code"
     },
     "name": {
      "type": "string",
      "description": "Option"
     },
     "description": {
      "type": "string",
      "description": "Description"
     },
     "item_id": {
      "type": "string",
      "format": "uuid",
      "description": "Item it adds"
     },
     "quantity": {
      "type": "string",
      "format": "decimal",
      "description": "Quantity"
     },
     "uom": {
      "type": "string",
      "description": "Uom"
     },
     "price_delta": {
      "type": "string",
      "format": "decimal",
      "description": "Price change"
     },
     "cost_delta": {
      "type": "string",
      "format": "decimal",
      "description": "Cost change"
     },
     "lead_time_delta_days": {
      "type": "integer",
      "description": "Lead time change (days)"
     },
     "weight_delta_kg": {
      "type": "string",
      "format": "decimal",
      "description": "Weight change (kg)"
     },
     "is_default": {
      "type": "boolean",
      "description": "Chosen by default"
     },
     "is_mandatory": {
      "type": "boolean",
      "description": "Fitted as standard, cannot be removed"
     },
     "forces_engineering": {
      "type": "boolean",
      "description": "Turns the whole order into engineer-to-order"
     },
     "sort_order": {
      "type": "integer",
      "description": "Order"
     },
     "is_active": {
      "type": "boolean",
      "description": "Active"
     },
     "effective_from": {
      "type": "string",
      "format": "date",
      "description": "In force from"
     },
     "effective_to": {
      "type": "string",
      "format": "date",
      "description": "Until"
     },
     "value_kind": {
      "type": "string",
      "description": "The answer is a value the person enters",
      "enum": [
       "number",
       "text"
      ]
     },
     "value_label": {
      "type": "string",
      "description": "What to ask for"
     },
     "value_uom": {
      "type": "string",
      "description": "Unit of the value"
     },
     "value_min": {
      "type": "string",
      "format": "decimal",
      "description": "Smallest allowed"
     },
     "value_max": {
      "type": "string",
      "format": "decimal",
      "description": "Largest allowed"
     },
     "value_sets_quantity": {
      "type": "boolean",
      "description": "The value is the quantity of the item it adds"
     },
     "submodel_id": {
      "type": "string",
      "format": "uuid",
      "description": "Submodel id",
      "readOnly": true
     },
     "component_kind": {
      "type": "string",
      "description": "Component kind",
      "readOnly": true
     },
     "value_decimals": {
      "type": "integer",
      "description": "Decimal places allowed"
     },
     "value_max_length": {
      "type": "integer",
      "description": "Most characters allowed"
     },
     "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
     },
     "value_code": {
      "type": "string",
      "description": "Value a rule compares"
     },
     "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/config-options": {
   "get": {
    "summary": "list config-options",
    "operationId": "list_config_options_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create config-options",
    "operationId": "create_config_options_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/config-options/{id}": {
   "get": {
    "summary": "get config-options",
    "operationId": "get_config_options_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change config-options",
    "operationId": "change_config_options_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete config-options",
    "operationId": "delete_config_options_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/config-options/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_config_options_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"
     }
    }
   }
  }
 }
}