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/19/categories HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.6.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 759
{
    "name": "Dr. Timmy Breitenberg",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": false,
    "only_order_in_store": true,
    "shop_ids": [
        15,
        16,
        12
    ],
    "seo": {
        "title": {
            "en": "Harum rerum dicta aut ut rerum delectus officia doloribus."
        },
        "description": {
            "en": "Beatae facere eligendi possimus quos provident doloremque. Sed eveniet vel illo. Magni blanditiis iusto voluptates quas non occaecati. Corrupti beatae omnis quod error."
        },
        "url": {
            "en": "http://von.com/occaecati-odio-cumque-accusantium-in"
        }
    },
    "product_ids": [
        17,
        16,
        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: 14227

{
    "name": "Josephine Lemke",
    "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": true,
            "price_type": "PER_UNIT",
            "price": 14,
            "target_price": true,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 14,
                    "maximum": 16,
                    "maximum_day": 15,
                    "maximum_week": 11
                },
                "weight": {
                    "minimum": 13,
                    "maximum": 17,
                    "maximum_day": 16,
                    "maximum_week": 19,
                    "suggested": 19
                },
                "persons": {
                    "minimum": 11,
                    "maximum": 15
                }
            },
            "id": 16,
            "allergens": [
                {
                    "id": 18,
                    "name": "Lactose"
                },
                {
                    "id": 15,
                    "name": "Celery"
                },
                {
                    "id": 13,
                    "name": "Soy"
                }
            ],
            "category_id": 16,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Itaque sed voluptatem consequatur ullam accusantium natus."
                },
                "description": {
                    "en": "Vel maxime sit accusantium ut quibusdam. Error odio excepturi cum. Voluptates reprehenderit ex accusantium odio est. Beatae id incidunt illum est reprehenderit quam iste qui."
                },
                "url": {
                    "en": "https://www.marvin.com/officiis-rerum-sit-est-ea"
                }
            },
            "origin": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": true,
            "only_order_in_store": true,
            "price_type": "PER_UNIT",
            "price": 11,
            "target_price": true,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 10,
                    "maximum": 10,
                    "maximum_day": 18,
                    "maximum_week": 19
                },
                "weight": {
                    "minimum": 12,
                    "maximum": 13,
                    "maximum_day": 14,
                    "maximum_week": 12,
                    "suggested": 13
                },
                "persons": {
                    "minimum": 17,
                    "maximum": 10
                }
            },
            "id": 14,
            "allergens": [
                {
                    "id": 19,
                    "name": "Mustard"
                },
                {
                    "id": 14,
                    "name": "Milk"
                },
                {
                    "id": 18,
                    "name": "Egg"
                }
            ],
            "category_id": 12,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Odit incidunt sit alias quia molestiae sit."
                },
                "description": {
                    "en": "Sit adipisci voluptatibus omnis ut consequuntur. Voluptas commodi repellat sit et. Consequatur mollitia et eos."
                },
                "url": {
                    "en": "https://www.huel.com/voluptatibus-qui-omnis-fugiat-exercitationem-at-sed"
                }
            },
            "origin": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": false,
            "only_order_in_store": false,
            "price_type": "PER_UNIT",
            "price": 18,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 16,
                    "maximum": 11,
                    "maximum_day": 18,
                    "maximum_week": 10
                },
                "weight": {
                    "minimum": 19,
                    "maximum": 11,
                    "maximum_day": 17,
                    "maximum_week": 11,
                    "suggested": 10
                },
                "persons": {
                    "minimum": 12,
                    "maximum": 10
                }
            },
            "id": 13,
            "allergens": [
                {
                    "id": 10,
                    "name": "Crustaceans"
                },
                {
                    "id": 11,
                    "name": "Gluten"
                },
                {
                    "id": 11,
                    "name": "Fish"
                }
            ],
            "category_id": 10,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Voluptatem distinctio minima aperiam quisquam voluptatem tempora."
                },
                "description": {
                    "en": "Beatae nam quibusdam repudiandae eos rem ut. Veritatis nesciunt modi eligendi ducimus accusamus. Veniam autem et explicabo rem soluta eos."
                },
                "url": {
                    "en": "http://www.tremblay.com/in-necessitatibus-laborum-et-voluptas-quo"
                }
            },
            "origin": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            }
        }
    ],
    "shops": [
        {
            "name": "Mr. Rodolfo Kub DVM",
            "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,
            "allow_invoices": true,
            "allow_order_comments": false,
            "allow_product_comments": false,
            "takeout_use_intervals": false,
            "allow_order_messages": false,
            "id": 10,
            "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": "Josefa Tromp",
            "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,
            "allow_invoices": false,
            "allow_order_comments": false,
            "allow_product_comments": false,
            "takeout_use_intervals": true,
            "allow_order_messages": true,
            "id": 12,
            "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": "Kenyon Grimes V",
            "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": true,
            "allow_invoices": false,
            "allow_order_comments": true,
            "allow_product_comments": true,
            "takeout_use_intervals": false,
            "allow_order_messages": 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": true
            }
        }
    ],
    "id": 17,
    "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": "Quos laboriosam exercitationem aut sequi ut omnis dolor molestias ut."
        },
        "description": {
            "en": "Non molestiae iusto repudiandae repudiandae. Praesentium consequatur omnis deserunt qui illo est eaque. Dolor maxime similique repudiandae. Tempore quam possimus illo."
        },
        "url": {
            "en": "http://glover.info/adipisci-non-culpa-provident-ab-quidem-ipsum"
        }
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.6.0 stable