How to build requests
API request consists of the following parts:
Server URL | https://api.intellisoft.ee/ |
Company alias | mycompany |
API component | Category of request such as units, salesorders etc |
id | Sometimes optional id of document to be requested, updated or deleted |
Various params | Optional parameters for searching, pagination, procedures parameters etc |
Request example (list all units from "democompany" database):
https://api.intellisoft.ee/democompany/units/
API methods
Profit API uses next HTTP methods:
- GET - read documents list or one document with full data
- POST - insert new document or update existing document
- DELETE - delete existing document
Results pagination
Pagination is possible using _pageNo and _pageLength:
GET https://api.intellisoft.ee/democompany/units/?_pageNo=0&_pageLength=50
_pageNo starts with 0 (default value), Default _pageLength is 50.
Filtering
Filtering is possible using _filter request.
Filter clauses presented by JSON array of records with next fields:
- field - any document field could be used in filter.
- operator - filter condition binary operator. Allowed operators are:
- >
- <
- >=
- <=
- =
- <>
- like
- value - searched value
Sample filter request
_filter=[{"field": "date", "operator": ">", "value": "2017-11-15"}, {"field": "date", "operator": "<", "value": "2017-11-17"}, {"field": "summaryRows", "operator": "like", "value": "%Volvo%"}]
NB! filter data (between [...]) should be URL encoded!
Sort order
Use _orderBy and _sortDir:
GET https://api.intellisoft.ee/democompany/units/?_orderBy=id&_sortDir=desc
When _sortDir is omitted, ascending sort order being used.
Debug information
Debug information returned when HTTP Request header X-DEBUG is set to integer larger than 0
Profit API v 0.1.4.2 beta, © Intellisoft OÜ 2017 - 2024