List of products related API requests

getProducts

Retrieve your product database.

In addition to product card fields, you can have API to return:

  • inventory quantities (set getStockInfo = 1);
  • costs and purchase prices (set getFIFOCost = 1);
  • price list prices in a particular store (set getPriceListPrices = 1);
  • recipes for assembly and bundle products (set getRecipes = 1);
  • package options (set getPackageInfo = 1);
  • replacement products (set getReplacementProducts = 1);
  • related products (set getRelatedProducts = 1);
  • product parameters (set getParameters = 1);
  • quantities of packaging materials that the product contains (set getPackagingMaterials = 1);
  • product files (manuals, specifications) (set getRelatedFiles = 1);
  • beverage containers (set getContainerInfo = 1);
  • detailed list of variations for a matrix product (set getMatrixVariations = 1).
To add or edit a product, use saveProduct. To retrieve inventory quantities ONLY, or to synchronize that data, use getProductStock. To retrieve only price list prices, use getProductPrices.

Services are also considered a special kind of products — non-stock products.

Note: PIM API offers a REST interface for retrieving products. PIM API supports more flexible filtering, for example; products can be filtered by any field, not just the predefined filters presented here.


getProductGroups

Returns a HIERARCHICAL array of product groups.

Groups are a way of categorizing your product database, and several API calls support filtering by group.

Products can additionally be organized into categories (getProductCategories, hierarchical), brands (getBrands, a flat list), and priority groups (getProductPriorityGroups, a flat list)

Note: PIM API offers a better REST interface for retrieving and managing product groups.


getProductCategories

Retrieve the list of product categories.

Categories are a way of categorizing your product database, and several API calls support filtering by category.

Products can additionally be organized into groups (getProductGroups, hierarchical), brands (getBrands, a flat list) and priority groups (getProductPriorityGroups, a flat list).

Note: PIM API offers a REST interface for retrieving and managing product categories.


getProductPriorityGroups

Returns an array of product priority groups.

Priority groups are a way of categorizing your product database, and several API calls support filtering by priority group.

Products can additionally be organized into groups (getProductGroups, hierarchical), categories (getProductCategories, hierarchical), and brands (getBrands, a flat list).


getProductUnits

Returns an array of product units.

Note: PIM API offers a REST interface for retrieving and managing product units.


getProductPrices

Retrieve a product's net sales price in a certain location, or net sales price for a specific customer — according to any price lists that apply.

You can query prices for a single product (by supplying parameter productID) or multiple products at a time (by supplying parameter productIDs).

If you do not want a price for a specific customer or location, but just need to know which price lists contain a specific item, see getProductPricesInPriceLists.


getProductCostForSpecificAmount

Get FIFO unit cost for a specific amount of specific items you are planning to subtract from inventory.

API inspects all the batches that are currently in stock, calculates (according to FIFO rules) how many items should be discounted from which batch (starting with the oldest ones), and returns the weighted average cost of the resulting lot.

This API call is useful when you plan to make an inventory transaction (eg. a sale, transfer or inventory writeoff), but want to know the exact total cost of the items before actually making the transaction.

You need to specify amount, because each batch may have a different cost. The amount that you require may have to be pulled from one or multiple batches, depending on how many items are left in each batch.

Please contact Erply support if you plan to use this API call. Your account may need updates or customizations to be applied.


getProductStock

Retrieve your Erply inventory — quantities on hand, reserved amounts, Reorder Points and Restock Levels, FIFO costs, and most recent purchase prices.

By default, API returns all products that have a non-zero inventory quantity in the warehouse you specified. In other words, items with a zero inventory quantity are skipped.

However, if you use input parameters "changedSince" (all quantities that have changed since last synchronization), or "getProductsWithReorderPointDefined" / "getProductsWithRestockLevelDefined", API will also return items with zero inventory quantity.

To retrieve only a list of reserved inventory quantities, see getReservedStock.

If you need to get total stock across all warehouses, then use API call syncTotalProductStock.


saveProduct

Create or update a product.

Note: PIM API offers a REST interface for creating products.


saveProductGroup

This call is deprecated. We recommend to use PIM API instead.

The corresponding new call is: POST /v1/product/group.

Create or update a product group.


saveProductCategory

This call is deprecated. We recommend to use PIM API instead.

The corresponding new call is: POST /v1/product/category.

Create or update a product category.


saveProductPicture

Attach a new picture to a product, or replace an existing picture.

To retrieve a list of images attached to a product, call getProducts and see the element "images". To remove a picture, use deleteProductPicture.

For an identical call which does not require the picture parameter to be base64-encoded, seee saveProductPicture2.


saveMatrixDimension

This call is deprecated. We recommend to use PIM API instead.

The corresponding new call is: POST /v1/matrix/dimension.

Create a matrix dimension, or add values to an existing dimension.

A matrix dimension is necessary for setting up matrix products. Typical matrix dimensions are, for example, "Size" (in which the values might be 2, 4, 6, 8 — or S, M, L, XL) and "Color" (which may contain Blue, Red, Black, Green etc).

Different matrix products can share the same dimensions, and a matrix product does not need to have variations corresponding to each value in the dimension. For example, it is sufficient to have just one dimension for all letter sizes, one for all numeric sizes and one for all kinds of colors.

Matrix products and their variations can be created with API call getProducts.

This API call is the best choice if you want to create a brand new dimension with a specific set of values. However, if a dimension already exists and you want to modify its list of values, see the following API calls instead:

API call "saveMatrixDimension" can be used to update the list of values, too, but it is recommended to not rely on that behavior. If you specify an existing dimension's ID and a list of values, API tries to look up existing values by name (the lookup is case-insensitive). If a match is found, the code of the found value is updated; the name is not. If no match is found, a new value will be inserted.

Hence, if you have an existing dimension "Color", with values "GREEN" and "RED", and call saveMatrixDimension with the following parameters:
dimensionID = ...
valueName1 = "Green"
valueCode1 = "123"
valueName2 = "Blue"
valueCode2 = "124"
the result will be as follows:
  • The code of color "GREEN" will be updated to "123". The name stays unchanged.
  • A new color, "Blue", with code "124", will be added.
Considering that this API call does not report which values were matched to existing ones and which ones were added as new, it is more reliable to use addItemToMatrixDimension and editItemInMatrixDimension instead.


deleteProduct

This call is deprecated. We recommend to use PIM API instead.

The corresponding new call is: DELETE /v1/product/{ids}.

Delete a product. Products that have any number of transactions associated with them (sales, purchases or inventory) cannot be deleted; API returns error 1063. Instead, we always recommend to archive the product — setting its status to "ARCHIVED".

In Erply backend, deleting products is no longer possible; clicking the "X" button always archives a product.


deleteProductGroup

This call is deprecated. We recommend to use PIM API instead.

The corresponding new call is: DELETE /v1/product/group/{ids}.

Delete a product group. Note that products belonging to this group, as well as subgroups, will NOT be deleted or recategorized.


deleteProductPicture

Delete a product picture.