Search

verifyUser

Log into ERPLY API: authenticate yourself with a user name and password.

Each communication session with Erply API must begin with a call to verifyUser. Successful log-in will give you a session key; include it with every subsequent API call. (Send it as input parameter “sessionKey”).

By default, session will last for one hour. When session expires, all API calls will start returning a 1054 or 1055 error; this is an indication that you should call verifyUser again to receive a fresh session key.

We recommend that you build authentication and session keep-alive into your API wrapper class — so that it automatically refreshes session key when it is about to expire, and is able to re-authenticate and re-issue an API call if it receives error 1054/1055. For an example, see our sample PHP wrapper class.

If logging in does not succeed, verifyUser returns error 1050, 1051 or 1052.

Input parameters

Parameter nameDescriptionPossible valueRequired
usernameUser nameString yes
passwordPasswordString yes
cardCodeUser PIN or magnetic card code for quick log-in.

THIS OPTION IS DEPRECATED. For security reasons, we will REMOVE this option in the future, and logging in with just user PIN will no longer be possible.

However, you can use PINs for fast user switching (see API call switchUser). User switching requires a valid session key — so the first login must always be done with a user name and password (with verifyUser), but later you may switch user accounts with PIN only.
String
sessionLengthSuggested session length in seconds. If omitted or has a value of 0 or less, default session length of 3600 seconds is appliedInteger

Response

Field nameTypeDescription
userIDIntegerID of the user account
userNameStringThe same username that was passed as input
employeeIDIntegerID of the company employee that has the abovementioned user account
employeeNameString
groupIDIntegerID of the user group where the user belongs
groupNameStringname of the user group
ipAddressStringIP address of the API client.
sessionKeyStringsession identifier, to be used for subsequent API calls.
sessionLengthIntegertime after which the session key expires (in seconds)
loginUrlStringURL from where user can log into ERPLY backend, through web browser.

This URL does not affect API usage and should not be used for sending API calls.
berlinPOSVersionStringApplication-specific field for ERPLY's Berlin POS. Indicates the version number (typically an integer) of the live / production POS version that is appropriate for this customer — or the version that has specifically been configured for this customer.

This field does not mean that the customer is definitely using Berlin POS. The customer may be using other POS products or not using a POS at all.

Also, API does not currently provide a POS version number for preproduction / staging / testing.
berlinPOSAssetsURLStringApplication-specific field for ERPLY's Berlin POS. Indicates the URL from where POS can load its static assets.

The URL does not include and does not depend on POS version number. POS should append version number to the URL, or perform some other transformation if needed.
epsiURLStringApplication-specific field for ERPLY's Berlin POS. Indicates the location of the JNLP file for Erply Point Of Sale Integrator (EPSI), which provides support for various POS hardware.
cayanGatewayURLsArray

Application-specific field for Berlin POS - returned only for Berlin POS.

List of Cayan (Merchant Warehouse) payment gateway URLs for this particular account. This only specifies the most appropriate service endpoints for the account to use; it does not indicate that the account is actually using Cayan payment integration.

This array may contain 0 or more records. If Cayan support has been disabled in this server, the array will be empty. Otherwise it will contain at least one record.

Each record in the array contains the following fields:

Field nameTypeDescription
targetStringService hostname
portIntegerService port
weightInteger (0..65535)For load balancing. See internal documentation.
priorityInteger (0..65535)Priority of this host. See internal documentation.
avalaraGatewayURLsArray

Application-specific field for Berlin POS - returned only for Berlin POS.

URLs of gateways to the Avalara tax calculation service. This only specifies the most appropriate service endpoints to use, if needed, and does not indicate that the account is actually using Avalara integration.

This array may contain 0 or more records. If Avalara support has been disabled in this server, the array will be empty. Otherwise it will contain at least one record.

Each record in the array contains the following fields:

Field nameTypeDescription
targetStringService hostname
portIntegerService port
weightInteger (0..65535)For load balancing. See internal documentation.
priorityInteger (0..65535)Priority of this host. See internal documentation.
pusherAuthenticationURLsArray

Application-specific field for Berlin POS - returned only for Berlin POS.

URLs of gateways to the Pusher messaging service, for this particular account.

This array may contain 0 or more records. If Pusher support has been disabled in this server, the array will be empty. Otherwise it will contain at least one record.

Each record in the array contains the following fields:

Field nameTypeDescription
targetStringService hostname
portIntegerService port
weightInteger (0..65535)For load balancing. See internal documentation.
priorityInteger (0..65535)Priority of this host. See internal documentation.
strikeIronGatewayURLsArray

Application-specific field for Berlin POS - returned only for Berlin POS.

URLs of gateways to the StrikeIron (Informatica) tax rate lookup service, for this particular account.

This array may contain 0 or more records. If StrikeIron support has been disabled in this server, the array will be empty. Otherwise it will contain at least one record.

Each record in the array contains the following fields:

Field nameTypeDescription
targetStringService hostname
portIntegerService port
weightInteger (0..65535)For load balancing. See internal documentation.
priorityInteger (0..65535)Priority of this host. See internal documentation.
customerRegistryURLsArray

Information about standalone customer registry service.

This array may contain 0 or more records. If account does not use a standalone customer registry (customers are stored in ERPLY as usual), this list will be empty. Otherwise it will contain at least one record.

Each record in the array contains the following fields:

Field nameTypeDescription
urlStringURL of the service endpoint (with "https://" protocol in the beginning and "/" in the end). Append the names of API calls (eg. "V1/Customer/create") to this URL.
tokenIntegerAuthentication token for the service. When the customer service reports the token has expired, call verifyUser again to get a new one.
priorityInteger (0..65535)Priority of this host. A client must attempt to contact the target host with the lowest-numbered priority it can reach. Target hosts with the same priority should be tried in pseudorandom order.
weightInteger (0..65535)For load balancing. When selecting a target host among those that have the same priority, the chance of trying this one first should be proportional to its weight. Larger weights SHOULD be given a proportionately higher probability of being selected.
transactionRegistryURLsArray

Information about standalone transaction registry service.

This array may contain 0 or more records. If account does not use a standalone transaction registry (transactions are stored in ERPLY as usual), this list will be empty. Otherwise it will contain at least one record.

Each record in the array contains the following fields:

Field nameTypeDescription
urlStringURL of the service endpoint (with "https://" protocol in the beginning and "/" in the end). Append the names of API calls to this URL.
tokenIntegerAuthentication token for the service. When the transaction service reports the token has expired, call verifyUser again to get a new one.
priorityInteger (0..65535)Priority of this host. A client must attempt to contact the target host with the lowest-numbered priority it can reach. Target hosts with the same priority should be tried in pseudorandom order.
weightInteger (0..65535)For load balancing. When selecting a target host among those that have the same priority, the chance of trying this one first should be proportional to its weight. Larger weights SHOULD be given a proportionately higher probability of being selected.