Create multiple products

POST /company/companies/@id/products/bulk

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 Company ID. Create multiple products in this company

Body

Pass the following properties via application/json or form encoding in the body of the request.

Minimum 1. Maximum 50. Array of company.Product.detailed: [company.Product.detailed]

company.Product.detailed

Field Type Description
name [Language: String] Name of the product
description [Language: String] Description of the product
specialty Bool Whether this product is a specialty. Specialties are also displayed in a seperate category and are highlighted with a star icon.
active Bool Inactive products are not visible in the webshop
only_order_in_store Bool Whether this product can only get ordered in the store with a seperate UI for the shop employees, and not in the public webshop.
price_type PriceType A product has a price type that defines the price calculations and the way consumers can order the product.
price UInt Price of the product (cents). Please note that this value is ignored when price_type is MULTIPLE_CHOICE.
target_price Bool Is true when it's not possible to provide an exact price of this product when ordering (e.g. not exact weight possible). This option might deactive online payments for orders with this product (shop settings).
url_type String String enumarion of 'none', 'recipe', 'website'
url URL? Nullable. An URL field starting with http:// or https://
min_max company.MinMaxSummary The allowed amounts a customer is allowed to order of a product for amount / weight / persons
option_set_ids [Int] ID's of the option sets you want to assign to this product. You can alter the order by switching the position of the ID's
allergen_ids [Int]? Nullable. ID's of the allergens of this product. Set to null if you don't want to specify allergens. Only use an empty array when the product has no allergens. It is a subtle difference but it has legal consequences if you set this to the wrong value. You can find all the available allergen ID's here.
category_id Int The category ID of the product
seo company.SeoData Optional. Product page SEO metatags
price_look_up_code String? Optional. Nullable. A String value
code String? Optional. Nullable. A custom code. You can set this to your own code and use this field to map your products to Bakeronline products

Example request 1 Create multiple products

POST /company/companies/1303/products/bulk HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 81049a80a1f7ea2cdf900f7a903b2be37202641e7dd35782a9a44c62f17262bc96efa0987509301b07f01f27f2e8821d825f8070d548bb26833b8b2961c2cd8d8bd8a72b7c0ab0d81050d3720cf753e7059f63e8dedacc053345c257274275b713fcc1f5
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 3629
[
    {
        "name": {
            "nl": "Brood",
            "en": "Bread",
            "fr": "Pain"
        },
        "description": {
            "nl": "Beschrijving",
            "en": "Description",
            "fr": "Description"
        },
        "specialty": false,
        "active": true,
        "only_order_in_store": false,
        "allergen_ids": [
            1,
            2,
            4
        ],
        "price_look_up_code": "123",
        "price_type": "PER_UNIT",
        "price": 1200,
        "target_price": false,
        "url_type": "recipe",
        "url": "https://www.google.be",
        "min_max": {
            "amount": {
                "minimum": 1,
                "maximum": null,
                "maximum_day": null,
                "maximum_week": null
            },
            "weight": {
                "minimum": 100,
                "maximum": null,
                "maximum_day": null,
                "maximum_week": null,
                "suggested": 200
            },
            "persons": {
                "minimum": 1,
                "maximum": null
            }
        },
        "seo": {
            "title": {
                "nl": "testSeoTitle NL",
                "en": "testSeoTitle en",
                "fr": "testSeoTitle fr"
            },
            "description": {
                "nl": "testSeoDescr NL",
                "en": "testSeoDescr en",
                "fr": "testSeoDescr fr"
            },
            "url": {
                "nl": "product-nl",
                "en": "product-en",
                "fr": "product-fr"
            }
        },
        "code": "testproductcode",
        "option_set_ids": [
            3707,
            3708,
            3709,
            3710
        ],
        "category_id": 2164
    },
    {
        "name": {
            "nl": "Brood2",
            "en": "Bread2",
            "fr": "Pain2"
        },
        "description": {
            "nl": "Beschrijving",
            "en": "Description",
            "fr": "Description"
        },
        "specialty": false,
        "active": true,
        "only_order_in_store": false,
        "allergen_ids": [
            1,
            2,
            4
        ],
        "price_look_up_code": "123",
        "price_type": "PER_UNIT",
        "price": 1200,
        "target_price": false,
        "url_type": "recipe",
        "url": "https://www.google.be",
        "min_max": {
            "amount": {
                "minimum": 1,
                "maximum": null,
                "maximum_day": null,
                "maximum_week": null
            },
            "weight": {
                "minimum": 100,
                "maximum": null,
                "maximum_day": null,
                "maximum_week": null,
                "suggested": 200
            },
            "persons": {
                "minimum": 1,
                "maximum": null
            }
        },
        "seo": {
            "title": {
                "nl": "testSeoTitle NL",
                "en": "testSeoTitle en",
                "fr": "testSeoTitle fr"
            },
            "description": {
                "nl": "testSeoDescr NL",
                "en": "testSeoDescr en",
                "fr": "testSeoDescr fr"
            },
            "url": {
                "nl": "product-nl",
                "en": "product-en",
                "fr": "product-fr"
            }
        },
        "code": "testproductcode",
        "option_set_ids": [
            3707,
            3708,
            3709,
            3710
        ],
        "category_id": 2164
    }
]

Response

Array of company.Product.detailed: [company.Product.detailed]

company.Product.detailed

