Get product by id

GET /shops/@shop/products/@id

Request

URL parameters

Replace the @ keywords in the URL with their corresponding value.

A dictionary with fields

Field Type Description
shop Int An integer value
id Int An integer value

Example request 1 Invalid product id

GET /shops/959556123265952/products/9595561232659595 HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5

Example request 2 Valid product id

GET /shops/2132/products/189613 HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5

Example request 3 Inactive product

GET /shops/2133/products/189615 HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5

Example request 4 Only on isop product

GET /shops/2135/products/189618 HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5

Example request 5 Inactive category

GET /shops/2136/products/189623 HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5

Example request 6 Only on isop category

GET /shops/2138/products/189624 HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5

Example request 7 Product with an offer

GET /shops/2132/products/189625 HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5

Example request 8 Product with prices and an offer

GET /shops/2132/products/189626 HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5

Response

Field Type Description
id Int Id of the product
name String Name of the product (translated)
images [Image] Array of Image
price_type PriceType A product has a price type that defines the price calculations and the way consumers can order the product.
target_price Bool Is true when the price of the product can change on takeout (e.g. not exact weight)
price Price Price of the product (cents). It only makes sense to use this property when price_type is not multiple choice. Please also check if the shop where you want to order has an offer with a discount for this product available.
subtitle String? Nullable. Important text you need to display under the product name
description String Description of the product (translated)
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)
url URL? Nullable. An URL field starting with http:// or https://
url_type String String enumarion of 'none', 'recipe', 'website'
specialty Bool A boolean value
favourite Bool? Nullable. A boolean value
product_prices [ProductPrice.detailed] Array of ProductPrice.detailed
optionsets [OptionSet.detailed] Array of OptionSet.detailed
min_max MinMaxSummary An overview of the minimum and maximum values for all amount types.
info [Message] A list of messages with information you need to display on the product page.
offer OfferItem? Nullable. Specificies where a discount should get appllied. A shop can give a complete category a discount, or only a certain product, or only a fixed product price. When calculating the discount, always round the price to 1 cent before multiplying it with an amount, persons or kilograms.

Example response 1 Invalid product id

HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8
Content-Length: 71

{
    "code": "product_not_found",
    "message": "Product not found"
}

Example response 2 Valid product id

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

