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
seo company.SeoData Optional. The category's webpage search engine metatags

Example request 1

POST /company/companies/17/categories HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 0.2.2
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 670
{
    "name": "Prof. Thalia Gislason III",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": true,
    "only_order_in_store": true,
    "seo": {
        "title": {
            "en": "Iusto iste deleniti aliquam delectus suscipit porro harum excepturi corrupti."
        },
        "description": {
            "en": "Ut voluptatem alias quos voluptas fugit blanditiis. Sit molestiae ut ut qui. Nulla aliquid dolores unde dolore quo dolorem. Ea necessitatibus et nam."
        },
        "url": {
            "en": "http://www.kutch.org/incidunt-molestias-ducimus-ea-quaerat-mollitia-omnis-rem.html"
        }
    }
}

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

{
    "name": "Mayra Dickinson",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": false,
    "only_order_in_store": false,
    "products": [
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": false,
            "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": 19,
                    "maximum": 16,
                    "maximum_day": 10,
                    "maximum_week": 13
                },
                "weight": {
                    "minimum": 19,
                    "maximum": 15,
                    "maximum_day": 10,
                    "maximum_week": 11,
                    "suggested": 13
                },
                "persons": {
                    "minimum": 11,
                    "maximum": 16
                }
            },
            "id": 11,
            "allergens": [
                {
                    "id": 12,
                    "name": "Celery"
                },
                {
                    "id": 17,
                    "name": "Lactose"
                },
                {
                    "id": 11,
                    "name": "Celery"
                }
            ],
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Voluptate at sequi eaque enim quos."
                },
                "description": {
                    "en": "Rerum enim qui doloribus debitis non aperiam illum. Quis neque odio ea nulla velit. Ut in saepe odit. Sint voluptatum dolores ut deleniti mollitia. Impedit aut voluptate consequatur doloremque."
                },
                "url": {
                    "en": "https://okuneva.org/ratione-laborum-et-iste-rerum-est-et-similique.html"
                }
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": true,
            "only_order_in_store": false,
            "price_type": "PER_UNIT",
            "price": 11,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 13,
                    "maximum": 17,
                    "maximum_day": 10,
                    "maximum_week": 12
                },
                "weight": {
                    "minimum": 11,
                    "maximum": 19,
                    "maximum_day": 16,
                    "maximum_week": 16,
                    "suggested": 12
                },
                "persons": {
                    "minimum": 18,
                    "maximum": 11
                }
            },
            "id": 19,
            "allergens": [
                {
                    "id": 11,
                    "name": "Egg"
                },
                {
                    "id": 14,
                    "name": "Gluten"
                },
                {
                    "id": 17,
                    "name": "Peanut"
                }
            ],
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Qui aliquam ipsam quisquam quis dolorem."
                },
                "description": {
                    "en": "Deserunt omnis qui illo quibusdam. Ex rerum ipsam sit. Eum dicta ut facilis eos nihil illum dolores."
                },
                "url": {
                    "en": "http://www.ruecker.info/ducimus-eum-vel-ut-aspernatur-ab-exercitationem-consequuntur.html"
                }
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": false,
            "active": true,
            "only_order_in_store": false,
            "price_type": "PER_UNIT",
            "price": 13,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 18,
                    "maximum": 12,
                    "maximum_day": 10,
                    "maximum_week": 18
                },
                "weight": {
                    "minimum": 12,
                    "maximum": 17,
                    "maximum_day": 17,
                    "maximum_week": 17,
                    "suggested": 18
                },
                "persons": {
                    "minimum": 10,
                    "maximum": 13
                }
            },
            "id": 19,
            "allergens": [
                {
                    "id": 13,
                    "name": "Sulphite"
                },
                {
                    "id": 13,
                    "name": "Lactose"
                },
                {
                    "id": 13,
                    "name": "Fish"
                }
            ],
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "At molestiae occaecati architecto dolor commodi doloribus voluptatem ducimus."
                },
                "description": {
                    "en": "Error dolor ad saepe et voluptatem praesentium. Aut perspiciatis saepe laboriosam ut. Nihil doloribus non iste. Nisi voluptas aut et suscipit."
                },
                "url": {
                    "en": "http://purdy.com/sit-amet-aut-labore-nesciunt-enim-aut-vero-aperiam.html"
                }
            }
        }
    ],
    "shops": [
        {
            "name": "Liam Schneider",
            "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": 14,
            "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": "Dr. Savanah Casper",
            "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": 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": "Tommie Auer",
            "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": 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
            }
        }
    ],
    "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": "Assumenda veniam quis ut incidunt odit rerum aut ipsam unde fuga."
        },
        "description": {
            "en": "Quis quia voluptatem officia excepturi molestiae corrupti sint. Minus porro quia eum odio perferendis assumenda hic. Sed consequatur ut temporibus."
        },
        "url": {
            "en": "http://www.schaden.com/vero-a-adipisci-tempore"
        }
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
0.2.2 stable