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": 11,
        "currency": "EUR"
    },
    "price_change_without_discount": {
        "value": 17,
        "currency": "EUR"
    },
    "item": {
        "amount": 12,
        "persons": 12,
        "gram": 12,
        "comment": "...",
        "product_id": 13,
        "product_price_id": 16,
        "shop_id": 13,
        "option_ids": [
            15,
            10,
            12
        ],
        "uploads": [
            {
                "upload": {
                    "id": 17,
                    "url": "https://example.com"
                },
                "optionset_id": 19
            },
            {
                "upload": {
                    "id": 15,
                    "url": "https://example.com"
                },
                "optionset_id": 15
            },
            {
                "upload": {
                    "id": 19,
                    "url": "https://example.com"
                },
                "optionset_id": 10
            }
        ]
    }
}

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": 12,
        "currency": "EUR"
    },
    "item": {
        "amount": 14,
        "persons": 16,
        "gram": 11,
        "comment": "...",
        "product": {
            "id": 12,
            "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": 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": false
                }
            ],
            "price_type": "PER_UNIT",
            "target_price": false,
            "price": {
                "value": 18,
                "currency": "EUR"
            }
        },
        "product_price": {
            "id": 18,
            "name": "...",
            "price": {
                "value": 14,
                "currency": "EUR"
            }
        },
        "calculated_prices": {
            "unit_price": {
                "value": 19,
                "currency": "EUR"
            },
            "price": {
                "value": 11,
                "currency": "EUR"
            }
        },
        "discount_prices": {
            "unit_price": {
                "value": 14,
                "currency": "EUR"
            },
            "price": {
                "value": 14,
                "currency": "EUR"
            }
        },
        "amount_free": 13,
        "shop": {
            "id": 10,
            "name": "Dr. Jarod O'Reilly III",
            "address": {
                "street": "Sint-Denijslaan",
                "nr": "96",
                "zipcode": "9000",
                "city": "Gent",
                "country": "BE",
                "position": {
                    "latitude": 1.54361,
                    "longitude": 0.45645
                }
            },
            "currency": "EUR"
        },
        "options": [
            {
                "id": 14,
                "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
                },
                "optionset": {
                    "id": 17,
                    "name": "...",
                    "allow_attachment": true
                }
            },
            {
                "id": 14,
                "name": "...",
                "price_change": {
                    "value": 10,
                    "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
                },
                "optionset": {
                    "id": 14,
                    "name": "...",
                    "allow_attachment": false
                }
            },
            {
                "id": 14,
                "name": "...",
                "price_change": {
                    "value": 10,
                    "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
                },
                "optionset": {
                    "id": 18,
                    "name": "...",
                    "allow_attachment": false
                }
            }
        ],
        "uploads": [
            {
                "upload": {
                    "id": 19,
                    "url": "https://example.com"
                },
                "optionset_id": 18
            },
            {
                "upload": {
                    "id": 10,
                    "url": "https://example.com"
                },
                "optionset_id": 17
            },
            {
                "upload": {
                    "id": 10,
                    "url": "https://example.com"
                },
                "optionset_id": 13
            }
        ]
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.4.0 stable