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": 12,
    "upload_id": 11,
    "amount": 16
}

Response

When returned in a response.

Example 1

{
    "option": {
        "id": 11,
        "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
                }
            ],
            "file_id": 11,
            "white_background": false
        },
        "require_image": false,
        "code": "...",
        "price_calculation": "PER_PIECE",
        "optionset": {
            "id": 12,
            "name": "...",
            "code": "...",
            "multiple_choice": true,
            "choose_amount": true,
            "min_different_options": 19,
            "max_different_options": 15,
            "min_amount_options": 17,
            "max_amount_options": 19
        }
    },
    "upload": {
        "id": 18,
        "url": "https://example.com"
    },
    "amount": 14
}
1.9.0 stable