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/15 HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.4.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 755
{
    "name": "Bell Miller",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": true,
    "only_order_in_store": false,
    "shop_ids": [
        13,
        17,
        14
    ],
    "seo": {
        "title": {
            "en": "Quia molestias error autem autem sint et nostrum est ad dolores."
        },
        "description": {
            "en": "Dolores pariatur ad quas quia quidem nobis velit. Non sed praesentium et culpa. Dolorum expedita similique nulla nam blanditiis. Illo quas magnam aut."
        },
        "url": {
            "en": "http://www.flatley.org/aut-aperiam-eum-non-omnis-voluptate-velit-esse"
        }
    },
    "product_ids": [
        17,
        19,
        13
    ]
}

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

{
    "name": "Prof. Mathilde Medhurst V",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": false,
    "only_order_in_store": false,
    "products": [
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": false,
            "active": false,
            "only_order_in_store": true,
            "price_type": "PER_UNIT",
            "price": 12,
            "target_price": true,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 10,
                    "maximum": 14,
                    "maximum_day": 14,
                    "maximum_week": 19
                },
                "weight": {
                    "minimum": 16,
                    "maximum": 13,
                    "maximum_day": 19,
                    "maximum_week": 15,
                    "suggested": 10
                },
                "persons": {
                    "minimum": 14,
                    "maximum": 13
                }
            },
            "id": 10,
            "allergens": [
                {
                    "id": 19,
                    "name": "Crustaceans"
                },
                {
                    "id": 12,
                    "name": "Fish"
                },
                {
                    "id": 19,
                    "name": "Lupine"
                }
            ],
            "category_id": 13,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Consequuntur aut sed sit voluptas voluptas sequi est veritatis facere voluptate."
                },
                "description": {
                    "en": "Voluptate quam voluptates in id. Labore earum vel voluptatem aut cum. Distinctio et voluptatem sit. Repudiandae nesciunt est voluptas dicta consequatur."
                },
                "url": {
                    "en": "http://kozey.org/"
                }
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": false,
            "active": false,
            "only_order_in_store": true,
            "price_type": "PER_UNIT",
            "price": 19,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 10,
                    "maximum": 19,
                    "maximum_day": 12,
                    "maximum_week": 15
                },
                "weight": {
                    "minimum": 10,
                    "maximum": 14,
                    "maximum_day": 14,
                    "maximum_week": 16,
                    "suggested": 19
                },
                "persons": {
                    "minimum": 18,
                    "maximum": 12
                }
            },
            "id": 12,
            "allergens": [
                {
                    "id": 10,
                    "name": "Egg"
                },
                {
                    "id": 12,
                    "name": "Milk"
                },
                {
                    "id": 18,
                    "name": "Mollusc"
                }
            ],
            "category_id": 19,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Aliquam aut blanditiis non necessitatibus est voluptatum."
                },
                "description": {
                    "en": "Fugit et atque quo beatae iure et nulla. Aut neque deserunt maxime nostrum quisquam. Nam maiores consequatur vitae voluptates consequatur eum nihil. Neque et omnis sapiente nihil."
                },
                "url": {
                    "en": "https://rau.com/tempore-earum-quia-dolorum-quibusdam-sequi-itaque.html"
                }
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": false,
            "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": 11,
                    "maximum": 17,
                    "maximum_day": 18,
                    "maximum_week": 13
                },
                "weight": {
                    "minimum": 17,
                    "maximum": 18,
                    "maximum_day": 10,
                    "maximum_week": 14,
                    "suggested": 17
                },
                "persons": {
                    "minimum": 10,
                    "maximum": 11
                }
            },
            "id": 19,
            "allergens": [
                {
                    "id": 12,
                    "name": "Nuts"
                },
                {
                    "id": 17,
                    "name": "Egg"
                },
                {
                    "id": 18,
                    "name": "Mollusc"
                }
            ],
            "category_id": 16,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Eligendi distinctio ducimus quibusdam hic sit itaque harum aliquam ut perferendis."
                },
                "description": {
                    "en": "Architecto vel debitis voluptates reiciendis earum ullam. Eum dignissimos ullam quos facilis tempore dolorem. Ipsam officia quo aut est blanditiis nam. Porro molestias beatae ipsa qui eos omnis non."
                },
                "url": {
                    "en": "https://rogahn.com/rerum-voluptatem-aut-aspernatur-quo-et-iusto-quibusdam.html"
                }
            }
        }
    ],
    "shops": [
        {
            "name": "Davonte Luettgen II",
            "active": false,
            "address": {
                "street": "Sint-Denijslaan",
                "nr": "96",
                "zipcode": "9000",
                "city": "Gent",
                "country": "BE",
                "position": {
                    "latitude": 1.54361,
                    "longitude": 0.45645
                }
            },
            "allow_comments": true,
            "allow_orders": true,
            "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
            }
        },
        {
            "name": "Dr. Lessie Johnson Jr.",
            "active": false,
            "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": 19,
            "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": "Halle Balistreri",
            "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": true,
            "delivery_use_intervals": true,
            "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": 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": false
    },
    "seo": {
        "title": {
            "en": "Culpa optio ut earum sit aut."
        },
        "description": {
            "en": "Nisi quod nemo doloribus facere. Commodi autem explicabo est et sint sequi omnis assumenda. Aut qui odit iste quis dolorem."
        },
        "url": {
            "en": "http://kirlin.net/facilis-nam-repellendus-reprehenderit-dolor"
        }
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.4.0 stable