saveProduct

Create or update a product.

Input parameters

Parameter name Description Possible value Required
productID  Product ID if you need to change existing product  Integer    
type  Product type, possible types are 'PRODUCT', 'BUNDLE', 'MATRIX', 'ASSEMBLY'. By default 'PRODUCT'.
When updating an existing product, API will leave product type unchanged. 
String    
groupID  ID of product group. To get the list of product groups, use getProductGroups Integer  yes  
unitID  ID of product unit. To get the list of units, use getProductUnits Integer    
brandID  ID of product brand. To get the list of brands, use getBrands Integer    
supplierID  Supplier ID  Integer    
vatrateID  ID of VAT (tax) rate. To get the list of rates, use getVatRates. If omitted, system will apply the default rate. Note that when the item is sold, POS tax rate, if set, will override this.  Integer    
taxFree  If set to 1, this product is tax free in ALL stores and sales locations, regardless of POS tax rate and regardless of this product's vatrateID. (Eg. a gift card.)  0 or 1    
code  Product's code. Must be UNIQUE, unless the account is configured otherwise.  String    
code2  Product's second code (by convention, EAN barcode). Must be UNIQUE, unless the account is configured otherwise.  String    
code3  Third code of the item (note that this field may not be visible on product card by default).  String    
supplierCode  Supplier's product code  String    
code5  Code 5 of the item. "Extra product codes" module must be enabled.  String    
code6  Code 6 of the item. "Extra product codes" module must be enabled.  String    
code7  Code 7 of the item. "Extra product codes" module must be enabled.  String    
code8  Code 8 of the item. "Extra product codes" module must be enabled.  String    
active  If set to 1, this item is the active product.  0 or 1    
status  Product status, possible statuses are 'ACTIVE', 'NO_LONGER_ORDERED', 'NOT_FOR_SALE' and 'ARCHIVED'. By default 'ACTIVE'.  String    
displayedInWebshop  If set to 1, this item is displayed in webshop.  0 or 1    
name  Product name. Use either general parameter "name" or one or more of the following parameters if you need to set the names in specific languages.  String    
nameEST    String    
nameENG    String    
nameLAT    String    
nameRUS    String    
nameFIN    String    
nameGRE    String    
description  Product description. Use either general parameter "description" or one or more of the following parameters if you need to set the descriptions in specific languages.  String    
descriptionEST    String    
descriptionENG    String    
descriptionRUS    String    
descriptionFIN    String    
longdesc  Long description of the product. Use either general parameter "longdesc" or one or more of the following parameters if you need to set long descriptions in specific languages.  String    
longdescEST    String    
longdescENG    String    
longdescRUS    String    
longdescFIN    String    
length  Item's physical dimensions. Unit depends on region, check your Erply account (typically inches or mm).  Integer    
width    Integer    
height    Integer    
netWeight  Item's net weight. Unit depends on region, check your Erply account (typically lbs or kg).  Float    
grossWeight  Item's gross weight (with packaging). Unit depends on region, check your Erply account (typically lbs or kg).  Float    
volume  Item's fluid volume, eg. for beverages or perfumery. Unit depends on locale, check your Erply account (typically mL or fl oz).  Integer    
netPrice  Default sales price of the product, excluding VAT  Decimal    
priceWithVAT  Default sales price of the product, VAT included. netPrice and priceWithVat do not have to be specified both - set one of them and system will do the necessary calculations.  Decimal    
hasQuickSelectButton  Set the value to 1 if you want the product to have a quick-select button in POS  Integer    
isGiftCard  Set the value to 1 if this product is a serial-numbered gift card.

If such a product is sold from POS, its serial number should be recorded and saved into the registry of sold gift cards, using API call saveGiftCard
Integer    
isRegularGiftCard  Set the value to 1 if this product is a regular gift card.  0 or 1    
lengthInMinutes  Default length for the service in minutes. If Salon / SPA module is not enabled, function returns error 1006  Integer    
setupTimeInMinutes  Service set-up time in minutes. Available only if Salon / Spa module is enabled on your account.  Integer    
cleanupTimeInMinutes  Service cleanup time in minutes. Available only if Salon / Spa module is enabled on your account.  Integer    
rewardPointsNotAllowed  Set the value to 1 if this product does not grant customer reward points. Available only if Reward Points module is enabled on your account.  0 or 1    
cost  Product cost  Decimal    
manufacturerName    String    
categoryID    Integer    
priorityGroupID    Integer    
countryOfOriginID    Integer    
containerID  ID of another product, a beverage container that is always sold together with this item.  Integer    
containerAmount  Number of beverage containers that this product contains. (Eg. if your product is "A Case of Coca-Cola", it might contain 24 cans.)  Integer    
deliveryTime    String    
backbarCharges  Amount of backbar charges for this service.  Double    
labelsNotNeeded  If set to 1, this product does not need printed labels.  0 or 1    
nonStockProduct  Set the value to 1 if this item is a non-stock product.  0 or 1    
cashierMustEnterPrice 

