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
option_ids [Int] Array of Int
uploads [CartUploadWithOptionSet] Optional. Array of CartUploadWithOptionSet
code String Optional. A String value

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.
shop Shop.simple
options [Option.detailed] Array of Option.detailed
uploads [CartUploadWithOptionSet] Optional. Array of CartUploadWithOptionSet
code String Optional. A String value

Examples

Request

When used inside a request.

Example 1

{
    "amount": 19,
    "persons": 14,
    "gram": 11,
    "comment": "...",
    "product_id": 19,
    "product_price_id": 16,
    "shop_id": 12,
    "option_ids": [
        19,
        15,
        11
    ],
    "uploads": [
        {
            "upload": {
                "id": 13,
                "url": "https://example.com"
            },
            "optionset_id": 16
        },
        {
            "upload": {
                "id": 15,
                "url": "https://example.com"
            },
            "optionset_id": 19
        },
        {
            "upload": {
                "id": 11,
                "url": "https://example.com"
            },
            "optionset_id": 19
        }
    ],
    "code": "..."
}

Response

When returned in a response.

Example 1

{
    "amount": 19,
    "persons": 18,
    "gram": 14,
    "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": 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": false,
        "price": 12
    },
    "product_price": {
        "id": 10,
        "name": "...",
        "price": 11
    },
    "calculated_prices": {
        "unit_price": 11,
        "price": 13
    },
    "discount_prices": {
        "unit_price": 17,
        "price": 12
    },
    "shop": {
        "id": 16,
        "name": "Ms. Gerry Walker",
        "address": {
            "street": "Sint-Denijslaan",
            "nr": "96",
            "zipcode": "9000",
            "city": "Gent",
            "country": "BE",
            "position": {
                "latitude": 1.54361,
                "longitude": 0.45645
            }
        }
    },
    "options": [
        {
            "id": 12,
            "name": "...",
            "price_change": 15,
            "optionset": {
                "id": 12,
                "name": "...",
                "allow_attachment": false
            }
        },
        {
            "id": 11,
            "name": "...",
            "price_change": 19,
            "optionset": {
                "id": 14,
                "name": "...",
                "allow_attachment": true
            }
        },
        {
            "id": 14,
            "name": "...",
            "price_change": 18,
            "optionset": {
                "id": 15,
                "name": "...",
                "allow_attachment": true
            }
        }
    ],
    "uploads": [
        {
            "upload": {
                "id": 13,
                "url": "https://example.com"
            },
            "optionset_id": 10
        },
        {
            "upload": {
                "id": 12,
                "url": "https://example.com"
            },
            "optionset_id": 14
        },
        {
            "upload": {
                "id": 18,
                "url": "https://example.com"
            },
            "optionset_id": 13
        }
    ],
    "code": "..."
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
0.2.0 stable