company.Option

Request

Fields when send to the api inside a request.

Field Type Description
name [Language: String] Name of the option
price_change Int Price change in cents. Positive for price increase, negative for discounts.
order Int The options of a option set are sorted on the order property (descending). If you specify the same order for multiple option sets, the id of the option set is used. Setting the same order for all option sets is discouraged.
price_calculation String How to multiply the price_change with the amount, kg or persons of a cart item
code String? Optional. Nullable. Your own ID or key that you can associate with an option
active Bool Optional. Is the option active or not?
image Image? Optional. Nullable.

Response

Fields when returned by the api in a response.

Field Type Description
name [Language: String] Name of the option
price_change Int Price change in cents. Positive for price increase, negative for discounts.
id Int ID of this option
code String? Nullable. Your own ID or key that you can associate with an option
order Int The options of a option set are sorted on the order property (descending). If you specify the same order for multiple option sets, the id of the option set is used. Setting the same order for all option sets is discouraged.
price_calculation String How to multiply the price_change with the amount, kg or persons of a cart item
active Bool Optional. Is the option active or not?
image Image? Optional. Nullable.

Examples

Request

When used inside a request.

Example 1

{
    "name": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "price_change": 15,
    "order": 12,
    "price_calculation": "PER_PIECE",
    "code": "...",
    "active": true,
    "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
    }
}

Response

When returned in a response.

Example 1

{
    "name": {
        "nl": "...",
        "en": "...",
        "fr": "..."
    },
    "price_change": 14,
    "id": 18,
    "code": "...",
    "order": 12,
    "price_calculation": "PER_PIECE",
    "active": true,
    "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": 16,
        "white_background": false
    }
}
1.9.0 stable