If this field is set to 1, a prompt to enter price will appear in Berlin POS (3.26 and newer) every time the item is sold. Even if the item has a price on product card or price lists, cashier will override the price every time, so the price lists will not apply.

This feature can be used for random-weighted or random-priced items which are sold in units. (Inventory will be in units, but each unit might have a unique price given to it.)

 
0 or 1    
walkInService  (For Salon customers.) Set the value to 1 if this item is a service that walk-in customers can themselves select in the Walk-In View, and register for an appointment.  0 or 1    
packagingType  Type of packaging, Packaging module must be enabled, allowed values - "ORDINARY_PACKAGE", "METAL_BEVERAGE_PACKAGE" or "RETURNABLE_PACKAGE"  String    
extraField1ID  ID of selected value in product card extra field 1. The field on product card is a drop-down, and the possible values can be retrieved with API call getProductExtraField1Values Integer    
extraField2ID  ID of selected value in product card extra field 2. The field on product card is a drop-down, and the possible values can be retrieved with API call getProductExtraField2Values Integer    
extraField3ID  ID of selected value in product card extra field 3. The field on product card is a drop-down, and the possible values can be retrieved with API call getProductExtraField3Values Integer    
extraField4ID  ID of selected value in product card extra field 4. The field on product card is a drop-down, and the possible values can be retrieved with API call getProductExtraField4Values Integer    
reorderPoint#  Reorder point. (If amount on hand drops below that point, the item should be re-stocked.)

Reorder point has to be defined for a specific warehouse / location. Replace # with warehouse ID, eg. reorderPoint1 for warehouse with ID = 1. 
Decimal    
restockLevel#  Restock level. (Suggested amount to have on hand. The item is usually re-stocked up to this quantity.)

Restock level has to be defined for a specific warehouse / location. Replace # with warehouse ID, eg. restockLevel1 for warehouse with ID = 1. 
Decimal    
replacementProductIDs  Replacement product IDs, separated by commas, such as: 1,2,3,4,5  String    
relatedProductIDs  Related product IDs, separated by commas, such as: 1,2,3,4,5  String    
parentProductID  Parent product ID. Only for matrix variations (specific colors/sizes of a matrix item). See guidelines below.  Integer    
locationInWarehouseID  ID of selected location in warehouse.  Integer    
locationInWarehouseText  Product's specific text added to location in warehouse.  String    
dimensionID#  Matrix product dimension ID. Only for matrix products. See guidelines below.  Integer    
dimValueID#  Dimension Value ID. Only for matrix variations. See guidelines below.  Integer    
  Guidelines for creating matrix products

Matrix items have 1...3 dimensions - color, size etc. Matrix dimensions can be defined in Erply backend (in Settings ยป Matrix Dimensions) or with API call saveMatrixDimension.

