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

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": false
    },
    "price_change": {
        "value": 17,
        "currency": "EUR"
    },
    "price_change_without_discount": {
        "value": 16,
        "currency": "EUR"
    },
    "item": {
        "amount": 13,
        "persons": 18,
        "gram": 16,
        "comment": "...",
        "product": {
            "id": 16,
            "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": true
                }
            ],
            "price_type": "PER_UNIT",
            "target_price": false,
            "price": {
                "value": 10,
                "currency": "EUR"
            },
            "only_order_in_store": true,
            "category": {
                "id": 18,
                "name": "..."
            },
            "origin": "..."
        },
        "product_price": {
            "id": 16,
            "name": "...",
            "price": {
                "value": 13,
                "currency": "EUR"
            }
        },
        "calculated_prices": {
            "unit_price": {
                "value": 13,
                "currency": "EUR"
            },
            "price": {
                "value": 12,
                "currency": "EUR"
            }
        },
        "discount_prices": {
            "unit_price": {
                "value": 10,
                "currency": "EUR"
            },
            "price": {
                "value": 16,
                "currency": "EUR"
            }
        },
        "amount_free": 15,
        "shop": {
            "id": 10,
            "name": "Prof. Abner Powlowski",
            "address": {
                "street": "Sint-Denijslaan",
                "nr": "96",
                "zipcode": "9000",
                "city": "Gent",
                "country": "BE",
                "position": {
                    "latitude": 1.54361,
                    "longitude": 0.45645
                }
            },
            "allow_comments": true,
            "url": "...",
            "allow_order_comments": false,
            "allow_product_comments": true,
            "allow_order_messages": false,
            "global_discount_percentage": 19,
            "allow_orders": 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": false
                    },
                    "require_image": false,
                    "code": "...",
                    "price_calculation": "PER_PIECE",
                    "optionset": {
                        "id": 10,
                        "name": "...",
                        "code": "...",
                        "multiple_choice": false,
                        "choose_amount": false,
                        "min_different_options": 15,
                        "max_different_options": 17,
                        "min_amount_options": 19,
                        "max_amount_options": 10
                    }
                },
                "upload": {
                    "id": 13,
                    "url": "https://example.com"
                },
                "amount": 14
            },
            {
                "option": {
                    "id": 12,
                    "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": "...",
                    "price_calculation": "PER_PIECE",
                    "optionset": {
                        "id": 15,
                        "name": "...",
                        "code": "...",
                        "multiple_choice": false,
                        "choose_amount": false,
                        "min_different_options": 15,
                        "max_different_options": 13,
                        "min_amount_options": 16,
                        "max_amount_options": 19
                    }
                },
                "upload": {
                    "id": 13,
                    "url": "https://example.com"
                },
                "amount": 10
            },
            {
                "option": {
                    "id": 11,
                    "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": true,
                    "code": "...",
                    "price_calculation": "PER_PIECE",
                    "optionset": {
                        "id": 16,
                        "name": "...",
                        "code": "...",
                        "multiple_choice": true,
                        "choose_amount": true,
                        "min_different_options": 15,
                        "max_different_options": 18,
                        "min_amount_options": 11,
                        "max_amount_options": 13
                    }
                },
                "upload": {
                    "id": 17,
                    "url": "https://example.com"
                },
                "amount": 13
            }
        ]
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.8.0 stable