CartItem.cart

Request

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

Response

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

Examples

Request

When used inside a request.

Example 1

{
    "amount": 11,
    "persons": 17,
    "gram": 17,
    "comment": "...",
    "product_id": 16,
    "product_price_id": 11,
    "shop_id": 16,
    "options": [
        {
            "option_id": 15,
            "upload_id": 17
        },
        {
            "option_id": 15,
            "upload_id": 18
        },
        {
            "option_id": 12,
            "upload_id": 19
        }
    ]
}

Response

When returned in a response.

Example 1

{
    "amount": 18,
    "persons": 17,
    "gram": 12,
    "comment": "...",
    "product": {
        "id": 11,
        "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": 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
            },
            {
                "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": 18,
            "currency": "EUR"
        }
    },
    "product_price": {
        "id": 14,
        "name": "...",
        "price": {
            "value": 17,
            "currency": "EUR"
        }
    },
    "calculated_prices": {
        "unit_price": {
            "value": 17,
            "currency": "EUR"
        },
        "price": {
            "value": 18,
            "currency": "EUR"
        }
    },
    "discount_prices": {
        "unit_price": {
            "value": 11,
            "currency": "EUR"
        },
        "price": {
            "value": 10,
            "currency": "EUR"
        }
    },
    "amount_free": 12,
    "shop": {
        "id": 18,
        "name": "Miss Roma Lakin V",
        "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": 12,
                "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": false
                },
                "require_image": true,
                "code": "...",
                "optionset": {
                    "id": 14,
                    "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": false,
                "code": "...",
                "optionset": {
                    "id": 12,
                    "name": "...",
                    "code": "..."
                }
            },
            "upload": {
                "id": 17,
                "url": "https://example.com"
            }
        },
        {
            "option": {
                "id": 11,
                "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
                },
                "require_image": true,
                "code": "...",
                "optionset": {
                    "id": 10,
                    "name": "...",
                    "code": "..."
                }
            },
            "upload": {
                "id": 17,
                "url": "https://example.com"
            }
        }
    ]
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.5.0 stable