A dimension has a name (eg. "Letter Sizes" or Spring 2013 Colors") and a list of possible values (eg. S, M, L or Lime, Yellow, Fuchsia). API call getMatrixDimensions returns a list of all dimensions you have defined.

To create a matrix product, first pick the dimension(s) that apply to this particular product, eg "Waist Size" and "Length" for jeans. A matrix can have up to 3 dimensions.

  1. Create the parent product (matrix product). You will not be selling this item directly, but Erply needs this item to group all sizes/colors together. Set:
    • type = MATRIX
    • dimensionID1 = first dimension ID
    • dimensionID2 = second dimension ID (if needed)
    • dimensionID3 = third dimension ID (if needed)

  2. Create the specific variations (color/size combinations), each one as a separate product. Set:
    • type = PRODUCT
    • parentProductID = ID of the matrix item
    • dimValueID1, dimValueID2, dimValueID3 as needed (corresponding to how many dimensions the matrix has.)

 
   
*****  Quantities of packaging materials. Packaging module must be enabled.      
salesPackageClearBrownGlass  Sales package - amount of clear/brown glass.  Double    
salesPackageGreenOtherGlass  Sales package - amount of green/other glass.  Double    
salesPackagePlasticPpPe  Sales package - amount of plastic (PP, PE).  Double    
salesPackagePlasticPet  Sales package - amount of plastic (PET).  Double    
salesPackageMetalFe  Sales package - amount of metal (Fe).  Double    
salesPackageMetalAl  Sales package - amount of metal (Al).  Double    
salesPackageOtherMetal  Sales package - amount of other metal.  Double    
salesPackageCardboard  Sales package - amount of cardboard.  Double    
salesPackageWood  Sales package - amount of wood.  Double    
groupPackagePaper  Group package - amount of paper.  Double    
groupPackagePlastic  Group package - amount of plastic.  Double    
groupPackageMetal  Group package - amount of metal.  Double    
groupPackageWood  Group package - amount of wood.  Double    
transportPackageWood  Transport package - amount of wood.  Double    
transportPackagePlastic  Transport package - amount of plastic.  Double    
transportPackageCardboard  Transport package - amount of cardboard.  Double    
*****  Alcohol details. Alcohol wholesale module must be enabled.      
registryNumber  The product's identification number in a state registry (eg. for alcoholic beverages).  String    
alcoholPercentage  Percentage of alcohol by volume in the beverage.  Double    
batches  List of current batches in stock (batch identification numbers), separated by semicolons. This field is only meant to be used for specific reporting purposes (eg. for alcoholic beverages), where batches are identified by an official identification number. Erply does not manage these "batches" automatically  it only allows to associate a sales document row with a batch number.  String  
exciseDeclaration  Number and date of the excise declaration for this product (eg. an alcoholic beverage), and other relevant information about the declaration  String    
exciseFermentedProductUnder6    Double    
exciseWineOver6    Double    
exciseFermentedProductOver6    Double    
exciseIntermediateProduct    Double    
exciseOtherAlcohol    Double    
excisePackaging    Double    
*****  Additional attributes associated with this item.
Attributes must be supplied as a flat list, each attribute defined by the following set of three parameters. Replace # with set number (1, 2, 3, ...). When updating an existing entry, API will only update the attributes specified in input data and leave all other existing attributes unchanged. To delete an attribute, set its value to 'null' or 'undefined'.  
   
attributeName#  Attribute name. Name can only contain the following symbols: A-Z, a-z, 0-9, dash and underscore.  String    
attributeType#  Attribute type, possible types are 'text', 'int' and 'double'. By default 'text'.  String    
attributeValue#  Value of the attribute. Set value to 'null' or 'undefined' to delete an attribute.
'text' attribute can be any string, maximum 255 characters.
'int' must be a signed 32-bit integer.
'double' must be a decimal number. 
String    
*****  To store strings longer than 255 characters, use "long attributes". (All accounts might not have this capability (API returns error 1006). If necessary, please ask ERPLY customer support to turn this feature on.)

As with regular attributes, send parameters longAttributeName1 and longAttributeValue1 to store an attribute, longAttributeName2 and longAttributeValue2 to store another etc. The "#" symbol below should be replaced with numbers 1, 2, 3, etc.

When updating an existing entry, API will only update the attributes specified in input data and leave all other existing attributes unchanged. To delete an attribute, set its value to 'null' or 'undefined'. 
*****    
longAttributeName#  Attribute name. Name can only contain the following symbols: A-Z, a-z, 0-9, dash and underscore.  String    
longAttributeValue#  Value of the attribute. Set value to 'null' or 'undefined' to delete an attribute.  String (65535)    
*****  Custom parameters.

"Product parameters" is a ERPLY add-on module, primarily for web shops. It needs to be set up in a specific way, and is not enabled by default. If you are looking for a simple way to attach extra key-value data to products, see "Attributes" above.


To work with parameters, you first need to define "parameter groups" in Erply backend, and associate these with product groups. Each parameter group defines parameters for a specific type of product. Eg.: inner and outer diameter for bearings; volume, energy rating and physical dimensions for refrigerators etc.

For each parameter that you want to change, send its ID and new value. For the first parameter, parameters should be named parameterID1 and parameterValue1; for the second one, parameterID2 and parameterValue2 etc.  
   
parameterID#  Parameter ID.  Integer    
parameterValue#  Parameter value. Not needed for MULTIVALUE parameters.  String    
parameterOptions#  For MULTIVALUE parameters only. This should be a comma-separated list, containing those option ID-s that you want to be enabled. All other options will be disabled.  String    
parameter#optionID#additionalPrice    Decimal    
*****  Components for assembly or bundle products (type ASSEMBLY or BUNDLE)      
componentProductID#  Component ID.  Integer    
componentAmount#  Amount.  String    

Response

Field name Type Description
productID  Integer  ID of the newly-created item