Create product

Create a new product

Access scopes

Requires the following access scope: create_catalog

Request

A JSON object with the following fields:

📘

Parameters in bold are mandatory

Product

FieldTypeDescription
namestringProduct title
nameTranslated<Translations>Available translations for product name
skustringProduct SKU. If this field is empty, Ecwid will generate new unique SKU automatically.
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)
lowestPricenumberValue of the product's "Lowest price" used for promotions. This value matches with the one displayed in Ecwid admin.
defaultDisplayedLowestPricenumberValue of the lowest product price with applied taxes (lowestPrice + tax). Matches with the lowest product price displayed on the storefront.
defaultDisplayedLowestPriceFormattedstringFormatted lowest price displayed on the storefront (defaultDisplayedLowestPrice). Uses store formatting settings.

Example: "defaultDisplayedLowestPrice": 45 => "defaultDisplayedLowestPriceFormatted": "45.00".
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
nameYourPriceEnabledbooleanSet to true to enable the "Name your price" feature allowing you to collect donations. Learn more
customPriceTiersObject customPriceTiers Defines fixed price values for the donations feature. Requires nameYourPriceEnabled setting to be enabled.
tax<TaxInfo>Detailed information about product's taxes
isShippingRequiredbooleantrue if product requires shipping, false otherwise
customSlugstringA custom slug set for the product URL.
weightnumberProduct weight in the units defined in store settings. Leave empty for intangible products
productClassIdnumberId of the class (type) that this product belongs to. 0 value means the product is of the default 'General' class. See also: Product types and attributes in Ecwid
enabledbooleantrue to make product enabled, false otherwise. Disabled products are not displayed on the storefront. If not passed, the default value is false.
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 an 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
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
seoDescriptionTranslatedstringTranslations 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. If no categories are assigned to product in categoryIds field, the showOnFrontPage will be 1
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.
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. null by default.
maxPurchaseQuantitynumberSets maximum product purchase quantity. null by default.
reviewsCollectingAllowedbooleantrue to allow to collect, check, and publish reviews for this product in store.

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 and is required in this case
requiredbooleantrue if this option is required, false otherwise. Default is false

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.

Translations

Object with text field translations in the "lang": "text" format, where the "lang" is an ISO 639-1 language code. Example:

{
    "en": "Sample text",
    "nl": "Voorbeeldtekst"
}

Translations for each available language. If no other translations are provided, the default language translations is returned. See available languages in store language settings.

customPriceTiers

An object containing arrays with only one value field. Values here determine available "Fixed price" options for the product. Learn more

Code example:

"customPriceTiers": [
        {
            "value": 25
        },
        {
            "value": 50
        },
        {
            "value": 100
        }
    ]

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

WholesalePrice

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

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
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

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<number>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

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

Response

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

CreateStatus

FieldTypeDescription
idnumberID of the created product

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
402The functionality/method is not available on the merchant plan
402The merchant plan product limit is reached. If the store has reached the product limit and some products have been deleted, this error can still appear for 2 minutes after the DELETE request.MAX_PRODUCTS_FOR_API_REQUEST_LIMIT_EXCEEDED
403Access token doesn't have create_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
Click Try It! to start a request and see the response here!