{
    "id": 189613,
    "name": "Taunus spelt",
    "price": {
        "value": 8144,
        "currency": "EUR"
    },
    "images": [
        {
            "resolutions": [
                {
                    "src": "https://bakeronline.be/uploads/tests/250x200/product-kalfslapje-165g.jpg",
                    "width": 300,
                    "height": 200
                },
                {
                    "src": "https://bakeronline.be/uploads/tests/1080x720/product-kalfslapje-165g.jpg",
                    "width": 1080,
                    "height": 720
                }
            ],
            "white_background": false
        }
    ],
    "price_type": "PER_KILOGRAM",
    "target_price": false,
    "subtitle": null,
    "description": "",
    "allergens": [
        {
            "id": 3,
            "name": "Egg"
        },
        {
            "id": 6,
            "name": "Soy"
        },
        {
            "id": 8,
            "name": "Nuts"
        }
    ],
    "url": "http://adam.net/consectetur-veniam-praesentium-at-dolor",
    "url_type": "none",
    "specialty": false,
    "favourite": null,
    "product_prices": [],
    "optionsets": [
        {
            "id": 133999,
            "name": "Do you want a picture on your cake?",
            "code": null,
            "options": [
                {
                    "id": 736871,
                    "name": "Yes",
                    "price_change": {
                        "value": 346,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                },
                {
                    "id": 736872,
                    "name": "No",
                    "price_change": {
                        "value": 983,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                }
            ]
        },
        {
            "id": 134001,
            "name": "Extra baked?",
            "code": null,
            "options": [
                {
                    "id": 736875,
                    "name": "Yes",
                    "price_change": {
                        "value": 889,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                },
                {
                    "id": 736877,
                    "name": "Yes",
                    "price_change": {
                        "value": 174,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                }
            ]
        }
    ],
    "min_max": {
        "amount": {
            "suggested": 1,
            "minimum": 1,
            "maximum": null
        },
        "weight": {
            "suggested": 100,
            "minimum": 1,
            "maximum": null
        },
        "persons": {
            "suggested": 1,
            "minimum": 1,
            "maximum": null
        }
    },
    "info": [
        {
            "name": "availability-takeout",
            "title": "Pick up at shop",
            "text": "<p>Order 5 minutes in advance</p>",
            "type": "HTML"
        },
        {
            "name": "availability-delivery",
            "title": "Delivery",
            "text": "<p>Order 5 minutes in advance</p>",
            "type": "HTML"
        },
        {
            "name": "allergens",
            "title": "Allergens ",
            "text": "This product contains Egg, Soy and Nuts",
            "type": "PLAIN"
        }
    ],
    "offer": null
}

Example response 3 Inactive product

HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8
Content-Length: 71

{
    "code": "product_not_found",
    "message": "Product not found"
}

Example response 4 Only on isop product

HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8
Content-Length: 71

{
    "code": "product_not_found",
    "message": "Product not found"
}

Example response 5 Inactive category

HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8
Content-Length: 71

{
    "code": "product_not_found",
    "message": "Product not found"
}

Example response 6 Only on isop category

HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8
Content-Length: 71

{
    "code": "product_not_found",
    "message": "Product not found"
}

Example response 7 Product with an offer

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

{
    "id": 189625,
    "name": "Zachte bruine pistolet",
    "price": {
        "value": 1048,
        "currency": "EUR"
    },
    "images": [
        {
            "resolutions": [
                {
                    "src": "https://bakeronline.be/uploads/tests/250x200/product-kalfslapje-165g.jpg",
                    "width": 300,
                    "height": 200
                },
                {
                    "src": "https://bakeronline.be/uploads/tests/1080x720/product-kalfslapje-165g.jpg",
                    "width": 1080,
                    "height": 720
                }
            ],
            "white_background": false
        }
    ],
    "price_type": "PER_PERSON",
    "target_price": false,
    "subtitle": null,
    "description": "Random product description",
    "allergens": [
        {
            "id": 3,
            "name": "Egg"
        },
        {
            "id": 4,
            "name": "Fish"
        },
        {
            "id": 9,
            "name": "Celery"
        },
        {
            "id": 11,
            "name": "Sesame"
        }
    ],
    "url": "http://decock.com/doloribus-dolorem-sapiente-qui-quo-similique-sint",
    "url_type": "recipe",
    "specialty": false,
    "favourite": null,
    "product_prices": [],
    "optionsets": [
        {
            "id": 134028,
            "name": "Do you want a bag?",
            "code": null,
            "options": [
                {
                    "id": 736975,
                    "name": "No",
                    "price_change": {
                        "value": 781,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                },
                {
                    "id": 736976,
                    "name": "Yes please",
                    "price_change": {
                        "value": 647,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                },
                {
                    "id": 736977,
                    "name": "No",
                    "price_change": {
                        "value": 725,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                },
                {
                    "id": 736978,
                    "name": "Yes please",
                    "price_change": {
                        "value": 938,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                }
            ]
        },
        {
            "id": 134029,
            "name": "Do you want your bread sliced?",
            "code": null,
            "options": [
                {
                    "id": 736979,
                    "name": "No thank you",
                    "price_change": {
                        "value": 140,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                },
                {
                    "id": 736980,
                    "name": "No thank you",
                    "price_change": {
                        "value": 464,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                }
            ]
        },
        {
            "id": 134030,
            "name": "Do you want a picture on your cake?",
            "code": null,
            "options": [
                {
                    "id": 736981,
                    "name": "Yes please",
                    "price_change": {
                        "value": 271,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                },
                {
                    "id": 736982,
                    "name": "No",
                    "price_change": {
                        "value": 406,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                }
            ]
        }
    ],
    "min_max": {
        "amount": {
            "suggested": 1,
            "minimum": 1,
            "maximum": null
        },
        "weight": {
            "suggested": 100,
            "minimum": 1,
            "maximum": null
        },
        "persons": {
            "suggested": 1,
            "minimum": 1,
            "maximum": null
        }
    },
    "info": [
        {
            "name": "description",
            "title": "Description",
            "text": "Random product description",
            "type": "PLAIN"
        },
        {
            "name": "availability-takeout",
            "title": "Pick up at shop",
            "text": "<p>Order 5 minutes in advance</p>",
            "type": "HTML"
        },
        {
            "name": "availability-delivery",
            "title": "Delivery",
            "text": "<p>Order 5 minutes in advance</p>",
            "type": "HTML"
        },
        {
            "name": "allergens",
            "title": "Allergens ",
            "text": "This product contains Egg, Fish, Celery and Sesame",
            "type": "PLAIN"
        }
    ],
    "offer": {
        "type": "percentage",
        "x": null,
        "y": null,
        "percentage": 1000,
        "minimum": null,
        "offer": {
            "id": 104,
            "name": "Black Friday"
        }
    }
}

Example response 8 Product with prices and an offer

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

{
    "id": 189626,
    "name": "Witte vloerpistolets",
    "price": {
        "value": 2884,
        "currency": "EUR"
    },
    "images": [
        {
            "resolutions": [
                {
                    "src": "https://bakeronline.be/uploads/tests/250x200/product-tijgerpistolets.jpg",
                    "width": 300,
                    "height": 200
                },
                {
                    "src": "https://bakeronline.be/uploads/tests/1080x720/product-tijgerpistolets.jpg",
                    "width": 1080,
                    "height": 720
                }
            ],
            "white_background": false
        }
    ],
    "price_type": "MULTIPLE_CHOICE",
    "target_price": false,
    "subtitle": null,
    "description": "Random product description",
    "allergens": [
        {
            "id": 8,
            "name": "Nuts"
        },
        {
            "id": 9,
            "name": "Celery"
        },
        {
            "id": 11,
            "name": "Sesame"
        },
        {
            "id": 12,
            "name": "Sulphite"
        },
        {
            "id": 13,
            "name": "Lupine"
        }
    ],
    "url": "http://www.coppens.be/enim-quasi-ipsa-labore-quod-qui.html",
    "url_type": "none",
    "specialty": false,
    "favourite": null,
    "product_prices": [
        {
            "id": 11750776,
            "name": "7 persons",
            "price": {
                "value": 26,
                "currency": "EUR"
            },
            "offer": {
                "type": "x-plus-y",
                "x": 3,
                "y": 1,
                "percentage": null,
                "minimum": 3,
                "offer": {
                    "id": 104,
                    "name": "Black Friday"
                }
            }
        },
        {
            "id": 11750777,
            "name": "2 persons",
            "price": {
                "value": 62,
                "currency": "EUR"
            },
            "offer": null
        }
    ],
    "optionsets": [
        {
            "id": 134031,
            "name": "Extra baked?",
            "code": null,
            "options": [
                {
                    "id": 736983,
                    "name": "Yes please",
                    "price_change": {
                        "value": 353,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                },
                {
                    "id": 736984,
                    "name": "No thank you",
                    "price_change": {
                        "value": 824,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                },
                {
                    "id": 736985,
                    "name": "Yes",
                    "price_change": {
                        "value": 5,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                }
            ]
        },
        {
            "id": 134032,
            "name": "Do you want your bread sliced?",
            "code": null,
            "options": [
                {
                    "id": 736986,
                    "name": "Yes",
                    "price_change": {
                        "value": 997,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                },
                {
                    "id": 736987,
                    "name": "No thank you",
                    "price_change": {
                        "value": 808,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                }
            ]
        },
        {
            "id": 133999,
            "name": "Do you want a picture on your cake?",
            "code": null,
            "options": [
                {
                    "id": 736871,
                    "name": "Yes",
                    "price_change": {
                        "value": 346,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                },
                {
                    "id": 736872,
                    "name": "No",
                    "price_change": {
                        "value": 983,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                }
            ]
        },
        {
            "id": 134001,
            "name": "Extra baked?",
            "code": null,
            "options": [
                {
                    "id": 736875,
                    "name": "Yes",
                    "price_change": {
                        "value": 889,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                },
                {
                    "id": 736877,
                    "name": "Yes",
                    "price_change": {
                        "value": 174,
                        "currency": "EUR"
                    },
                    "image": null,
                    "require_image": false,
                    "code": null
                }
            ]
        }
    ],
    "min_max": {
        "amount": {
            "suggested": 1,
            "minimum": 1,
            "maximum": null
        },
        "weight": {
            "suggested": 100,
            "minimum": 1,
            "maximum": null
        },
        "persons": {
            "suggested": 1,
            "minimum": 1,
            "maximum": null
        }
    },
    "info": [
        {
            "name": "description",
            "title": "Description",
            "text": "Random product description",
            "type": "PLAIN"
        },
        {
            "name": "availability-takeout",
            "title": "Pick up at shop",
            "text": "<p>Order 5 minutes in advance</p>",
            "type": "HTML"
        },
        {
            "name": "availability-delivery",
            "title": "Delivery",
            "text": "<p>Order 5 minutes in advance</p>",
            "type": "HTML"
        },
        {
            "name": "allergens",
            "title": "Allergens ",
            "text": "This product contains Nuts, Celery, Sesame, Sulphite and Lupine",
            "type": "PLAIN"
        }
    ],
    "offer": null
}
1.5.0 stable