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.0.1
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 746
{
    "name": "Dr. Michelle Morissette Jr.",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": true,
    "only_order_in_store": false,
    "shop_ids": [
        16,
        19,
        15
    ],
    "seo": {
        "title": {
            "en": "Odit ullam debitis ipsa unde officia explicabo cupiditate quibusdam."
        },
        "description": {
            "en": "Et nesciunt itaque voluptas beatae sunt. Architecto sed animi nihil eos qui voluptate incidunt. Est ut unde eum quis soluta."
        },
        "url": {
            "en": "http://www.russel.com/odit-est-voluptatem-omnis-et-labore-et-nihil"
        }
    },
    "product_ids": [
        19,
        16,
        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: 12984

{
    "name": "Chelsea Hintz",
    "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": 17,
            "target_price": true,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 12,
                    "maximum": 10,
                    "maximum_day": 16,
                    "maximum_week": 11
                },
                "weight": {
                    "minimum": 12,
                    "maximum": 15,
                    "maximum_day": 14,
                    "maximum_week": 19,
                    "suggested": 12
                },
                "persons": {
                    "minimum": 11,
                    "maximum": 11
                }
            },
            "id": 17,
            "allergens": [
                {
                    "id": 12,
                    "name": "Lupine"
                },
                {
                    "id": 10,
                    "name": "Nuts"
                },
                {
                    "id": 12,
                    "name": "Fish"
                }
            ],
            "category_id": 17,
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Et non iusto illo itaque quia facere."
                },
                "description": {
                    "en": "Omnis error assumenda aut. Aut eum ducimus dolorum quos impedit a non tempora. Minus iste eos unde. Laboriosam aperiam fugiat et."
                },
                "url": {
                    "en": "http://marquardt.com/"
                }
            },
            "code": "..."
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": true,
            "only_order_in_store": false,
            "price_type": "PER_UNIT",
            "price": 14,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 11,
                    "maximum": 17,
                    "maximum_day": 10,
                    "maximum_week": 18
                },
                "weight": {
                    "minimum": 10,
                    "maximum": 19,
                    "maximum_day": 15,
                    "maximum_week": 10,
                    "suggested": 14
                },
                "persons": {
                    "minimum": 19,
                    "maximum": 10
                }
            },
            "id": 19,
            "allergens": [
                {
                    "id": 16,
                    "name": "Sulphite"
                },
                {
                    "id": 13,
                    "name": "Celery"
                },
                {
                    "id": 15,
                    "name": "Nuts"
                }
            ],
            "category_id": 19,
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Consequatur id molestias non facere."
                },
                "description": {
                    "en": "Numquam animi est animi. Ut ut voluptatem aut fuga. Sequi accusamus ab earum accusantium unde consequatur."
                },
                "url": {
                    "en": "https://www.veum.info/quas-et-a-odio-voluptas-voluptas"
                }
            },
            "code": "..."
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": false,
            "active": true,
            "only_order_in_store": false,
            "price_type": "PER_UNIT",
            "price": 16,
            "target_price": true,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 17,
                    "maximum": 11,
                    "maximum_day": 18,
                    "maximum_week": 16
                },
                "weight": {
                    "minimum": 19,
                    "maximum": 18,
                    "maximum_day": 17,
                    "maximum_week": 12,
                    "suggested": 19
                },
                "persons": {
                    "minimum": 13,
                    "maximum": 10
                }
            },
            "id": 18,
            "allergens": [
                {
                    "id": 18,
                    "name": "Sulphite"
                },
                {
                    "id": 19,
                    "name": "Mustard"
                },
                {
                    "id": 16,
                    "name": "Mustard"
                }
            ],
            "category_id": 15,
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Ea culpa fuga et repellendus inventore."
                },
                "description": {
                    "en": "Eligendi deserunt alias dolor. Est qui nesciunt et vero. Magnam illum placeat alias unde nobis nam. Qui tenetur illum molestiae facere et sequi aut."
                },
                "url": {
                    "en": "http://lebsack.com/"
                }
            },
            "code": "..."
        }
    ],
    "shops": [
        {
            "name": "Delbert VonRueden IV",
            "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": "Ms. Amara Braun",
            "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": true,
            "delivery_use_intervals": false,
            "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": true
            }
        },
        {
            "name": "Beau Wolf IV",
            "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": 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": false
            }
        }
    ],
    "id": 13,
    "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": "Qui nihil maiores eum earum soluta."
        },
        "description": {
            "en": "Eaque saepe amet qui eum dolores animi iure neque. Et atque quia esse voluptatem. Sed vitae est at. Ipsam enim totam harum eos vitae."
        },
        "url": {
            "en": "http://www.hills.net/esse-dignissimos-perferendis-atque-maxime-doloremque-et"
        }
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.0.1 stable