Field Type Description
name [Language: String] Name of the product
description [Language: String] Description of the product
specialty Bool Whether this product is a specialty. Specialties are also displayed in a seperate category and are highlighted with a star icon.
active Bool Inactive products are not visible in the webshop
only_order_in_store Bool Whether this product can only get ordered in the store with a seperate UI for the shop employees, and not in the public webshop.
price_type PriceType A product has a price type that defines the price calculations and the way consumers can order the product.
price UInt Price of the product (cents). Please note that this value is ignored when price_type is MULTIPLE_CHOICE.
target_price Bool Is true when it's not possible to provide an exact price of this product when ordering (e.g. not exact weight possible). This option might deactive online payments for orders with this product (shop settings).
url_type String String enumarion of 'none', 'recipe', 'website'
url URL? Nullable. An URL field starting with http:// or https://
min_max company.MinMaxSummary The allowed amounts a customer is allowed to order of a product for amount / weight / persons
images [Image] Array of Image
product_prices [company.ProductPrice] Array of company.ProductPrice
option_sets [company.OptionSet.simple] Array of company.OptionSet.simple
id Int Id of the product
allergens [Allergen]? Nullable. The allergens of this product. An empty array means no allergens. Null means no allergens specified (= can have allergens, ask in shop).
category_id Int The category ID of the product
price_look_up_code String? Nullable. A String value
code String? Nullable. A custom code. You can set this to your own code and use this field to map your products to Bakeronline products
seo company.SeoData Optional. Product page SEO metatags

Example response 1 Create multiple products

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 5825

[
    {
        "id": 3764,
        "name": {
            "en": "Bread",
            "fr": "Pain",
            "nl": "Brood"
        },
        "description": {
            "en": "Description",
            "fr": "Description",
            "nl": "Beschrijving"
        },
        "specialty": false,
        "active": true,
        "only_order_in_store": false,
        "allergens": [
            {
                "id": 1,
                "name": "1319"
            },
            {
                "id": 2,
                "name": "1320"
            },
            {
                "id": 4,
                "name": "1322"
            }
        ],
        "price_look_up_code": "123",
        "price_type": "PER_UNIT",
        "price": 1200,
        "target_price": false,
        "url_type": "recipe",
        "url": "https://www.google.be",
        "min_max": {
            "amount": {
                "minimum": 1,
                "maximum": null,
                "maximum_day": null,
                "maximum_week": null
            },
            "weight": {
                "minimum": 100,
                "maximum": null,
                "maximum_day": null,
                "maximum_week": null,
                "suggested": 200
            },
            "persons": {
                "minimum": 1,
                "maximum": null
            }
        },
        "seo": {
            "title": {
                "nl": "testSeoTitle NL",
                "en": "testSeoTitle en",
                "fr": "testSeoTitle fr"
            },
            "description": {
                "nl": "testSeoDescr NL",
                "en": "testSeoDescr en",
                "fr": "testSeoDescr fr"
            },
            "url": {
                "nl": "product-nl",
                "en": "product-en",
                "fr": "product-fr"
            }
        },
        "code": "testproductcode",
        "category_id": 2164,
        "images": [],
        "product_prices": [],
        "option_sets": [
            {
                "id": 3707,
                "name": {
                    "nl": "Please select an option"
                },
                "allow_attachment": false,
                "code": null
            },
            {
                "id": 3708,
                "name": {
                    "nl": "Do you want a bag?"
                },
                "allow_attachment": false,
                "code": null
            },
            {
                "id": 3709,
                "name": {
                    "nl": "Please select an option"
                },
                "allow_attachment": false,
                "code": null
            },
            {
                "id": 3710,
                "name": {
                    "nl": "Do you want a bag?"
                },
                "allow_attachment": false,
                "code": null
            }
        ]
    },
    {
        "id": 3765,
        "name": {
            "en": "Bread2",
            "fr": "Pain2",
            "nl": "Brood2"
        },
        "description": {
            "en": "Description",
            "fr": "Description",
            "nl": "Beschrijving"
        },
        "specialty": false,
        "active": true,
        "only_order_in_store": false,
        "allergens": [
            {
                "id": 1,
                "name": "1319"
            },
            {
                "id": 2,
                "name": "1320"
            },
            {
                "id": 4,
                "name": "1322"
            }
        ],
        "price_look_up_code": "123",
        "price_type": "PER_UNIT",
        "price": 1200,
        "target_price": false,
        "url_type": "recipe",
        "url": "https://www.google.be",
        "min_max": {
            "amount": {
                "minimum": 1,
                "maximum": null,
                "maximum_day": null,
                "maximum_week": null
            },
            "weight": {
                "minimum": 100,
                "maximum": null,
                "maximum_day": null,
                "maximum_week": null,
                "suggested": 200
            },
            "persons": {
                "minimum": 1,
                "maximum": null
            }
        },
        "seo": {
            "title": {
                "nl": "testSeoTitle NL",
                "en": "testSeoTitle en",
                "fr": "testSeoTitle fr"
            },
            "description": {
                "nl": "testSeoDescr NL",
                "en": "testSeoDescr en",
                "fr": "testSeoDescr fr"
            },
            "url": {
                "nl": "product-nl",
                "en": "product-en",
                "fr": "product-fr"
            }
        },
        "code": "testproductcode",
        "category_id": 2164,
        "images": [],
        "product_prices": [],
        "option_sets": [
            {
                "id": 3707,
                "name": {
                    "nl": "Please select an option"
                },
                "allow_attachment": false,
                "code": null
            },
            {
                "id": 3708,
                "name": {
                    "nl": "Do you want a bag?"
                },
                "allow_attachment": false,
                "code": null
            },
            {
                "id": 3709,
                "name": {
                    "nl": "Please select an option"
                },
                "allow_attachment": false,
                "code": null
            },
            {
                "id": 3710,
                "name": {
                    "nl": "Do you want a bag?"
                },
                "allow_attachment": false,
                "code": null
            }
        ]
    }
]
1.5.0 stable