UpsertCustomVariableRequestDto
Unified request model for creating or updating custom variables. Contains all the configurable properties of a custom variable.
identifierstringRequired
Unique identifier string for programmatic reference.
Must contain only letters, numbers, underscores, and hyphens.
namestringRequired
Display name shown to customers.
optionsCustomVariableOptionRequestDto[]RequiredPredefined options for dropdown-type custom variables.
Required for dropdown types, ignored for text and number types.
When updating, this completely replaces all existing options.
is_defaultbooleanRequired
Whether this option is selected by default.
Only one option per custom variable should be marked as default.
namestringRequired
Display name shown to customers for this option.
priceintegerRequired
Price modification when this option is selected.
Interpretation depends on PriceType (fixed amount or percentage).
If fixed, the value is in cents, if a percentage, in permille.
price_typeenumRequired
Defines how option pricing should be applied to the base product price.
Possible enum values
fixedFixed amount added to or subtracted from the base price. Price value represents the exact amount in the smallest currency unit.
percentagePercentage modification of the base price. Price value represents the percentage (e.g., 150 = 1.5% increase).
valuestringRequired
The value the command variable will be replaced with.
idFlakeIdOptional
typeenumRequired
Defines the type of input method for a custom variable.
Possible enum values
dropdownDropdown selection with predefined options. Customers choose from a list of available options. Allows for additional pricing based on the selected entry.
textFree-form text input. Customers can enter any text value (subject to validation).
numberNumeric input. Customers can enter numeric values (subject to validation).
descriptionstringOptional
Description explaining the purpose of this custom variable.
value_regexstringOptional
Optional regex pattern for validating customer input.
Only applies to text and number types. Ignored for dropdown types.
Example
{
"identifier": "string",
"name": "string",
"options": [
{
"is_default": true,
"name": "string",
"price": 0,
"price_type": "fixed",
"value": "string",
"id": "411486491630370816"
}
],
"type": "dropdown",
"description": "string",
"value_regex": "string"
}