April 13, 2020
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:
New API calls have been added:
"tierID" has been added to API calls getCampaigns and saveCampaign.
The new algorithm has been implemented in API call calculateShoppingCart.
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.
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).
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.
New API call getCustomerBalance has been added. Use it to retrieve the balance of one or many customers, by customer ID.
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.
warehouseIDs (the list of locations user can access) has been added to API call saveUser.
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.
isPasswordExpired has been added to the output of API call verifyUser.
countedItemsOnly have been added to API call getStocktakingReadings.
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.
numberOrCustomerin 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.