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/453 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 4952a2c22f0863188202510fc3909b9e62d07b02c9a1562673a88ec30e111ae4cc27912e1f058f6dc88a6b59af08dfbd6f91227c4093c9e99db020b4237113ce555ef74ea6e5f6a231a6e4e94d4a18721fb3fb8cea2478ce1f83b4da78ef1a434b2c3203
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/453 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 4952a2c22f0863188202510fc3909b9e62d07b02c9a1562673a88ec30e111ae4cc27912e1f058f6dc88a6b59af08dfbd6f91227c4093c9e99db020b4237113ce555ef74ea6e5f6a231a6e4e94d4a18721fb3fb8cea2478ce1f83b4da78ef1a434b2c3203
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/453 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 4952a2c22f0863188202510fc3909b9e62d07b02c9a1562673a88ec30e111ae4cc27912e1f058f6dc88a6b59af08dfbd6f91227c4093c9e99db020b4237113ce555ef74ea6e5f6a231a6e4e94d4a18721fb3fb8cea2478ce1f83b4da78ef1a434b2c3203
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/453 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 4952a2c22f0863188202510fc3909b9e62d07b02c9a1562673a88ec30e111ae4cc27912e1f058f6dc88a6b59af08dfbd6f91227c4093c9e99db020b4237113ce555ef74ea6e5f6a231a6e4e94d4a18721fb3fb8cea2478ce1f83b4da78ef1a434b2c3203
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: 1049

{
    "id": 453,
    "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": 1587,
            "name": {
                "nl": "No thank you"
            },
            "price_change": 547,
            "code": null,
            "order": 1
        },
        {
            "id": 1588,
            "name": {
                "nl": "No"
            },
            "price_change": 803,
            "code": null,
            "order": 2
        },
        {
            "id": 1589,
            "name": {
                "nl": "Yes please"
            },
            "price_change": 797,
            "code": null,
            "order": 3
        },
        {
            "id": 1590,
            "name": {
                "nl": "Yes"
            },
            "price_change": 782,
            "code": null,
            "order": 4
        }
    ]
}

Example response 2 Update name

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

{
    "id": 453,
    "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": 1587,
            "name": {
                "nl": "No thank you"
            },
            "price_change": 547,
            "code": null,
            "order": 1
        },
        {
            "id": 1588,
            "name": {
                "nl": "No"
            },
            "price_change": 803,
            "code": null,
            "order": 2
        },
        {
            "id": 1589,
            "name": {
                "nl": "Yes please"
            },
            "price_change": 797,
            "code": null,
            "order": 3
        },
        {
            "id": 1590,
            "name": {
                "nl": "Yes"
            },
            "price_change": 782,
            "code": null,
            "order": 4
        }
    ]
}

Example response 3 Update allow attachment

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

{
    "id": 453,
    "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": 1587,
            "name": {
                "nl": "No thank you"
            },
            "price_change": 547,
            "code": null,
            "order": 1
        },
        {
            "id": 1588,
            "name": {
                "nl": "No"
            },
            "price_change": 803,
            "code": null,
            "order": 2
        },
        {
            "id": 1589,
            "name": {
                "nl": "Yes please"
            },
            "price_change": 797,
            "code": null,
            "order": 3
        },
        {
            "id": 1590,
            "name": {
                "nl": "Yes"
            },
            "price_change": 782,
            "code": null,
            "order": 4
        }
    ]
}

Example response 4 Update code

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

{
    "id": 453,
    "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": 1587,
            "name": {
                "nl": "No thank you"
            },
            "price_change": 547,
            "code": null,
            "order": 1
        },
        {
            "id": 1588,
            "name": {
                "nl": "No"
            },
            "price_change": 803,
            "code": null,
            "order": 2
        },
        {
            "id": 1589,
            "name": {
                "nl": "Yes please"
            },
            "price_change": 797,
            "code": null,
            "order": 3
        },
        {
            "id": 1590,
            "name": {
                "nl": "Yes"
            },
            "price_change": 782,
            "code": null,
            "order": 4
        }
    ]
}
1.5.0 stable