Skip to main content

WebApi Overview

Overview

Interactions between Fluentis and external applications will have to be done using WebApi (REST) controllers, which are the main tool offered by Fluentis to implement and expose server-side services that can be reached by different platforms. The API call uses the standard HTTP (or HTTPS) protocol and usually uses the HTTP POST method. The various parameters are sent in the request body using the JSON format.

Method types

Considering the functionality of the method, We have these kind of WebApi method types:

Method TypeDescription
ImportUsed to import data in Fluentis. Example: Import a FSItem object.
ExportUsed to export data from Fluentis. Example: Export a FSItem object.
ServiceUsed to execute read only tasks in Fluentis. Example: Get the stock summary for a FSItem object
OperationUsed to execute read write tasks in Fluentis. Example: Unload a Sales Delivery Note document.

Authentication and Authorization

Fluentis uses Basic Authentication, and it expects a valid username and password combination in the Authorization HTTP header of the request (https://datatracker.ietf.org/doc/html/rfc7617). In few words, Fluentis expects a header field in the form of Authorization: Basic <credentials> , where <credentials> is the Base64 encoding of username and password joined by a single colon :.

The username and password are validated against Arm Service Users, and in this way is identified also the Arm Connection where the WebApi call will be executed.

Fluentis must understand the Company and Department the call needs to be executed, in base of the company and department related parameters sent in the request body. Is mandatory to identify a single Company and Department combination for the current call. If present, the rights configured for the controller and controller method are verified for the current user, company and department.

Common Parameters

NameTypeRequiredDescription
Company identification
CompanyIdintegerNoCompany Id (Id property of the Fluentis.FluentisErp.Core.FSCompany object).
CompanyCodestringNoCompany Code (Code property of the Fluentis.FluentisErp.Core.FSCompany object).
Department identification
DepartmentIdintegerNoDepartment Id (Id property of the Fluentis.FluentisErp.Core.FSDepartment object).
DepartmentCodestringNoDepartment Code (Code property of the Fluentis.FluentisErp.Core.FSDepartment object).

Company Identification

Is enough to specify CompanyId or CompanyCode parameter. If both are specified they need to correspond to the same company.

Department Identification

Is enough to specify DepartmentId or DepartmentCode parameter. If both are specified they need to correspond to the same department. The department is searched under the company identified previously.

Missing Company and Department information

The best practice is to include Company and Department information in each call. Anyway, if all 4 Company and Department related parameters are missing, Fluentis will compute the list of all the Company/Department combinations for the current user. If this list contains one and only one combination, Fluentis will use this Company and Department.