Update a category

PATCH /company/categories/@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 The ID of the category 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] Translated category name
description [Language: String] Description of this category
active Bool A boolean value
only_order_in_store Bool Whether this product can only get ordered in the store with a separate UI for the shop employees, and not in the public webshop
shop_ids [Int] Minimum 1. IDs of the shops the category will be available for
seo company.SeoData Optional. The category's webpage search engine metatags
product_ids [Int] Optional. Set the order of the products in a category by setting the IDs of the products in the right order. You can't add or remove products, only change the order. Don't set this field if you don't want to make changes.

Example request 1

PATCH /company/categories/16 HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.6.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 680
{
    "name": "Vance Hammes",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": false,
    "only_order_in_store": true,
    "shop_ids": [
        12,
        15,
        19
    ],
    "seo": {
        "title": {
            "en": "Ratione possimus unde porro qui."
        },
        "description": {
            "en": "Dolores rerum quo ut quibusdam eum ullam qui. Soluta omnis aut vel beatae. At quam dolore sit ut."
        },
        "url": {
            "en": "http://morissette.com/minus-rerum-numquam-sunt-voluptas-fugiat-laborum-officia"
        }
    },
    "product_ids": [
        12,
        19,
        16
    ]
}

Response

Field Type Description
name [Language: String] Translated category name
description [Language: String] Description of this category
active Bool A boolean value
only_order_in_store Bool Whether this product can only get ordered in the store with a separate UI for the shop employees, and not in the public webshop
products [company.Product.simple] Array of company.Product.simple
shops [company.Shop.simple] Array of company.Shop.simple
id Int ID of the category
banner Image? Nullable.
seo company.SeoData Optional. The category's webpage search engine metatags

Example response 1

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

