Update product
PUT
https://app.ecwid.com/api/v3/{storeId}/products/{productId}
Required access scopes
Your app must have the following access scopes to make this request: update_catalog
Path params
All path params are required.
storeId
number
Ecwid store ID.
productId
number
Internal product ID.
Query params
All query params are optional.
saveCombinations
boolean
If set to true
, API will process and save all combinations provided in the request.
If false
, all combinations from the request will be ignored.
Headers
The Authorization header is required.
Authorization
Bearer secret_ab***cd
Access token of the application.
Request JSON
A JSON object with the following fields:
sku
string
Product SKU. Items with options can have several SKUs specified in the product variations.
quantity
number
Amount of product items in stock (available for purchase).
If the product has unlimited stock (unlimited
is true
), this field is not returned.
unlimited
boolean
Defines if the product has unlimited stock.
inStock
boolean
Defines if the product or any of its variations are in stock (quantity
is more than 0
).
name
string
Product name visible on the storefront.
nameTranslated
string
Available translations for the product name.
price
number
Base product price without any modifiers.
wholesalePrices
array of objects wholesalePrices
Sorted list of wholesale price tiers: "minimum quantity = price" pairs.
compareToPrice
number
Product pre-sale price with the same value as specified in Ecwid admin (without taxes), e.g. 40
.
lowestPriceSettings
object lowestPriceSettings
Product lowest price settings for EU stores. Read more on lowes price settings in Help Center.
isShippingRequired
boolean
Defines if the product requires shipping.
weight
number
Product weight in the units defined in store settings. If the product doesn't have weight, this field is not returned.
customSlug
string
Custom slug defined by the store owner. Affects product page URL.
productClassId
number
ID of the product class that affects attributes management.
If it's 0
the product belongs to the default "General" class.
Read more on product types and attributes in Help Center.
enabled
boolean
Defines if the product is enabled and visible on the storefront.
If false
, the product can't be opened on the storefront or added to the cart.
options
array of objects options
Detailed list of product options.
Empty ([]
) if no options are specified for the product.
warningLimit
number
Minimum amount of products in stock to trigger an automated "low stock" email notification for the store owner.
fixedShippingRateOnly
boolean
Legacy feature – see shipping
field instead.
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.
fixedShippingRate
number
Legacy feature – see shipping
field instead.
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 an extra shipping cost the product adds to the global calculated shipping
description
string
Product description in HTML format. Scripts inside product descriptions are not supported.
categoryIds
array of numbers
List of the category IDs the product belongs to.
defaultCategoryId
number
Default category ID of the product. If value is 0
, then product does not have a default category and is not shown anywhere in storefront
seoTitle
string
Page title for search engines. Recommended length < 55 characters.
seoDescription
string
Page description for search engines. Recommended length < 160 characters.
relatedProducts
object relatedProducts
List of related products displayed as "You may also like" products of the product.
combinations
array of objects combinations
Details about product variations.
Requires saveCombinations=true
query param.
volume
number
Product volume for calculations shipping costs, fractional number, 0
by default.
showOnFrontpage
number
Product index on the main storefront page starting with 1
.
isGiftCard
boolean
Defines if a product is a gift card.
subtitle
string
Small product description visible on category and product pages under the product title.
discountsAllowed
boolean
Defines if Ecwid can apply discounts to the product.
externalReferenceId
string
External ID for products synced from external services, for example, POS. This ID is unique for each product in one store.
outOfStockVisibilityBehaviour
boolean
Defines if a product is visible and/or can be pre-ordered when out-of-stock.
Requires enabled pre-orders on the store level: allowPreordersForOutOfStockProducts
setting in /profile
endpoint.
Supported values:
SHOW
- Show out-of-stock products, but adding them to the cart is impossible.
HIDE
- Hide out-of-stock products.
ALLOW_PREORDER
- Show out-of-stock products and allow them to be added to the cart.
minPurchaseQuantity
number
Sets minimum product purchase quantity.
Default value is null
.
maxPurchaseQuantity
number
Sets maximum product purchase quantity.
Default value is null
.
reviewsCollectingAllowed
boolean
When true
, allows to collect, check, and publish reviews for this product in store.
wholesalePrices
quantity
number
Number of product items on this wholesale tier.
price
number
Product price on the tier.
lowestPriceSettings
lowestPriceEnabled
boolean
Defines if the lowest price is enabled for the product and shown on the storefront.
manualLowestPrice
number
Manually entered lowest price for the last 30 days before any discounts or taxes applied.
options
type
string
Option type that defines its functionality. One of:
SELECT
- Drop-down list with several options. Users can select only one of the options provided.
RADIO
- Radio buttons. Users can select only one of the options provided.
CHECKBOX
- Checkbox options. Users can select several options at the same time.
TEXTFIELD
- Single-line text input field.
TEXTAREA
- Multi-lines text input field.
DATE
- Date and time selector.
FILES
- File uploader for users.
SIZE
- Selector for the product sizes. Works the same way as radio buttons.
SWATCHES
- Selector for the product colors. Works the same way as radio buttons.
name
string
Product option name. For example: Color
or Size
.
choices
array of objects choices
List of available option choices for users.
Only works for the following option types: SELECT
, CHECKBOX
, RADIO
, SIZE
, or SWATCHES
.
defaultChoice
number
Index of the option's default selection. Can be null
(no default option), otherwise starts with 0
.
Only works for the following option types: SELECT
, CHECKBOX
, RADIO
, SIZE
, or SWATCHES
.
required
boolean
Defines if this option is required to add product to the cart.
useImageAsSwatchSelector
boolean
Display mode for the color swatches option. Only works with SWATCHES
option type.
One of:
true
- show specific product images when a user choses different color at the storefront.false
- show color swatches defines as hex codes when user chooses different color at the storefront.
choices
text
string
Text displayed near the option choise or as it at the storefront. For example, a text near the radio button or a checkbox, choice name in the dropdown list, etc.
priceModifier
number
Value of the option's price markup.
Positive, negative (in case the option reduces the pice) and zero values are allowed. Default is 0
priceModifierType
string
Option markup calculation type. One of:
PERCENT
- price modifier applied as a percent increase to the product price.
ABSOLUTE
- price modifier applied as an absolute increase to the product price (default).
hexCodes
array of strings
List of HEX codes.
Defines what color must be displayed when user changes color in the SWATCHES
option, for example: ["#fff000"]
.
Requires useImageAsSwatchSelector
to be true
.
imageId
string
Internal ID of the product image.
Defines what product image must be displayed when user changes color in the SWATCHES
option.
Requires useImageAsSwatchSelector
to be true
.
media
The media
object allows you to update alt
texts for images.
To do so, list all images and videos in the update request with the id
and alt
fields. Existing alt texts must be included in the request.
images
id
string
Internal image ID in a string format. Starts with "0"
and interates by 1.
alt
main
string
Image description for the "alt" HTML attribute of the image.
shipping
type
string
One 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.
methodMarkup
number
Additional product shipping cost added to any shipping methods.
flatRate
number
Flat rate cost for shipping the product. If set, shipping costs for it will not be calculated.
disabledMethods
array of strings
IDs of shipping methods that need to be excluded from calculation when this product is in cart. Full list of shipping method IDs is available thorugh the Store profile call.
enabledMethods
array of strings
IDs of shipping methods which will only be shown when this product is in cart. No other shipping methods will be shown. Full list of shipping method IDs is available thorugh the Store profile call.
categories
id
number
Internal category ID.
enabled
boolean
Defines if the category is enabled.
combinations
id
number
Internal ID for the product variation.
combinationNumber
number
Ordered variation number displayed in Ecwid admin.
Starts with 1
and iterates by 1.
options
array of objects options (variation)
Set of selected product option values that identify this variation.
sku
string
Variation SKU. If empty, variation inherits the base product's SKU.
thumbnailUrl
string
Link to the variation image resized to fit 400x400px container.
imageUrl
string
Link to the variation image resized to fit 1200x1200px container.
smallThumbnailUrl
string
Link to the variation image resized to fit 160x160px container.
hdThumbnailUrl
string
Link to the variation image resized to fit 800x800px container.
originalImageUrl
string
Link to the full-sized variation image.
instock
boolean
Defines if the variation is in stock (quantity
is more than 0
).
quantity
number
Number of variation items in stock.
If the variation has unlimited stock (unlimited
is true
), this field is not returned.
unlimited
boolean
Defines if the variation has unlimited stock.
price
number
Base variation price without any modifiers.
defaultDisplayedPrice
number
Variation price as it's shown on the storefront for logged out customers with default location (store location).
Pre-selected product options or variations modify the price.
Includes taxes
defaultDisplayedPriceFormatted
string
Formatted variant (curency symbol and delimeter settings) of defaultDisplayedPrice
based on the store's format settings.
For example, €11,00
lowestPrice
number
Variation's lowest price for EU store.
lowestPriceSettings
object lowestPriceSettings
Variation's lowest price settings contain only one field: lowestPriceEnabled
It defines if the lowest price is enabled for the variation.
defaultDisplayedLowestPrice
number
Variation lowest price as it's shown on the storefront for logged out customers with default location (store location). Includes taxes
defaultDisplayedLowestPriceFormatted
string
Formatted variant (curency symbol and delimeter settings) of defaultDisplayedLowestPrice
based on the store's format settings.
For example, €11,00
wholesalePrices
array of objects wholesalePrices
Sorted list of wholesale price tiers specific to the variation: "minimum quantity = price" pairs.
weight
number
Variation's weight for calculating shipping costs.
volume
number
Variation volume for calculations shipping costs, fractional number, 0
by default.
warningLimit
number
Minimum amount of variation in stock to trigger an automated "low stock" email notification for the store owner.
compareToPrice
number
Pre-sale price for the variation.
minPurchaseQuantity
number
Sets minimum product purchase quantity.
Default value is null
.
maxPurchaseQuantity
number
Sets maximum product purchase quantity.
Default value is null
.
outOfStockVisibilityBehaviour
boolean
Defines if a variation is visible and/or can be pre-ordered when out-of-stock.
Requires enabled pre-orders on the store level: allowPreordersForOutOfStockProducts
setting in /profile
endpoint.
Supported values:
SHOW
- Show out-of-stock variation, but adding it to the cart is disabled.
ALLOW_PREORDER
- Show out-of-stock variation and allow adding it to the cart.
options (variation)
name
string
Name of the selected option.
value
string
Value of the selected option.
attributes
id
number
Internal attribute ID.
name
string
Attribute name visible on the storefront.
value
string
Value of the attribute for this product.
type
string
Attribute type. There are user-defined attributes, general attributes and attributes pre-defined by Ecwid, for example, "price per unit".
One of:
CUSTOM
UPC
BRAND
GENDER
AGE_GROUP
COLOR
SIZE
PRICE_PER_UNIT
UNITS_IN_PRODUCT
show
string
Defines if an attribute is visible on a product page.
One of:
NOTSHOW
- Not visible.
DESCR
- Visible under the product description.
PRICE
- Visible under the product price
files
id
number
Internal ID of the file attached to the product.
name
string
File name visible to clients.
description
string
File description visible to clients.
size
number
File size in bytes (64-bit integer).
adminUrl
string
Direct link to the file.
Important: to download the file, add your API access token to this URL like this: https://app.ecwid.com/api/v3/4870020/products/37208340/files/7215102?token=YOUR-API-TOKEN
Do not share links containing access tokens.
relatedProducts
productIds
array of numbers
List of related product IDs.
relatedCategory
object relatedCategory
Describes the "N random related products from a category" option.
relatedCategory
enabled
boolean
Defines if the "N random related products from a category" option is enabled.
categoryId
number
ID of the related category. Empty value means that related products can be from any category.
productCount
number
Number of random products from the given category.
dimensions
length
number
Length of a product for calculating shipping costs.
width
number
Width of a product for calculating shipping costs.
height
number
Height of a product for calculating shipping costs.
tax
taxable
boolean
Defines if taxes can be applied to the product.
enabledManualTaxes
array of numbers
List of internal IDs for manual taxes. Empty if no manual taxes are enabled or automatic taxes are enabled.
taxClassCode
string
Tax class code for the product that determines the taxability of the products for a certain region.
translations
Object with text field translations in the "lang": "text"
format, where the "lang"
is an ISO 639-1 language code. For example:
{
"en": "Sample text",
"nl": "Voorbeeldtekst"
}
Translations are available for all active store languages. Only the default language translations are returned if no other translations are provided for the field. Find active store languages with GET
/profile
request > languages
> enabledLanguages
.
Response JSON
A JSON object with the following fields:
updateCount
number
The number of updated items that defines if the request was successful. One of:
1
if the item was updated,
0
if the item was not updated.
Last updated
Was this helpful?