Update a product

Update an existing product in an Ecwid store referring to its ID.

You can use the checkLowStockNotification as a request parameter. If true, makes Ecwid check whether the low stock email notification needs to be sent to merchant after request is sent.

Headers

NameTypeDescription
AuthorizationstringoAuth token with mandatory Bearer before it. Example: Bearer e***s0, where e***s0 should be replaced with your oAuth token.

Request

A JSON object of type 'Product' with the following fields:

Product

FieldTypeDescription
skustringProduct SKU
namestringProduct title
nameTranslated<Translations>Available translations for product name
quantitynumberAmount of product items in stock.
unlimitedbooleanSet as true to make Unlimited stock for the product and to not track product inventory.
pricenumberBase product price
wholesalePricesArray<WholesalePrice>Sorted array of wholesale price tiers (quantity limit and price pairs)
lowestPricenumberThe lowest price for the last 30 days before discount.
defaultDisplayedLowestPricenumberlowestPrice with tax
defaultDisplayedLowestPriceFormattedstringFormatted display of defaultDisplayedLowestPrice in the store's formatting for prices
compareToPricenumberProduct's sale price displayed strike-out in the customer frontend
costPricenumberPurchase price (the price at which the seller bought the product from the supplier). A positive number, 0 by default. The field is not shown in the UI and can be used for reports and profit calculations
isShippingRequiredbooleantrue if product requires shipping, false otherwise
tax<TaxInfo>Detailed information about product's taxes
weightnumberProduct weight in the units defined in store settings. Leave empty for intangible products
productClassIdnumberId of the product type that this product belongs to. 0 value means the product is of the default 'General' type. See also: Product types and attributes in Ecwid
enabledbooleantrue to make product enabled, false otherwise. Disabled products are not displayed in the store front.
optionsArray<ProductOption>List of the product options.
warningLimitnumberThe minimum 'warning' amount of the product items in stock, if set. When the product quantity reaches this level, the store administrator gets an email notification.
fixedShippingRateOnlybooleanLegacy function – see shipping field instead. Is ignored if it is sent alongside shipping object. true if shipping cost for this product is calculated as 'Fixed rate per item' (managed under the "Tax and Shipping" section of the product management page in Ecwid Control panel). false otherwise. With this option on, the fixedShippingRate field specifies the shipping cost of the product
fixedShippingRatenumberLegacy function – see shipping field instead. Is ignored if it is sent alongside shipping object. When fixedShippingRateOnly is true, this field sets the product fixed shipping cost per item. When fixedShippingRateOnly is false, the value in this field is treated as extra shipping cost the product adds to the global calculated shipping
shipping<ShippingSettings>Shipping settings of this product
descriptionstringProduct description in HTML
descriptionTranslated<Translations>Available translations for product description
galleryImagesArray<GalleryImages>List of the product gallery images (for updating sort order)
media<ProductMedia>Media files for a product (images)
categoryIdsArray<number>List of the categories, which the product belongs to. If no categories provided, product will be displayed on the store front page, see showOnFrontpage field
seoTitlestringPage title to be displayed in search results on the web. Recommended length is under 55 characters. Is empty if value wasn't changed by merchant from the product itself
seoTitleTranslatedstringTranslations of the page title to be displayed in search results on the web
seoDescriptionstringPage description to be displayed in search results on the web. Recommended length is under 160 characters. Is empty if value wasn't changed by merchant from the product itself
seoDecriptionTranslatedstringTranslations of the page description to be displayed in search results on the web
defaultCategoryIdnumberDefault category ID of the product. If value is 0, then product does not have a default category and is not shown anywhere in storefront
attributesArray<AttributeValue>Product attributes and their values
relatedProducts<RelatedProducts>Related or "You may also like" products of the product
dimensions<ProductDimensions>Product dimensions info
volumenumberProduct volume, fractional number, 0 by default.
volumeUnitstringThe unit of measurement of the store's volume, possible values: lmloz. ml by default.
showOnFrontpagenumberA positive number indicates the position (index) of a product in the store front page – the smaller the number, the higher the product is displayed on a page. A negative value means the product is not shown in the store front page
discountsAllowedbooleantrue if Ecwid can apply discounts to this product at checkout. false otherwise
nameYourPriceEnabledbooleantrue if the "Pay What You Want " feature is enabled. false otherwise.
subscriptionSettingsArray<SubscriptionSettings>Subscription settings
subtitletextShort product description for categories or search pages.
ribbon<Ribbon>Small product label visible on categories and product pages. To delete the ribbon, send a request with an empty "text" field. Example: "text": ""
subtitleTranslated<Translations>Available translations for product subtitles.
ribbonTranslated<Translations>Available translations for product ribbons.
outOfStockVisibilityBehaviourstringIndicates whether an out of stock product should visible or not. One of: SHOW, HIDE, ALLOW_PREORDER.
minPurchaseQuantitynumberSets minimum product purchase quantity.
maxPurchaseQuantitynumberSets maximum product purchase quantity.

WholesalePrice

FieldTypeDescription
quantitynumberNumber of product items on this wholesale tier
pricenumberProduct price on the tier

