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 Retrieve optionsets

GET /company/companies/2949/optionsets HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 5ce1aaa5751df4b633730cb6ded198ee976e051eb83014053a42f8e3487b5cdf825340fb843e98ca1ef9936eab06631745c3d5da053904eafc655db3ed71323aca9ddcf1bb872916a88a7a12ed8040400c5d979ce7c1f68c975539dabcd4d5507863c957
X-VERSION: 1.5.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

Example response 1 Retrieve optionsets

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

[
    {
        "id": 8381,
        "name": {
            "nl": "Do you want your bread sliced?"
        },
        "allow_attachment": false,
        "code": null,
        "options": [
            {
                "id": 29431,
                "name": {
                    "nl": "No thank you"
                },
                "price_change": 114,
                "code": null,
                "order": 1
            },
            {
                "id": 29432,
                "name": {
                    "nl": "Yes please"
                },
                "price_change": 835,
                "code": null,
                "order": 2
            }
        ]
    },
    {
        "id": 8382,
        "name": {
            "nl": "Please select an option"
        },
        "allow_attachment": false,
        "code": null,
        "options": [
            {
                "id": 29433,
                "name": {
                    "nl": "Yes"
                },
                "price_change": 644,
                "code": null,
                "order": 1
            },
            {
                "id": 29434,
                "name": {
                    "nl": "Yes please"
                },
                "price_change": 700,
                "code": null,
                "order": 2
            }
        ]
    },
    {
        "id": 8383,
        "name": {
            "nl": "Do you want your bread sliced?"
        },
        "allow_attachment": false,
        "code": null,
        "options": [
            {
                "id": 29435,
                "name": {
                    "nl": "No thank you"
                },
                "price_change": 565,
                "code": null,
                "order": 1
            },
            {
                "id": 29436,
                "name": {
                    "nl": "Yes"
                },
                "price_change": 789,
                "code": null,
                "order": 2
            },
            {
                "id": 29437,
                "name": {
                    "nl": "Yes please"
                },
                "price_change": 274,
                "code": null,
                "order": 3
            },
            {
                "id": 29438,
                "name": {
                    "nl": "No"
                },
                "price_change": 393,
                "code": null,
                "order": 4
            },
            {
                "id": 29439,
                "name": {
                    "nl": "No thank you"
                },
                "price_change": 835,
                "code": null,
                "order": 5
            }
        ]
    },
    {
        "id": 8384,
        "name": {
            "nl": "Do you want a picture on your cake?"
        },
        "allow_attachment": false,
        "code": null,
        "options": [
            {
                "id": 29440,
                "name": {
                    "nl": "Yes"
                },
                "price_change": 519,
                "code": null,
                "order": 1
            },
            {
                "id": 29441,
                "name": {
                    "nl": "Yes"
                },
                "price_change": 128,
                "code": null,
                "order": 2
            },
            {
                "id": 29442,
                "name": {
                    "nl": "No thank you"
                },
                "price_change": 1,
                "code": null,
                "order": 3
            },
            {
                "id": 29443,
                "name": {
                    "nl": "Yes"
                },
                "price_change": 592,
                "code": null,
                "order": 4
            },
            {
                "id": 29444,
                "name": {
                    "nl": "No thank you"
                },
                "price_change": 496,
                "code": null,
                "order": 5
            }
        ]
    },
    {
        "id": 8385,
        "name": {
            "nl": "Please select an option"
        },
        "allow_attachment": false,
        "code": null,
        "options": [
            {
                "id": 29445,
                "name": {
                    "nl": "Yes please"
                },
                "price_change": 742,
                "code": null,
                "order": 1
            },
            {
                "id": 29446,
                "name": {
                    "nl": "Yes"
                },
                "price_change": 4,
                "code": null,
                "order": 2
            },
            {
                "id": 29447,
                "name": {
                    "nl": "Yes"
                },
                "price_change": 931,
                "code": null,
                "order": 3
            },
            {
                "id": 29448,
                "name": {
                    "nl": "Yes please"
                },
                "price_change": 624,
                "code": null,
                "order": 4
            },
            {
                "id": 29449,
                "name": {
                    "nl": "No thank you"
                },
                "price_change": 569,
                "code": null,
                "order": 5
            }
        ]
    }
]
Version update available Please adjust your integration to the latest stable version (1.5.2)
1.5.0 stable