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 |
option_ids | [Int] | Array of Int |
uploads | [CartUploadWithOptionSet] | Optional. Array of CartUploadWithOptionSet |
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 | [Option.detailed] | Array of Option.detailed |
uploads | [CartUploadWithOptionSet] | Optional. Array of CartUploadWithOptionSet |
When used inside a request.
{
"amount": 18,
"persons": 14,
"gram": 13,
"comment": "...",
"product_id": 15,
"product_price_id": 18,
"shop_id": 19,
"option_ids": [
11,
18,
17
],
"uploads": [
{
"upload": {
"id": 16,
"url": "https://example.com"
},
"optionset_id": 14
},
{
"upload": {
"id": 14,
"url": "https://example.com"
},
"optionset_id": 19
},
{
"upload": {
"id": 16,
"url": "https://example.com"
},
"optionset_id": 11
}
]
}
When returned in a response.
{
"amount": 13,
"persons": 17,
"gram": 15,
"comment": "...",
"product": {
"id": 15,
"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": true,
"price": {
"value": 16,
"currency": "EUR"
}
},
"product_price": {
"id": 12,
"name": "...",
"price": {
"value": 15,
"currency": "EUR"
}
},
"calculated_prices": {
"unit_price": {
"value": 17,
"currency": "EUR"
},
"price": {
"value": 10,
"currency": "EUR"
}
},
"discount_prices": {
"unit_price": {
"value": 15,
"currency": "EUR"
},
"price": {
"value": 16,
"currency": "EUR"
}
},
"amount_free": 10,
"shop": {
"id": 19,
"name": "Celestine Kling",
"address": {
"street": "Sint-Denijslaan",
"nr": "96",
"zipcode": "9000",
"city": "Gent",
"country": "BE",
"position": {
"latitude": 1.54361,
"longitude": 0.45645
}
},
"currency": "EUR"
},
"options": [
{
"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
},
"optionset": {
"id": 17,
"name": "...",
"allow_attachment": true
}
},
{
"id": 18,
"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
}
],
"white_background": true
},
"optionset": {
"id": 12,
"name": "...",
"allow_attachment": true
}
},
{
"id": 10,
"name": "...",
"price_change": {
"value": 10,
"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
},
"optionset": {
"id": 11,
"name": "...",
"allow_attachment": false
}
}
],
"uploads": [
{
"upload": {
"id": 10,
"url": "https://example.com"
},
"optionset_id": 10
},
{
"upload": {
"id": 13,
"url": "https://example.com"
},
"optionset_id": 16
},
{
"upload": {
"id": 13,
"url": "https://example.com"
},
"optionset_id": 16
}
]
}