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 |
When used inside a request.
{
"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": 10,
"currency": "EUR"
},
"price_change_without_discount": {
"value": 17,
"currency": "EUR"
},
"item": {
"amount": 11,
"persons": 10,
"gram": 14,
"comment": "...",
"product_id": 13,
"product_price_id": 12,
"shop_id": 13,
"options": [
{
"option_id": 16,
"upload_id": 17
},
{
"option_id": 10,
"upload_id": 13
},
{
"option_id": 12,
"upload_id": 17
}
]
}
}
When returned in a response.
{
"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": 18,
"currency": "EUR"
},
"price_change_without_discount": {
"value": 14,
"currency": "EUR"
},
"item": {
"amount": 10,
"persons": 13,
"gram": 16,
"comment": "...",
"product": {
"id": 18,
"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": 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": false,
"price": {
"value": 12,
"currency": "EUR"
}
},
"product_price": {
"id": 17,
"name": "...",
"price": {
"value": 17,
"currency": "EUR"
}
},
"calculated_prices": {
"unit_price": {
"value": 14,
"currency": "EUR"
},
"price": {
"value": 15,
"currency": "EUR"
}
},
"discount_prices": {
"unit_price": {
"value": 16,
"currency": "EUR"
},
"price": {
"value": 19,
"currency": "EUR"
}
},
"amount_free": 19,
"shop": {
"id": 14,
"name": "Prof. Chet O'Conner",
"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": 13,
"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": true,
"code": "...",
"optionset": {
"id": 16,
"name": "...",
"code": "..."
}
},
"upload": {
"id": 15,
"url": "https://example.com"
}
},
{
"option": {
"id": 13,
"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": false
},
"require_image": true,
"code": "...",
"optionset": {
"id": 10,
"name": "...",
"code": "..."
}
},
"upload": {
"id": 19,
"url": "https://example.com"
}
},
{
"option": {
"id": 11,
"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": false
},
"require_image": true,
"code": "...",
"optionset": {
"id": 12,
"name": "...",
"code": "..."
}
},
"upload": {
"id": 14,
"url": "https://example.com"
}
}
]
}
}