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.

  • applyPromotions() - Applies promotions.
  • clockIn() - Clock in an employee. Timeclock records are used for time & attendance report.

    This function returns error 1006 if timeclock module is not enabled on this account.
  • clockOut() - Clock out an employee. Timeclock records are used for time & attendance report.

    This function returns error 1006 if timeclock module is not enabled on this account.

    NB! Clock.in time is a required input parameter — InventoryAPI uses this to find the correct timeclock record and update it.
  • decrementAttributeValue() - Decrements attribute value.
  • deleteAddress() NEW - Delete a supplier's or customer's or company's own address.
  • deleteAppliance() - Delete an appliance.

    This function returns error 1006 if assignment module is not enabled on this account.
  • deleteAssignment() - Delete an assignment.

    This function returns error 1006 if assignment module is not enabled on this account.
  • deleteAssignmentGroup() - Delete an assignment group.

    This function returns error 1006 if assignment module is not enabled on this account.
  • deleteBillingStatement() - Delete a billing statement.
  • deleteBillingStatementReading() - Delete a reading of billing statement.
  • deleteCustomer() NEW - Delete a customer.
  • deleteCustomerGroup() - Delete a customer group.
  • deleteEvent() - Delete an event.
  • deleteObject() - Delete an object.
  • deletePayment() - Delete a payment.
  • deleteSalesDocument() - Delete a sales document (invoice, order, offer or reservation).
  • deleteSupplier() - Delete a supplier.
  • deleteSupplierGroup() - Delete a supplier group.
  • deleteProduct() - Delete a product. Products that have any number of transactions associated with them (sales, purchases or inventory) cannot be deleted; API returns error 1063.
  • deleteProductGroup() - 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.
  • deleteProject() - Delete a project.
  • deletePurchaseDocument() - Delete a purchase document (invoice, order, return).
  • getAccountStatements() - Returns all customers who have a non
  • getAddresses() - Returns a customer's or supplier's list of addresses.
  • getAddressTypes() - Returns an array of address types.
  • getAllowedWarehouses() - Returns an array of warehouses this particular user is allowed to use. Compare with getWarehouses() that returns the list of all warehouses.
  • getAppliances() - Returns an array of appliances or vehicles.

    This function is related to the Assignments module. Depending on configuration, your Assignments module may be set up either for appliance repair (in which case this function returns the list of appliances), or vehicle repair (this function returns the list of vehicles). Vehicles have a few extra fields, compared to appliances.

    This function returns error 1006 if assignment module is not enabled on this account.
  • getAssignmentGroups() - Returns an array of assignment groups.

    This function returns error 1006 if assignment module is not enabled on this account.
  • getAssignments() - Returns an array of assignments.

    Assignments module is an Erply feature for repair workshops. There are two different configurations: appliance repair and vehicle repair. API call getAppliances lists your appliance/vehicle database.

    This function returns error 1006 if assignment module is not enabled on this account.
  • getBillingStatements() - Returns an array of billing statements.
  • getBillingStatementReadings() - Returns an array of billing statement readings.
  • getBrands() - Returns a list of product brands.
  • getBusinessAreas() - Returns the list of areas of business (Manufacturing, services, transportation etc.) Used as a classifier in CRM.
  • getCampaigns() - Return an array of sales campaigns (promotions).
  • getChangedDataSince() - Returns information about what items have been created, updated or deleted in the server since the given timestamp.

    Function output lists the various modules (data tables) in the system, whether there have been additions/updates, and whether there have been deletions in the particular module.
  • getClockIns() - Returns an array of timeclock records.

    This function returns error 1006 if timeclock module is not enabled on this account.
  • getConfParameters() - Returns account configuration — all the settings from the module Settings > Configuration and also a number of hidden settings that can be enabled by Erply technical support.

    This function returns exactly one result record. This record contains a variable number of attributes and it is not guaranteed that any one of these attributes will be present. The contents of this record should be saved into a dictionary or an associative array, and a default value (0, unless specified otherwise) assumed for any missing parameter.

    Some of the parameters are supposed to have a decimal/integer value, or a value of 1 or 0 (true/false, enabled/disabled). However API returns almost all fields as strings. If your programming environment requires that, please cast the parameters to the correct type. In the table below, the types are marked with an asterisk.

    Most — but not all! — settings can be edited using saveConfParameter. Do NOT edit any undocumented settings or those marked as "Not Editable".
  • getCostOfGoodsSold() - Get the cost of goods sold for a given period. API returns an array of all sales document rows in the selected period, and the cost for each row.

    Erply calculates cost according to FIFO principle.

    Usage guidelines: Note that the COGS of any sale may change at any time — Erply does not freeze cost at the moment when sale takes place. Many kinds of operations may adjust it, eg. entering or correcting a purchase invoice at a later date, adding freight costs, deleting other documents etc. Find out what are the accounting principles in your company and pull COGS only when all adjustments for the given period are done — eg. at the end of month.
  • getCountries() - Returns an array of countries.
  • getCoupons() - Returns a list of coupon codes. Coupons can be printed out to the customer from POS, whether manually by the cashier, or automatically according to a rule. To make a coupon code do something, it should be associated with a sales promotion (see getCampaigns()).
  • getCustomerGroups() - Return an array of customer groups.
  • getCustomers() - Returns an array of customers.
  • getCompanyInfo() - Returns information about the company running the account.
  • getCurrencies() - Returns an array of currencies.
  • getCustomerRewardPoints() - Returns an array of customer's total reward points.
  • getDefaultCustomer() - Returns the ID of default customer used for POS transactions (typically, "Private Customer", "One_time Buyer" or similar). If such a customer is not defined, returns no records.
  • getDocuments() - Returns an array of documents.
  • getDocumentStatuses() - Returns an array of possible document statuses.
  • getDocumentTypes() - Returns an array of possible document types.
  • getDocumentSeries() - returns an array of possible document series.
  • getEDocuments() - if ID is specified, returns the corresponding EDocument. Otherwise returns a list of EDocuments, according to the supplied filtering parameters.
  • getEmailAccounts() - Returns the list of configured email accounts and the access credentials for each account
  • getEmployees() - Returns an array of employees.
  • getEvents() - Returns an array of events.
  • getEventStatuses() - Returns an array of possible event statuses.
  • getEventTypes() - Returns an array of event/task types.
  • getGiftCardRedeemings() - Return an array of gift card redeemings.

    This function returns error 1006 if "Gift card extras" module is not enabled on this account.
  • getGiftCards() - Return an array of gift cards.
  • getInventoryRegistrations() - Return an array of inventory registrations.
  • getInventoryTransfers() - Return an array of inventory transfers.
  • getInventoryWriteOffs() - Return an array of inventory write
  • getMatrixDimensions() - Returns an array of possible matrix dimensions.
  • getObjects() - Returns an array of objects.
  • getPayments() - Returns an array of payments.
  • getPaymentTypes() - Returns an array of payment types.
  • getPointOfSaleDayTotals() - Returns today's cash, card and other payment type totals for the specified register (point of sale).
  • getPointsOfSale() - Returns the list of all points of sale (registers), in all shops and locations. One shop can have many points of sale. A point of sale has the attribute "warehouseID" to indicate which store or warehouse it is located in.
  • getPriceLists() - Returns price lists and the contents of each price list.

    Price lists may contain three types of "rules": 1) fixed prices for specified products; 2) fixed prices for specified services; 3) percentage discounts for specified product groups. (A discount applies to all products in this group and its subgroups.)

    There can be multiple price lists associated with location, customer, or customer group and the price lists interact with each other and override each other in various ways. To apply all applicable price lists and promotions to a sale, we recommend to use API call applyPromotions. (As input; you need to send all the items on your receipt; API will return the same list, with final prices for each item added.)

    Re–implementing all price list rules in your application would be a major undertaking, and we plan to constantly add new promotion features to ERPLY.
  • getProductCategories() - Returns an array of product categories.
  • getProducts() - Returns products.
  • getProductStock() - Returns an array of product stock.
  • getProductCostForSpecificAmount() - Returns the 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 function 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.
  • getProductGroups() - Returns a HIERARCHICAL array of product groups.
  • getProductPrices() - Returns 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).
  • getProductPriorityGroups() - Returns an array of priority groups.
  • getParameters() - Returns an array of parameters.
  • getProductUnits() - Returns an array of product possible units.
  • getProjects() - Returns an array of projects.
  • getProjectStatuses() - Returns an array of possible project statuses.
  • getProjectTypes() - Returns an array of possible project types.
  • getPurchaseDocuments() - Returns a list of purchase documents (purchase invoices 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.
  • getPurchaseDocumentStatuses() - Returns an array of purchase document possible statuses.
  • getReasonCodes() - Returns an array of reason codes.
  • getReports() - Get a report. Currently, only Z Report / X Report (day sales and payments in POS) is available; it can be retrieved either as structured data or HTML.
  • getSalesDocuments() - Returns a list of 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.
  • getSchedule() - Returns employee's work schedule. It can be retrieved in two formats: a list of employee's working hours for each day, or a list of employee's time off.

    This function can only be used is Salon module is enabled on your account. For other salon related functions, see getEmployees and getTimeSlots.
  • getTimeSlots() - Returns first available appointment slots for a chosen service in a selected salon (location).
    API will inspect employee's schedules and find first available times that have not been booked yet.

    Using this API call, you can schedule:
    • One appointment for one customer;
    • Several consecutive appointments (eg. multiple hair care services) for one customer;
    • Appointments for a group of customers who want to arrive and leave together.
    This function can only be used if Salon module is enabled on your account. For other salon related functions, see getEmployees and getSchedule.

    Returns error 1044 if the service being booked does not have a default length specified in Erply backend.
  • getServices() - Returns an array of services.
  • getStocktakings() - Returns an array of stocktakings.
  • getStocktakingReadings() - Returns an array of stocktaking readings.
  • getSummaryInventoryReport() - Get summary inventory report (all stores and locations). API returns an array of all locations.
  • getSupplierGroups() - Return an array of supplier groups.
  • getSuppliers() - Returns an array of suppliers.
  • getUserGroups() - Return an array of user groups.
  • getUserOperationsLog() - Returns an array of user operations (delete).
  • getUserRights() - Returns an array of user rights.
  • getVatRates() - Returns the list of VAT rates (or sales tax / GST / etc. rates, depending on what taxation is used in the particular country)
  • getWarehouses() - Returns a list of warehouses, or locations, or stores.

    API call getAllowedWarehouses() returns the list of those warehouses that your user has access to.
  • getWidgets() - Returns an array of possible widgets. This function is only available if your Erply account is running version 3.4 or newer; otherwise returns error 1006.
  • incrementAttributeValue() - Increments attribute value.
  • incrementStocktakingReading() - Increments stocktaking reading value.
  • pollNewInvoices() - Ask system if there are any invoices that need verification by fiscal printer. This function is optimised for high_frequency use.
  • POSCashIN() - Drops an amount of cash in register.
  • POSCashOUT() - Pays out an amount of cash from register.
  • POSCloseDay() - Closes the day in POS. Day should be previously opened with POSOpenDay().
  • POSOpenDay() - Opens the day in POS.
  • redeemIssuedCoupon() - Redeem a coupon that has been previously issued to a customer. A redeemed coupon cannot be used again. To just verify that a coupon is valid (before redeeming it), use verifyIssuedCoupon().

    If such coupon has not been issued, returns error 1040. If coupon has been redeemed already, returns error 1041. If coupon is valid, returns error 0.
  • removeItemsFromPriceList() - Remove rules from price list. You need to specify rule type and the ID of the respective product or product group that you want to remove. (If using the Quantity Discounts module, you also need to specify the "amount" parameter.)

    You can specify many such parameter pairs in one API request; give a sequential number (1, 2, 3, ...) to each such pair. The "#" character below denotes this sequential number.
  • saveAddress() - Creates or updates customer's or supplier's address.
  • saveAddressType() - Creates or updates address type.
  • saveAppliance() - Creates or updates appliance.

    This function returns error 1006 if assignment module is not enabled on this account.
  • saveAssignment() - Creates or updates assignment.

    This function returns error 1006 if assignment module is not enabled on this account.
  • saveAssignmentGroup() - Creates or updates assignment group.

    This function returns error 1006 if assignment module is not enabled on this account.
  • saveBillingStatement() - Creates or updates billing statement.
  • saveBillingStatementReading() - Creates a reading of billing statement.
  • saveBrand() - Creates or updates brand.
  • saveCompanyLogo() - Adds company logo.
  • saveConfParameter() - Updates configuration parameter. If parameter name is invalid, returns error 1016. Some configuration parameters returned by getConfParameters — 'languages', 'additionalModules', 'invoice_algorithm_version', 'default_currency' — are derived from various other settings and you cannot directly change their value.
  • saveCurrency() - Creates or updates currency.
  • saveCustomer() - Creates a new customer or updates customer data. Function can be used for manipulating both companies and persons. Some parameters only apply to one or another.
  • saveCustomerGroup() - Inserts or updates customer group.
  • saveDocument() - Inserts or updates document.
  • saveEDocuments() - Creates a new EDocument (sales invoice/order or purchase invoice/order)
  • saveEmployee() - Inserts or updates an employee.
  • saveEvent() - Inserts or updates event/appointment.

    Function may return error 1043 if creating appointment and employee already has an appointment in the selected time slot. (In that case you need to requery getTimeSlots and select a different start and end time for new appointment.)
  • saveGiftCard() - Inserts or updates gift card.
  • saveInventoryRegistration() - Inserts an inventory registration.
  • saveInventoryTransfer() - Inserts an inventory transfer.
  • saveInventoryWriteOff() - Inserts an inventory write
  • saveIssuedCoupon() - Register a printed coupon that has been issued to a customer. The issued coupon must have a unique identifier. Since coupons may carry monetary value, Erply keeps track of issued coupons and allows to validate (verify) a coupon when customer comes to redeem it. See also verifyIssuedCoupon() and redeemIssuedCoupon().
  • saveMatrixDimension() - Inserts a matrix dimension.
  • saveObject() - Inserts or updates an object.
  • savePayment() - Inserts or updates a payment.
  • savePriceList() - Create a price list, or add prices to an existing price list.

    A price list can contain three types of rules: 1) fixed prices for specified products, 2) fixed prices for specified services, 3) percentage discounts for product groups. You may specify as many rules of each type as necessary.

    If you need to create a very large price list (with thousands of items), we strongly recommend to create it in parts — create the list itself with the first API call, and then add items into the list with each subsequent call, eg. in batches of 1000.

    If needed, you can edit just an existing price list's name, status and validity dates. In that case, API will not modify price list contents. However, you can also use this call for adding or updating prices in an existing price list. If you send any price list rules, API will check if the specified product or product group already exists in price list. If yes, that price list item will be updated. If not, a new one will be added.

    If you want to remove any items from the price list, use the removeItemsFromPriceList API call.

    If you have the Quantity Discounts module enabled, please note that each product may have multiple entries in the price list. If you want to address and update one specific rule, you also need to pass along the "amount" parameter.
  • saveProduct() - Inserts or updates a product.
  • saveProductCategory() - Inserts or updates a product category.
  • saveProductGroup() - Inserts or updates a product group.
  • saveProductPicture() - Adds an image to a product.
  • saveProject() - Inserts or updates a project.
  • savePurchaseDocument() - Creates a new purchase invoice, purchase order or purchase return, or updates an existing one.
  • saveSalesDocument() - Creates a new invoice, waybill, offer, order or reservation, or updates an existing one. Input parameters must include general properties of the document as well as an array of document rows (goods or services being sold).
  • saveService() - Inserts or updates a service.
  • saveStocktaking() - Creates or updates a physical stocktaking act.

    Creating the act is the first step in physical stocktaking. Next, it must be filled with quantities counted in the warehouse. After all quantities have been recorded and verified, the act must be confirmed. Finally, surplus quantities should be taken into stock with an Inventory Registration and missing quantites written off with an Inventory Write
  • saveStocktakingReadings() - Inserts or updates a stocktaking readings.
  • saveSupplier() - Inserts or updates a supplier.
  • saveSupplierGroup() - Inserts or updates supplier group.
  • saveUser() - Inserts or updates a user.
  • saveWarehouse() - Inserts or updates a warehouse.
  • saveVatRate() - Creates or updates a VAT (tax) rate.
  • sendByEmail() NEW - 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.
  • sendInvoiceVerification() - Sends a verification code for an invoice, provided by fiscal printer.
  • sendToPrint() NEW - A request for printing a document. This API call is asynchronous (returns immediately, printing will take place soon after). Printing specifics are decided serverside and configurable from ERPLY settings.
  • subtractCustomerRewardPoints() - Subtracting customer's reward points. Returns an array of reward points status.
  • updatePrices() - Updates product's price.
  • verifyCustomerUser() - Validates a webshop user.
  • verifyIssuedCoupon() - Validate a coupon identifier. The function verifies that the coupon has indeed been issued previously (using saveIssuedCoupon()), and that it has not been redeemed yet (using redeemIssuedCoupon()).

    If coupon has not been issued, returns error 1040. If coupon has been redeemed already, returns error 1041. If coupon is valid, returns error 0.
  • verifyUser() - Validates user's username and password and returns more information about the user. If verification (logging in) does not succeed, error 1050, 1051 or 1052 is returned.
  • createInstallation() - Creates a new ERPLY account.
 
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