Powered by Olark

InventoryAPI by Erply is a powerful backend for web shops, and more.

  • Use as a backbone for any web shop
  • Plug into your existing software
  • Connect inventory with POS and accounts
Developer
competition

Erply Inventory API

List of API functions

This is a list of all API functions. Click on function name and you'll find all required and optional input parameters and response fields.

« back to list

saveProduct()

Inserts or updates 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 getUnits(). 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 -
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 -
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 function saveGiftCard().
Integer -
lengthInMinutes Default length for the service in minutes. If Salon / SPA module is not enabled, function returns error 1006 Integer -
cost Product cost Decimal -
manufacturerName String -
categoryID Integer -
priorityGroupID Integer -
countryOfOriginID Integer -
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 -
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 -
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 -
parentProductID Parent product ID. Only for matrix variations (specific colors/sizes of a matrix item). See guidelines below. Integer -
dimensionID# Matrix product dimension ID. Only for matrix products. See guidelines below. Integer -
dimValueID# Dimension Value ID. Only for matrix variations. See guidelines bwlow. 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.)

-
************* 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, Latin letters and digits allowed. 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. String -

Response

Response is a JSON or XML document which contains an array of records and request status information.

Field nameTypeDescription
productID Integer ID of the newly-created item
 
Ask your question and we will contact you
*
*
*
*
Erply is a service of Erply Ltd © 2010 Erply.
9th floor 107 Cheapside London
Company No. 07043823