[POST] Create Product
Request Description
POST /v1/product
The request allows you to create a product that can be added to the checkout page using a checkout link.
Request contains:
- Authorization data (token)
- General product properties
- Prices
- (Optional) Renewal settings (AR/PMR/Email)
- (Optional) Localisation data
- (Optional) Product display settings
- (Optional) Cross-Sell offer settings
- (Optional) Special offer (TYPO) settings
- (Optional) Electronic product delivery data
Connection Data
- Endpoint URL:
- Production environment: https://api.ecommerce.noventiq.com/v1/product
- Test environment: https://api.ecommerce.noventiq.com.demonqweb.com/v1/product
- Request Method: POST
- Format: JSON
- Authorization: token-based
- Format:
Bearer [token]
- Where [token] is substituted by the token, value obtained through the authentication API
It is displayed to the customer on the checkout page (example).
Maximum of 255 characters.
It is displayed to the customer on the checkout page (example). You can hide the subtitle using the display_settings.hide_name parameter.
Maximum of 255 characters.
If the parameter is equal to false, the customer will not be able to add a product to the checkout page.
Value options:
- true - product is available for adding
- false - product has been removed from publication and is no longer available for adding
- Valid URL of product image on your end
- Maximum of 255 characters
- File size: 1B - 512KB
- Acceptable image formats: *.gif, *.jpg, *,jpeg, *.png.
- mimeTypes: 'image/gif', 'image/jpg', 'image/jpeg', 'image/pjpeg', 'image/png', 'image/x-png'
The customer will see it on the checkout page (example). The description is displayed in a modal window.
HTML tags can be used.
The comment is intended for internal use and will not be displayed to the customer.
The link can be shown in the email with license information sent to the customer. The instructions must be posted on an external address (e.g., on your website) and available to the customer via a link.
- Valid URL or empty value (url_to_instruction:"")
- Maximum of 255 characters
The link can be output in the email containing customer license information. The product distribution package must be located at an external address (e.g., on your website) and available to the customer via the link.
- Valid URL or empty value (url_to_download:"")
- Must not exceed 255 characters
- When transferring empty value (url_to_download:""), previously filled out URL gets removed
Value options:
- b2c - product is intended for individuals
- b2b - product is intended for legal entities
- mobile - mobile app
For example, if at least one product in the shopping cart has Business segment = b2b, then, by default the customer will be shown a form to fill in data for legal entities.
NOTE: The parameter does not impose restrictions on the product sale.
Value options:
- all - product is available to all customer types
- physical - product is available to individuals
- juridical - product is available to companies
The parameter is used in sales reports. You can access them through the Merchant Portal. The parameter is also transferred to variables for electronic trading.
Value options:
- new - initial product (new license)
- renew - renewal product (license renewal)
* - Required for renewable products, i.e. true is transferred to at least one of the following parameters: In this case:
- Validity period must be > 0
- Minimum validity period depends on renewal type
Value options:
- 0 - unlimited validity
- P[number][unit of measurement] - limited validity, where:
- [unit of measurement] - units to measure validity period: Y - year, M - month, D - day
- [number] - number of units of measurement transferred
- More details on selling renewals
- Read on how to fill out parameters to set different renewal options
* - Required, if true is transferred to at least one of the parameters: Read on how to fill out parameters to set different renewal options.
Important! If you transfer this parameter while updating a product, the values of all the nested parameters will be updated. Moreover, if any of the nested parameters is not transferred, it will be assigned the default value. More details on the request for updating products.
Value options:
- true - enabled; the product can initiate a subscription. In this case, the following parameters must also be transferred in the request: See how to fill out parameters to set different renewal options.
- false - disabled; the product can be sold without a subscription or can be used to renew a subscription
* - Required, if the product is to be the initiator of a subscription having a free trial period (AR Trial). In this case, the value of the parameter must be equal to true. Otherwise, the parameter must be equal to false. See how to fill out parameters to set different renewal options.
Value options:
- true - subscription is required. In this case, when placing an order, no consent to AR-subscriptions (automatic renewal) is required from customers. Such a subscription is created automatically upon product purchase.
- false - subscription is optional. In this case, when placing an order, customers can enable/disable their consent to create subscriptions. A subscription is created upon product purchase only if the customer has given their consent.
Value options:
- true - enabled; the product can initiate a subscription. In this case, the following parameters must also be transferred in the request: See how to fill out parameters to set different renewal options.
- false - disabled; the product can be sold without a subscription or can be used to renew a subscription
Value options:
- true - enabled. In this case, the following parameters must also be transferred in the request:
- false - disabled
Important! If you transfer this parameter while updating a product, the values of all the nested parameters will be updated. Moreover, if any of the nested parameters is not transferred, it will be assigned the default value. More details on the request for updating products.
- The list of supported language codes is decided on and provided upon connection
- Format: four-letter code in form xx_XX. For possible values, see the reference guide
- Maximum of 255 characters
- If not transferred, it will be displayed as set in the main part of the request for the product as a whole
- Maximum of 255 characters
- If not transferred, it will be displayed as set in the main part of the request for the product as a whole
- HTML tags can be used
- If not transferred, it will be displayed as set in the main part of the request for the product as a whole
- * - If the parameter has been transferred for at least one of the languages, it must also be transferred for the rest of them available on the checkout page
- If a comment needs to be hidden in some of the languages, then the parameter having an empty value have to be transferred
- HTML tags can be used
- * - If the parameter has been transferred for at least one of the languages, it must also be transferred for the rest of them available on the checkout page
- If a comment needs to be hidden in some of the languages, then the parameter having an empty value have to be transferred
- HTML tags can be used
- * - If the parameter has been transferred for at least one of the languages, it must also be transferred for the rest of them available on the checkout page
- If a comment needs to be hidden in some of the languages, then the parameter having an empty value have to be transferred
- HTML tags can be used
- * - If the parameter has been transferred for at least one of the languages, it must also be transferred for the rest of them available on the checkout page
- If a comment needs to be hidden in some of the languages, then the parameter having an empty value have to be transferred
- HTML tags can be used
- * - If the parameter has been transferred for at least one of the languages, it must also be transferred for the rest of them available on the checkout page
- If a comment needs to be hidden in some of the languages, then the parameter having an empty value have to be transferred
- HTML tags can be used
- * - If the parameter has been transferred for at least one of the languages, it must also be transferred for the rest of them available on the checkout page
- If a comment needs to be hidden in some of the languages, then the parameter having an empty value have to be transferred
- HTML tags can be used
Value options:
- true - hide
- false - display
If the quantity is hidden then:
- The minimum possible quantity of the product will be added to the order (transferred to variants.from)
- The customer will not see how many items of the product are added and will not be able to change the value
Value options:
- true - hide
- false - display
It can contain several objects (variants.price) which have the price set depending on the number of purchased product items (variants.from, variants.to).
Maximum of 40 characters.
Maximum of 255 characters.
This value is saved into the order instead of variants.sku if the customer purchases an auto-renewable subscription to a product.
Maximum of 255 characters.
This quantity is available for purchase at the price set in variants.price.
- The parameter can be equal to an integer or zero (0)
- If the parameter is not transferred or equal to zero, the price becomes valid starting with purchase of one product unit
- The parameter must be greater than zero if variants.to is transferred and greater than zero
This quantity is available for purchase at the price set invariants.price.
- The parameter can be equal to an integer or zero (0)
- If the parameter is not transferred or equal to zero, the price is valid for purchase of any product quantity (from one to infinity)
- If variants.from and variants.to have been transferred, condition to ≥ from must be satisfied
- Intervals from - to should not intersect for one product
- The product must not have quantity intervals for which no price is set
* - Required, if variants array is transferred.
There are two formats to set up prices:
- One common price in base currency (for pricing models: One price, Volume pricing).
Transfer one nested object named common to set prices in this format. - Individual prices for each checkout currency (for pricing models One price for each currency, Volume pricing and options).
Transfer individual nested objects the names of which are respective to checkout currencies. In the event when no data has been transferred for any checkout currency, all prices using this currency are deleted. The product using this currency becomes unavailable for sale.
IMPORTANT! Prices of one product can use only one of the price setup formats; i.e. all product prices must be transferred using either one common price or individual prices.
This object contains data of an individual price (for sales in a specific currency) or data of one common price set in a base currency (based on such a currency prices are calculated for available currencies at checkout). The name of the object determines whether this price is an individual price for the currency at checkout or a price in the base currency.
More details on how to set prices for different pricing models, and see setup examples.
- * - Required, if variants.price is transferred
- To set only one price in the base currency, transfer the following name of the object: common.
- To set individual prices per checkout currency:
- Transfer a checkout currency code in ISO 4217 alpha-3 format as the object name
- Maximum 3 characters
- See value options in currencies reference
- In one product, you can use only the currencies that are available to you in accordance with your Agreement (one of the Agreements)
- If you have several Agreements and sell products using a different currency in each of the Agreements, you must create products per Agreement separately
This code transfers the currency in which the product price is set (in variants.price.price). You can set the price for your product in a base currency that is different from a checkout currency. In this case, when purchasing such a product, the price is converted.
- * - Required, if variants.price is transferred
- Possible currency options:
- When using one common price in base currency: USD, EUR, RUB
- When using individual prices per checkout currency: USD, EUR, RUB or [checkout currency] - you can only use the currencies that are available to you in accordance with your Agreement
- Format: ISO 4217 alpha-3
- Maximum 3 characters
- See value options in reference
- * - Required, if variants.price is transferred
- String contains numerals; value separating by point, with two decimal places.
- Price can be equal to zero (0.00) for trial products or gifts
More details on how cross-sell offer works.
Note. You set up a cross-sell offer in an additional product. This additional product must be offered to your end customer if a primary product is on their checkout page. You do not have to transfer this parameter for primary products.
Important! If you transfer this parameter while updating a product, the values of all the nested parameters will be updated. Moreover, if any of the nested parameters is not transferred, it will be assigned the default value. More details on the request for updating products.
* - Required, if cross_sell parameter is transferred.
Value options:
- candy_rack - optional additional product (recommended)
- add_to_basket - mandatory additional product
Value options:
- true - enabled
- false - disabled
* - Required, if cross_sell parameter is transferred.
Format:
- Format: YYYY-MM-DD HH:MI:SS
- UTC+3
- date_from ≤ date_to
* - Required, if cross_sell parameter is transferred.
Format:
- Format: YYYY-MM-DD HH:MI:SS
- UTC+3
- date_from ≤ date_to
Availability of the function to remove the additional product from the checkout separately without affecting the primary one.
Value options:
- true - can be deleted
- false - cannot be deleted
Availability of the function to change quantity of additional products without affecting the primary product.
Value options:
- true - quantity can be changed
- false - quantity cannot be changed
When the customer adds at least one of such products to their checkout page, another additional product will be offered.
* - Required, if cross_sell parameter is transferred.
More details on how TYPO works.
Note: You set up TYPO in an additional product. This additional product must be offered to your end customer on the paid order page of their purchased primary product. You do not have to transfer this parameter for primary products.
If you want a TYPO product to have a special discounted price:
- Create a separate product and a discount promotion for it
- Set up TYPO for this product
- Do not place a checkout link for this product on your end so that no customer could add the product to the checkout page but could see it only as a special offer.
Value options:
- true - enabled
- false - disabled
* - Required, if typo parameter is transferred.
Format:
- Format: YYYY-MM-DD HH:MI:SS
- UTC+3
- date_from ≤ date_to
* - Required, if typo parameter is transferred.
Format:
- Format: YYYY-MM-DD HH:MI:SS
- UTC+3
- date_from ≤ date_to
If there is at least one of such products in a paid order, TYPO will be shown to the customer on the page of this paid order. Primary products cannot be products having free trial periods.
* - Required, if typo parameter is transferred.
- If the parameter is not transferred, then:
- A standard text is used, e.g. "As a thank you, we offer a %DISCOUNT% % discount on one more product."
- IMPORTANT! If a product is not set up for a discount through a promotion, "0" is displayed instead of %DISCOUNT% in the text
- If the parameter is transferred, it must contain values for each of the languages enabled for the checkout page
- If you want to hide data for any of the languages, transfer typo.localization_values.comment_for_typo with an empty value for this language
- The list of supported language codes is decided on and provided upon connection
- Format: four-letter code in form xx_XX. For possible values, see the reference guide
- HTML tags can be used
- You can use the %DISCOUNT% substitution tag to apply the value of the discount configured for the product in the text
IMPORTANT! If no discount is configured for the product, then "0%"" will be displayed in the text instead of %DISCOUNT%.
It is used if a product has one of our automatic product delivery methods connected. More details on how it works.
- If the parameter is not transferred, the default value is used. When using automatic fulfillment via a web service, the default value can be configured via the Merchant Portal. In other cases, the configuration is performed with the help of our support team
- If the parameter is transferred, its value is used only for the corresponding product instead of the default value. At the same time, it must contain values for each language enables for the checkout page (providing data for only some of the languages is impossible)
- Important! If you transfer this parameter when updating a product, the values of all nested parameters are updated. More details on product update requests
- If you want to completely remove a previously transferred parameter value for a product (to start using the default value again), contact our support team
- The list of supported language codes is decided on and provided upon connection
- Format: four-letter code in form xx_XX. For possible values, see the reference guide
The text from the parameter is inserted into the template of the email containing license information for the customer. It is used instead of the default value.
- You can use HTML-tags and substitution tags
- Note that if your products use automatic fulfillment via a web service or a pool, the text must contain the following substitution tag: {KEY}
This property is informational. It does not affect the quantity limit of the product purchased. It is non-customer-facing. It can be displayed in order emails (in product properties). It is not displayed by default. If you want your emails to display a number of devices, please contact our support team to set up.
Value options:
- null - email contains no string; i.e. no information on the number of devices
- 0 - email contains some text; it indicates an unlimited number of devices (customizable text value)
- Any other integer - email displayes it; i.e. it is the number of devices for which the purchased product has been designed; must be less than 999999999 (if a larger number is transferred, error 1010 returns)
Request Example
{
"family_name": "Demo Product",
"name": "1 Pc / 1 year",
"is_publish": true,
"image_url": "https://my-shop.com/images/product-1234.png",
"description": "<p><strong>Test product</strong></p>",
"comment_for_manager": "There will be a full description later",
"url_to_instructions": "https://www.google.com",
"url_to_download": "https://www.google.com",
"business_segment": "b2c",
"available_for_sale": "all",
"is_service": true,
"license_type": "new",
"licence_term": "P1Y",
"device_quantity": 3,
"renew_settings": {
"product_id_for_renew": [
4645130,
4645131,
4645131
],
"renew_ar": {
"enable": true,
"required": false
},
"renew_pmr": true,
"renew_email": false
},
"localization_values": {
"en_EN": {
"family_name": "Test product",
"name": "1 PC/1 year",
"description": "<p><strong>Test product</strong> for test purchase</p>",
"comment_for_cart": "This is a test purchase.",
"comment_for_product_top": "The license is valid for 1 year.",
"comment_for_product_middle": "New version of the test product.",
"comment_for_product_for_AR": "The license is renewed automatically.",
"comment_for_product_for_MR": "You will need to manually renew your license after 1 year.",
"comment_for_product_bottom": "This license is not for sale or activation outside of the country."
},
"cs_CZ": {
"family_name": "Zkušební výrobek",
"name": "1 ks / 1 rok",
"description": "<p><strong>Testovací produkt</strong> pro zkušební nákup</p>",
"comment_for_cart": "Jedná se o zkušební nákup.",
"comment_for_product_top": "Licence je platná po dobu 1 roku.",
"comment_for_product_middle": "Nová verze testovaného produktu.",
"comment_for_product_for_AR": "Licence se obnovuje automaticky.",
"comment_for_product_for_MR": "Budete muset ručně obnovit licenci po 1 roce.",
"comment_for_product_bottom": "Tato licence není určena k prodeji nebo aktivaci mimo zemi."
}
},
"display_settings": {
"hide_name": true,
"hide_item_quantity": true
},
"variants": [{
"vendor_code": "1",
"sku": "111",
"from": 1,
"to": 5,
"price": {
"USD": {
"currency": "USD",
"price": "99.99"
},
"EUR": {
"currency": "USD",
"price": "99.99"
}
}
}, {
"vendor_code": "1",
"sku": "111",
"from": 6,
"price": {
"USD": {
"currency": "USD",
"price": "80.99"
},
"EUR": {
"currency": "USD",
"price": "80.00"
}
}
}
],
"cross_sell": {
"type": "add_to_basket",
"status": true,
"date_from": "2020-10-15 14:18:00",
"date_to": "2020-10-25 14:18:00",
"removal_available": true,
"quantity_change_available": false,
"product_id": [
4645130,
4645131
]
},
"typo": {
"status": true,
"date_from": "2020-10-15 14:18:40",
"date_to": "2020-10-25 14:18:40",
"localization_values": {
"en_EN": {
"comment_for_typo": "This is a test purchase."
},
"cs_CZ": {
"comment_for_typo": "Jedná se o zkušební nákup."
}
},
"product_id": [
4645130,
4645131
]
},
"license_data": {
"en_EN": {
"customer_notification": "Key: {KEY}"
},
"cs_CZ": {
"customer_notification": "Klíč: {KEY}"
}
}
}
Response Description
In response to the request, you receive the server response code corresponding to the processing result. Depending on the code, the response body may contain additional parameters.
Successful Response
If processing is successful, the following will return in response server response code: HTTP/1.1 200 OK and json with a product identifier.
Example of Successful Response
{
"id": 111122233
}
Error Response
If an error occurs while processing the request, you receive a server response code corresponding to the result of processing.
Depending on the code, the response body may contain additional parameters.
HTTP Server Response Error Code
HTTP code | Description |
HTTP/1.1 400 Bad Request | The request is not valid (error in parameters; necessary data is not transferred, etc.). An additional error code (one or more) will be transferred in the response bodу. |
HTTP/1.1 401 Unauthorized | Unsuccessful authorization. An additional error code (one or more) will be transferred in the response bodу. |
HTTP/1.1 404 Not found | Invalid request URL. |
HTTP/1.1 500 Request Error | Internal Server Error. Please try again later or contact support. |
Additional Error Codes for HTTP 400
Error | Message | Description |
If at least one error from the list below is found, then it returns in response to a request, other errors are not validated. | ||
110 | JSON is not valid. | The request cannot be processed. Request field structure is not valid. Check the fields in the request body against the JSON format. |
111 | Invalid data format (Content-type). | The request cannot be processed. Invalid request header. Content-type must be equal to application/json. |
1020 | Could not identify product settings for this currency. Please contact technical support. |
During processing, we could not identify your account setting unambiguously. Make sure that the request contains the correct currency in the variants.price.[currency]. If the problem persists, please contact support team. |
1040 | According to the Agreement, this product cannot be sold in this currency. For more information, please contact the Content Department. | It is impossible to create a product in the currency transferred (ariants.price.[currency]). |
If at least one error from the list below is found, then request validation is not interrupted. Several errors may return in response. | ||
3010 | Invalid field value: [parametr name] | The request is not valid, e.g., the required parameter is not filled out, the parameter name is incorrect, the parameter value does not match with the data type provided, or the value format is incorrect. Moreover, the error will return if null is transferred in the parameter, and this value option is not set as valid in the parameter description. |
1050 | Locale not found. | An invalid language code is transferred (localization_values.[local-name], typo.localization_values.[local-name], license_data.[local-name]). |
1060 | Auto-renewal cannot be enabled (renew_ar). No data: [list of parameters necessary to transfered]. | The renew_settings.renew_ar.enable = true is transferred in the request, but the mandatory data is missing. The data required will be listed in the error text. |
1070 | "Mandatory auto-renewal" condition (renew_ar.required) can only be enabled if auto-renewal is enabled (renew_ar.enable). |
The renew_settings.renew_ar.required = true is transferred in the request, however renew_settings.renew_ar.enable = false. |
1080 | Pre-filled manual renewal cannot be enabled (renew_pmr). No data: [list of parameters necessary to transfered]. |
The renew_settings.renew_pmr = true is transferred in the request, but the mandatory data is missing. The data required will be listed in the error text. |
1090 | Function to send an email containing a license renewal buy link cannot be enabled (renew_email). No data: [list of parameters necessary to transfered]. |
The renew_settings.renew_email = true is transferred in the request, but the mandatory data is missing. The data required will be listed in the error text. |
1100 | Invalid renewal products for product_id_for_renew. No products found: [list of product IDs that could not pass validation]. | At least one product in the trasnferred renewal product list (renew_settings.product_id_for_renew) failed validation. The error text will contain the products that could not pass validation. |
1110 | Invalid configuration of renewal products for product_id_for_renew. The products must be listed in the same order as the renewal process will be performed. The last product must renew itself. | The rules to create a chain of renewal products are not met. |
1120 | Invalid price list currency (currency). The price in the price list can be set only in one of these currencies: USD, EUR or sales currency. | An invalid currency in which the product price is set in the variants.price.[checkout currency].currency:[price currency] parameter. The error text will contain a list of valid currencies. |
1125 | Invalid price list currency (currency). The common price in the price list can be set only in one of the following currencies: USD, EUR. | Invalid currency in which the product common price is set (variants.price.common.currency:[price currency]). Valid currencies will be listed in the error message text. |
1130 | Invalid price range (variants.from, variants.to). |
An error in the minimum (variants.from) and (or) maximum (variants.to) quantity of the product for which the price is set. |
1135 | Invalid price list currency (currency). The "common" attribute and any other sales currency cannot be used at the same time. | Invalid price setting (variants.price). Individual prices for each checkout currency and common prices must not be used simultaneously for a single product. |
1140 | Products for cross_sell.product_id are incorrect. Products not found: [list of product IDs that could not pass validation]. |
At least one product from the list of primary products for the additional product (cross_sell.product_id) fails to pass validation. |
1150 | Parameters for cross_sell: date_from, date_to are incorrect. |
The dates for the cross-sell offer (cross_sell.date_from, cross_sell.date_to) fail to pass validation. |
1160 | Products for typo.product_id are incorrect. Products not found: [list of product IDs that could not pass validation]. | At least one product from the parent product list for TYPO (typo.product_id) fails to pass validation. |
1170 | Parameters for typo: date_from, date_to are incorrect. | The dates for TYPO (typo.date_from, typo.date_to) fail to pass validation. |
Additional Error Codes for HTTP 401
The errors are the same for all the APIs that use token authorization.
Example of Error Response
{
"errors": [{
"error": 1010,
"message": "Invalid field value: family_name"
}, {
"error": 1050,
"message": "Locale not found."
}
]
}