Create a category

POST /company/companies/@id/categories

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 company where to create a new category

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

POST /company/companies/14/categories 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: 644
{
    "name": "Prof. Susana West",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": true,
    "only_order_in_store": true,
    "shop_ids": [
        16,
        10,
        13
    ],
    "seo": {
        "title": "Pariatur consequatur quia voluptatem culpa illo porro accusamus adipisci quaerat et magnam.",
        "description": "Enim qui aut commodi amet vel neque. Natus doloremque quod error itaque et laudantium expedita.",
        "url": "https://www.kuhic.com/optio-quo-explicabo-fuga-consectetur-beatae-autem"
    },
    "product_ids": [
        13,
        12,
        12
    ]
}

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

{
    "name": "Leo Hoppe",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": false,
    "only_order_in_store": false,
    "products": [
        {
            "name": "Carson Thompson",
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": false,
            "only_order_in_store": true,
            "price_type": "PER_UNIT",
            "price": 14,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 16,
                    "maximum": 10,
                    "maximum_day": 10,
                    "maximum_week": 13
                },
                "weight": {
                    "minimum": 16,
                    "maximum": 18,
                    "maximum_day": 12,
                    "maximum_week": 18,
                    "suggested": 18
                },
                "persons": {
                    "minimum": 19,
                    "maximum": 19
                }
            },
            "id": 17,
            "allergens": [
                {
                    "id": 13,
                    "name": "1332"
                },
                {
                    "id": 13,
                    "name": "1332"
                },
                {
                    "id": 16,
                    "name": "1324"
                }
            ],
            "category_id": 15,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": "Molestiae modi officiis corporis dignissimos rerum cumque minima esse natus.",
                "description": "Facere esse perferendis esse soluta architecto non. Est atque at sit ut tempore consectetur. Ut harum excepturi nam quisquam porro.",
                "url": "http://reichert.org/impedit-occaecati-quos-pariatur-qui.html"
            }
        },
        {
            "name": "Delpha Watsica",
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": false,
            "active": false,
            "only_order_in_store": true,
            "price_type": "PER_UNIT",
            "price": 12,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 17,
                    "maximum": 11,
                    "maximum_day": 15,
                    "maximum_week": 17
                },
                "weight": {
                    "minimum": 11,
                    "maximum": 13,
                    "maximum_day": 19,
                    "maximum_week": 10,
                    "suggested": 16
                },
                "persons": {
                    "minimum": 13,
                    "maximum": 10
                }
            },
            "id": 12,
            "allergens": [
                {
                    "id": 10,
                    "name": "1328"
                },
                {
                    "id": 16,
                    "name": "1326"
                },
                {
                    "id": 18,
                    "name": "1326"
                }
            ],
            "category_id": 12,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": "Nam ea qui ab sed beatae voluptatem blanditiis quia.",
                "description": "Officia distinctio suscipit unde nesciunt. Ut doloremque aut ipsam voluptatem. Eligendi ut aut eum voluptas mollitia et.",
                "url": "http://doyle.com/nostrum-debitis-ut-quibusdam-laborum-dolores"
            }
        },
        {
            "name": "Prof. Cole Cronin",
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": true,
            "only_order_in_store": true,
            "price_type": "PER_UNIT",
            "price": 17,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 11,
                    "maximum": 14,
                    "maximum_day": 19,
                    "maximum_week": 13
                },
                "weight": {
                    "minimum": 15,
                    "maximum": 13,
                    "maximum_day": 14,
                    "maximum_week": 13,
                    "suggested": 10
                },
                "persons": {
                    "minimum": 15,
                    "maximum": 17
                }
            },
            "id": 12,
            "allergens": [
                {
                    "id": 15,
                    "name": "1332"
                },
                {
                    "id": 12,
                    "name": "1327"
                },
                {
                    "id": 19,
                    "name": "1327"
                }
            ],
            "category_id": 15,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": "Nihil et ut adipisci porro.",
                "description": "Suscipit totam praesentium repudiandae eos qui. Et aut qui amet impedit. Ab et est sed ut consequatur minus. Consequuntur fugit quia repudiandae.",
                "url": "http://hoppe.com/non-eligendi-rerum-quasi-asperiores-error-dolorem-consequatur"
            }
        }
    ],
    "shops": [
        {
            "name": "Mr. Nathaniel Powlowski",
            "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": true,
            "id": 13,
            "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": "Andreane Graham",
            "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": false,
            "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": true
            }
        },
        {
            "name": "Mya Lebsack",
            "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": false,
            "id": 13,
            "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": 14,
    "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": "Delectus eos quae modi magni dolores.",
        "description": "Hic eos asperiores nemo quam ducimus. Et possimus odit est in vel dolore quia. Impedit cupiditate velit consequuntur voluptatem ut. Quia illum maxime blanditiis libero debitis dolorem officia.",
        "url": "http://gleichner.com/non-et-maxime-minima-quo-sed"
    }
}
Version update available Please adjust your integration to the latest stable version (1.6.0)
1.5.0 stable