API Version 1.46.0

July 14, 2021

April 13, 2020

New Features

  1. This API version introduces a new feature — promotion tiering.

    "Tiers" allow to organize promotions into groups, to affect the order in which promotions are applied. The new order is as follows:

    1. Promotions are applied by tier. (Promotions with no tier are applied first.)
    2. Within each tier, promotions are applied by type.
    3. Within each type, promotions are applied from oldest to newest.

    New API calls have been added:

    Field "tierID" has been added to API calls getCampaigns and saveCampaign.

    The new algorithm has been implemented in API call calculateShoppingCart.

    Fields manualDiscountReasonCodeID# (a discount reason ID for each shopping cart row) has been added to API call calculateShoppingCart. For the back office setting "A discount with this reason code will disable the following promotion tiers: ..." to take effect, POS will have to populate this field.

  2. New API call getJwtToken has been added.

    The functionality of this API call will be implemented step by step in future API versions. Right now, the token will generally be empty (will contain no permissions), or the API call may even return an error.

    The difference between getJwtToken and getIdentityToken is that the new call returns a JSON Web Token (an authorization token) assembled by Erply API itself — not one requested from the Identity service.

    Eventually, the contents of the token returned from getJwtToken will be assembled based on user's rights in back office. At the moment, we just implemented a few default permissions, to be returned to API clients using "global access" (the method where each request is signed with a secret key).

  3. API now enforces the "Password History" constraint. This is a password policy that can be enabled from Erply back office (starting with Classic 4.23 and Berlin 5.21): when user updates their password, the new password cannot be identical to their previous N passwords. (How many previous passwords exactly, is configurable from back office.) API call changePassword will return a new error code 1196 if the new password does not comply with the policy.

  4. New API call getCustomerBalance has been added. Use it to retrieve the balance of one or many customers, by customer ID.

  5. Fields trackingNumber and fulfillmentStatus have been added to sales documents. These two input fields have been added to API callsaveSalesDocument. API call getSalesDocuments returns these fields and supports filtering by these fields.

  6. Field warehouseIDs (the list of locations user can access) has been added to API call saveUser.

  7. Flag addAccessForAllUsers has been added to API call saveWarehouse. When the flag is set, access to the new location will be given to all users. By default, only the creator of the new location is granted access.

  8. Flag isPasswordExpired has been added to the output of API call verifyUser.

  9. Filters uncountedItemsOnly and countedItemsOnly have been added to API call getStocktakingReadings.

  10. Input flag showDocumentLinks has been added to API call getReports. When set, the HTML-formatted Z Report will contain links to each sales transaction, as seen in the Z Report in back office.


  1. Filter numberOrCustomer in API call getSalesDocuments has been adjusted and a special case for one account removed. On accounts with a full-text customer index, this full-text index will be now used for finding sales documents by customer.