{
    "name": "Mr. Ellsworth Huels",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": false,
    "only_order_in_store": false,
    "products": [
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": false,
            "active": true,
            "only_order_in_store": false,
            "price_type": "PER_UNIT",
            "price": 17,
            "target_price": true,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 16,
                    "maximum": 18,
                    "maximum_day": 15,
                    "maximum_week": 14
                },
                "weight": {
                    "minimum": 11,
                    "maximum": 11,
                    "maximum_day": 12,
                    "maximum_week": 16,
                    "suggested": 10
                },
                "persons": {
                    "minimum": 19,
                    "maximum": 13
                }
            },
            "id": 11,
            "allergens": [
                {
                    "id": 10,
                    "name": "Milk"
                },
                {
                    "id": 19,
                    "name": "Mustard"
                },
                {
                    "id": 16,
                    "name": "Egg"
                }
            ],
            "category_id": 13,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "At praesentium esse sint unde quam occaecati."
                },
                "description": {
                    "en": "Sint et explicabo eum doloremque error laboriosam. Fuga dicta eaque sit est asperiores accusamus repellendus. Laboriosam porro aliquid dolor debitis itaque voluptas."
                },
                "url": {
                    "en": "http://hyatt.org/et-modi-sequi-aspernatur-dolor-rem-hic-dolore"
                }
            },
            "origin": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": true,
            "only_order_in_store": true,
            "price_type": "PER_UNIT",
            "price": 10,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 13,
                    "maximum": 11,
                    "maximum_day": 19,
                    "maximum_week": 17
                },
                "weight": {
                    "minimum": 14,
                    "maximum": 11,
                    "maximum_day": 19,
                    "maximum_week": 18,
                    "suggested": 11
                },
                "persons": {
                    "minimum": 15,
                    "maximum": 14
                }
            },
            "id": 16,
            "allergens": [
                {
                    "id": 17,
                    "name": "Lactose"
                },
                {
                    "id": 19,
                    "name": "Gluten"
                },
                {
                    "id": 17,
                    "name": "Fish"
                }
            ],
            "category_id": 12,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Quas sapiente iusto et assumenda occaecati quibusdam voluptatem et in magnam."
                },
                "description": {
                    "en": "Sit sed tenetur quis non cupiditate omnis consequuntur. Ullam repellendus nulla qui quia possimus dolorem."
                },
                "url": {
                    "en": "http://hagenes.com/ea-odio-quis-quia-eum-consequatur-adipisci-ut"
                }
            },
            "origin": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": false,
            "only_order_in_store": false,
            "price_type": "PER_UNIT",
            "price": 12,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 17,
                    "maximum": 12,
                    "maximum_day": 15,
                    "maximum_week": 13
                },
                "weight": {
                    "minimum": 13,
                    "maximum": 12,
                    "maximum_day": 10,
                    "maximum_week": 11,
                    "suggested": 16
                },
                "persons": {
                    "minimum": 14,
                    "maximum": 14
                }
            },
            "id": 17,
            "allergens": [
                {
                    "id": 15,
                    "name": "Peanut"
                },
                {
                    "id": 13,
                    "name": "Peanut"
                },
                {
                    "id": 11,
                    "name": "Fish"
                }
            ],
            "category_id": 15,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Rerum dolor quis numquam aut et sequi ea voluptates eum ullam."
                },
                "description": {
                    "en": "Necessitatibus vero excepturi quasi nesciunt ratione voluptate similique. Et voluptas temporibus ut. Cum omnis earum facere quis sequi at odio. Totam ut itaque praesentium est hic amet."
                },
                "url": {
                    "en": "http://emmerich.org/consectetur-cupiditate-consequatur-est-dolor-aperiam.html"
                }
            },
            "origin": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            }
        }
    ],
    "shops": [
        {
            "name": "Mrs. Maegan Cummerata MD",
            "active": true,
            "address": {
                "street": "Sint-Denijslaan",
                "nr": "96",
                "zipcode": "9000",
                "city": "Gent",
                "country": "BE",
                "position": {
                    "latitude": 1.54361,
                    "longitude": 0.45645
                }
            },
            "allow_comments": false,
            "allow_orders": false,
            "delivery_use_intervals": true,
            "allow_invoices": true,
            "allow_order_comments": false,
            "allow_product_comments": true,
            "takeout_use_intervals": true,
            "allow_order_messages": false,
            "id": 12,
            "avatar": {
                "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
            },
            "banner": {
                "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": "Laron Mertz",
            "active": false,
            "address": {
                "street": "Sint-Denijslaan",
                "nr": "96",
                "zipcode": "9000",
                "city": "Gent",
                "country": "BE",
                "position": {
                    "latitude": 1.54361,
                    "longitude": 0.45645
                }
            },
            "allow_comments": false,
            "allow_orders": false,
            "delivery_use_intervals": true,
            "allow_invoices": false,
            "allow_order_comments": false,
            "allow_product_comments": true,
            "takeout_use_intervals": true,
            "allow_order_messages": false,
            "id": 12,
            "avatar": {
                "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
            },
            "banner": {
                "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
            }
        },
        {
            "name": "Janiya Stark",
            "active": true,
            "address": {
                "street": "Sint-Denijslaan",
                "nr": "96",
                "zipcode": "9000",
                "city": "Gent",
                "country": "BE",
                "position": {
                    "latitude": 1.54361,
                    "longitude": 0.45645
                }
            },
            "allow_comments": false,
            "allow_orders": false,
            "delivery_use_intervals": false,
            "allow_invoices": true,
            "allow_order_comments": true,
            "allow_product_comments": true,
            "takeout_use_intervals": true,
            "allow_order_messages": false,
            "id": 14,
            "avatar": {
                "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
            },
            "banner": {
                "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
            }
        }
    ],
    "id": 10,
    "banner": {
        "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
    },
    "seo": {
        "title": {
            "en": "Illum ipsam quia eligendi ab corrupti."
        },
        "description": {
            "en": "Consequuntur voluptatem et nam veritatis. Sint incidunt reprehenderit ut et minima dicta assumenda illo. Est qui voluptatem reiciendis et iusto. Voluptas eum quia magni."
        },
        "url": {
            "en": "http://www.cummings.net/"
        }
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.6.0 stable