Fields when send to the api inside a request.
Field | Type | Description |
---|
Fields when returned by the api in a response.
Field | Type | Description |
---|---|---|
amount | Int | An integer value |
persons | Int | An integer value |
gram | Int | An integer value |
comment | String | A String value |
product | Product.simple | |
product_price | ProductPrice.simple? | Nullable. |
calculated_prices | CartItemPrices | |
discount_prices | CartItemPrices? | Nullable. |
amount_free | Int | Amount you receive for free on top of the chosen amount. If the price type of the product is in gram or persons, this amount is also in gram or persons. |
options | [CartItemOption] | Array of CartItemOption |
When used inside a request.
[]
When returned in a response.
{
"amount": 10,
"persons": 17,
"gram": 14,
"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
}
],
"file_id": 16,
"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": 19,
"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": 17,
"white_background": false
}
],
"price_type": "PER_UNIT",
"target_price": true,
"price": {
"value": 16,
"currency": "EUR"
},
"only_order_in_store": true,
"category": {
"id": 17,
"name": "..."
},
"origin": "...",
"ingredients": "...",
"nutrients": [
{
"type": "FAT",
"amount": 9.67,
"label": "..."
},
{
"type": "FAT",
"amount": 9.67,
"label": "..."
},
{
"type": "FAT",
"amount": 9.67,
"label": "..."
}
]
},
"product_price": {
"id": 16,
"name": "...",
"price": {
"value": 15,
"currency": "EUR"
}
},
"calculated_prices": {
"unit_price": {
"value": 19,
"currency": "EUR"
},
"price": {
"value": 14,
"currency": "EUR"
}
},
"discount_prices": {
"unit_price": {
"value": 10,
"currency": "EUR"
},
"price": {
"value": 19,
"currency": "EUR"
}
},
"amount_free": 17,
"options": [
{
"option": {
"id": 11,
"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
}
],
"file_id": 16,
"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": 10,
"max_different_options": 12,
"min_amount_options": 10,
"max_amount_options": 12
}
},
"upload": {
"id": 10,
"url": "https://example.com"
},
"amount": 12
},
{
"option": {
"id": 17,
"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
}
],
"file_id": 17,
"white_background": false
},
"require_image": true,
"code": "...",
"price_calculation": "PER_PIECE",
"optionset": {
"id": 12,
"name": "...",
"code": "...",
"multiple_choice": false,
"choose_amount": true,
"min_different_options": 13,
"max_different_options": 19,
"min_amount_options": 11,
"max_amount_options": 16
}
},
"upload": {
"id": 18,
"url": "https://example.com"
},
"amount": 15
},
{
"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
}
],
"file_id": 10,
"white_background": false
},
"require_image": false,
"code": "...",
"price_calculation": "PER_PIECE",
"optionset": {
"id": 14,
"name": "...",
"code": "...",
"multiple_choice": false,
"choose_amount": true,
"min_different_options": 14,
"max_different_options": 12,
"min_amount_options": 16,
"max_amount_options": 18
}
},
"upload": {
"id": 10,
"url": "https://example.com"
},
"amount": 18
}
]
}