Integrating without opening the database
For a long time, integrating a system with the ERP meant opening up the database: a shared SQL user, queries written against physical tables and an ODBC connection set up in the BI tool or the partner system. It works until the day the password leaks, the structure changes in an update or a heavy query freezes billing.
The GTI ERP REST API replaces that coupling with a contract. Master data, documents and transactions published in the ERP catalog appear as HTTP resources, with JSON responses, semantic names in English and labels in Portuguese, English, Spanish and Italian. Integrators depend on a documented contract, not on the name of a physical table or a database credential.
Data types were also designed with integration in mind. Decimals with fractional digits arrive as strings, without the floating-point rounding that distorts financial amounts, and precision, letter case and spacing follow the source database.
OAuth2 with PKCE and the same ERP login
Authentication follows the OAuth 2.0 standard with Authorization Code and mandatory PKCE using the S256 method. The application sends the person to the authorization screen at the company's address; they sign in with the same GTI ERP user and give consent; the application receives a single-use code and exchanges it for tokens. There is no second password for the API and no static key forgotten in a configuration file.
The access token is valid for one hour, refresh tokens rotate and revocation has its own endpoint. Each application requests only the scope it needs; to query data, the read scope. For a custom application, GTi registers a client_id with the redirect URIs provided by the partner; to explore the API, each company's Swagger already includes a ready-to-use public client.
Public documentation and a console per company
The starting point is the public developer portal, the GTI ERP developers site, which requires no login and shows no customer data. It brings together an overview, a quickstart with examples in curl, Python and JavaScript, authentication, pagination and filters, error handling and a resource reference generated from the standard catalog, with OpenAPI per module for download, in the product's four languages and with search.
Actual use happens at each company's address. That is where Swagger, with OpenAPI 3.1 documentation per module, the test console and token issuance live, all behind the person's login, and each person sees there only what their own permissions reach. To get to the console, the public portal asks for the company code and never lists or suggests which companies use the product.
Reads scoped by company
Each customer company has its own address, and the tenant is always the one in the address being called: there is no parameter to pick another one, and the API never accepts SQL, server addresses, credentials or physical table names from the request. Within the tenant, reads are limited to the companies authorized for that person. A call may name one of them; if it does not, the company chosen in the portal applies.
The company filter is applied by the server outside the expression sent by the client, so no filter, whether badly written or malicious, can reach another company's data. A context endpoint reports the company in use and the companies the person may choose, which makes it easier to debug integrations serving several companies in the group.
For queries, the API offers an OData-inspired syntax: filters with comparison and logical operators, substring search, field selection, sorting, pagination and counting, with a cap on rows per page. In production, the API is read-only: entries and settlements remain in the ERP, where the business rules live.
Where the API helps
The most common uses are recurring reads: feeding Power BI and other analytics tools without a direct database connection, bringing ERP information to customer and supplier portals, syncing data with CRM and e-commerce and automating spreadsheets that today depend on manual exports.
GTi iT Solutions follows each integration: it registers the application, advises on scopes and filters, publishes the resources the project needs in the catalog and checks behavior with the partner's team. Coverage grows as new ERP resources are published, always with the same contract, the same authentication and the same company scope.