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/11 HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.7.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 714
{
    "name": "Anastasia Hayes",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": true,
    "only_order_in_store": true,
    "shop_ids": [
        16,
        14,
        17
    ],
    "seo": {
        "title": {
            "en": "Perspiciatis nulla vel veniam eius voluptatem quam voluptatem."
        },
        "description": {
            "en": "Ea facere dolorum aspernatur ab ea commodi occaecati. Eos et mollitia maiores. Est consequatur quasi delectus."
        },
        "url": {
            "en": "http://www.bahringer.com/quo-aut-autem-enim-ipsam-et-debitis-facere"
        }
    },
    "product_ids": [
        11,
        19,
        18
    ]
}

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

{
    "name": "Sid Schinner",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": true,
    "only_order_in_store": true,
    "products": [
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": false,
            "only_order_in_store": false,
            "price_type": "PER_UNIT",
            "price": 15,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 16,
                    "maximum": 10,
                    "maximum_day": 17,
                    "maximum_week": 18
                },
                "weight": {
                    "minimum": 14,
                    "maximum": 14,
                    "maximum_day": 13,
                    "maximum_week": 12,
                    "suggested": 15
                },
                "persons": {
                    "minimum": 17,
                    "maximum": 16
                }
            },
            "id": 14,
            "allergens": [
                {
                    "id": 19,
                    "name": "Sesame"
                },
                {
                    "id": 19,
                    "name": "Milk"
                },
                {
                    "id": 17,
                    "name": "Sulphite"
                }
            ],
            "category_id": 19,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Qui cumque ipsa nostrum enim quam mollitia eaque omnis est voluptas."
                },
                "description": {
                    "en": "Voluptas eos voluptas necessitatibus vero. Molestias adipisci sit dignissimos sapiente nulla. Et accusantium iusto in qui doloremque harum. Incidunt doloribus minima ducimus eum quod perferendis."
                },
                "url": {
                    "en": "http://www.spencer.info/consequatur-voluptate-beatae-est-perspiciatis"
                }
            },
            "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": 11,
            "target_price": true,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 16,
                    "maximum": 14,
                    "maximum_day": 13,
                    "maximum_week": 11
                },
                "weight": {
                    "minimum": 16,
                    "maximum": 11,
                    "maximum_day": 17,
                    "maximum_week": 16,
                    "suggested": 19
                },
                "persons": {
                    "minimum": 12,
                    "maximum": 11
                }
            },
            "id": 17,
            "allergens": [
                {
                    "id": 16,
                    "name": "Egg"
                },
                {
                    "id": 12,
                    "name": "Mustard"
                },
                {
                    "id": 14,
                    "name": "Lupine"
                }
            ],
            "category_id": 11,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Doloremque laboriosam qui ea ab molestiae quod sequi."
                },
                "description": {
                    "en": "Eaque sed possimus sequi eos debitis. Expedita magni tempora magnam ut ratione et et voluptatem."
                },
                "url": {
                    "en": "https://volkman.biz/non-odit-quia-accusantium-atque-qui-architecto.html"
                }
            },
            "origin": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": false,
            "only_order_in_store": true,
            "price_type": "PER_UNIT",
            "price": 19,
            "target_price": true,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 18,
                    "maximum": 13,
                    "maximum_day": 14,
                    "maximum_week": 14
                },
                "weight": {
                    "minimum": 18,
                    "maximum": 10,
                    "maximum_day": 17,
                    "maximum_week": 17,
                    "suggested": 15
                },
                "persons": {
                    "minimum": 10,
                    "maximum": 11
                }
            },
            "id": 11,
            "allergens": [
                {
                    "id": 18,
                    "name": "Milk"
                },
                {
                    "id": 17,
                    "name": "Nuts"
                },
                {
                    "id": 18,
                    "name": "Crustaceans"
                }
            ],
            "category_id": 11,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Incidunt quas ea ullam ex eos autem exercitationem incidunt pariatur."
                },
                "description": {
                    "en": "Fuga sed beatae voluptas qui est. Ipsum architecto vitae eos aut. Corporis sit pariatur enim animi corrupti maxime. Quis quia rerum quod fugit."
                },
                "url": {
                    "en": "http://treutel.com/temporibus-libero-quo-quisquam-tempore"
                }
            },
            "origin": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            }
        }
    ],
    "shops": [
        {
            "name": "Dr. Beaulah Hegmann III",
            "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,
            "allow_invoices": false,
            "allow_order_comments": false,
            "allow_product_comments": false,
            "takeout_use_intervals": false,
            "allow_order_messages": 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": 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
            },
            "url": "..."
        },
        {
            "name": "Ms. Lina Mosciski III",
            "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,
            "allow_invoices": false,
            "allow_order_comments": true,
            "allow_product_comments": false,
            "takeout_use_intervals": false,
            "allow_order_messages": true,
            "id": 11,
            "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
            },
            "url": "..."
        },
        {
            "name": "Mrs. Kayla Mueller III",
            "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": false,
            "allow_invoices": false,
            "allow_order_comments": false,
            "allow_product_comments": false,
            "takeout_use_intervals": true,
            "allow_order_messages": false,
            "id": 10,
            "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
            },
            "url": "..."
        }
    ],
    "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": "Omnis perspiciatis dolor aut beatae distinctio eos."
        },
        "description": {
            "en": "Voluptates eius alias reprehenderit doloremque. Eos quis ut ipsam velit. Quidem ipsum culpa vel odit assumenda. Laudantium harum beatae adipisci."
        },
        "url": {
            "en": "http://www.klein.com/"
        }
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.7.0 stable