Get product by id

GET /shops/@shop/products/@id

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
shop Int An integer value
id Int An integer value

Example request 1

GET /shops/19/products/15 HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.5.2
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.detailed? 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.
soldout Bool Check if product is soldout or not
stock Dictionary Amount in stock
category Dictionary Optional. A dictionary with fields

Example response 1

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

{
    "id": 14,
    "name": "...",
    "images": [
        {
            "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
        },
        {
            "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
        },
        {
            "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
        }
    ],
    "price_type": "PER_UNIT",
    "target_price": false,
    "price": {
        "value": 16,
        "currency": "EUR"
    },
    "subtitle": "...",
    "description": "...",
    "allergens": [
        {
            "id": 19,
            "name": "Sesame"
        },
        {
            "id": 12,
            "name": "Milk"
        },
        {
            "id": 19,
            "name": "Sesame"
        }
    ],
    "url": "https://example.com",
    "url_type": "none",
    "specialty": true,
    "favourite": true,
    "product_prices": [
        {
            "id": 15,
            "name": "...",
            "price": {
                "value": 12,
                "currency": "EUR"
            },
            "offer": {
                "type": "percentage",
                "x": 17,
                "y": 17,
                "percentage": 15,
                "minimum": 13,
                "offer": {
                    "id": 10,
                    "name": "Black Friday"
                }
            }
        },
        {
            "id": 10,
            "name": "...",
            "price": {
                "value": 11,
                "currency": "EUR"
            },
            "offer": {
                "type": "percentage",
                "x": 13,
                "y": 11,
                "percentage": 12,
                "minimum": 11,
                "offer": {
                    "id": 16,
                    "name": "Black Friday"
                }
            }
        },
        {
            "id": 14,
            "name": "...",
            "price": {
                "value": 12,
                "currency": "EUR"
            },
            "offer": {
                "type": "percentage",
                "x": 14,
                "y": 19,
                "percentage": 10,
                "minimum": 17,
                "offer": {
                    "id": 15,
                    "name": "Black Friday"
                }
            }
        }
    ],
    "optionsets": [
        {
            "id": 13,
            "name": "...",
            "code": "...",
            "options": [
                {
                    "id": 16,
                    "name": "...",
                    "price_change": {
                        "value": 14,
                        "currency": "EUR"
                    },
                    "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
                            }
                        ],
                        "white_background": true
                    },
                    "require_image": false,
                    "code": "..."
                },
                {
                    "id": 10,
                    "name": "...",
                    "price_change": {
                        "value": 19,
                        "currency": "EUR"
                    },
                    "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
                            }
                        ],
                        "white_background": false
                    },
                    "require_image": false,
                    "code": "..."
                },
                {
                    "id": 12,
                    "name": "...",
                    "price_change": {
                        "value": 12,
                        "currency": "EUR"
                    },
                    "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
                            }
                        ],
                        "white_background": true
                    },
                    "require_image": false,
                    "code": "..."
                }
            ]
        },
        {
            "id": 11,
            "name": "...",
            "code": "...",
            "options": [
                {
                    "id": 13,
                    "name": "...",
                    "price_change": {
                        "value": 15,
                        "currency": "EUR"
                    },
                    "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
                            }
                        ],
                        "white_background": false
                    },
                    "require_image": false,
                    "code": "..."
                },
                {
                    "id": 10,
                    "name": "...",
                    "price_change": {
                        "value": 19,
                        "currency": "EUR"
                    },
                    "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
                            }
                        ],
                        "white_background": false
                    },
                    "require_image": true,
                    "code": "..."
                },
                {
                    "id": 11,
                    "name": "...",
                    "price_change": {
                        "value": 12,
                        "currency": "EUR"
                    },
                    "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
                            }
                        ],
                        "white_background": false
                    },
                    "require_image": true,
                    "code": "..."
                }
            ]
        },
        {
            "id": 17,
            "name": "...",
            "code": "...",
            "options": [
                {
                    "id": 17,
                    "name": "...",
                    "price_change": {
                        "value": 16,
                        "currency": "EUR"
                    },
                    "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
                            }
                        ],
                        "white_background": false
                    },
                    "require_image": true,
                    "code": "..."
                },
                {
                    "id": 12,
                    "name": "...",
                    "price_change": {
                        "value": 11,
                        "currency": "EUR"
                    },
                    "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
                            }
                        ],
                        "white_background": true
                    },
                    "require_image": false,
                    "code": "..."
                },
                {
                    "id": 17,
                    "name": "...",
                    "price_change": {
                        "value": 11,
                        "currency": "EUR"
                    },
                    "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
                            }
                        ],
                        "white_background": true
                    },
                    "require_image": true,
                    "code": "..."
                }
            ]
        }
    ],
    "min_max": {
        "amount": {
            "minimum": 13,
            "maximum": 12,
            "suggested": 12
        },
        "weight": {
            "minimum": 11,
            "maximum": 11,
            "suggested": 13
        },
        "persons": {
            "minimum": 15,
            "maximum": 11,
            "suggested": 17
        }
    },
    "info": [
        {
            "name": "...",
            "title": "...",
            "text": "...",
            "type": "HTML"
        },
        {
            "name": "...",
            "title": "...",
            "text": "...",
            "type": "HTML"
        },
        {
            "name": "...",
            "title": "...",
            "text": "...",
            "type": "HTML"
        }
    ],
    "offer": {
        "type": "percentage",
        "x": 14,
        "y": 14,
        "percentage": 12,
        "minimum": 11,
        "offer": {
            "id": 17,
            "name": "Black Friday"
        }
    },
    "soldout": false,
    "stock": {
        "amount": 13
    },
    "category": {
        "id": 15,
        "name": "..."
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.5.2 stable