ProductOption

FieldTypeDescription
typestringOne of SELECT, RADIO, CHECKBOX, TEXTFIELD, TEXTAREA, DATE, FILES, SIZE
namestringProduct option name, e.g. Color
nameTranslated<Translations>Available translations for product option name
choicesArray<ProductOptionChoice>All possible option selections for the types SELECT, CHECKBOX or RADIO or SIZE. This field is omitted for the product option with no selection (e.g. text, datepicker or upload file options)
defaultChoicenumberThe number, starting from 0, of the option's default selection. Only presents if the type is SELECT or RADIO or SIZE. Passing the null value or omitting the field will keep the existing value unchanged.
requiredbooleantrue if this option is required, false otherwise. Default is false

ShippingSettings

FieldTypeDescription
typestringOne of: "GLOBAL_METHODS", "SELECTED_METHODS", "FLAT_RATE", "FREE_SHIPPING". "GLOBAL_METHODS" – all standard shipping methods set up in store settings; "SELECTED_METHODS" – Ecwid will use enabledMethods and disabledMethods list to make shipping calculations; "FLAT_RATE" – sets flat rate for product's shipping, see flatRate field.
methodMarkupnumberAdditional cost for shipping methods set by merchant (global and selected)
flatRatenumberFlat rate cost for shipping this product
disabledMethodsArray of stringIDs of shipping methods that need to be excluded from calculation when this product is in cart. IDs can be retrieved in Store profile
enabledMethodsArray of stringIDs of shipping methods which will only be shown when this product is in cart. No other shipping methods will be shown. IDs can be retrieved in Store profile

GalleryImages

FieldTypeDescription
idnumberId of an image in the gallery
urlstringURL of an image
thumbnailstringURL of a thumbnail (160px)
originalImageUrlstringURL of an original image
imageUrlstringURL of an image (1200px)
hdThumbnailUrlstringURL of an HD-thumbnail (800px)
thumbnailUrlstringURL of a big thumbnail (400px)
smallThumbnailUrlstringURL of a thumbnail (160px)
widthnumberWidth of an image (px)
heightnumberHeight of an image (px)
orderBynumberConsecutive number of an image in the gallery
borderInfoArray<BorderInfo>Border information

BorderInfo

FieldTypeDescription
dominatingColorArray<DominatingColor>Dominating color information
homogeneitybooleantrue if an image is homogeneous. false otherwise

DominatingColor

FieldTypeDescription
rednumberRed color (from 0 to 255, RGB)
greennumberGreen color (from 0 to 255, RGB)
bluenumberBlue color (from 0 to 255, RGB)
alphanumberAlpha channel (from 0 to 255)

AttributeValue

FieldTypeDescription
idnumberUnique attribute ID. See Product Classes for the information on attribute IDs.
namestringCan be used to specify the attribute. It's case-insensitive. If id or alias fields are sent, the field will be ignored.
nameTranslated<Translations>Available translations for product attribute name
aliasstringOne of UPC, BRAND, PRICE_PER_UNIT, UNITS_IN_PRODUCT. This can be used instead of id or name to quickly set the basic variation attributes without numeric id.
valuestringAttribute value same as the main store language. It can be empty when the other translations are updated.
valueTranslated<Translations>Available translations for product attribute value.
showstringDefines if an attribute is visible on a product page. Supported values: NOTSHOW, DESCR, PRICE. The value PRICE = DESCR.

RelatedProducts

FieldTypeDescription
productIdsArray<number>IDs of the related products, sort order is taken into the account
productSkusArray<string>SKUs of the related products. Write-only. Products added via SKUs will be displayed in the productIds array.
relatedCategoryRelatedCategoryDescribes the "N random related products from a category" option

RelatedCategory

FieldTypeDescription
enabledbooleantrue if the "N random related products from a category" option is enabled. false otherwise
categoryIdnumberId of the related category. Zero value means "any category", that is, random products from the whole store.
productCountnumberNumber of random products from the given category to be shown as related

OptionValue

FieldTypeDescription
namestringOption name, as in Product.options[i].name
nameTranslated<Translations>Available translations for product option name
valuestringOption value one of Product.options[i].choices[j].text
valueTranslated<Translations>Available translations for product option value

ProductOptionChoice

FieldTypeDescription
textstringOption selection text, e.g. 'Green'
textTranslated<Translations>Available translations for product option selection text
priceModifiernumberPercent or absolute value of the option's price markup. Positive, negative and zero values are allowed. Default is 0
priceModifierTypestringOption markup calculation type. PERCENT or ABSOLUTE. Default is ABSOLUTE.

ProductMedia

FieldTypeDescription
imagesArray <ProductImage>Images of this product and their details

ProductImage

FieldTypeDescription
idnumberInternal image ID
alt<ProductImageAlt>Image description in "alt" attribute and its translations
orderBynumberThe sort weight of the image in the gallery images list. The less the number, the closer the image to the beginning of the gallery
isMainbooleantrue if this is a main product image. false if gallery image

ProductImageAlt

FieldTypeDescription
mainstringText image description displayed in "alt" image attribute
translations<Translations>Translations for the "alt" image description

