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.2.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 782
{
    "name": "Miss Meagan Carroll V",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": true,
    "only_order_in_store": false,
    "shop_ids": [
        15,
        18,
        18
    ],
    "seo": {
        "title": {
            "en": "Tempora dolor veritatis officia perspiciatis quia saepe voluptas itaque earum quam."
        },
        "description": {
            "en": "Ut id praesentium occaecati rerum laborum et qui corrupti. Temporibus natus odit quo veritatis id et. Consequatur fugiat eius modi blanditiis excepturi autem sunt."
        },
        "url": {
            "en": "http://witting.net/ad-beatae-vero-provident-facere-non"
        }
    },
    "product_ids": [
        11,
        15,
        13
    ]
}

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

{
    "name": "Grayce Kutch",
    "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": 19,
            "target_price": true,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 19,
                    "maximum": 16,
                    "maximum_day": 16,
                    "maximum_week": 12
                },
                "weight": {
                    "minimum": 13,
                    "maximum": 13,
                    "maximum_day": 14,
                    "maximum_week": 15,
                    "suggested": 11
                },
                "persons": {
                    "minimum": 18,
                    "maximum": 18
                }
            },
            "id": 13,
            "allergens": [
                {
                    "id": 10,
                    "name": "Sulphite"
                },
                {
                    "id": 18,
                    "name": "Soy"
                },
                {
                    "id": 17,
                    "name": "Sesame"
                }
            ],
            "category_id": 18,
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Facilis explicabo enim laudantium omnis provident."
                },
                "description": {
                    "en": "Excepturi est ipsum enim mollitia impedit. Dolor numquam et corporis in."
                },
                "url": {
                    "en": "https://marks.com/amet-accusantium-et-quos-in-atque-ipsam-eos.html"
                }
            },
            "code": "..."
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": true,
            "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": 14,
                    "maximum": 16,
                    "maximum_day": 14,
                    "maximum_week": 11
                },
                "weight": {
                    "minimum": 12,
                    "maximum": 17,
                    "maximum_day": 12,
                    "maximum_week": 12,
                    "suggested": 14
                },
                "persons": {
                    "minimum": 15,
                    "maximum": 10
                }
            },
            "id": 13,
            "allergens": [
                {
                    "id": 14,
                    "name": "Sesame"
                },
                {
                    "id": 16,
                    "name": "Egg"
                },
                {
                    "id": 19,
                    "name": "Lactose"
                }
            ],
            "category_id": 19,
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Accusamus libero sit officia qui quibusdam nesciunt reprehenderit."
                },
                "description": {
                    "en": "Omnis repudiandae a alias velit unde non sit. Voluptas quia sit laudantium omnis eveniet fugit officiis."
                },
                "url": {
                    "en": "http://johns.com/"
                }
            },
            "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": true,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 15,
                    "maximum": 13,
                    "maximum_day": 18,
                    "maximum_week": 19
                },
                "weight": {
                    "minimum": 16,
                    "maximum": 15,
                    "maximum_day": 19,
                    "maximum_week": 11,
                    "suggested": 18
                },
                "persons": {
                    "minimum": 15,
                    "maximum": 14
                }
            },
            "id": 17,
            "allergens": [
                {
                    "id": 15,
                    "name": "Soy"
                },
                {
                    "id": 10,
                    "name": "Crustaceans"
                },
                {
                    "id": 17,
                    "name": "Mustard"
                }
            ],
            "category_id": 18,
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Dolorum culpa quos et rerum magnam laboriosam."
                },
                "description": {
                    "en": "Quis sunt mollitia neque corrupti. Quasi iste aut voluptatem qui. Pariatur dolores facere incidunt omnis. Rerum non deserunt aperiam tempora."
                },
                "url": {
                    "en": "http://torp.com/"
                }
            },
            "code": "..."
        }
    ],
    "shops": [
        {
            "name": "Chris Ledner Jr.",
            "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": 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
            }
        },
        {
            "name": "Dr. Kraig Leannon",
            "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": 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": false
            }
        },
        {
            "name": "Dane Cummings",
            "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": true,
            "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": false
            }
        }
    ],
    "id": 19,
    "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": "Voluptas et optio et corrupti impedit qui inventore."
        },
        "description": {
            "en": "Consequatur reiciendis sed quam distinctio tempora vel possimus. Consequatur et quas sed provident. Dolorem neque voluptatem pariatur rerum deserunt."
        },
        "url": {
            "en": "http://www.schuppe.com/ipsa-ut-nam-voluptatem-dolor-quisquam-in.html"
        }
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.2.0 stable