API: General Technical Overview
Table of Contents
The Enapps ERP REST API provides the necessary API methods to build custom client portals, applications and e-commerce integrations. The API methods are customisable and expandable as required for each client, since the Enapps ERP itself is provided as single tenant cloud service. For clarification, Enapps ERP is a customisable ERP and each implementation may have unique developments, fields, functions, restrictions etc, unique to each specific client and their individual workflows.
Enapps ERP API is in active development and new methods and features are being added and documented. Please contact your account manager if you require anything specific.
As standard we have two instances - production and development ERP instances. The Development instance gets automatically cloned from the production each weekend, so the data on the dev instances is always at most 1 week old. Please note that the dev instances may contain test transactions, which can be created by other users while testing or by Enapps automated bot which runs every night to test the platform with the latest experimental builds.
Since Development instances are cloned from Production system every weekend, any data created during the week on the dev system will not be available the following week.
In order to begin an integration with Enapps ERP, you will need to obtain an API user credentials and details. The API users can be generic or customer specific.
- Generic API user is for building multi-customer portals. i.e. - E-commerce, where different customers can login and transact online.
- Customer specific API user is an API user for a specific customer that wishes to integrate directly with Enapps ERP to transact in a similar way to EDI, but via the API.
Base API URL
LIVE ERP API URL | Base DEV ERP API URL | |
https://<server>:4095/api/v1 | https://<server>:5095/api/v1 |
Replace <server> with the actual server address. This approach allows you to differentiate between the live and development environments based on the distinct port numbers used (4095 for LIVE and 5095 for DEV).
Examples:
LIVE ERP API URL | Base DEV ERP API URL | |
https://mycompany.erp.zone:4095/api/v1 | https://mycompany.erp.zone:5095/api/v1 |
Request limits
The Enapps ERP API is implemented with rate limiting to ensure fair access as per the table below. The default limit configuration is “Basic”. If you run into time-out issues, please request a limit upgrade.
Package |
Limit |
Maximum queued requests surpassing the threshold |
Basic |
2 requests per 1 second |
10 |
Standard |
10 requests per 1 second |
50 |
Advanced |
20 requests per 1 second |
100 |
Paging
The Enapps ERP API requests is implemented with paging to handle large results efficiently. The "meta" section in the API response contains information about the total number of items available, the current page number, and the number of items per page.
Request example: /api/v1/product/get_basic?page=2
Response meta example:
"meta": {
"total_items": 15062,
"page": 2,
"per_page": 1000
}
Error responses
The Enapps ERP API typically returns error responses in a standard JSON format. For further assistance in troubleshooting, a 'failures' array is included to offer additional details to the integrator.
4xx status codes indicate an issue with the request. It is advisable not to retry the request until the underlying problem is resolved. Refer to the table below for a list of typical failure codes and their corresponding causes.
Failure Code |
Status Code |
Failure Description |
---|---|---|
badRequest |
400 |
The request is invalid; correct all issues before resending. |
unauthorized |
401 |
A valid API token is required. |
notFound |
404 |
The requested resource does not exist. |
notAcceptable |
406 |
The Accept request header must specify 'application/json;charset=UTF-8'; the Accept-Version request header if present, must reference a valid API version. |
payloadTooLarge |
413 |
The request payload is too large. |
unsupportedMediaType |
415 |
The Content-Type request header must specify 'application/json' |
tooManyRequests |
429 |
Too many requests have been received. |
Server error | 5XX |
5xx status codes show an unexpected server problem - please submit a support request if you encounter these. |