This API expose all the functionnalities for the eZmax and eZsign applications.
We publish everything related to our API on github at this location: https://github.com/eZmaxinc. You'll find git repos for the specification, documentation, SDKs and samples.
Documentation, SDKs and samples are provided in English only for easier maintenance, but we also have French speaking integrators that can help you out.
If you find any mistake or omission in the documentation, please notify us. We'll quickly fix the issue.
We highly recommend to schedule an online meeting with your technical team and an eZmax integrator. During this meeting, we go through requirements, business logic, configuration, api key generation, and we go through the list of functions you might need to implement to achieve your goals. Make sure you take this opportunity to speed up your integration project.
If you need help understanding how to use this API, don't waste too much time searching in it. Contact support-api@ezmax.ca, we're here to help. We are developpers so we know programmers don't like to waste time in documentation. If you don't find what you need in the documentation, let us know, we'll improve it and put you rapidly up on track.
We highly believe in open standards and open source. We have adopted the Open API vision where all of the functionnalities of our applications are accessible with open source definition files. We use our own public API's to build our interfaces so you can do pretty much everything we can do. Open API has a rich toolset from editor, generators, mock servers, validators, etc. Learn more at OpenAPI Initiative
If you need our Open API Spec files to use in your toolset, you can find them in the specs folder.
We provide SDKs for customers. They are generated using OpenAPI Generator, we encourage customers to use them as we also provide samples for them.
Most of our SDKs provide language specific documentation, but you'll find more details on this page about the general use of the API. Both the SDK's specific document (if you choose to use a SDK) and this documentation can be used in complementarity.
We try to make it as easy as possible for you to use our SDKs so we publish packages on NPM and Composer. If you don't find your favorite language supported or it we could make your life easier by automating package distribution, let us know !
You can choose to automatically build and personnalize your own SDK by using any compatible OpenAPI 3.0 generator like OpenAPI Generator, Swagger Codegen or any commercial generators.
To do so, you just need to pass the specification file to your generator. You can find the latest version in the specs folder.
We are integrated into commercial automation platforms that allow users to create workflows to automate tasks and processes We currently support:
Various software vendors have seamlessly integrated our API into their solutions, simplifying the adoption process for their customers by eliminating the need for manual integration efforts. If you're utilizing one of these integrated solutions, feel free to reach out to the respective software vendor to activate the functionality.
Below is a partial list of these integrations:
Contact us if you're interested in being included in this list.
Occasionally, customers may find themselves utilizing a programming language that lacks support from any generator. Alternatively, some may prefer the straightforwardness of directly calling API endpoints without relying on an SDK.
Fortunately, as our API adheres to standard REST principles, you have the freedom to invoke the GET/POST/PUT/PATCH/DELETE methods with appropriate parameters and payloads. Following this approach allows you to handle responses by parsing them manually, offering a flexible and adaptable method for interacting with our services.
When you send your API requests, you'll need to send them in the proper region and proper environment where your customer data are stored. Based on your requirements (proximity and legislation), we will create your environment in one of our supported region's.
The general format of the URL where to send requests is: https://{sInfrastructureenvironmenttypeDescription}.api.appcluster01.{sInfrastructureregionCode}.ezmax.com/rest/
Where "{sInfrastructureenvironmenttypeDescription}" and "{sInfrastructureregionCode}" need to be replaced with one of the values in the table below.
Some of the functions needs to be called on the global infrastructure instead of the regional servers. These functions are all located in the Global section of the documentation.
The general format of the URL where to send requests is: https://{sInfrastructureenvironmenttypeDescription}.api.global.ezmax.com/
Where "{sInfrastructureenvironmenttypeDescription}" needs to be replaced with one of the values in the tables below.
When you send your Websocket requests, you'll need to send them in the proper region and proper environment where your customer data are stored. Based on your requirements (proximity and legislation), we will create your environment in one of our supported region's.
The general format of the URL where to send requests is: wss://ws.{sInfrastructureregionCode}.ezmax.com/{sInfrastructureenvironmenttypeDescription}/
Where "{sInfrastructureregionCode}" and "{sInfrastructureenvironmenttypeDescription}" need to be replaced with one of the values in the tables below.
sInfrastructureenvironmenttypeDescription | Description |
---|---|
iso | Isolated Customers |
prod | Production |
stg | Staging |
qa | Quality Assurance |
dev | Development |
Note: You should always use "prod" for the environment unless otherwise instructed by eZmax's support.
sInfrastructureregionCode | Description |
---|---|
af-south-1 | Africa (Cape Town) |
ap-east-1 | Asia Pacific (Hong Kong) |
ap-northeast-1 | Asia Pacific (Tokyo) |
ap-northeast-2 | Asia Pacific (Seoul) |
ap-northeast-3 | Asia Pacific (Osaka) |
ap-south-1 | Asia Pacific (Mumbai) |
ap-south-2 | Asia Pacific (Hyderabad) |
ap-southeast-1 | Asia Pacific (Singapore) |
ap-southeast-2 | Asia Pacific (Sydney) |
ap-southeast-3 | Asia Pacific (Jakarta) |
ap-southeast-4 | Asia Pacific (Melbourne) |
ca-central-1 | Canada (Central) |
ca-west-1 | Canada West (Calgary) |
eu-central-1 | Europe (Frankfurt) |
eu-central-2 | Europe (Zurich) |
eu-north-1 | Europe (Stockholm) |
eu-south-1 | Europe (Milan) |
eu-south-2 | Europe (Spain) |
eu-west-1 | Europe (Ireland) |
eu-west-2 | Europe (London) |
eu-west-3 | Europe (Paris) |
il-central-1 | Israel (Tel Aviv) |
me-central-1 | Middle East (UAE) |
me-south-1 | Middle East (Bahrain) |
sa-east-1 | South America (São Paulo) |
us-east-1 | US East (N. Virginia) |
us-east-2 | US East (Ohio) |
us-west-1 | US West (N. California) |
us-west-2 | US West (Oregon) |
Note Our SDKs have a default value of "ca-central-1". You will need to call "setHost" to change the default value if needed.
Except for a few functions that do not require authorization, most of the functions require an API key that is sent in the request headers. The header name is "Authorization".
There are 6 types of API Key that can be used to make requests to the API.
API type key which is static and not session based. It can be generated from the admin console. This is the most common type of authentication for "server to server" kind of integration. Never use this in a web based (client) application as the key could be leaked. This type of key begins with the letter A.
Delegated type key which has an expiration time. It is commonly used in mobile or web application where you cannot use an API type key that could be leaked. The application would query a server part that will generate a Delegated type key using an API type key. The Delegated type key could now be used by the mobile or web page application without leaking the API type key. This type of key begins with the letter D.
User type key which are session based and can be retrieved after a successful authentication. This type of key is reserved to specific situations where the other types of key are not desirable. This type of key begins with the letter U.
Presigned type key which are used to presign a url. These keys have an expiration date configured at signing time. This type of key begins with the letter P.
Special type key which are for special cases where other types of keys cannot be used. This type of key is reserved to specific situations. This type of key begins with the letter S.
Webhook type key which is used when a webhook is sent to your server if request signing is enabled. This type of key begins with the letter W.
Each API key can be restricted to specific IP addresse(s). This is an optional but recommended security feature you should put in place if all your requests will be coming from a specific range. You can configure the allowed ranges from the eZmax administration console.
Each API Key can be configured to have specific permission(s) so we highly recommend to use the "Least privileges" principle. For example, instead of allowing all permissions to an API Key, you should perhaps create an API Keys each for each of your application having just the specific permissions needed. You can configure the API Key's permission in eZmax's administration console.
Request Signing is a process of signing the request with a Secret that is not transmitted over the Wire. The signing process improves security in case your API Key is leaked or during a MITM attack (Man in the Middle). It will also prevent request manipulation or replay attack. Since all requests must use https these kinds of attacks are hard to conduct but sometimes customers might not be aware their underlying library does not verify SSL Certs validity or that their application can disclose their API key if it's not well secured. It takes a bit of effort to sign requests but it's highly recommended to do so.
Mandatory requirements of signing varies by used key type. For API type keys (most common type), you can configure if signing is mandatory or not in eZmax's administration console. Delegated, User and Special type keys must sign requests otherwise requests will fail.
To apply a signature to your request you will need to send 3 or 4 additional HTTP Headers to the request:
Ezmax-Date Is the date/time when you send the request. It needs to be a ISO 8601 formatted date/time. It's a format that supports timezones so you can either use your local timezone or GMT. Be aware certain implementation adds milliseconds to the formatted date which won't be accepted by the API (ex: Javascript's toISOString function).
There is a tolerance of ±5 minutes clock skew between the date/time you specify and the server's time so make sure your time is correct. Usage of a NTP server is recommended. Compute the date/time as close as possible to the actual sending of the request. For example, don't set the current time at the beginning of a long running script that sends 50 requests to the server with the same time/date as you might receive errors related to clock skew.
Examples:
Ezmax-Expiration Is optional. It must be a positive integer representing the number of minutes (starting from Ezmax-Date) after which the signed request will be considered expired.
Ezmax-Fingerprint Is a fingerprint (aka hash) representing the request you are sending. Any alteration in any part of the request would produce a different fingerprint. The hash is computed using SHA256. Most programming languages offer an implementation of SHA256. To make sure your implementation is producing expected values, try to hash the value "foo", it should produce the value "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae".
To compute the Fingerprint, you'll need to concatenate the Method, the URL, the Body, the API Key, the Date and the Expiration (Expiration must be appended only if defined). All these values will need to be separated by a line Feed caracter (\n). Make sure your Method is Uppercase (Shoud be "GET", not "Get" or "get"). Make sure your URL Scheme and Host or the URL are lowercase (Should be "https://www.example.com", not "HTTPS://WWW.EXAMPLE.COM"). Also make sure the the URI part of the URL is properly URL encoded (Should be "/Path%20with%20Spaces/?Key=Value%20with%20Spaces", not "/Path with Spaces/?Key=Value with Spaces". If the Body is empty (ex: GET request don't have a body), use an empty string.
Once the SHA256 hash is computed, prefix it with "v1=" which is future proofing version identifier.
Here is an example implementation in PHP:
public static function getFingerprintV1 ($sAuthorization, $dtDate, $sMethod, $sURL, $sBody = '', $iExpiration = null) {
$sContentToHash = "$sMethod\n$sURL\n$sBody\n$sAuthorization\n$dtDate" . (is_null($iExpiration) ? '' : "\n$iExpiration");
return 'v1='.hash('sha256', $sContentToHash);
}
Here are two examples of what a GET and POST requests Fingerprints could look like. You can validate if your algorithm work by using these sample values and comparing them to the expected values. In the example below the litteral "\n" should be replaced with a linefeed character.
GET\n
https://prod.api.appcluster01.ca-central-1.ezmax.com/rest/1/object/activesession/getCurrent\n
\n
ThisIsMyAuthorizationKey\n
2000-12-31T23:59:59Z
Expected result for Ezmax-Fingerprint (GET): v1=8f6f3ed75edb6e2cbe777b4fda5cab1a6adaebadc758780eb82c3d49934f354a
POST\n
https://prod.api.global.ezmax.com/1/module/sspr/sendUsernames\n
{"pksCustomerCode": "demo","fkiLanguageID": "2","eUserTypeSSPR": "Native","sEmailAddress": "email@example.com"}\n
ThisIsMyAuthorizationKey\n
2000-12-31T23:59:59Z
Expected result for Ezmax-Fingerprint (POST): v1=da829efd4c2a8722ce17d3cf977c4e86adf7d2dbaa47e1b2ee3b4ade6c9cb642
Ezmax-Signature Is the actual signature proving the request was generated by the key owner using its secret. The signature is computed using HMAC and SHA256. Don't confuse SHA256 (aka SHA2-256) and SHA3-256, these are 2 distinct algorithms. Most programming languages offer an implementation of HMAC with SHA256. To make sure your implementation is producing expected values, try to hash the value "foo" with the key "bar", it should produce the value "147933218aaabc0b8b10a2b3a5c34684c8d94341bcf10a4736dc7270f7741851".
To compute the Signature, you'll need to concatenate the Ezmax-Fingerprint, the API Key and the Ezmax-Date. The 3 values are concatenated WITHOUT separators. Then calculate the HMAC using SHA256 using your Secret as the key.
Once the HMAC-SHA256 hash is computed, prefix it with "v1=" which is future proofing version identifier.
Here is an example implementation in PHP:
public static function getSignatureV1 ($sAuthorization, $dtDate, $sFingerprint, $sSecret) {
$sContentToSign = "$sFingerprint$sAuthorization$dtDate";
return 'v1='.hash_hmac('sha256', $sContentToSign, $sSecret);
}
Here are two examples of what the GET and POST requests Signature would be. You can validate if your algorithm work by using these sample values and comparing them to the expected values. For the below examples, we have used the same API Key, Fingerprint and Date as in the Fingerprint section above. The only new variable is the Secret which is "ThisIsTheSecretAssociatedToTheAuthorizationKey" for this example.
v1=8f6f3ed75edb6e2cbe777b4fda5cab1a6adaebadc758780eb82c3d49934f354aThisIsMyAuthorizationKey2000-12-31T23:59:59Z
Expected result for Ezmax-Signature (GET): v1=3a95fde64d27527745bcb0dd91be8caf7917c6778197e22d1d56c87245f979f5
v1=da829efd4c2a8722ce17d3cf977c4e86adf7d2dbaa47e1b2ee3b4ade6c9cb642ThisIsMyAuthorizationKey2000-12-31T23:59:59Z
Expected result for Ezmax-Signature (POST): v1=b924269145ff74f64985992325e82e79445bbe3aa994b90d2f24b3023b8d5f09
The whole process was detailed above but here is summary of what your http headers should look like to sign these example requests considering the following common variables:
Variable | Example value |
---|---|
Date | 2000-12-31T23:59:59Z |
Authorization | ThisIsMyAuthorizationKey |
Secret | ThisIsTheSecretAssociatedToTheAuthorizationKey |
For a GET request to https://prod.api.appcluster01.ca-central-1.ezmax.com/rest/1/object/activesession/getCurrent:
Authorization: ThisIsMyAuthorizationKey
Ezmax-Date: 2000-12-31T23:59:59Z
Ezmax-Fingerprint: v1=8f6f3ed75edb6e2cbe777b4fda5cab1a6adaebadc758780eb82c3d49934f354a
Ezmax-Signature: v1=3a95fde64d27527745bcb0dd91be8caf7917c6778197e22d1d56c87245f979f5
For a POST request to https://prod.api.global.ezmax.com/1/module/sspr/sendUsernames with this body content = '{"pksCustomerCode": "demo","fkiLanguageID": "2","eUserTypeSSPR": "Native","sEmailAddress": "emain@example.com"}' :
Authorization: ThisIsMyAuthorizationKey
Ezmax-Date: 2000-12-31T23:59:59Z
Ezmax-Fingerprint: v1=da829efd4c2a8722ce17d3cf977c4e86adf7d2dbaa47e1b2ee3b4ade6c9cb642
Ezmax-Signature: v1=b924269145ff74f64985992325e82e79445bbe3aa994b90d2f24b3023b8d5f09
We use a custom type base naming convention for variables.
Each variable name is composed of up to 6 indicators
Here is a summary table explaining the convention.
Array | Key | Type | Table | Field | Discriminator | |
---|---|---|---|---|---|---|
Optional | Yes | Yes | No | No | Yes | Yes |
Naming | Fixed | Fixed | Lowercase | First letter is uppercase and the rest is lowercase | First letter is uppercase and the rest is lowercase except for the Field ID wich is always uppercase | First letter is uppercase and the rest is lowercase |
Values | a_ | pk fk efk |
s (string) t (text) c (char) sha (sha-1 string) md5 (md5 string) bin (binary string) i (integer) f (float) d (decimal) e (enum) dt (date or datetime) b (boolean) obj (object) m (mixed) |
Any | Any | Any |
Here are examples of typical variables' names
Variable name | Array | key | Type | Table | Field | Discriminator | Explanation | Example |
---|---|---|---|---|---|---|---|---|
pkiContactID | pk | i | Contact | ID | Primary key of type integer for the field name ID in table Contact | 133 | ||
fkiContactID | fk | i | Contact | ID | Foreign key of type integer pointing to the field pkiContactID in table Contact | 133 | ||
efkiContactID | efk | i | Contact | ID | External foreign key of type integer pointing to the field pkiContactID in table Contact | 133 | ||
fkiContactIDOwner | fk | i | Contact | ID | Owner | Foreign key of type integer pointing to the field pkiContactID in table Contact with a discriminator of Owner | 266 | |
sContactFirstname | s | Contact | Firstname | String for the Field Firstname in table Contact | John | |||
bPurchaseIspaid | b | Purchase | Ispaid | Boolean for the field Ispaid in table Purchase | true | |||
dPurchaseTotal | d | Purchase | Total | Decimal number for the field Total in table Purchase | 2199.78 | |||
objEzsignfolder | obj | Esignfolder | Object of type Ezsignfolder | {"pkiEzsignfolderID": 122, "sEzsignfolderName": "Test"} | ||||
a_objEzsignfolder | a_ | obj | Ezsignfolder | Array of objects of type Ezsignfolder | [{"pkiEzsignfolderID": 122, "sEzsignfolderName": "Test"}, {"pkiEzsignfolderID": 234, "sEzsignfolderName": "Test 2"}] | |||
a_sContactFirstname | a_ | s | Contact | Firstname | An array of string for the field Firstname in table Contact | ['John', 'Mary', 'Jane'] | ||
a_pkiContactIDOwner | a_ | pk | i | Contact | ID | Owner | An array of foreign keys of type integer pointing to the field pkiContactID in table Contact with a discriminator of Owner | [266, 277, 288] |
Every GetList Endpoint has a sFilter query parameter that can be used to filter the returned elements.
The sFilter parameter's syntax is not documented at the endpoint's level since it would be redundant. This section documents the syntax.
Valid operators for boolean values:
Operator | Description | Examples |
---|---|---|
eq | Equals | bEzsigndocumentEzsignclause eq true bEzsigndocumentEzsignclause eq false |
Valid operators for integer values:
Operator | Description | Examples |
---|---|---|
eq | Equals | iEzsigndocumentPagetotal eq 10 |
gt | Greater than | iEzsigndocumentPagetotal gt 10 |
gte | Greater than or equal to | iEzsigndocumentPagetotal gte 10 |
lt | Less than | iEzsigndocumentPagetotal lt 100 |
lte | Less than or equal to | iEzsigndocumentPagetotal lte 100 |
in | in list | fkiEzsignfoldertypeID in '1,2,3' |
Valid operators for date and datetime values:
Operator | Description | Examples |
---|---|---|
eq | Equals | dtEzsigndocumentDuedate eq '2005-07-01 18:15:59' dtEzsigndocumentDuedate eq '2005-07-01' |
gt | Greater than | dtEzsigndocumentDuedate gt '2001-01-01 00:00:00' dtEzsigndocumentDuedate gt '2001-01-01' |
gte | Greater than or equal to | dtEzsigndocumentDuedate gte '2001-01-01 00:00:00' dtEzsigndocumentDuedate gte '2001-01-01' |
lt | Less than | dtEzsigndocumentDuedate lt '2025-12-31 23:59:59' dtEzsigndocumentDuedate lt '2025-12-31' |
lte | Less than or equal to | dtEzsigndocumentDuedate lte '2025-12-31 23:59:59' dtEzsigndocumentDuedate lte '2025-12-31' |
rg | In the range of see range documentation |
dtEzsigndocumentDuedate rg '=m,=m+7d' |
Valid operators for string values:
Operator | Description | Examples |
---|---|---|
eq | Equals | sEzsigndocumentName eq 'Test contract' |
like | Search for a partial string with % wildcard | sEzsigndocumentName like 'Test contra%' sEzsigndocumentName like '%contract' sEzsigndocumentName like '%con%' |
Valid operators for enum values (valid values are documented at the endpoint's level):
Operator | Description | Examples |
---|---|---|
eq | Equals | eEzsigndocumentStep eq 'PartiallySigned' |
in | in list | eEzsigndocumentStep in 'PartiallySigned,Archived' |
Example of combining multiple filter together:
sFilter=bEzsigndocumentEzsignclause eq true and iEzsigndocumentPagetotal gt 10 and iEzsigndocumentPagetotal lte 100 and dtEzsigndocumentDuedate gt '2001-01-01 00:00:00' and dtEzsigndocumentDuedate lte '2025-12-31 23:59:59' and sEzsigndocumentName like '%con%' and eEzsigndocumentStep eq 'PartiallySigned' and fkiEzsignfoldertypeID in '1,2,3' and dtEzsigndocumentDuedate rg '=m,=m+7d'
Same example, but properly url encoded:
sFilter=bEzsigndocumentEzsignclause%20eq%20true%20and%20iEzsigndocumentPagetotal%20gt%2010%20and%20iEzsigndocumentPagetotal%20lte%20100%20and%20dtEzsigndocumentDuedate%20gt%20%272001-01-01%2000%3A00%3A00%27%20and%20dtEzsigndocumentDuedate%20lte%20%272025-12-31%2023%3A59%3A59%27%20and%20sEzsigndocumentName%20%20like%20%27%25con%25%27%20and%20eEzsigndocumentStep%20eq%20%27PartiallySigned%27%20and%20fkiEzsignfoldertypeID%20in%20%271%2C2%2C3%27%20and%20dtEzsigndocumentDuedate%20rg%20%27%3Dm%2C%3Dm%2B7d%27
Dates in list filter can use a "rg" operator for ranges. This allows to filter data based on relative dates. The range operator is just another way to compute filters dates.
For the rest of this section, let's assume today's date is February 25th 2019 and the time is 10:15:37. Let's assume that we want to filter on dtInvoiceDate.
If we wanted to get all the invoices that were generated in the previous month, we could do (not url encoded for readability purposes): sFilter=dtInvoiceDate gte '2019-01-01 00:00:00' and dtInvoiceDate lte '2019-01-31 23:59:59'
Range operator is useful to transfer the complexity of date computation to the api instead of the calling application.
The general format of the range operator is: dtInvoiceDate rg '[STARTDATE],[ENDDATE]'
Both [STARTDATE] and [ENDDATE] use the same format which is a sequence of 1 or more [SUBSECTION] so for example, we could have: dtInvoiceDate rg '[SUBSECTION],[SUBSECTION][SUBSECTION][SUBSECTION][SUBSECTION]'
Both [STARTDATE] and [ENDDATE] have a starting time equal to current time (so in this example 2019-02-25 10:15:37)
[SUBSECTION] start with an operator which can be either = to reset the pointer, + to move forward in time or - to move backward in time.
The = operator can be directly followed by a letter representing the [PERIOD] (ex: =m) to initialize the date to the start or end of the period or by a number and a letter representing the [PERIOD] (ex: =7m) to set the [PERIOD] to a specific value.
The + and - operators are followed by a number then by a letter representing the [PERIOD] (ex: +7d or -1m)
Here is a list of valid [PERIOD]
[Period] | Description |
---|---|
y | year |
m | month |
w | week |
d | day |
h | hour |
i | minute |
s | second |
= operator without a number resets the pointer to either the beginning or the end of the [Period] depending if it's being used in the [STARTDATE] or [ENDDATE]. This table shows the time when the pointer is reset
Syntax | Description | [STARTDATE] | [ENDDATE] |
---|---|---|---|
=y | year | 2019-01-01 00:00:00 | 2019-12-31 23:59:59 |
=m | month | 2019-02-01 00:00:00 | 2019-02-28 23:59:59 |
=w | week* | 2019-02-24 00:00:00 | 2019-03-02 23:59:59 |
=d | day | 2019-02-25 00:00:00 | 2019-02-25 23:59:59 |
=h | hour | 2019-02-25 10:00:00 | 2019-02-25 10:59:59 |
=i | minute | 2019-02-25 10:15:00 | 2019-02-25 10:15:59 |
=s | second | 2019-02-25 10:15:37 | 2019-02-25 10:15:37 |
* Week start day is configurable per user
= operator with a number resets the [PERIOD] to a specific value and works the same for both [STARTDATE] or [ENDDATE]. Here are some example. Please note it's not possible to reset the week like this (ex: =7w)
Syntax | Description | New Date |
---|---|---|
=2025y | year | 2025-02-25 10:15:37 |
=11m | month | 2019-11-25 10:15:37 |
=7d | day | 2019-02-07 10:15:37 |
=17h | hour | 2019-02-25 17:15:37 |
=1i | minute | 2019-02-25 10:01:37 |
=18s | second | 2019-02-25 10:15:18 |
You can combine multiple [SUBSECTION] under the same operator. For example:
[STARTDATE] and [ENDDATE] are evaluated from left to right. The order is important. For example, these values would give different results in [ENDDATE]:
Syntax | Explanation | Date From | Date To |
---|---|---|---|
sFilter=dtInvoice rg '-7d,=s' | Invoices in the last 7 days up to now | 2019-02-18 10:15:37 | 2019-02-25 10:15:37 |
sFilter=dtInvoice rg '=d-7d,=s' | Invoices in the last 7 days starting at 00:00:00 up to now | 2019-02-18 00:00:00 | 2019-02-25 10:15:37 |
sFilter=dtInvoice rg '=m-1m,=m-1m' | Invoices in the last month | 2019-01-01 00:00:00 | 2019-01-31 23:59:59 |
sFilter=dtInvoice rg '=m,=m' | Invoices in this month | 2019-02-01 00:00:00 | 2019-02-28 23:59:59 |
sFilter=dtInvoice rg '=m-1m+10d,=s' | Invoices since the 10th of last month up to now | 2019-01-10 00:00:00 | 2019-02-25 10:15:37 |
sFilter=dtInvoice rg '-10h,=d8h+1d1s' | Invoices in the last 10 hours up to 9h00 tomorrow morning | 2019-02-25 00:15:37 | 2019-02-26 09:00:00 |
sFilter=dtInvoice rg '-1y=4mm,=3mm' | Invoices from last year second semester up to this year first quarter | 2018-04-01 00:00:00 | 2019-03-31 23:59:59 |
sFilter=dtInvoice rg '=w-3w,=w' | Invoices in the last 3 weeks (calendar week start day = Sunday) up to the end of the week | 2019-02-03 00:00:00 | 2019-03-02 23:59:59 |
sFilter=dtInvoice rg '=y,=3mm' | Invoices in the first semester | 2019-01-01 00:00:00 | 2019-03-31 23:59:59 |
sFilter=dtInvoice rg '=4mm,=6mm' | Invoices in the second semester | 2019-04-01 00:00:00 | 2019-06-30 23:59:59 |
sFilter=dtInvoice rg '=7mm,=9mm' | Invoices in the third semester | 2019-07-01 00:00:00 | 2019-09-30 23:59:59 |
sFilter=dtInvoice rg '=10mm,=y' | Invoices in the last semester | 2019-10-01 00:00:00 | 2019-12-31 23:59:59 |
We use standard HTTP Status Codes to return details about completed function calls.
You should always validate the HTTP response's status code before trying to read the content of the body. Our SDKs do this automatically. In each of the documented function, we document only the function's specific return code to facilitate the reading of the documentation. Even if a generic return code is not documented at the function's level, it could be returned by the API.
HTTP Status Code | Meaning | Detail |
---|---|---|
200 | OK | The request completed successfully and valid data was returned in the body |
201 | Created | The request completed successfully. Some elements were created and details about the created items was returned in the body |
204 | No Content | The request completed successfully. There was no need to return any data in the body |
403 | Forbidden | The request is not allowed to be executed. Look for detail about the error in the body |
404 | Not Found | The request failed. The element on which you were trying to work does not exists. Look for detail about the error in the body |
406 | Not Acceptable | The URL is valid, but one of the Accept header is not defined or invalid. For example, you set the header "Accept: application/json" but the function can only return "Content-type: image/png" |
422 | Unprocessable entity | The request was syntactically valid but failed because of an interdependance condition. Look for detail about the error in the body |
HTTP Status Code | Meaning | Detail |
---|---|---|
400 | Bad Request | The request does not meet specifications. For example: an invalid type for a variable, a value that does not pass validation or a protocol violation. Look for details about the error in the response's body |
401 | Unauthorized | The API Key is either not present, expired, invalid or inactive. It could also mean you are calling the API from an unauthorized IP address |
403 | Forbidden | The Provided API Key is valid, but it is not allowed to execute the request. Verify the Key's permissions |
404 | Not Found | Your request was sent to a URL that does not exist. Make sure you are calling the proper version number of the function and look for typos in the URL |
405 | Method Not Allowed | The URL is valid, but the Method is not allowed. For example, have you call a GET while the function expects a POST ? |
406 | Not Acceptable | The URL is valid, but one of the Accept header is not defined or invalid. For example, you set the header "Accept: application/json" but the function can only return "Content-type: image/png" |
429 | Too Many Requests | Too many requests were received from your API Key/IP address. Make sure to optimize your requests or ask for a limit increase. For example, make a single request to create 100 objects instead of calling 100 requests each creating a single objet |
500 | Internal Server Error | This should never happen. There is either a temporary problem that should resolve quickly or an error you should report to technical support. |
501 | Not Implemented | Endpoint not yet available in your region or environment |
503 | Service Unavailable | This should never happen. There is either a temporary problem that should resolve quickly or an error you should report to technical support |
These codes can only be generated for User type API Key. The API, Delegated and Special types keys will never return such codes. (See Authorization section for more information). Most users should not be concerned with these status codes.
These codes are documented in the Activesession getCurrent endpoint only to simplify the documentation but they can be returned in any of the endpoints.
HTTP Status Code | Meaning | Detail |
---|---|---|
350 | Authentication required | User must authenticate because session is invalid |
351 | Phone Validation required | (2FA) User needs to complete a Voice Call or SMS challenge |
352 | Question Validation required | (2FA) User needs to complete a question/answer challenge |
353 | Clause Acceptance required | User need to accept electronic signature terms and conditions |
354 | Computer Validation required | User's computer is not authorized |
355 | Password Change required | User must change it's password |
356 | Native Application Version Check | The user is not running the latest version of the native application |
These codes will be considered as a succesful delivery when they are returned by your webpage during a Webhook delivery.
HTTP Status Code | Meaning | Detail |
---|---|---|
202 | Accepted | The request has been received but not yet acted upon. It is intended for cases where another process or server handles the request, or for batch processing. |
204 | No Content | The request completed successfully. There was no need to return any data in the body |
When the API returns an HTTP status code in the range 200-299, a property could be returned indicating one or more warnings occured. The array contain objects with 2 properties:
We highly suggest you use eWarningCode to do any warning validation logic in your code or to create your own warning message for your users. sWarningMessage has more detail for a human to read, but is intended for the developper and is always returned in English.
Here is the complete list of eWarningCode you could receive.
eWarningCode | Examples |
---|---|
MUSTVERIFY | An object was changed and a verification is recommended |
When the API returns an HTTP status code in the range 400-599, a JSON object will be returned with 2 properties:
We highly suggest you use eErrorCode to do any error validation logic in your code or to create your own error message for your users. sErrorMessage has more detail for a human to read, but is intended for the developper and is always returned in English.
Here is the complete list of eErrorCode you could receive for each HTTP status code and examples of situations where they could be returned.
eErrorCode | Examples |
---|---|
BADREQUEST | Unserializable JSON, invalid parameter, invalid signature, invalid fingerprint |
BADREQUEST_CLOCKSKEW | The time on the client computer is wrong |
eErrorCode | Examples |
---|---|
UNAUTHORIZED_BADAUTH | Invalid credentials during Authentication |
UNAUTHORIZED_BADMFA | Invalid response to the MFA challenge |
UNAUTHORIZED_EXPIRED | Credentials have expired |
UNAUTHORIZED_REQUEST | The request is invalid (bad ip source, fingerprint, signature, etc) |
UNAUTHORIZED_REQUEST_APIKEY | The API Key is invalid |
UNAUTHORIZED_REQUEST_PRESIGNED | The presigned URL is invalid |
eErrorCode | Examples |
---|---|
FORBIDDEN | Generic Forbidden |
FORBIDDEN_CONFIGURATION | A configured setting prevent access to the element |
FORBIDDEN_MODULE | Module is not activated |
FORBIDDEN_NOACCESS | Not allowed to access the element |
FORBIDDEN_PERMISSION | Missing a permission to access the route |
FORBIDDEN_SUBSCRIPTION | Your plan does not allow access to this feature |
FORBIDDEN_SUBSCRIPTION_EZSIGN_PLAN | Your Ezsign plan does not allow access to this feature |
FORBIDDEN_USERTYPE | This type of User is forbidden for the route |
FORBIDDEN_USER_ORIGIN_EXTERNAL | Can't modify user informations. |
eErrorCode | Examples |
---|---|
NOTFOUND | Generic not found |
NOTFOUND_OBJECT | Object does not exist in database |
NOTFOUND_ROUTE | The route does not exist (url, API version) |
eErrorCode | Examples |
---|---|
METHODNOTALLOWED | The route is valid but the method is not allowed ex: POST on a GET only route |
eErrorCode | Examples |
---|---|
NOTACCEPTABLE_CONTENT | The route is valid but the Accept header is not allowed ex: "application/json" vs "image/png" |
NOTACCEPTABLE_LANGUAGE | The route is valid but the Accept-Language header is not allowed ex: "en" vs "es" |
eErrorCode | Examples |
---|---|
CONTENT_TOO_LARGE | The content of the request is too large |
eErrorCode | Examples |
---|---|
UNPROCESSABLEENTITY_ACTIVESESSION_ALREADY_CLONING | The user is already cloning another user |
UNPROCESSABLEENTITY_CANNOTDELETE | The element cannot be deleted |
UNPROCESSABLEENTITY_CANNOTMODIFY | The element cannot be modified |
UNPROCESSABLEENTITY_CHANGEPASSWORD_INVALID_CURRENT | The old password supplied does not match the user's current password |
UNPROCESSABLEENTITY_CHANGEPASSWORD_SAME | The new password is the same as the old password |
UNPROCESSABLEENTITY_DATA_MISSING | Some data is missing |
UNPROCESSABLEENTITY_DATA_UNIQUE | The data fails unique check : value exist in other element |
UNPROCESSABLEENTITY_DATA_VALIDATION | The data fails some validation |
UNPROCESSABLEENTITY_DATA_OUTOFBOUND | The data contains a value that is out of bound |
UNPROCESSABLEENTITY_DOWNLOAD_ERROR | We cannot retrieve ressource at supplied url |
UNPROCESSABLEENTITY_EZSIGNFORM_VALIDATION | The validation of the Ezsignform returned some errors |
UNPROCESSABLEENTITY_EZSIGNELEMENTDEPENDENCY_LOOP | We detected a loop in the Ezsignelementdependcy |
UNPROCESSABLEENTITY_EZSIGNELEMENTDEPENDENCY_MISSINGEZSIGNTEMPLATESIGNERREFERENCE | An Ezsignelementdependency has an Ezsigntemplatesigner not assigned |
UNPROCESSABLEENTITY_EZSIGNSIGNATURE_SIGNED | The Ezsignsignature is already signed |
UNPROCESSABLEENTITY_EZSIGNSIGNERCONNECTED | The Ezsignsigner is connected |
UNPROCESSABLEENTITY_NOTHINGTODO | The request was valid, but no action was necessary |
UNPROCESSABLEENTITY_NOTREADY | The element is not in a state that allows the action (Sending a document without signature, downloading an unsigned document) |
UNPROCESSABLEENTITY_PDF_FORM | The pdf document contains a form |
UNPROCESSABLEENTITY_PDF_SIGNATURE | The pdf document contains a signature(s) |
UNPROCESSABLEENTITY_PDF_FORM_AND_SIGNATURE | The pdf document contains a form and signature(s) |
UNPROCESSABLEENTITY_PDF_INCOMPATIBLE | The pdf document cannot be signed |
UNPROCESSABLEENTITY_PDF_PASSWORD | The pdf document contains a password and cannot be signed |
UNPROCESSABLEENTITY_PDF_WRONG_PASSWORD | The password cannot open the pdf document since it's incorrect |
UNPROCESSABLEENTITY_PDF_REPAIRABLE | The pdf document contains errors and can be repaired |
UNPROCESSABLEENTITY_PDF_XFA | The pdf document contains XFA form and cannot be signed |
UNPROCESSABLEENTITY_TEMPLATE_MISMATCH | The number of pages between the document and the template do not match |
UNPROCESSABLEENTITY_UNMODIFIABLE_FIELD | The field is not modifiable in the current state |
UNPROCESSABLEENTITY_USER_STAGED | The user can't connect since it's currently staged |
eErrorCode | Examples |
---|---|
TOOMANYREQUESTS | The client reached the maximum number of requests allowed in the specific time |
TOOMANYREQUESTS_THIRDPARTY | Our server encountered a 'Too Many Requests' error from a third party |
eErrorCode | Examples |
---|---|
ERROR_INTERNAL | Unhandled error on server |
ERROR_CONFIGURATION | A parameter on the server is not configured properly |
eErrorCode | Examples |
---|---|
ERROR_NOTIMPLEMENTED | Endpoint not yet available in your region or environment |
A Webhook (also called a web callback or HTTP push API) is a way for your application to be notified of an event in real time.
For example, if you send a contract for signing and need to be notified as soon as it get signed.
You could program a loop to query the document status every 5 minutes for many days until you receive a response saying the document is signed. This is a bad approach as it will waste a lot of resources everytime you make a call to the API for no reason.
A better approach would be to configure a webhook in the eZmax's administration console to watch for a specific event. In this exemple, the event to monitor is "DocumentCompleted" from the module "Ezsign". This way, as soon as the document gets signed, a request will be made to YOUR server to let you know about the event that just happened.
When you configure eZmax to notify you of events, you must provide your server's URL and a fallback email address. The URL provided must use HTTPS for security reasons.
Look for red indicators with the word "EVENT" throughout the documentation to see currently available Webhooks events you can subscribe to. If you have a need for an event that is not available, please send a feature request to technical support.
You can enable request signing in the webhook configuration section. This will add an extra layer of security by adding an Authorization, a Date, a Fingerprint and a Signature to each request that you can validate. This can help to authenticate the request, prevent forgery and prevent replay attacks.
The following HTTP headers will be added to each request:
You can read more on Request Signing in the Security section of the documentation.
In eZmax's administration module, you'll find a "Test" button that you can use as many time as you need to test your server code easily with a sample event.
eZmax will attempt to deliver the event to your server instantly but will retry many times if your server does not respond successfully for some reason (see schedule below). After all attempts are exhausted, the event will be forwarded to the configured fallback email in the same format as the webhook. The email body will contain the JSON request in the same format as the webhook. This way, you'll be able to send the request to your server using Postman, Curl or similar tool.
This is the approximate retry schedule. Since there is a 30 seconds timeout on each try, there could be a cumulative overhead up to 3½ minutes.
Minutes after previous step | Minutes after event | Method |
---|---|---|
N/A | 0 | HTTPS |
1 | 1 | HTTPS |
5 | 6 | HTTPS |
15 | 21 | HTTPS |
15 | 36 | HTTPS |
15 | 51 | HTTPS |
15 | 66 | HTTPS |
0 | 66 |
If you don't receive the event on the first attempt, there will be debugging information about each previous attempt in the body of the event. You'll be able to see the timestamp of each previous attempt and the return code returned by your server or a timeout indication if your server hasn't replied.
All notable changes to this project will be documented in this section.
Version numbers are using MAJOR.MINOR.PATCH numbering format for example 1.2.23
MAJOR will be incremented only if there is an incompatible breaking change. New distinct documentation and specification files will be published.
MINOR will be incremented only if a function becomes deprecated or deleted (after being deprecated in a previous version)
PATCH will be incremented everytime changes and additions are released.
For each version, there will be the list of changes:
Removal lifecycle
Once a function becomes Deprecated, we monitor its usage to track how many users are still using it.
After a long period of time, if a minority of users are still using the function, we might ask users to update to the newer version of the function and give them ample time to do so.
Only after that delay expires (or no more users are still using it), we will have the function Removed.
Documentation and changelog for older releases can be found here
Franchisebroker contains detail about a brokerage in the franchise administration module
Get the list of Franchisebroker to be used in a dropdown or autocomplete control.
sSelector required | string Value: "All" The type of Franchisebrokers to return |
eFilterActive | string Default: "Active" Enum: "All" "Active" "Inactive" Specify which results we want to display. |
sQuery | string Allow to filter the returned results |
Accept-Language | string (Header-Accept-Language) Enum: "*" "en" "fr" Example: en The language of the returned content.
|
{- "mPayload": {
- "a_objFranchisebroker": [
- {
- "sFranchisebrokerName": "Default",
- "pkiFranchisebrokerID": 61,
- "bFranchisebrokerIsactive": true
}
]
}, - "objDebugPayload": {
- "iVersionMin": 1,
- "iVersionMax": 2,
- "a_RequiredPermission": [
- 117
], - "bVersionDeprecated": false,
- "dtResponseDate": "2020-12-31 23:59:59"
}, - "objDebug": {
- "sMemoryUsage": "11,923MB",
- "sRunTime": "0.6084s",
- "iSQLSelects": 3,
- "iSQLQueries": 6,
- "a_objSQLQuery": [
- {
- "sQuery": "SELECT * FROM table",
- "fDuration": 0.0001
}, - {
- "sQuery": "SELECT * FROM table",
- "fDuration": 0.0001
}
]
}
}
Franchiseoffice contains detail about a brokerage's office in the franchise administration module
Get the list of Franchiseoffice to be used in a dropdown or autocomplete control.
sSelector required | string Value: "All" The type of Franchiseoffices to return |
eFilterActive | string Default: "Active" Enum: "All" "Active" "Inactive" Specify which results we want to display. |
sQuery | string Allow to filter the returned results |
Accept-Language | string (Header-Accept-Language) Enum: "*" "en" "fr" Example: en The language of the returned content.
|
{- "mPayload": {
- "a_objFranchiseoffice": [
- {
- "sFranchiseofficeDescription": "Default",
- "pkiFranchiseofficeID": 50,
- "bFranchiseofficeIsactive": true
}
]
}, - "objDebugPayload": {
- "iVersionMin": 1,
- "iVersionMax": 2,
- "a_RequiredPermission": [
- 117
], - "bVersionDeprecated": false,
- "dtResponseDate": "2020-12-31 23:59:59"
}, - "objDebug": {
- "sMemoryUsage": "11,923MB",
- "sRunTime": "0.6084s",
- "iSQLSelects": 3,
- "iSQLQueries": 6,
- "a_objSQLQuery": [
- {
- "sQuery": "SELECT * FROM table",
- "fDuration": 0.0001
}, - {
- "sQuery": "SELECT * FROM table",
- "fDuration": 0.0001
}
]
}
}
Franchisereferalincome contains detail about a referal income in the franchise administration module
The endpoint allows to create one or many elements at once.
required | Array of objects (franchisereferalincome-RequestCompound) non-empty |
{- "a_objFranchisereferalincome": [
- {
- "pkiFranchisereferalincomeID": 35,
- "fkiFranchisebrokerID": 61,
- "fkiFranchisereferalincomeprogramID": 51,
- "fkiPeriodID": 21,
- "dFranchisereferalincomeLoan": "500275.62",
- "dFranchisereferalincomeFranchiseamount": "275.00",
- "dFranchisereferalincomeFranchisoramount": "385.00",
- "dFranchisereferalincomeAgentamount": "800.00",
- "dtFranchisereferalincomeDisbursed": "2020-12-31",
- "tFranchisereferalincomeComment": "This is a comment",
- "fkiFranchiseofficeID": 50,
- "sFranchisereferalincomeRemoteid": "string",
- "objAddress": {
- "fkiAddresstypeID": 1,
- "sAddressCivic": "2540",
- "sAddressStreet": "Daniel-Johnson Blvd.",
- "sAddressSuite": "610",
- "sAddressCity": "Laval",
- "fkiProvinceID": 11,
- "fkiCountryID": 1,
- "sAddressZip": "H7T2S3",
- "fAddressLongitude": "doej",
- "fAddressLatitude": "doej"
}, - "a_objContact": [
- {
- "fkiContacttitleID": 2,
- "fkiLanguageID": 2,
- "sContactFirstname": "John",
- "sContactLastname": "Doe",
- "sContactCompany": "eZmax Solutions Inc.",
- "dtContactBirthdate": "1980-01-01",
- "objContactinformations": {
- "iAddressDefault": 0,
- "iPhoneDefault": 0,
- "iEmailDefault": 0,
- "iWebsiteDefault": 0,
- "a_objAddress": [
- {
- "fkiAddresstypeID": 1,
- "sAddressCivic": "2540",
- "sAddressStreet": "Daniel-Johnson Blvd.",
- "sAddressSuite": "610",
- "sAddressCity": "Laval",
- "fkiProvinceID": 11,
- "fkiCountryID": 1,
- "sAddressZip": "H7T2S3",
- "fAddressLongitude": "doej",
- "fAddressLatitude": "doej"
}
], - "a_objPhone": [
- {
- "pkiPhoneID": 1,
- "fkiPhonetypeID": 1,
- "ePhoneType": "Local",
- "sPhoneRegion": "514",
- "sPhoneExchange": "990",
- "sPhoneNumber": "1516",
- "sPhoneInternational": "15149901516",
- "sPhoneExtension": "123",
- "sPhoneE164": "+15149901516"
}
], - "a_objEmail": [
- {
- "pkiEmailID": 22,
- "fkiEmailtypeID": 1,
- "sEmailAddress": "email@example.com"
}
],
}
}
]
}
]
}
{- "mPayload": {
- "a_pkiFranchisereferalincomeID": [
- 35
]
}, - "objDebugPayload": {
- "iVersionMin": 1,
- "iVersionMax": 2,
- "a_RequiredPermission": [
- 117
], - "bVersionDeprecated": false,
- "dtResponseDate": "2020-12-31 23:59:59"
}, - "objDebug": {
- "sMemoryUsage": "11,923MB",
- "sRunTime": "0.6084s",
- "iSQLSelects": 3,
- "iSQLQueries": 6,
- "a_objSQLQuery": [
- {
- "sQuery": "SELECT * FROM table",
- "fDuration": 0.0001
}, - {
- "sQuery": "SELECT * FROM table",
- "fDuration": 0.0001
}
]
}
}
Get the list of Period to be used in a dropdown or autocomplete control.
sSelector required | string Enum: "ActiveNormal" "ActiveNormalAndEndOfYear" "AllNormal" "AllNormalAndEndOfYear" The type of Periods to return |
eFilterActive | string Default: "Active" Enum: "All" "Active" "Inactive" Specify which results we want to display. |
sQuery | string Allow to filter the returned results |
Accept-Language | string (Header-Accept-Language) Enum: "*" "en" "fr" Example: en The language of the returned content.
|
{- "mPayload": {
- "a_objPeriod": [
- {
- "sPeriodYYYYMM": "2202-12",
- "pkiPeriodID": 21,
- "bPeriodIsactive": true
}
]
}, - "objDebugPayload": {
- "iVersionMin": 1,
- "iVersionMax": 2,
- "a_RequiredPermission": [
- 117
], - "bVersionDeprecated": false,
- "dtResponseDate": "2020-12-31 23:59:59"
}, - "objDebug": {
- "sMemoryUsage": "11,923MB",
- "sRunTime": "0.6084s",
- "iSQLSelects": 3,
- "iSQLQueries": 6,
- "a_objSQLQuery": [
- {
- "sQuery": "SELECT * FROM table",
- "fDuration": 0.0001
}, - {
- "sQuery": "SELECT * FROM table",
- "fDuration": 0.0001
}
]
}
}