List of pos 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.


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.


getSalesDocuments

Retrieve sales documents (invoices, waybills, credit invoices, quotes or orders), according to the supplied filtering parameters.

If you have specified document ID or invoice number, or if the search criteria match a single sales document, or if you have set getRowsForAllInvoices = 1, API returns all documents together with their rows. Otherwise only document headers will be returned.

To create a new sales document (invoice, order or quote), see saveSalesDocument.

If you are looking for a way to pull all sales data for external processing, see getSalesReport. getSalesReport can output either detailed data or aggregate it as needed: it can provide totals by products, by product groups, by dates, by locations, etc.



applyPromotions

An alias for API call calculateShoppingCart.

calculateShoppingCart takes a list of items and quantities as input, and returns up-to-date item prices and the total value of the cart — with price lists, discounts, promotions, coupons, and taxes automatically applied.


saveSalesDocument

Create a new sales document (invoice, sales order, etc.) or update an existing one.

Sales documents in Erply have a header with general information (customer, date etc.) and one or more lines that list the items, quantities and prices.

Every sales document in Erply needs to be confirmed. When confirmed, a sales invoice, for example, 1) receives a number, 2) generates sales revenue and VAT / tax obligation and 3) removes sold items from inventory. A confirmed sales order places a reservation on ordered items. A confirmed document may not be fully editable any more, or you might need special user rights for some kinds of changes.

Possible sales document types are listed below. Most common ones that you'll probably need, are:

  • INVWAYBILL (this is an ordinary sales invoice),
  • CASHINVOICE (basically the same, but the printout is formatted as a POS receipt),
  • ORDER (a sales order).
List of sales documents can be retrieved with getSalesDocuments. If you are making a sale, but you first need to know up-to-date prices and correct tax (VAT) rates for the items customer has selected, and get invoice total, see calculateShoppingCart. To apply a payment to the sale, use savePayment.

If the sales document that you created or updated is associated with a customer who is a natural person — and if your account country is subject to the General Data Protection Regulation (GDPR) — Erply logs the sale in the customer information processing log.


sendByEmail

A request for sending a document or report by email. This API call is synchronous (returns when email is sent) and can take a few seconds to complete. Sending will be handled by the server. Email subject, sender's address, message content and attachment format (HTML/PDF) will be decided serverside and are configurable from ERPLY settings.



sendToPrint

THIS API CALL IS DEPRECATED.


POSOpenDay

Open the day (or cashier's shift) in POS.

To open the day, cashier needs to count the amount of cash at the register.

Day must later be closed with POSCloseDay. Both the opening and closing (and the amount of cash counted at opening time and closing time) will be recorded on the Z Report.

A log of POS openings and closings can be retrieved with getDayClosings.


POSCashIN

Drop an amount of cash in register.

By convention, a cash drop with an amount of 0 is an indicator of "No Sale", ie. just opening the drawer. So if you want to record drawer openings (and have these printed on the Z Report), send a cash drop event with amount 0.

For cash payouts, use POSCashOUT. To get a list of all cash drops and cash payouts, use getCashIns.


POSCashOUT

Pay out an amount of cash from register.

For cash drops, use POSCashIN. To get a list of all cash drops and cash payouts, use getCashIns.


POSCloseDay

Close the day (or cashier's shift) in POS. The day must be previously opened with POSOpenDay.

To close the day, cashier needs to count the amount of cash at the register, and indicate how much of it will be stored at the register (closedSum) and how much taken away and deposited (bankedSum).

Both the opening and closing (and the amount of cash counted at opening time and closing time) will be recorded on the Z Report.

A log of POS openings and closings can be retrieved with getDayClosings.

To get a report of total payments by type, before closing the day (for reconciliation), see getPointOfSaleDayTotals.