Get all the option sets that belong to a company

GET /company/companies/@id/optionsets

Request

Authentication

This endpoint requires authentication.

Header Value
Authorization Set the value to Bearer + + access_token

URL parameters

Replace the @ keywords in the URL with their corresponding value.

A dictionary with fields

Field Type Description
id Int Company ID. Return only option sets of this company

Example request 1

GET /company/companies/14/optionsets HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.8.0
Accept-Language: en-US,en;q=0.5

Response

Array of company.OptionSet.detailed: [company.OptionSet.detailed]

company.OptionSet.detailed

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

Example response 1

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 4375

[
    {
        "name": {
            "nl": "...",
            "en": "...",
            "fr": "..."
        },
        "allow_attachment": false,
        "options": [
            {
                "name": {
                    "nl": "...",
                    "en": "...",
                    "fr": "..."
                },
                "price_change": 17,
                "id": 12,
                "code": "...",
                "order": 13,
                "price_calculation": "PER_PIECE"
            },
            {
                "name": {
                    "nl": "...",
                    "en": "...",
                    "fr": "..."
                },
                "price_change": 12,
                "id": 17,
                "code": "...",
                "order": 12,
                "price_calculation": "PER_PIECE"
            },
            {
                "name": {
                    "nl": "...",
                    "en": "...",
                    "fr": "..."
                },
                "price_change": 13,
                "id": 16,
                "code": "...",
                "order": 13,
                "price_calculation": "PER_PIECE"
            }
        ],
        "id": 17,
        "code": "...",
        "multiple_choice": true,
        "choose_amount": true,
        "min_different_options": 13,
        "max_different_options": 10,
        "min_amount_options": 11,
        "max_amount_options": 14
    },
    {
        "name": {
            "nl": "...",
            "en": "...",
            "fr": "..."
        },
        "allow_attachment": false,
        "options": [
            {
                "name": {
                    "nl": "...",
                    "en": "...",
                    "fr": "..."
                },
                "price_change": 14,
                "id": 12,
                "code": "...",
                "order": 19,
                "price_calculation": "PER_PIECE"
            },
            {
                "name": {
                    "nl": "...",
                    "en": "...",
                    "fr": "..."
                },
                "price_change": 18,
                "id": 10,
                "code": "...",
                "order": 17,
                "price_calculation": "PER_PIECE"
            },
            {
                "name": {
                    "nl": "...",
                    "en": "...",
                    "fr": "..."
                },
                "price_change": 12,
                "id": 16,
                "code": "...",
                "order": 17,
                "price_calculation": "PER_PIECE"
            }
        ],
        "id": 19,
        "code": "...",
        "multiple_choice": false,
        "choose_amount": false,
        "min_different_options": 11,
        "max_different_options": 11,
        "min_amount_options": 12,
        "max_amount_options": 13
    },
    {
        "name": {
            "nl": "...",
            "en": "...",
            "fr": "..."
        },
        "allow_attachment": false,
        "options": [
            {
                "name": {
                    "nl": "...",
                    "en": "...",
                    "fr": "..."
                },
                "price_change": 13,
                "id": 12,
                "code": "...",
                "order": 15,
                "price_calculation": "PER_PIECE"
            },
            {
                "name": {
                    "nl": "...",
                    "en": "...",
                    "fr": "..."
                },
                "price_change": 19,
                "id": 13,
                "code": "...",
                "order": 18,
                "price_calculation": "PER_PIECE"
            },
            {
                "name": {
                    "nl": "...",
                    "en": "...",
                    "fr": "..."
                },
                "price_change": 11,
                "id": 10,
                "code": "...",
                "order": 10,
                "price_calculation": "PER_PIECE"
            }
        ],
        "id": 14,
        "code": "...",
        "multiple_choice": true,
        "choose_amount": true,
        "min_different_options": 14,
        "max_different_options": 17,
        "min_amount_options": 16,
        "max_amount_options": 19
    }
]
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.8.0 stable