Translations

FieldTypeDescription
<ISO_LANG_CODE>stringTranslations for each available language. If no other translations are provided, the default language translations is returned. See available languages in store language settings

ProductDimensions

FieldTypeDescription
lengthnumberLength of a product
widthnumberWidth of a product
heightnumberHeight of a product

SubscriptionSettings

FieldTypeDescription
subscriptionAllowedbooleantrue if the product can be sold as subscription ("Sell as subscription" product setting enabled). false otherwise.
oneTimePurchaseAllowedbooleantrue if the product can be purchased once, with no further charges on a regular basis. false otherwise.
oneTimePurchasePricenumberThe cost of the product by subscription with a one-time purchase, null by default.
oneTimePurchasePriceFormattedstringThe cost of the product for a one-time purchase, formatted according to the settings for displaying prices in the store.
oneTimePurchaseMarkupnumberThe difference between the price of the product when subscribing and a one-time purchase in absolute values. Calculated automatically when oneTimePurchasePrice that isn’t equal to price is set.
oneTimePurchaseMarkupFormattedstringThe difference between the price of the product when subscribing and a one-time purchase in absolute values. Formatted according to the settings for displaying prices in the store. Updated automatically when the oneTimePurchaseMarkup is changed.
oneTimePurchaseMarkupPercentnumberThe difference between the price of the product when subscribing and a one-time purchase as a percentage. Calculated automatically when oneTimePurchasePrice that isn’t equal to price is set.
oneTimePurchaseMarkupPercentFormattedstringThe difference between the price of the product when subscribing and a one-time purchase as a percentage. Formatted according to the settings for displaying prices in the store. Updated automatically when the oneTimePurchaseMarkupPercent is changed.
recurringChargeSettings<RecurringChargeSettings>Recurring charge settings

RecurringChargeSettings

FieldTypeDescription
recurringIntervalstringCharge recurring interval. Supported values: DAY, WEEK, MONTH, YEAR.
recurringIntervalCountnumberCharge recurring interval. Supported values: for DAY - 1 (daily), for WEEK - 1 (weekly), 2 (biweekly), for MONTH - 1 (monthly), 3 (quarterly), for YEAR - 1 (annually).
subscriptionPriceWithSignUpFeenumberThe cost of the product for the first subscription order.
subscriptionPriceWithSignUpFeeFormattedstringThe cost of the product for the first subscription order. Formatted according to the settings for displaying prices in the store. Updated automatically when the subscriptionPriceWithSignUpFee is changed.
signUpFeenumberThe size of the markup that is imposed on the first order.
signUpFeeFormattedstringThe size of the markup that is imposed on the first order. Formatted according to the settings for displaying prices in the store. Updated automatically when the signUpFee is changed.

TaxInfo

FieldTypeDescription
enabledManualTaxesArray<TaxId>Array of internal Ecwid tax IDs, as listed in Store profile. Empty array if no manual taxes are enabled or automatic taxes are enabled
taxablebooleantrue to apply taxes to this product, false otherwise
taxClassCodestringA unique tax class code for the product that determine the taxability of the products for a certain region. If not specified the default value is Default, can not be empty. If the passed code is not valid for merchant's region, returns error Tax class is not found

NameYourPriceEnabled

FieldTypeDescription
priceDefaultTiernumberDefault price tier.
customPriceTiers → valueArraySorted array of custom price tiers (value).

Ribbon

FieldTypeDescription
textstringA small text, which is displayed in the product ribbon. Maximum length: 30 symbols
colorstringBackground color of the product ribbon, accepts following formats: #RGB, #RRGGBB, #RGBA, #RRGGBBAA

Response

A JSON object of type 'UpdateStatus' with the following fields:

UpdateStatus

FieldTypeDescription
updateCountnumberThe number of updated products (1 or 0 depending on whether the update was successful)

Errors

In case of error, Ecwid responds with an error HTTP status code and, optionally, JSON-formatted body containing error description

HTTP codes

HTTP StatusDescriptionCode (optional)
400Request parameters are malformed
400Attribute showOnFrontpage was specified as a negative number when there are no categories assigned to productAttribute showOnFrontpage can’t be negative, because the product has no categories
402The functionality/method is not available on the merchant plan
402The merchant plan product limit is reached
403Access token doesn't have update_catalog scope
404Some of the linked entities in the request doesn't exist. For example, the product class is not found
409The product with such SKU already existsSKU_ALREADY_EXISTS
409Specified wholesale price can't be nullWHOLESALE_PRICES_CANT_BE_NULL
409Specified wholesale price can't be negativeWHOLESALE_PRICES_CANT_BE_NEGATIVE
409Specified wholesale price is too bigWHOLESALE_PRICES_TOO_BIG
409Specified wholesale price quantity is too smallWHOLESALE_PRICES_QUANTITY_TOO_SMALL
409Specified manual taxes cannot be assigned because store has automatic taxes enabled
409Specified manual taxes cannot be assigned because this tax is disabled in store
415Unsupported content-type: expected application/json or text/json

Error response body (optional)

FieldTypeDescription
errorMessagestringError message
errorCodestringError code
Language