shop.product.skus.update

Updates information about a product variant. Access rights allowing a user to edit products of that type are required.

Parameters

  • id GET

    Product variant ID.

  • sku POST Optional

    SKU code.

  • sort POST Optional

    Sort order value.

  • name POST Optional

    SKU name.

  • image_id POST Optional

    Selected image ID.

  • price POST Optional

    Price.

  • purchase_price POST Optional

    Purchase price.

  • compare_price POST Optional

    Strike-through price.

  • available POST Optional

    Flag (0 or 1) denoting the availability for ordering.

  • status POST Optional

    Flag (0 or 1) denoting visibility in the storefront.

  • stock POST Optional

    Variant’s stock quantities. If no stocks are set up in the store settings then the array must contain 1 item with the Variant’s stock quantity in the decimal(15,3) format. If stocks are set up then array keys must be stock IDs and array values must be quantities available on those stocks in the decimal(15,3) format.

  • count POST Optional

    Variant’s quantity available in stock. Is used in the case when stocks are not set up in the store settings and the 'stock' parameter is empty.

  • stock_base_ratio POST Optional

    Stock-to-base quantity unit ratio.

  • order_count_min POST Optional

    Quantity adjustment value with “+/-” buttons.

  • order_count_step POST Optional

    Minimum orderable quantity.

  • features POST Optional

    Array of product feature’s values. Array keys are the features’ string identifiers. Array item values have different format depending on a particular feature type.
    — Single text or numeric value: feature value.
    — Multiple text or numeric values: array of values.
    — Single editable numeric value with a measurement unit: array with the keys 'value' (editable value), 'unit' (localization key of the brief measurement unit name).
    — Single numeric value, with a measurement unit, selectable from a list: feature value followed by a whitespace character and a localized brief measurement unit name.
    — Multiple numeric values with measurement units: array of strings each being a feature value followed by a whitespace character and a localized brief measurement unit name.
    — Dimensions in the form X*X(*X): array with the keys 'feature identifier.0[value]' (1st dimension), 'feature identifier.1[value]' (2nd dimension),
    'feature identifier.2[value]' (3rd dimension, if applicable), 'feature identifier.0[unit]' (localization key of the brief measurement unit name).
    — Range of numeric values: array with the keys 'value[begin]' (start value), 'value[end]' (end value), 'unit' (localization key of the brief measurement unit name, if applicable).
    — Single color value: array with the keys 'value' (editable color name), 'code' (HTML code of a color starting with the # character).
    — Single color value selectable from a list: editable color name.
    ­— Multiple color values: array of editable color names.
    — Yes/No toggle: 1 (yes), 0 (no), or empty value (if not specified).
    — Date: string in the “yyyy-mm-dd” format.

  • format GET Optional

    Sets response format. Available options: json (default), xml.

Error codes

  • invalid_request

    Invalid formed request. Additional information about the error is available in error_description parameter.

  • access_denied

    Access to the specified API method for the current token is denied.

  • invalid_method

    Unknown API method.