Return all products for an offer in a shop

GET /shops/@shop/offers/@offer/products

Request

Optional authentication

You can use authentication for this request, but it is not required. Always provide the access_token when you have one. It may affect the response.

Header Value
Authorization Optional. 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
offer Int An integer value
shop Int An integer value

Example request 1 Return all products of an offer that are not inactive or in inactive categories

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

Response

Array of Product.detailed: [Product.detailed]

Product.detailed

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 Return all products of an offer that are not inactive or in inactive categories

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

[
    {
        "id": 189552,
        "name": "Eclair chocolade",
        "price": {
            "value": 3591,
            "currency": "EUR"
        },
        "images": [
            {
                "resolutions": [
                    {
                        "src": "https://bakeronline.be/uploads/tests/250x200/product-mini-pist-sand.jpg",
                        "width": 300,
                        "height": 200
                    },
                    {
                        "src": "https://bakeronline.be/uploads/tests/1080x720/product-mini-pist-sand.jpg",
                        "width": 1080,
                        "height": 720
                    }
                ],
                "white_background": true
            }
        ],
        "price_type": "PER_UNIT",
        "target_price": false,
        "subtitle": null,
        "description": "",
        "allergens": [],
        "url": "http://www.mahieu.org/ipsum-ea-nihil-magni-reiciendis-ut-odit-quis.html",
        "url_type": "website",
        "specialty": false,
        "favourite": null,
        "product_prices": [],
        "optionsets": [
            {
                "id": 133914,
                "name": "Do you want your bread sliced?",
                "code": null,
                "options": [
                    {
                        "id": 736584,
                        "name": "No",
                        "price_change": {
                            "value": 493,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    },
                    {
                        "id": 736585,
                        "name": "Yes please",
                        "price_change": {
                            "value": 843,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    },
                    {
                        "id": 736586,
                        "name": "No thank you",
                        "price_change": {
                            "value": 905,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    },
                    {
                        "id": 736587,
                        "name": "Yes please",
                        "price_change": {
                            "value": 985,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    },
                    {
                        "id": 736588,
                        "name": "Yes please",
                        "price_change": {
                            "value": 273,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    }
                ]
            },
            {
                "id": 133916,
                "name": "Please select an option",
                "code": null,
                "options": [
                    {
                        "id": 736590,
                        "name": "No thank you",
                        "price_change": {
                            "value": 405,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    },
                    {
                        "id": 736592,
                        "name": "No thank you",
                        "price_change": {
                            "value": 576,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    },
                    {
                        "id": 736593,
                        "name": "Yes",
                        "price_change": {
                            "value": 126,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    },
                    {
                        "id": 736594,
                        "name": "Yes",
                        "price_change": {
                            "value": 138,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    }
                ]
            },
            {
                "id": 133917,
                "name": "Do you want a picture on your cake?",
                "code": null,
                "options": [
                    {
                        "id": 736595,
                        "name": "Yes please",
                        "price_change": {
                            "value": 716,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    },
                    {
                        "id": 736597,
                        "name": "Yes",
                        "price_change": {
                            "value": 128,
                            "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": "ingredients",
                "title": "Ingredients",
                "text": "A list of ingredients here",
                "type": "PLAIN"
            }
        ],
        "offer": {
            "type": "percentage",
            "x": null,
            "y": null,
            "percentage": 1000,
            "minimum": null,
            "offer": {
                "id": 102,
                "name": "Black Friday"
            }
        }
    },
    {
        "id": 189556,
        "name": "Sandwich ongesuikerd",
        "price": {
            "value": 2739,
            "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": "MULTIPLE_CHOICE",
        "target_price": false,
        "subtitle": null,
        "description": "",
        "allergens": [],
        "url": "http://www.cools.org/",
        "url_type": "recipe",
        "specialty": false,
        "favourite": null,
        "product_prices": [
            {
                "id": 11750728,
                "name": "5 persons",
                "price": {
                    "value": 16,
                    "currency": "EUR"
                },
                "offer": {
                    "type": "percentage",
                    "x": null,
                    "y": null,
                    "percentage": 2000,
                    "minimum": null,
                    "offer": {
                        "id": 102,
                        "name": "Black Friday"
                    }
                }
            },
            {
                "id": 11750729,
                "name": "4 persons",
                "price": {
                    "value": 42,
                    "currency": "EUR"
                },
                "offer": null
            },
            {
                "id": 11750730,
                "name": "6 persons",
                "price": {
                    "value": 57,
                    "currency": "EUR"
                },
                "offer": null
            }
        ],
        "optionsets": [
            {
                "id": 133921,
                "name": "Do you want a bag?",
                "code": null,
                "options": [
                    {
                        "id": 736604,
                        "name": "No",
                        "price_change": {
                            "value": 445,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    },
                    {
                        "id": 736605,
                        "name": "Yes please",
                        "price_change": {
                            "value": 843,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    },
                    {
                        "id": 736606,
                        "name": "No thank you",
                        "price_change": {
                            "value": 341,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    }
                ]
            },
            {
                "id": 133922,
                "name": "Extra baked?",
                "code": null,
                "options": [
                    {
                        "id": 736607,
                        "name": "No",
                        "price_change": {
                            "value": 255,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    },
                    {
                        "id": 736608,
                        "name": "No thank you",
                        "price_change": {
                            "value": 117,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    },
                    {
                        "id": 736609,
                        "name": "Yes",
                        "price_change": {
                            "value": 144,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    },
                    {
                        "id": 736610,
                        "name": "Yes please",
                        "price_change": {
                            "value": 755,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    },
                    {
                        "id": 736611,
                        "name": "No thank you",
                        "price_change": {
                            "value": 818,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    }
                ]
            },
            {
                "id": 133923,
                "name": "Do you want your bread sliced?",
                "code": null,
                "options": [
                    {
                        "id": 736612,
                        "name": "No thank you",
                        "price_change": {
                            "value": 355,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null
                    },
                    {
                        "id": 736613,
                        "name": "No",
                        "price_change": {
                            "value": 596,
                            "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"
            }
        ],
        "offer": null
    }
]
1.5.0 stable