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: 0.3.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 779
{
    "name": "Berta Anderson IV",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": true,
    "only_order_in_store": false,
    "shop_ids": [
        17,
        19,
        18
    ],
    "seo": {
        "title": {
            "en": "Voluptatem exercitationem error necessitatibus necessitatibus."
        },
        "description": {
            "en": "Nihil expedita inventore eligendi suscipit quibusdam. Voluptates voluptatum nemo laborum dolorem dolores ratione veritatis consequatur. Voluptatem porro eos quae vitae dicta id."
        },
        "url": {
            "en": "http://wilkinson.com/itaque-voluptas-natus-iste-autem-qui-esse"
        }
    },
    "product_ids": [
        10,
        10,
        17
    ]
}

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

{
    "name": "Prof. Kirk VonRueden MD",
    "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": 12,
            "target_price": true,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 17,
                    "maximum": 15,
                    "maximum_day": 10,
                    "maximum_week": 14
                },
                "weight": {
                    "minimum": 18,
                    "maximum": 15,
                    "maximum_day": 13,
                    "maximum_week": 15,
                    "suggested": 18
                },
                "persons": {
                    "minimum": 18,
                    "maximum": 18
                }
            },
            "id": 12,
            "allergens": [
                {
                    "id": 18,
                    "name": "Fish"
                },
                {
                    "id": 17,
                    "name": "Sulphite"
                },
                {
                    "id": 12,
                    "name": "Lactose"
                }
            ],
            "category_id": 18,
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Et vitae dolorem illo velit ea quo."
                },
                "description": {
                    "en": "Ut ad dolores ut quisquam. Et modi nisi et nostrum. Voluptatem blanditiis nobis ut voluptates sed delectus. Nihil aut fuga dolorum et."
                },
                "url": {
                    "en": "http://baumbach.com/aut-sit-debitis-dolorem-laudantium-tenetur-minus.html"
                }
            },
            "code": "..."
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": false,
            "only_order_in_store": false,
            "price_type": "PER_UNIT",
            "price": 13,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 16,
                    "maximum": 13,
                    "maximum_day": 11,
                    "maximum_week": 19
                },
                "weight": {
                    "minimum": 17,
                    "maximum": 18,
                    "maximum_day": 19,
                    "maximum_week": 18,
                    "suggested": 18
                },
                "persons": {
                    "minimum": 14,
                    "maximum": 10
                }
            },
            "id": 14,
            "allergens": [
                {
                    "id": 18,
                    "name": "Nuts"
                },
                {
                    "id": 11,
                    "name": "Soy"
                },
                {
                    "id": 15,
                    "name": "Fish"
                }
            ],
            "category_id": 16,
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Praesentium modi ut quae molestiae itaque similique et beatae voluptate excepturi."
                },
                "description": {
                    "en": "Eos ab libero dolorum eum maiores. Fugiat blanditiis dolor omnis nihil. Quos hic culpa deleniti molestias et."
                },
                "url": {
                    "en": "https://botsford.com/aut-sed-veritatis-accusamus-eum-nam-molestiae-et.html"
                }
            },
            "code": "..."
        },
        {
            "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": 14,
                    "maximum": 12,
                    "maximum_day": 17,
                    "maximum_week": 13
                },
                "weight": {
                    "minimum": 11,
                    "maximum": 10,
                    "maximum_day": 14,
                    "maximum_week": 10,
                    "suggested": 18
                },
                "persons": {
                    "minimum": 14,
                    "maximum": 16
                }
            },
            "id": 14,
            "allergens": [
                {
                    "id": 12,
                    "name": "Peanut"
                },
                {
                    "id": 15,
                    "name": "Sulphite"
                },
                {
                    "id": 10,
                    "name": "Fish"
                }
            ],
            "category_id": 19,
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Ea voluptate eum ad aliquam iusto."
                },
                "description": {
                    "en": "Aut voluptatem recusandae pariatur qui id. Quia dolorem dolores a alias. Nesciunt ut dolorem non quae ad. Mollitia ut et pariatur et quam itaque consequuntur."
                },
                "url": {
                    "en": "https://wiegand.com/ratione-veniam-magni-aliquid-qui.html"
                }
            },
            "code": "..."
        }
    ],
    "shops": [
        {
            "name": "Ms. Vita Farrell",
            "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": 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": 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": "Margot Kutch",
            "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,
            "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": 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": "Keyshawn Huels",
            "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": 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": true
            }
        }
    ],
    "id": 18,
    "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": "Officiis amet consequatur laudantium qui rerum at accusamus sunt."
        },
        "description": {
            "en": "Porro dolores nihil delectus. Omnis maxime praesentium cumque corporis. Quis repudiandae molestiae ut suscipit fuga. Reiciendis qui molestiae error voluptatum nihil."
        },
        "url": {
            "en": "http://www.marquardt.com/"
        }
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
0.3.0 stable