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/10/categories HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 0.2.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 667
{
    "name": "Malika Goodwin",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": true,
    "only_order_in_store": false,
    "seo": {
        "title": {
            "en": "Neque et quidem soluta qui veritatis quae exercitationem velit inventore reiciendis."
        },
        "description": {
            "en": "Quibusdam illum sit quod. Temporibus optio perferendis magni enim quidem. Et nihil et a incidunt perspiciatis. Laboriosam ut quae pariatur enim fugit ducimus rem."
        },
        "url": {
            "en": "http://stamm.com/consequuntur-ad-voluptatum-et-in-vero-architecto-qui"
        }
    }
}

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

{
    "name": "Salvatore Raynor",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": false,
    "only_order_in_store": false,
    "products": [
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": true,
            "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": 15,
                    "maximum": 12,
                    "maximum_day": 15,
                    "maximum_week": 18
                },
                "weight": {
                    "minimum": 10,
                    "maximum": 18,
                    "maximum_day": 13,
                    "maximum_week": 10,
                    "suggested": 13
                },
                "persons": {
                    "minimum": 15,
                    "maximum": 19
                }
            },
            "id": 11,
            "allergens": [
                {
                    "id": 19,
                    "name": "Nuts"
                },
                {
                    "id": 10,
                    "name": "Mustard"
                },
                {
                    "id": 12,
                    "name": "Gluten"
                }
            ],
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Saepe veritatis fuga natus ipsum ducimus."
                },
                "description": {
                    "en": "Alias voluptas explicabo nobis neque quia et nobis. Dolorem placeat ut necessitatibus eos. In soluta est ut voluptas cupiditate ullam cumque."
                },
                "url": {
                    "en": "https://kautzer.net/iure-numquam-omnis-eos-explicabo-illo-non-aut.html"
                }
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": false,
            "active": false,
            "only_order_in_store": false,
            "price_type": "PER_UNIT",
            "price": 14,
            "target_price": true,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 13,
                    "maximum": 18,
                    "maximum_day": 10,
                    "maximum_week": 15
                },
                "weight": {
                    "minimum": 18,
                    "maximum": 16,
                    "maximum_day": 15,
                    "maximum_week": 16,
                    "suggested": 10
                },
                "persons": {
                    "minimum": 11,
                    "maximum": 13
                }
            },
            "id": 13,
            "allergens": [
                {
                    "id": 17,
                    "name": "Sesame"
                },
                {
                    "id": 16,
                    "name": "Sesame"
                },
                {
                    "id": 13,
                    "name": "Celery"
                }
            ],
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Dolorem excepturi qui minima aut minima eum rerum reprehenderit sit."
                },
                "description": {
                    "en": "Non voluptas est repellat enim et voluptate nisi. Est recusandae voluptatem ut vel. Non ea laboriosam amet."
                },
                "url": {
                    "en": "http://www.rogahn.com/"
                }
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": false,
            "active": true,
            "only_order_in_store": false,
            "price_type": "PER_UNIT",
            "price": 18,
            "target_price": true,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 12,
                    "maximum": 16,
                    "maximum_day": 13,
                    "maximum_week": 14
                },
                "weight": {
                    "minimum": 12,
                    "maximum": 17,
                    "maximum_day": 17,
                    "maximum_week": 16,
                    "suggested": 11
                },
                "persons": {
                    "minimum": 12,
                    "maximum": 17
                }
            },
            "id": 10,
            "allergens": [
                {
                    "id": 12,
                    "name": "Lactose"
                },
                {
                    "id": 11,
                    "name": "Fish"
                },
                {
                    "id": 14,
                    "name": "Lupine"
                }
            ],
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Quia sed accusamus nisi quia animi aperiam qui."
                },
                "description": {
                    "en": "Incidunt consectetur sit inventore quia modi velit dicta. Expedita velit non quia sapiente maiores ut. Praesentium et necessitatibus necessitatibus quos iusto."
                },
                "url": {
                    "en": "https://www.morissette.net/possimus-inventore-nisi-temporibus-sit-aut"
                }
            }
        }
    ],
    "shops": [
        {
            "name": "Isaias Kris",
            "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": 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": 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": "Judy Goldner",
            "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": 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": false
            }
        },
        {
            "name": "Dr. Coy McLaughlin II",
            "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": true,
            "delivery_use_intervals": false,
            "id": 17,
            "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": 16,
    "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": "Nostrum commodi qui aliquid consequatur officia corrupti facilis rem sit."
        },
        "description": {
            "en": "Accusantium sed minus omnis odio. Ut odio repudiandae nulla nobis. Porro rem excepturi qui vel enim earum ipsum quos."
        },
        "url": {
            "en": "https://schuppe.com/repellat-atque-magni-vero-et-dolores-et-qui.html"
        }
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
0.2.0 stable