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.1.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 732
{
    "name": "Sarina Bergstrom",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": false,
    "only_order_in_store": false,
    "shop_ids": [
        10,
        14,
        16
    ],
    "seo": {
        "title": {
            "en": "In sit aut qui unde totam itaque quis sunt consequuntur non."
        },
        "description": {
            "en": "Voluptates qui quo totam rerum. Non autem quibusdam cupiditate veritatis dolor ut nemo quaerat. Et maiores numquam id quia. Ipsam laborum nihil eveniet corrupti ducimus ullam."
        },
        "url": {
            "en": "http://pfeffer.com/"
        }
    },
    "product_ids": [
        16,
        15,
        19
    ]
}

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: 13317

{
    "name": "Morgan Becker IV",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": false,
    "only_order_in_store": false,
    "products": [
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": false,
            "only_order_in_store": true,
            "price_type": "PER_UNIT",
            "price": 12,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 12,
                    "maximum": 11,
                    "maximum_day": 16,
                    "maximum_week": 11
                },
                "weight": {
                    "minimum": 11,
                    "maximum": 13,
                    "maximum_day": 12,
                    "maximum_week": 18,
                    "suggested": 18
                },
                "persons": {
                    "minimum": 16,
                    "maximum": 10
                }
            },
            "id": 19,
            "allergens": [
                {
                    "id": 13,
                    "name": "Mollusc"
                },
                {
                    "id": 13,
                    "name": "Celery"
                },
                {
                    "id": 13,
                    "name": "Peanut"
                }
            ],
            "category_id": 17,
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Et occaecati nemo soluta ut dolorum neque ut aliquid quaerat et."
                },
                "description": {
                    "en": "Magni ut eum qui quia pariatur. Et et est repudiandae culpa aut. Rem aperiam autem eos aut aut. Dolorum et quibusdam omnis labore inventore vero deserunt."
                },
                "url": {
                    "en": "http://www.jakubowski.net/dolores-animi-sint-libero-tempora-dicta-quia-eius-at"
                }
            },
            "code": "..."
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": true,
            "only_order_in_store": true,
            "price_type": "PER_UNIT",
            "price": 15,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 11,
                    "maximum": 17,
                    "maximum_day": 17,
                    "maximum_week": 13
                },
                "weight": {
                    "minimum": 14,
                    "maximum": 19,
                    "maximum_day": 13,
                    "maximum_week": 13,
                    "suggested": 11
                },
                "persons": {
                    "minimum": 17,
                    "maximum": 11
                }
            },
            "id": 12,
            "allergens": [
                {
                    "id": 15,
                    "name": "Celery"
                },
                {
                    "id": 18,
                    "name": "Sulphite"
                },
                {
                    "id": 15,
                    "name": "Egg"
                }
            ],
            "category_id": 11,
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Et error sint tempore aliquid ut qui sit."
                },
                "description": {
                    "en": "Soluta sit architecto veniam consequuntur animi. Corporis et maiores deserunt. Est ex qui doloremque repellat. Et aut est debitis."
                },
                "url": {
                    "en": "http://www.gerlach.info/similique-et-velit-quidem-dolorem-architecto-commodi-quo"
                }
            },
            "code": "..."
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": false,
            "active": false,
            "only_order_in_store": false,
            "price_type": "PER_UNIT",
            "price": 10,
            "target_price": true,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 12,
                    "maximum": 16,
                    "maximum_day": 12,
                    "maximum_week": 18
                },
                "weight": {
                    "minimum": 14,
                    "maximum": 11,
                    "maximum_day": 11,
                    "maximum_week": 13,
                    "suggested": 17
                },
                "persons": {
                    "minimum": 18,
                    "maximum": 18
                }
            },
            "id": 18,
            "allergens": [
                {
                    "id": 18,
                    "name": "Sulphite"
                },
                {
                    "id": 10,
                    "name": "Egg"
                },
                {
                    "id": 11,
                    "name": "Crustaceans"
                }
            ],
            "category_id": 16,
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Et dignissimos qui eum corrupti ut omnis quia nihil suscipit ipsam."
                },
                "description": {
                    "en": "Dolor qui numquam dolores aut suscipit. Ducimus aspernatur earum enim cupiditate exercitationem unde eos numquam. Eum qui quos explicabo dolor et. Et eos vel illo odit velit qui enim."
                },
                "url": {
                    "en": "http://www.streich.com/maxime-et-necessitatibus-porro-libero-reprehenderit"
                }
            },
            "code": "..."
        }
    ],
    "shops": [
        {
            "name": "Prof. Kristoffer Mayert III",
            "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,
            "id": 18,
            "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": "Leone Cassin",
            "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,
            "id": 16,
            "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": true
            }
        },
        {
            "name": "Amelie Shanahan",
            "active": true,
            "address": {
                "street": "Sint-Denijslaan",
                "nr": "96",
                "zipcode": "9000",
                "city": "Gent",
                "country": "BE",
                "position": {
                    "latitude": 1.54361,
                    "longitude": 0.45645
                }
            },
            "allow_comments": true,
            "allow_orders": false,
            "delivery_use_intervals": true,
            "id": 15,
            "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": false
            }
        }
    ],
    "id": 19,
    "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
    },
    "seo": {
        "title": {
            "en": "Libero aliquam adipisci quas qui qui et odio ducimus voluptate."
        },
        "description": {
            "en": "Voluptatem quia non aperiam ratione velit. Aperiam voluptatem reiciendis repudiandae autem corporis sed accusantium consectetur. Aut aut aut non tempora harum quidem."
        },
        "url": {
            "en": "http://runolfsson.info/qui-minus-et-est-vero.html"
        }
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.1.0 stable