Fields when send to the api inside a request.
Field | Type | Description |
---|---|---|
amount | Int | An integer value |
persons | Int | An integer value |
gram | Int | An integer value |
comment | String | A String value |
product_id | Int | An integer value |
product_price_id | Int? | Nullable. An integer value |
shop_id | Int | An integer value |
options | [CartItemOption] | Array of CartItemOption |
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. |
shop | Shop.simple | |
options | [CartItemOption] | Array of CartItemOption |
When used inside a request.
{
"amount": 13,
"persons": 16,
"gram": 14,
"comment": "...",
"product_id": 10,
"product_price_id": 19,
"shop_id": 12,
"options": [
{
"option_id": 15,
"upload_id": 15,
"amount": 12
},
{
"option_id": 10,
"upload_id": 10,
"amount": 15
},
{
"option_id": 16,
"upload_id": 12,
"amount": 11
}
]
}
When returned in a response.
{
"amount": 16,
"persons": 13,
"gram": 13,
"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": 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": true,
"price": {
"value": 18,
"currency": "EUR"
},
"only_order_in_store": false,
"category": {
"id": 18,
"name": "..."
},
"origin": "..."
},
"product_price": {
"id": 10,
"name": "...",
"price": {
"value": 15,
"currency": "EUR"
}
},
"calculated_prices": {
"unit_price": {
"value": 19,
"currency": "EUR"
},
"price": {
"value": 16,
"currency": "EUR"
}
},
"discount_prices": {
"unit_price": {
"value": 11,
"currency": "EUR"
},
"price": {
"value": 13,
"currency": "EUR"
}
},
"amount_free": 11,
"shop": {
"id": 19,
"name": "Blaise Schaden",
"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": true,
"global_discount_percentage": 15,
"allow_orders": false,
"currency": "EUR"
},
"options": [
{
"option": {
"id": 14,
"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": false,
"code": "...",
"price_calculation": "PER_PIECE",
"optionset": {
"id": 16,
"name": "...",
"code": "...",
"multiple_choice": false,
"choose_amount": false,
"min_different_options": 15,
"max_different_options": 10,
"min_amount_options": 15,
"max_amount_options": 15
}
},
"upload": {
"id": 19,
"url": "https://example.com"
},
"amount": 17
},
{
"option": {
"id": 10,
"name": "...",
"price_change": {
"value": 17,
"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": "...",
"price_calculation": "PER_PIECE",
"optionset": {
"id": 11,
"name": "...",
"code": "...",
"multiple_choice": false,
"choose_amount": false,
"min_different_options": 13,
"max_different_options": 12,
"min_amount_options": 10,
"max_amount_options": 11
}
},
"upload": {
"id": 14,
"url": "https://example.com"
},
"amount": 15
},
{
"option": {
"id": 14,
"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": true
},
"require_image": false,
"code": "...",
"price_calculation": "PER_PIECE",
"optionset": {
"id": 15,
"name": "...",
"code": "...",
"multiple_choice": true,
"choose_amount": false,
"min_different_options": 10,
"max_different_options": 11,
"min_amount_options": 12,
"max_amount_options": 14
}
},
"upload": {
"id": 15,
"url": "https://example.com"
},
"amount": 10
}
]
}