CartItemSuggestion

Suggestion to add a CartItem to the cart. It contains some display information and information about what the price change would be relative to the current Cart and may contain discount information (e.g. it is cheaper to add something because you already have a specific product in your cart).

Field Type Description
name String Name of the suggestion (can be different than the name of the product in the CartItem)
description String A discription of this suggestion.
image Image? Nullable.
price_change Price The difference in price to the total of the cart (excluding delivery and other costs). Please only use this value for presentation, not for calculating the price of the cart.
price_change_without_discount Price? Nullable. Nullable. Contains the difference in price (same as price_change) but doesn't take discounts and combinations into account. Always display with strikethrough style.
item CartItem.cart Information about an item in the cart

Examples

Request

When used inside a request.

Example 1

{
    "name": "string",
    "description": "string",
    "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
    },
    "price_change": {
        "value": 12,
        "currency": "EUR"
    },
    "price_change_without_discount": {
        "value": 12,
        "currency": "EUR"
    },
    "item": {
        "amount": 12,
        "persons": 12,
        "gram": 12,
        "comment": "string",
        "product_id": 12,
        "product_price_id": 12,
        "shop_id": 12,
        "options": [
            {
                "option_id": 12,
                "upload_id": 12
            },
            {
                "option_id": 12,
                "upload_id": 12
            },
            {
                "option_id": 12,
                "upload_id": 12
            }
        ]
    }
}

Response

When returned in a response.

Example 1

{
    "name": "string",
    "description": "string",
    "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
    },
    "price_change": {
        "value": 12,
        "currency": "EUR"
    },
    "price_change_without_discount": {
        "value": 12,
        "currency": "EUR"
    },
    "item": {
        "amount": 12,
        "persons": 12,
        "gram": 12,
        "comment": "string",
        "product": {
            "id": 12,
            "name": "string",
            "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": 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": 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": true
                }
            ],
            "price_type": "PER_UNIT",
            "target_price": true,
            "price": {
                "value": 12,
                "currency": "EUR"
            }
        },
        "product_price": {
            "id": 12,
            "name": "string",
            "price": {
                "value": 12,
                "currency": "EUR"
            }
        },
        "calculated_prices": {
            "unit_price": {
                "value": 12,
                "currency": "EUR"
            },
            "price": {
                "value": 12,
                "currency": "EUR"
            }
        },
        "discount_prices": {
            "unit_price": {
                "value": 12,
                "currency": "EUR"
            },
            "price": {
                "value": 12,
                "currency": "EUR"
            }
        },
        "amount_free": 12,
        "shop": {
            "id": 228,
            "name": "Emergency Cake",
            "address": {
                "street": "Huberthof",
                "nr": "12",
                "zipcode": "6150",
                "city": "Fosses-la-Ville",
                "country": "BE",
                "position": {
                    "latitude": 51.05,
                    "longitude": 3.71667
                }
            },
            "allow_comments": true,
            "currency": "EUR"
        },
        "options": [
            {
                "option": {
                    "id": 12,
                    "name": "string",
                    "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": true,
                    "code": "string",
                    "optionset": {
                        "id": 12,
                        "name": "string",
                        "code": "string"
                    }
                },
                "upload": {
                    "id": 12,
                    "url": "https://example.com"
                }
            },
            {
                "option": {
                    "id": 12,
                    "name": "string",
                    "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": true,
                    "code": "string",
                    "optionset": {
                        "id": 12,
                        "name": "string",
                        "code": "string"
                    }
                },
                "upload": {
                    "id": 12,
                    "url": "https://example.com"
                }
            },
            {
                "option": {
                    "id": 12,
                    "name": "string",
                    "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": true,
                    "code": "string",
                    "optionset": {
                        "id": 12,
                        "name": "string",
                        "code": "string"
                    }
                },
                "upload": {
                    "id": 12,
                    "url": "https://example.com"
                }
            }
        ]
    }
}
1.5.0 stable