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": "...",
    "description": "...",
    "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": 10,
        "currency": "EUR"
    },
    "price_change_without_discount": {
        "value": 11,
        "currency": "EUR"
    },
    "item": {
        "amount": 19,
        "persons": 15,
        "gram": 13,
        "comment": "...",
        "product_id": 19,
        "product_price_id": 11,
        "shop_id": 17,
        "options": [
            {
                "option_id": 12,
                "upload_id": 14
            },
            {
                "option_id": 18,
                "upload_id": 19
            },
            {
                "option_id": 10,
                "upload_id": 15
            }
        ]
    }
}

Response

When returned in a response.

Example 1

{
    "name": "...",
    "description": "...",
    "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": 18,
        "currency": "EUR"
    },
    "price_change_without_discount": {
        "value": 19,
        "currency": "EUR"
    },
    "item": {
        "amount": 10,
        "persons": 11,
        "gram": 19,
        "comment": "...",
        "product": {
            "id": 17,
            "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": 13,
                "currency": "EUR"
            }
        },
        "product_price": {
            "id": 18,
            "name": "...",
            "price": {
                "value": 12,
                "currency": "EUR"
            }
        },
        "calculated_prices": {
            "unit_price": {
                "value": 14,
                "currency": "EUR"
            },
            "price": {
                "value": 14,
                "currency": "EUR"
            }
        },
        "discount_prices": {
            "unit_price": {
                "value": 14,
                "currency": "EUR"
            },
            "price": {
                "value": 15,
                "currency": "EUR"
            }
        },
        "amount_free": 11,
        "shop": {
            "id": 16,
            "name": "Jeanie Nikolaus",
            "address": {
                "street": "Sint-Denijslaan",
                "nr": "96",
                "zipcode": "9000",
                "city": "Gent",
                "country": "BE",
                "position": {
                    "latitude": 1.54361,
                    "longitude": 0.45645
                }
            },
            "allow_comments": false,
            "currency": "EUR"
        },
        "options": [
            {
                "option": {
                    "id": 18,
                    "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": true
                    },
                    "require_image": true,
                    "code": "...",
                    "optionset": {
                        "id": 11,
                        "name": "...",
                        "code": "..."
                    }
                },
                "upload": {
                    "id": 19,
                    "url": "https://example.com"
                }
            },
            {
                "option": {
                    "id": 19,
                    "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": "...",
                    "optionset": {
                        "id": 18,
                        "name": "...",
                        "code": "..."
                    }
                },
                "upload": {
                    "id": 19,
                    "url": "https://example.com"
                }
            },
            {
                "option": {
                    "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": false,
                    "code": "...",
                    "optionset": {
                        "id": 10,
                        "name": "...",
                        "code": "..."
                    }
                },
                "upload": {
                    "id": 16,
                    "url": "https://example.com"
                }
            }
        ]
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.5.1 stable