Field | Type | Description |
---|---|---|
id | Int | Id of the option set |
name | String | Name of the option set (translated) |
code | String? | Nullable. ID or key that you a third party can associate with an option set |
multiple_choice | Bool | If true, the user can select none, one or more options (min_different_options and max_different_options is used for minimum and maximum) |
choose_amount | Bool | If true, the user can enter an amount for every option. Note that this can only get enabled when multiple_choice = true |
min_different_options | Int | When multiple choice is enabled, this is the minimum of different options a user should add to a cart item |
max_different_options | Int? | Nullable. When multiple choice is enabled, this is the maximum of different options a user should add to a cart item. When set to null, there is no limit |
min_amount_options | Int | When choose_amount is enabled, this is the minimum allowed sum of the option amounts user should add to a cart item. Note: if price per person is used, you should multiply this amount with the chosen persons. |
max_amount_options | Int? | Nullable. When choose_amount is enabled, this is the maximum allowed sum of the option amounts a user should add to a cart item. When set to null, there is no limit. Note: if price per person is used, you should multiply this amount with the chosen persons. |
options | [Option.simple] | Array of Option.simple |
When used inside a request.
{
"id": 18,
"name": "...",
"code": "...",
"multiple_choice": true,
"choose_amount": true,
"min_different_options": 19,
"max_different_options": 17,
"min_amount_options": 13,
"max_amount_options": 18,
"options": [
{
"id": 15,
"name": "...",
"price_change": {
"value": 12,
"currency": "EUR"
},
"image": {
"resolutions": [
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
}
],
"white_background": false
},
"require_image": false,
"code": "...",
"price_calculation": "PER_PIECE"
},
{
"id": 16,
"name": "...",
"price_change": {
"value": 10,
"currency": "EUR"
},
"image": {
"resolutions": [
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
}
],
"white_background": true
},
"require_image": true,
"code": "...",
"price_calculation": "PER_PIECE"
},
{
"id": 10,
"name": "...",
"price_change": {
"value": 17,
"currency": "EUR"
},
"image": {
"resolutions": [
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
}
],
"white_background": false
},
"require_image": false,
"code": "...",
"price_calculation": "PER_PIECE"
}
]
}
When returned in a response.
{
"id": 19,
"name": "...",
"code": "...",
"multiple_choice": true,
"choose_amount": false,
"min_different_options": 16,
"max_different_options": 14,
"min_amount_options": 18,
"max_amount_options": 14,
"options": [
{
"id": 15,
"name": "...",
"price_change": {
"value": 15,
"currency": "EUR"
},
"image": {
"resolutions": [
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
}
],
"file_id": 19,
"white_background": true
},
"require_image": true,
"code": "...",
"price_calculation": "PER_PIECE"
},
{
"id": 17,
"name": "...",
"price_change": {
"value": 10,
"currency": "EUR"
},
"image": {
"resolutions": [
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
}
],
"file_id": 12,
"white_background": false
},
"require_image": false,
"code": "...",
"price_calculation": "PER_PIECE"
},
{
"id": 12,
"name": "...",
"price_change": {
"value": 14,
"currency": "EUR"
},
"image": {
"resolutions": [
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
}
],
"file_id": 12,
"white_background": true
},
"require_image": true,
"code": "...",
"price_calculation": "PER_PIECE"
}
]
}