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/17 HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 700
{
    "name": "Jayme Simonis",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": false,
    "only_order_in_store": false,
    "shop_ids": [
        19,
        18,
        13
    ],
    "seo": {
        "title": {
            "en": "Sed temporibus qui consectetur animi quia tenetur."
        },
        "description": {
            "en": "Nihil sint id ullam praesentium et. Aut a facere ipsam voluptates dolores. Accusamus unde omnis voluptatibus eaque. Quis est aut ullam reprehenderit natus."
        },
        "url": {
            "en": "http://cummings.biz/"
        }
    },
    "product_ids": [
        13,
        11,
        11
    ]
}

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

{
    "name": "Judd Hegmann IV",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": false,
    "only_order_in_store": true,
    "products": [
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": false,
            "active": true,
            "only_order_in_store": true,
            "price_type": "PER_UNIT",
            "price": 14,
            "target_price": true,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 14,
                    "maximum": 14,
                    "maximum_day": 16,
                    "maximum_week": 11
                },
                "weight": {
                    "minimum": 10,
                    "maximum": 13,
                    "maximum_day": 10,
                    "maximum_week": 17,
                    "suggested": 17
                },
                "persons": {
                    "minimum": 19,
                    "maximum": 16
                }
            },
            "id": 18,
            "allergens": [
                {
                    "id": 16,
                    "name": "Gluten"
                },
                {
                    "id": 10,
                    "name": "Egg"
                },
                {
                    "id": 15,
                    "name": "Mustard"
                }
            ],
            "category_id": 15,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Consequatur corrupti autem cum ipsum sint quia."
                },
                "description": {
                    "en": "Rerum recusandae commodi praesentium laboriosam. Veniam ut minima sint quibusdam unde mollitia. Dolorum nostrum cum perspiciatis voluptas. Fugiat laborum consectetur reiciendis sed in vero harum."
                },
                "url": {
                    "en": "http://rath.biz/quo-voluptate-officia-inventore-molestiae-nihil-debitis-officia"
                }
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": true,
            "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": 19,
                    "maximum": 11,
                    "maximum_day": 16,
                    "maximum_week": 18
                },
                "weight": {
                    "minimum": 13,
                    "maximum": 17,
                    "maximum_day": 11,
                    "maximum_week": 14,
                    "suggested": 17
                },
                "persons": {
                    "minimum": 12,
                    "maximum": 18
                }
            },
            "id": 17,
            "allergens": [
                {
                    "id": 11,
                    "name": "Celery"
                },
                {
                    "id": 10,
                    "name": "Lactose"
                },
                {
                    "id": 19,
                    "name": "Milk"
                }
            ],
            "category_id": 11,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Est aliquam eos sed ea sed facere vero voluptatem natus rem."
                },
                "description": {
                    "en": "In qui repudiandae libero debitis ea. Et velit quis nihil odio ad aut sit sunt. Exercitationem deleniti tempore occaecati fugit."
                },
                "url": {
                    "en": "http://www.thiel.info/modi-quisquam-voluptas-alias-est-error-aspernatur-assumenda-minus"
                }
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": false,
            "only_order_in_store": true,
            "price_type": "PER_UNIT",
            "price": 13,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 15,
                    "maximum": 17,
                    "maximum_day": 10,
                    "maximum_week": 19
                },
                "weight": {
                    "minimum": 13,
                    "maximum": 10,
                    "maximum_day": 12,
                    "maximum_week": 18,
                    "suggested": 15
                },
                "persons": {
                    "minimum": 15,
                    "maximum": 12
                }
            },
            "id": 18,
            "allergens": [
                {
                    "id": 17,
                    "name": "Sesame"
                },
                {
                    "id": 10,
                    "name": "Mollusc"
                },
                {
                    "id": 16,
                    "name": "Peanut"
                }
            ],
            "category_id": 14,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Animi sint numquam ratione eum dolores rerum odit tempora tenetur."
                },
                "description": {
                    "en": "Id porro expedita aut dolores est dolor. Ut nobis accusamus veritatis. Quis est et sunt ut amet minus. Omnis rerum illo quidem quaerat quidem deserunt labore."
                },
                "url": {
                    "en": "http://lubowitz.com/"
                }
            }
        }
    ],
    "shops": [
        {
            "name": "Miss Alene Greenfelder 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": 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": "Silas Shanahan",
            "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": 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": false
            }
        },
        {
            "name": "Blaze Kling",
            "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": true,
            "delivery_use_intervals": true,
            "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": 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
            }
        }
    ],
    "id": 12,
    "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": "Neque animi corrupti et eos est et eius dolorem dicta vitae."
        },
        "description": {
            "en": "Veritatis non quasi molestiae molestiae sapiente. Et eum tempora nisi repudiandae et."
        },
        "url": {
            "en": "http://heathcote.com/cum-rem-accusamus-ex-ut-sit-debitis-quae"
        }
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.5.0 stable