CartItemOption

Request

Fields when send to the api inside a request.

Field Type Description
option_id Int An integer value
upload_id Int? Nullable. An integer value
amount Int Amount of this option that is selected. Only allowed if both option_set choose_amount and multiple_choice are true, else always set this to 1.

Response

Fields when returned by the api in a response.

Field Type Description
option Option.detailed
upload CartUpload? Nullable.
amount Int Amount of this option that is selected. Only allowed if both option_set choose_amount and multiple_choice are true, else always set this to 1.

Examples

Request

When used inside a request.

Example 1

{
    "option_id": 17,
    "upload_id": 10,
    "amount": 13
}

Response

When returned in a response.

Example 1

{
    "option": {
        "id": 19,
        "name": "...",
        "price_change": {
            "value": 19,
            "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": 15,
            "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": 19,
            "min_amount_options": 19,
            "max_amount_options": 16
        }
    },
    "upload": {
        "id": 10,
        "url": "https://example.com"
    },
    "amount": 10
}
This is a development version Do not use this version in production
1.10.0 development