company.OptionSet.detailed

Request

Fields when send to the api inside a request.

Field Type Description
name [Language: String] Name of the option set
allow_attachment Bool Allow the attachment of a picture to this option set
options [company.Option] Array of company.Option
code String? Optional. Nullable. Your own ID or key that you can associate with an option set
multiple_choice Bool Optional. 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 Optional. 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 Optional. When multiple choice is enabled, this is the minimum of different options a user should add to a cart item
max_different_options Int? Optional. 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 Optional. When choose_amount is enabled, this is the minimum allowed sum of the option amounts user should add to a cart item
max_amount_options Int? Optional. 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

Response

Fields when returned by the api in a response.

Field Type Description
name [Language: String] Name of the option set
allow_attachment Bool Allow the attachment of a picture to this option set
options [company.Option] Array of company.Option
id Int Id of the option set
code String? Nullable. Your own ID or key that you 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
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

Examples

Request

When used inside a request.

Example 1

{
    "name": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "allow_attachment": false,
    "options": [
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "price_change": 15,
            "order": 14,
            "price_calculation": "PER_PIECE",
            "code": "...",
            "active": true,
            "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
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "price_change": 13,
            "order": 12,
            "price_calculation": "PER_PIECE",
            "code": "...",
            "active": true,
            "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
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "price_change": 19,
            "order": 11,
            "price_calculation": "PER_PIECE",
            "code": "...",
            "active": false,
            "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
            }
        }
    ],
    "code": "...",
    "multiple_choice": false,
    "choose_amount": true,
    "min_different_options": 14,
    "max_different_options": 13,
    "min_amount_options": 11,
    "max_amount_options": 19
}

Response

When returned in a response.

Example 1

{
    "name": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "allow_attachment": true,
    "options": [
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "price_change": 15,
            "id": 18,
            "code": "...",
            "order": 10,
            "price_calculation": "PER_PIECE",
            "active": true,
            "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
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "price_change": 11,
            "id": 19,
            "code": "...",
            "order": 17,
            "price_calculation": "PER_PIECE",
            "active": false,
            "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": 18,
                "white_background": false
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "price_change": 11,
            "id": 11,
            "code": "...",
            "order": 19,
            "price_calculation": "PER_PIECE",
            "active": true,
            "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": 11,
                "white_background": true
            }
        }
    ],
    "id": 12,
    "code": "...",
    "multiple_choice": false,
    "choose_amount": true,
    "min_different_options": 17,
    "max_different_options": 18,
    "min_amount_options": 11,
    "max_amount_options": 12
}
This is a development version Do not use this version in production
1.10.0 development