What does the Defontana API allow?
Defontana publishes a REST API with documentation for Chile and a test environment separate from production. It authenticates with the client and company IDs Defontana assigns, plus a user and password, and returns a token. Every new token invalidates the same user's earlier tokens, so all the integration's processes must share one.
It covers what a HubSpot integration needs: clients with tax ID and line of business, products, price lists and stock, quotes, orders and sales documents, including credit and debit notes.
What should sync and in which direction?
Usually HubSpot owns the sales stage and Defontana the accounting one. The client is born in HubSpot and, when the deal is won, it is looked up by tax ID in Defontana and created if it does not exist. Products and prices travel the other way, from Defontana, so HubSpot quotes use the same codes as the invoice.
The won deal triggers the order or the sale in Defontana with data already validated. On the way back, the invoice updates the deal and the company in HubSpot with the number, date, amount and SII status. Write these rules down before coding: that is what prevents duplicates.
What should you watch with electronic invoicing?
Defontana issues it: for electronic documents, the API assigns the invoice number automatically from the company's authorized number ranges and lets you query the document's status with the SII. HubSpot has its own invoices, but they are not electronic tax documents; it only shows what the ERP issued.
Typical errors are data errors: a mistyped tax ID, an empty line of business, an incomplete tax address, products without a code in Defontana or different payment terms. Validate those fields in HubSpot before the deal is won and test first in the test environment, with real documents from your operation in Chile.
How do you know the integration is still working?
Since Defontana does not notify through webhooks, the integration polls periodically and leaves a trail. In HubSpot, the Record Source property shows which records the integration created, and the app keeps a log of its calls. A daily report by source shows whether invoices keep arriving.
Define a silence alert: if no invoice arrives on a business day, someone gets a notice that same morning. And leave an owner with access to the code, the Defontana credentials and the documentation. In companies across Chile and Latin America, an invoice that never reaches the CRM is usually discovered when collections calls the wrong salesperson.