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.
code String? Optional. Nullable. A custom code. You can set this to your own code and use this field to map your categories to Bakeronline categories

Example request 1

POST /company/companies/15/categories HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.10.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 771
{
    "name": "Gisselle Rodriguez",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": true,
    "only_order_in_store": true,
    "shop_ids": [
        10,
        17,
        14
    ],
    "seo": {
        "title": {
            "en": "Asperiores est reiciendis et consectetur cumque saepe."
        },
        "description": {
            "en": "Voluptates dolor ducimus aut maiores quis modi magni. Reiciendis autem suscipit sit expedita. Id aut voluptatibus nemo iste nesciunt quis et recusandae."
        },
        "url": {
            "en": "http://waelchi.net/sunt-qui-distinctio-nemo-qui-eos-corporis-id.html"
        }
    },
    "product_ids": [
        11,
        11,
        18
    ],
    "code": "..."
}

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
code String? Nullable. A custom code. You can set this to your own code and use this field to map your categories to Bakeronline categories
id Int ID of the category
banner Image? Nullable.
overview_image 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: 18241

{
    "name": "Miss Octavia Hoppe IV",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": true,
    "only_order_in_store": true,
    "products": [
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": false,
            "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": 12,
                    "maximum": 14,
                    "maximum_day": 14,
                    "maximum_week": 13
                },
                "weight": {
                    "minimum": 10,
                    "maximum": 10,
                    "maximum_day": 11,
                    "maximum_week": 16,
                    "suggested": 19
                },
                "persons": {
                    "minimum": 11,
                    "maximum": 13
                }
            },
            "id": 13,
            "allergens": [
                {
                    "id": 10,
                    "name": "Egg"
                },
                {
                    "id": 18,
                    "name": "Peanut"
                },
                {
                    "id": 16,
                    "name": "Mustard"
                }
            ],
            "category_id": 11,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Non minus nobis vitae et unde deleniti quo quibusdam."
                },
                "description": {
                    "en": "Pariatur voluptas officia atque explicabo culpa quis reprehenderit quia. Ea quos aut earum et quo. Iure ut eveniet nihil alias. Aut quis suscipit voluptas repellat vel ab est."
                },
                "url": {
                    "en": "http://www.balistreri.com/et-occaecati-quo-explicabo-quae-a"
                }
            },
            "origin": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "ingredients": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "temperature_type": "any",
            "warranty_type": "none",
            "warranty_price": 10,
            "stock": {
                "soldout": true,
                "amount": 12,
                "soldoutUntil": "2019-01-31 12:00"
            },
            "daysavailable": [
                19,
                10,
                10
            ],
            "upfront": {
                "upfront_use_default": false,
                "upfront_type": "days",
                "upfront_days": 14,
                "upfront_time": "12:00",
                "upfront_hours": 13,
                "upfront_minutes": 11
            },
            "use_pickup_after": false,
            "pickup_after": "12:00",
            "use_pickup_before": false,
            "pickup_before": "12:00",
            "related_products": [
                13,
                15,
                13
            ]
        },
        {
            "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": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 18,
                    "maximum": 17,
                    "maximum_day": 15,
                    "maximum_week": 10
                },
                "weight": {
                    "minimum": 14,
                    "maximum": 18,
                    "maximum_day": 19,
                    "maximum_week": 13,
                    "suggested": 19
                },
                "persons": {
                    "minimum": 14,
                    "maximum": 16
                }
            },
            "id": 13,
            "allergens": [
                {
                    "id": 17,
                    "name": "Crustaceans"
                },
                {
                    "id": 10,
                    "name": "Gluten"
                },
                {
                    "id": 16,
                    "name": "Mustard"
                }
            ],
            "category_id": 11,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Autem quis necessitatibus dolorum autem dolores et perferendis qui beatae qui."
                },
                "description": {
                    "en": "Ut quia eveniet numquam autem. Vel minima expedita facere. Adipisci natus doloremque sed et. Sunt molestiae magni qui ipsam eum provident. Sunt rerum et aspernatur non occaecati non et."
                },
                "url": {
                    "en": "http://schumm.com/id-temporibus-libero-totam-dicta.html"
                }
            },
            "origin": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "ingredients": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "temperature_type": "any",
            "warranty_type": "none",
            "warranty_price": 16,
            "stock": {
                "soldout": true,
                "amount": 18,
                "soldoutUntil": "2019-01-31 12:00"
            },
            "daysavailable": [
                14,
                11,
                17
            ],
            "upfront": {
                "upfront_use_default": false,
                "upfront_type": "days",
                "upfront_days": 11,
                "upfront_time": "12:00",
                "upfront_hours": 11,
                "upfront_minutes": 11
            },
            "use_pickup_after": false,
            "pickup_after": "12:00",
            "use_pickup_before": false,
            "pickup_before": "12:00",
            "related_products": [
                15,
                17,
                14
            ]
        },
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": true,
            "active": false,
            "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": 13,
                    "maximum": 13,
                    "maximum_day": 14,
                    "maximum_week": 19
                },
                "weight": {
                    "minimum": 19,
                    "maximum": 10,
                    "maximum_day": 10,
                    "maximum_week": 15,
                    "suggested": 16
                },
                "persons": {
                    "minimum": 14,
                    "maximum": 10
                }
            },
            "id": 19,
            "allergens": [
                {
                    "id": 18,
                    "name": "Mollusc"
                },
                {
                    "id": 16,
                    "name": "Mollusc"
                },
                {
                    "id": 18,
                    "name": "Sulphite"
                }
            ],
            "category_id": 13,
            "price_look_up_code": "...",
            "code": "...",
            "seo": {
                "title": {
                    "en": "Et provident rem voluptas similique ullam nesciunt a esse nihil quo."
                },
                "description": {
                    "en": "Incidunt et dolorem ipsum est illum ab consequuntur excepturi. Ratione laudantium aut harum numquam vel. Aut consequatur tempora quaerat sed et. Similique quidem qui temporibus beatae nostrum."
                },
                "url": {
                    "en": "http://macejkovic.com/"
                }
            },
            "origin": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "ingredients": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "temperature_type": "any",
            "warranty_type": "none",
            "warranty_price": 17,
            "stock": {
                "soldout": false,
                "amount": 18,
                "soldoutUntil": "2019-01-31 12:00"
            },
            "daysavailable": [
                14,
                13,
                14
            ],
            "upfront": {
                "upfront_use_default": false,
                "upfront_type": "days",
                "upfront_days": 17,
                "upfront_time": "12:00",
                "upfront_hours": 12,
                "upfront_minutes": 13
            },
            "use_pickup_after": false,
            "pickup_after": "12:00",
            "use_pickup_before": false,
            "pickup_before": "12:00",
            "related_products": [
                10,
                17,
                17
            ]
        }
    ],
    "shops": [
        {
            "name": "Letha Abernathy",
            "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": true,
            "allow_order_comments": true,
            "allow_product_comments": true,
            "takeout_use_intervals": true,
            "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
                    }
                ],
                "file_id": 11,
                "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
                    }
                ],
                "file_id": 19,
                "white_background": true
            },
            "url": "..."
        },
        {
            "name": "Joey Renner",
            "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,
            "allow_invoices": true,
            "allow_order_comments": false,
            "allow_product_comments": false,
            "takeout_use_intervals": true,
            "allow_order_messages": 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
                    }
                ],
                "file_id": 11,
                "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
                    }
                ],
                "file_id": 14,
                "white_background": true
            },
            "url": "..."
        },
        {
            "name": "Addison Ernser",
            "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,
            "allow_invoices": true,
            "allow_order_comments": true,
            "allow_product_comments": false,
            "takeout_use_intervals": true,
            "allow_order_messages": 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
                    }
                ],
                "file_id": 10,
                "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
                    }
                ],
                "file_id": 18,
                "white_background": false
            },
            "url": "..."
        }
    ],
    "code": "...",
    "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
            }
        ],
        "file_id": 13,
        "white_background": true
    },
    "overview_image": {
        "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
            }
        ],
        "file_id": 10,
        "white_background": false
    },
    "seo": {
        "title": {
            "en": "Harum voluptatem et omnis amet qui."
        },
        "description": {
            "en": "Voluptatem omnis et aut esse repellat voluptatibus laborum. Quod culpa est incidunt quo sequi cupiditate et explicabo. Soluta eveniet dolore cumque accusantium."
        },
        "url": {
            "en": "http://www.collins.info/veritatis-tempora-enim-saepe-omnis"
        }
    }
}
This is a development version Do not use this version in production
1.10.0 development