The Spanish version is the authoritative reference. View in Spanish
Docupath — Integration
Docupath is an Intelligent Document Processing (IDP) platform based on generative AI. Unlike traditional OCR — which reads characters — Docupath uses LLMs to understand a document's layout, language and logic without templates or rigid rules. For Gosocket, Docupath acts as the engine that turns tax PDFs (invoices, credit notes, etc.) into structured data/XML that the Gosocket pipeline can process: it isn't Gosocket that recognizes the PDF, it's Docupath.
The integration is bidirectional and consists of two flows with different endpoints and authentication, plus a third mechanism — periodic polling — that reuses the API and authentication of the first flow.
What does the Gosocket + Docupath integration do?
Integration mechanism
The integration operates over two REST APIs — the Docupath API (OAuth 2.0) and the Gosocket API (Basic Auth) — plus a third mechanism that reuses the Docupath API. Gosocket sends PDFs to the Docupath AI pipeline; the result (XML + original PDF) can arrive in two ways: via push — UploadZipDocument (Flow ②) — which is only a manual contingency, because it depends on someone approving the document by hand in the Docupath portal; or via polling — GET /v1/documents/search (Flow ③) — which is the automatic process: Gosocket checks the result every 5 minutes (max. 10 retries) without depending on that approval. Gosocket generates external_id and batch_id when sending; Docupath stores them and returns them unchanged, closing the traceability loop through either path.
See How it works for the full architecture and sequence diagrams.
Who is this documentation for?
This documentation is aimed at:
- Developers implementing the integration between Gosocket and Docupath in either direction
- Docupath technical teams configuring the delivery of processed documents to Gosocket
- Partners and integrators operating either flow in test or production environments
Where to start
If this is your first time working with this integration, follow this order:
- Read How it works to understand the bidirectional architecture and the traceability cycle
- Identify which flow you're implementing:
- Gosocket sends documents to Docupath → generate the OAuth credentials in the Docupath portal, then implement Authentication and Send document
- Docupath delivers documents to Gosocket (push, manual contingency) → request the Basic Auth credentials from the Gosocket team, then implement Prepare the ZIP and Send the document
- Gosocket polls for the result (automatic process) → no new credentials required (reuses the Flow ① access_token); implement Periodic polling
- Check the technical reference for the full details of each method
Sections in this documentation
How it worksGuideBidirectional architecture, integration model, diagrams of both flows and the document lifecycle.Gosocket → DocupathFlowStep-by-step process: authentication, sending the PDF and delivery of the result.Docupath → GosocketFlowManual contingency: preparing the ZIP and delivering the processed document when someone approves it by hand in the portal.Periodic pollingFlowAutomatic process: Gosocket queries the result directly, without depending on the push or on manual approval.APIsReferenceFull technical reference: authentication, parameters, request/response examples and error catalog.