Update an option set

PATCH /company/optionsets/@id

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 ID of the option set you want to update

Body

Pass the following properties via application/json or form encoding in the body of the 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
code String? Optional. Nullable. Your own ID or key that you can associate with an option set

Example request 1 Update all fields

PATCH /company/optionsets/8388 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 43f425c6ba28a89ddd8bb208289c172a5e2cd44a37c71d03686f882c5cef59aad82d02dcc333c372becb6c705053879d049ae32a221614ba2bcf569ca4b06ecfdf834f9b86015de724a1c184d402f043215b48c22ee139ff811b71fdbc179a7faddfedea
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 210
{
    "name": {
        "nl": "Wil je je brood gesneden hebben?",
        "en": "Do you want your bread sliced?",
        "fr": "Est ce que vous voulez votre pain coupé?"
    },
    "allow_attachment": false
}

Example request 2 Update name

PATCH /company/optionsets/8388 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 43f425c6ba28a89ddd8bb208289c172a5e2cd44a37c71d03686f882c5cef59aad82d02dcc333c372becb6c705053879d049ae32a221614ba2bcf569ca4b06ecfdf834f9b86015de724a1c184d402f043215b48c22ee139ff811b71fdbc179a7faddfedea
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 179
{
    "name": {
        "nl": "Wil je je brood gesneden hebben?",
        "en": "Do you want your bread sliced?",
        "fr": "Est ce que vous voulez votre pain coupé?"
    }
}

Example request 3 Update allow attachment

PATCH /company/optionsets/8388 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 43f425c6ba28a89ddd8bb208289c172a5e2cd44a37c71d03686f882c5cef59aad82d02dcc333c372becb6c705053879d049ae32a221614ba2bcf569ca4b06ecfdf834f9b86015de724a1c184d402f043215b48c22ee139ff811b71fdbc179a7faddfedea
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 32
{
    "allow_attachment": true
}

Example request 4 Update code

PATCH /company/optionsets/8388 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 43f425c6ba28a89ddd8bb208289c172a5e2cd44a37c71d03686f882c5cef59aad82d02dcc333c372becb6c705053879d049ae32a221614ba2bcf569ca4b06ecfdf834f9b86015de724a1c184d402f043215b48c22ee139ff811b71fdbc179a7faddfedea
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 26
{
    "code": "AD64GHZ3"
}

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

Example response 1 Update all fields

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

{
    "id": 8388,
    "name": {
        "en": "Do you want your bread sliced?",
        "fr": "Est ce que vous voulez votre pain coupé?",
        "nl": "Wil je je brood gesneden hebben?"
    },
    "allow_attachment": false,
    "code": null,
    "options": [
        {
            "id": 29454,
            "name": {
                "nl": "No"
            },
            "price_change": 86,
            "code": null,
            "order": 1
        },
        {
            "id": 29455,
            "name": {
                "nl": "No"
            },
            "price_change": 673,
            "code": null,
            "order": 2
        },
        {
            "id": 29456,
            "name": {
                "nl": "Yes please"
            },
            "price_change": 681,
            "code": null,
            "order": 3
        },
        {
            "id": 29457,
            "name": {
                "nl": "Yes"
            },
            "price_change": 715,
            "code": null,
            "order": 4
        }
    ]
}

Example response 2 Update name

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

{
    "id": 8388,
    "name": {
        "en": "Do you want your bread sliced?",
        "fr": "Est ce que vous voulez votre pain coupé?",
        "nl": "Wil je je brood gesneden hebben?"
    },
    "allow_attachment": false,
    "code": null,
    "options": [
        {
            "id": 29454,
            "name": {
                "nl": "No"
            },
            "price_change": 86,
            "code": null,
            "order": 1
        },
        {
            "id": 29455,
            "name": {
                "nl": "No"
            },
            "price_change": 673,
            "code": null,
            "order": 2
        },
        {
            "id": 29456,
            "name": {
                "nl": "Yes please"
            },
            "price_change": 681,
            "code": null,
            "order": 3
        },
        {
            "id": 29457,
            "name": {
                "nl": "Yes"
            },
            "price_change": 715,
            "code": null,
            "order": 4
        }
    ]
}

Example response 3 Update allow attachment

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

{
    "id": 8388,
    "name": {
        "en": "Do you want your bread sliced?",
        "fr": "Est ce que vous voulez votre pain coupé?",
        "nl": "Wil je je brood gesneden hebben?"
    },
    "allow_attachment": true,
    "code": null,
    "options": [
        {
            "id": 29454,
            "name": {
                "nl": "No"
            },
            "price_change": 86,
            "code": null,
            "order": 1
        },
        {
            "id": 29455,
            "name": {
                "nl": "No"
            },
            "price_change": 673,
            "code": null,
            "order": 2
        },
        {
            "id": 29456,
            "name": {
                "nl": "Yes please"
            },
            "price_change": 681,
            "code": null,
            "order": 3
        },
        {
            "id": 29457,
            "name": {
                "nl": "Yes"
            },
            "price_change": 715,
            "code": null,
            "order": 4
        }
    ]
}

Example response 4 Update code

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

{
    "id": 8388,
    "name": {
        "en": "Do you want your bread sliced?",
        "fr": "Est ce que vous voulez votre pain coupé?",
        "nl": "Wil je je brood gesneden hebben?"
    },
    "allow_attachment": true,
    "code": "AD64GHZ3",
    "options": [
        {
            "id": 29454,
            "name": {
                "nl": "No"
            },
            "price_change": 86,
            "code": null,
            "order": 1
        },
        {
            "id": 29455,
            "name": {
                "nl": "No"
            },
            "price_change": 673,
            "code": null,
            "order": 2
        },
        {
            "id": 29456,
            "name": {
                "nl": "Yes please"
            },
            "price_change": 681,
            "code": null,
            "order": 3
        },
        {
            "id": 29457,
            "name": {
                "nl": "Yes"
            },
            "price_change": 715,
            "code": null,
            "order": 4
        }
    ]
}
Version update available Please adjust your integration to the latest stable version (1.5.2)
1.5.0 stable