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/10/categories HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.4.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 760
{
    "name": "Cleveland Lakin",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": true,
    "only_order_in_store": true,
    "shop_ids": [
        13,
        19,
        15
    ],
    "seo": {
        "title": {
            "en": "Maiores non vel ad tempore rerum quia esse aperiam doloribus."
        },
        "description": {
            "en": "Fugiat soluta est quaerat consectetur. Est distinctio quia at pariatur. Quae ipsum et est et. Unde totam est fuga molestiae quia ullam. Ut deserunt sunt earum."
        },
        "url": {
            "en": "https://rau.com/ipsum-adipisci-sint-temporibus-ad-et-et-iste.html"
        }
    },
    "product_ids": [
        16,
        17,
        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: 13377

{
    "name": "Darrick Barrows",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": true,
    "only_order_in_store": false,
    "products": [
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": false,
            "active": true,
            "only_order_in_store": true,
            "price_type": "PER_UNIT",
            "price": 10,
            "target_price": true,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 10,
                    "maximum": 10,
                    "maximum_day": 11,
                    "maximum_week": 11
                },
                "weight": {
                    "minimum": 17,
                    "maximum": 12,
                    "maximum_day": 18,
                    "maximum_week": 11,
                    "suggested": 16
                },
                "persons": {
                    "minimum": 13,
                    "maximum": 19
                }
            },
            "id": 13,
            "allergens": [
                {
                    "id": 18,
                    "name": "Egg"
                },
                {
                    "id": 10,
                    "name": "Nuts"
                },
                {
                    "id": 11,
                    "name": "Crustaceans"
                }
            ],
            "category_id": 14,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Vero vel enim voluptatem dolor harum qui ducimus cupiditate quam est."
                },
                "description": {
                    "en": "Quasi aut omnis et omnis consequatur non. Dolorem id autem in ut quas cupiditate ut. Repellendus non repellendus perspiciatis ut et sequi. Nihil dignissimos sit labore."
                },
                "url": {
                    "en": "https://klein.com/incidunt-maiores-maxime-laborum-qui-minima-exercitationem-et-atque.html"
                }
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": false,
            "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": 12,
                    "maximum": 10,
                    "maximum_day": 13,
                    "maximum_week": 15
                },
                "weight": {
                    "minimum": 10,
                    "maximum": 12,
                    "maximum_day": 14,
                    "maximum_week": 17,
                    "suggested": 11
                },
                "persons": {
                    "minimum": 19,
                    "maximum": 12
                }
            },
            "id": 11,
            "allergens": [
                {
                    "id": 15,
                    "name": "Egg"
                },
                {
                    "id": 14,
                    "name": "Gluten"
                },
                {
                    "id": 17,
                    "name": "Fish"
                }
            ],
            "category_id": 10,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Amet fuga optio minus quasi sint non libero possimus."
                },
                "description": {
                    "en": "Officiis animi neque fugiat perspiciatis aperiam ad reprehenderit. Exercitationem nemo et iure consequatur fugit excepturi molestiae. Atque provident non aliquid reprehenderit debitis."
                },
                "url": {
                    "en": "http://www.dickens.com/laborum-sed-est-ab-minima-quis"
                }
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": false,
            "active": false,
            "only_order_in_store": true,
            "price_type": "PER_UNIT",
            "price": 18,
            "target_price": true,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 13,
                    "maximum": 15,
                    "maximum_day": 14,
                    "maximum_week": 11
                },
                "weight": {
                    "minimum": 18,
                    "maximum": 12,
                    "maximum_day": 13,
                    "maximum_week": 18,
                    "suggested": 16
                },
                "persons": {
                    "minimum": 10,
                    "maximum": 14
                }
            },
            "id": 14,
            "allergens": [
                {
                    "id": 19,
                    "name": "Peanut"
                },
                {
                    "id": 13,
                    "name": "Crustaceans"
                },
                {
                    "id": 19,
                    "name": "Nuts"
                }
            ],
            "category_id": 11,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Illo esse dolor veritatis veritatis molestias aspernatur repudiandae."
                },
                "description": {
                    "en": "Eum sint architecto non distinctio. Tenetur qui commodi nobis at praesentium. Consequatur impedit et non dicta quia nemo. Facilis vel id quo molestiae sed aut qui quo."
                },
                "url": {
                    "en": "https://mills.net/similique-est-ut-in-culpa-eveniet-eveniet-voluptatem.html"
                }
            }
        }
    ],
    "shops": [
        {
            "name": "Wanda Gleason",
            "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": 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": 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": "Jodie Beer",
            "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": 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": 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
            }
        },
        {
            "name": "Maximo Bartoletti",
            "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": 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": 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": "Facere earum quidem eum aspernatur non enim deserunt."
        },
        "description": {
            "en": "Excepturi et asperiores aliquam odio omnis illo molestiae et. Autem optio aut quia aliquid est ad quis et. Non sit qui qui non assumenda et sit rerum. Velit dicta nihil exercitationem nobis aut."
        },
        "url": {
            "en": "http://www.morar.com/aliquid-fuga-sed-earum-et-quia-aliquid"
        }
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.4.0 stable