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/12/categories HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.7.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 690
{
    "name": "Keshawn Stanton",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": false,
    "only_order_in_store": false,
    "shop_ids": [
        11,
        10,
        16
    ],
    "seo": {
        "title": {
            "en": "Nam quo iste quis modi voluptatem."
        },
        "description": {
            "en": "Eaque autem dolorem aut et tenetur molestiae. Eos voluptates dicta animi labore id. Et magni dolores voluptas minus autem. Maiores odio vitae sit molestiae."
        },
        "url": {
            "en": "http://www.farrell.net/"
        }
    },
    "product_ids": [
        10,
        10,
        18
    ]
}

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

{
    "name": "Idell Dicki",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": true,
    "only_order_in_store": true,
    "products": [
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": false,
            "active": true,
            "only_order_in_store": true,
            "price_type": "PER_UNIT",
            "price": 15,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 19,
                    "maximum": 16,
                    "maximum_day": 13,
                    "maximum_week": 19
                },
                "weight": {
                    "minimum": 17,
                    "maximum": 18,
                    "maximum_day": 19,
                    "maximum_week": 16,
                    "suggested": 11
                },
                "persons": {
                    "minimum": 19,
                    "maximum": 18
                }
            },
            "id": 16,
            "allergens": [
                {
                    "id": 14,
                    "name": "Crustaceans"
                },
                {
                    "id": 12,
                    "name": "Mustard"
                },
                {
                    "id": 12,
                    "name": "Mustard"
                }
            ],
            "category_id": 13,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Sed autem rerum minus ratione et minima nihil sed."
                },
                "description": {
                    "en": "Dolore autem blanditiis sint recusandae delectus et cupiditate ex. Distinctio nisi ut nesciunt voluptas nisi veritatis. Incidunt minima nesciunt fugit soluta et. Asperiores tempora iure dolorem quos."
                },
                "url": {
                    "en": "http://armstrong.com/veniam-ut-officiis-ut-quos"
                }
            },
            "origin": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            }
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": true,
            "only_order_in_store": false,
            "price_type": "PER_UNIT",
            "price": 19,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 12,
                    "maximum": 16,
                    "maximum_day": 14,
                    "maximum_week": 10
                },
                "weight": {
                    "minimum": 19,
                    "maximum": 16,
                    "maximum_day": 13,
                    "maximum_week": 17,
                    "suggested": 10
                },
                "persons": {
                    "minimum": 16,
                    "maximum": 12
                }
            },
            "id": 19,
            "allergens": [
                {
                    "id": 13,
                    "name": "Gluten"
                },
                {
                    "id": 18,
                    "name": "Nuts"
                },
                {
                    "id": 15,
                    "name": "Peanut"
                }
            ],
            "category_id": 13,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Veniam labore maxime voluptatibus non."
                },
                "description": {
                    "en": "Aut nemo facere eos. Quas quis velit iure totam ut. Unde quia numquam in eos doloribus in."
                },
                "url": {
                    "en": "http://www.hagenes.biz/ut-vel-sit-soluta-quo"
                }
            },
            "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": 13,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 12,
                    "maximum": 17,
                    "maximum_day": 11,
                    "maximum_week": 19
                },
                "weight": {
                    "minimum": 16,
                    "maximum": 10,
                    "maximum_day": 14,
                    "maximum_week": 16,
                    "suggested": 14
                },
                "persons": {
                    "minimum": 12,
                    "maximum": 18
                }
            },
            "id": 11,
            "allergens": [
                {
                    "id": 18,
                    "name": "Peanut"
                },
                {
                    "id": 18,
                    "name": "Lupine"
                },
                {
                    "id": 16,
                    "name": "Celery"
                }
            ],
            "category_id": 17,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Quis quam quae officia voluptatem quos."
                },
                "description": {
                    "en": "Quas hic ut iste distinctio. Provident omnis fugiat deleniti recusandae laboriosam magni sint. Id quo sunt ipsam similique ut natus natus."
                },
                "url": {
                    "en": "http://parker.net/harum-quae-nam-velit-sint-voluptas-id-itaque.html"
                }
            },
            "origin": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            }
        }
    ],
    "shops": [
        {
            "name": "Alycia Bergstrom PhD",
            "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": true,
            "allow_invoices": false,
            "allow_order_comments": true,
            "allow_product_comments": false,
            "takeout_use_intervals": true,
            "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": 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
            },
            "url": "..."
        },
        {
            "name": "Gerson Hermiston",
            "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,
            "allow_invoices": true,
            "allow_order_comments": true,
            "allow_product_comments": false,
            "takeout_use_intervals": false,
            "allow_order_messages": false,
            "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": 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
            },
            "url": "..."
        },
        {
            "name": "Krystina Cummings",
            "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,
            "allow_invoices": false,
            "allow_order_comments": false,
            "allow_product_comments": false,
            "takeout_use_intervals": false,
            "allow_order_messages": false,
            "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": 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
            },
            "url": "..."
        }
    ],
    "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": false
    },
    "seo": {
        "title": {
            "en": "Eligendi quisquam fuga optio sequi perspiciatis nobis provident commodi."
        },
        "description": {
            "en": "Laudantium necessitatibus aliquam harum nemo. Quasi sequi qui ullam alias asperiores. Aut sed quod perferendis mollitia dolores dolorem adipisci. Similique fuga ad aut qui at quod dolorem."
        },
        "url": {
            "en": "https://www.denesik.biz/quasi-recusandae-nisi-et-inventore"
        }
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.7.0 stable