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": 11,
"currency": "EUR"
},
"price_change_without_discount": {
"value": 10,
"currency": "EUR"
},
"item": {
"amount": 19,
"persons": 12,
"gram": 15,
"comment": "...",
"product_id": 19,
"product_price_id": 10,
"shop_id": 13,
"options": [
{
"option_id": 10,
"upload_id": 15,
"amount": 16
},
{
"option_id": 17,
"upload_id": 11,
"amount": 14
},
{
"option_id": 10,
"upload_id": 14,
"amount": 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
}
],
"file_id": 11,
"white_background": false
},
"price_change": {
"value": 11,
"currency": "EUR"
},
"price_change_without_discount": {
"value": 14,
"currency": "EUR"
},
"item": {
"amount": 16,
"persons": 14,
"gram": 13,
"comment": "...",
"product": {
"id": 14,
"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
}
],
"file_id": 12,
"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
}
],
"file_id": 13,
"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
}
],
"file_id": 16,
"white_background": false
}
],
"price_type": "PER_UNIT",
"target_price": true,
"price": {
"value": 15,
"currency": "EUR"
},
"only_order_in_store": true,
"category": {
"id": 16,
"name": "..."
},
"origin": "...",
"ingredients": "..."
},
"product_price": {
"id": 13,
"name": "...",
"price": {
"value": 12,
"currency": "EUR"
}
},
"calculated_prices": {
"unit_price": {
"value": 10,
"currency": "EUR"
},
"price": {
"value": 16,
"currency": "EUR"
}
},
"discount_prices": {
"unit_price": {
"value": 16,
"currency": "EUR"
},
"price": {
"value": 10,
"currency": "EUR"
}
},
"amount_free": 19,
"shop": {
"id": 19,
"name": "Levi Kshlerin",
"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": false,
"allow_order_messages": false,
"global_discount_percentage": 12,
"allow_orders": true,
"currency": "EUR"
},
"options": [
{
"option": {
"id": 12,
"name": "...",
"price_change": {
"value": 11,
"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
}
],
"file_id": 11,
"white_background": false
},
"require_image": true,
"code": "...",
"price_calculation": "PER_PIECE",
"optionset": {
"id": 12,
"name": "...",
"code": "...",
"multiple_choice": true,
"choose_amount": false,
"min_different_options": 14,
"max_different_options": 12,
"min_amount_options": 12,
"max_amount_options": 13
}
},
"upload": {
"id": 12,
"url": "https://example.com"
},
"amount": 15
},
{
"option": {
"id": 12,
"name": "...",
"price_change": {
"value": 18,
"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
}
],
"file_id": 15,
"white_background": false
},
"require_image": true,
"code": "...",
"price_calculation": "PER_PIECE",
"optionset": {
"id": 14,
"name": "...",
"code": "...",
"multiple_choice": false,
"choose_amount": false,
"min_different_options": 15,
"max_different_options": 16,
"min_amount_options": 10,
"max_amount_options": 14
}
},
"upload": {
"id": 12,
"url": "https://example.com"
},
"amount": 10
},
{
"option": {
"id": 17,
"name": "...",
"price_change": {
"value": 13,
"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
}
],
"file_id": 13,
"white_background": true
},
"require_image": false,
"code": "...",
"price_calculation": "PER_PIECE",
"optionset": {
"id": 18,
"name": "...",
"code": "...",
"multiple_choice": true,
"choose_amount": false,
"min_different_options": 11,
"max_different_options": 15,
"min_amount_options": 10,
"max_amount_options": 19
}
},
"upload": {
"id": 16,
"url": "https://example.com"
},
"amount": 17
}
]
}
}