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/12/categories HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 0.2.1
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 579
{
    "name": "Mr. Richie Lakin",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": false,
    "only_order_in_store": false,
    "seo": {
        "title": {
            "en": "Animi eum explicabo perspiciatis consequatur in facere."
        },
        "description": {
            "en": "Perspiciatis sed eveniet voluptatum voluptas consequatur quaerat asperiores. Quisquam nesciunt totam voluptas facere."
        },
        "url": {
            "en": "http://king.com/repellendus-explicabo-et-quo-ducimus"
        }
    }
}

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

{
    "name": "Dandre Parker",
    "description": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "active": false,
    "only_order_in_store": false,
    "products": [
        {
            "name": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "description": {
                "nl": "...",
                "en": "...",
                "fr": "..."
            },
            "specialty": false,
            "active": false,
            "only_order_in_store": true,
            "price_type": "PER_UNIT",
            "price": 14,
            "target_price": false,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 14,
                    "maximum": 11,
                    "maximum_day": 15,
                    "maximum_week": 19
                },
                "weight": {
                    "minimum": 10,
                    "maximum": 17,
                    "maximum_day": 17,
                    "maximum_week": 11,
                    "suggested": 19
                },
                "persons": {
                    "minimum": 11,
                    "maximum": 17
                }
            },
            "id": 18,
            "allergens": [
                {
                    "id": 11,
                    "name": "Soy"
                },
                {
                    "id": 19,
                    "name": "Soy"
                },
                {
                    "id": 19,
                    "name": "Mustard"
                }
            ],
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Facilis cupiditate et vel dolor dolorum distinctio ut ex."
                },
                "description": {
                    "en": "Iste odio repudiandae doloribus exercitationem. Accusamus vel praesentium fugiat dolorem animi ipsam."
                },
                "url": {
                    "en": "http://hickle.com/"
                }
            }
        },
        {
            "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": 14,
                    "maximum": 19,
                    "maximum_day": 16,
                    "maximum_week": 14
                },
                "weight": {
                    "minimum": 17,
                    "maximum": 12,
                    "maximum_day": 16,
                    "maximum_week": 15,
                    "suggested": 19
                },
                "persons": {
                    "minimum": 17,
                    "maximum": 12
                }
            },
            "id": 11,
            "allergens": [
                {
                    "id": 19,
                    "name": "Milk"
                },
                {
                    "id": 18,
                    "name": "Sulphite"
                },
                {
                    "id": 14,
                    "name": "Sesame"
                }
            ],
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Repellat id corporis dolores maxime voluptatum corrupti."
                },
                "description": {
                    "en": "Enim mollitia qui omnis odit eum eveniet. Est cupiditate repellat sunt ullam suscipit eaque exercitationem. Tempore libero amet similique. Fugiat omnis recusandae totam temporibus ducimus voluptatem."
                },
                "url": {
                    "en": "http://hodkiewicz.com/"
                }
            }
        },
        {
            "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": true,
            "url_type": "none",
            "url": "https://example.com",
            "min_max": {
                "amount": {
                    "minimum": 19,
                    "maximum": 12,
                    "maximum_day": 19,
                    "maximum_week": 14
                },
                "weight": {
                    "minimum": 15,
                    "maximum": 18,
                    "maximum_day": 18,
                    "maximum_week": 10,
                    "suggested": 18
                },
                "persons": {
                    "minimum": 14,
                    "maximum": 15
                }
            },
            "id": 18,
            "allergens": [
                {
                    "id": 13,
                    "name": "Soy"
                },
                {
                    "id": 13,
                    "name": "Mollusc"
                },
                {
                    "id": 16,
                    "name": "Mustard"
                }
            ],
            "price_look_up_code": "...",
            "seo": {
                "title": {
                    "en": "Temporibus officiis sed voluptatibus ipsam voluptatem eius architecto quisquam."
                },
                "description": {
                    "en": "Deserunt officiis fuga ut aut quia. Voluptatibus fugiat laborum exercitationem dolores eos qui."
                },
                "url": {
                    "en": "https://www.lang.com/et-sit-quibusdam-sunt-dolores"
                }
            }
        }
    ],
    "shops": [
        {
            "name": "Ayana Kutch MD",
            "active": true,
            "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": 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": "Michale Bednar Sr.",
            "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": 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": 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": "Prof. Alexa Jones V",
            "active": true,
            "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": 12,
            "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
            }
        }
    ],
    "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": "Optio et enim voluptates inventore velit voluptates architecto aspernatur qui consectetur."
        },
        "description": {
            "en": "Laborum voluptatem unde ullam similique recusandae qui. Inventore quis animi voluptas nihil. Quisquam et minima reprehenderit est voluptatem. Non facilis molestias soluta sequi odio corporis nisi."
        },
        "url": {
            "en": "http://www.brekke.com/"
        }
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
0.2.1 stable