The Spanish version is the authoritative reference. View in Spanish
How does the Docupath integration work?
Gosocket uses Docupath as its Intelligent Document Processing (IDP) engine: it sends tax PDFs to the Finn vertical pipeline, Docupath interprets them with AI without templates, extracts the structured data, and returns it to Gosocket in native XML format ready for the tax pipeline.
General architectureβ
The integration consists of three mechanisms: two flows that operate over different APIs with different authentication (β and β‘), and a third one (β’) that reuses the same API and authentication as Flow β to poll for the result. Flow β’ is the integration's automatic process; Flow β‘ is simply a manual contingency for when someone approves the document by hand in the Docupath portal. Gosocket generates external_id and batch_id when sending the PDF (Flow β ); Docupath stores them and returns them unchanged as externalId + batchId in the response ZIP (Flow β‘) β or Gosocket retrieves them directly by querying the status (Flow β’), closing the traceability loop through either path.
The flowsβ
Flow β always happens: Gosocket sends the document. To get the result there are two paths: Flow β‘ is a manual contingency β it depends on someone approving the document in the Docupath portal β and Flow β’ is the automatic process, where Gosocket obtains the result on its own without depending on that approval.
Flow β uses OAuth 2.0 against the Docupath API. Flow β‘ uses Basic Auth against the Gosocket API. Flow β’ reuses the API and the access_token from flow β β it isn't a new integration, it's a different way of consuming the same API.
Flow β β Gosocket β Docupathβ
Gosocket acts as a client of the Docupath API. It sends the tax PDF and its metadata; Docupath processes it with AI and delivers the result back via flow β‘ (UploadZipDocument).
Step 1 β AuthenticationPOSTObtains the OAuth 2.0 access_token. Credentials from the Docupath portal.Step 2 β Send documentPOSTPOST /v1/documents with the PDF, external_id and batch_id.Step 3 β Processing and deliveryProcessDocupath processes with AI and delivers the result to Gosocket via flow β‘.Flow β‘ β Docupath β Gosocket (manual contingency)β
Gosocket receives the processed document through the UploadZipDocument endpoint. Once the AI engine completes processing and someone approves it manually in the Docupath portal, Docupath packages the result (XML + original PDF) into a .zip and delivers it to Gosocket. Because it depends on that manual approval, this flow is only a contingency, not the integration's automatic mechanism β that role belongs to Flow β’, described next.
Step 1 β AuthenticationBasic AuthCredentials assigned by Gosocket to Docupath, one per environment.Step 2 β Prepare the ZIPProcessPackage XML + PDF with the same base name, encode in Base64.Step 3 β Send the documentPOSTPOST /api/v1/UploadZipDocument with the Base64 ZIP, externalId and batchId.Flow β’ β Periodic polling β automatic processβ
Gosocket queries the document's status directly against the Docupath API, instead of waiting for Flow β‘ to deliver it. It exists because the transition to approved requires that manual review β autoreview doesn't behave reliably (Docupath Help Center) β and testing showed that the XML and PDF are already available from the pending_review state, before any manual approval, which lets polling resolve the document without human intervention.
Step 1 β AuthenticationOAuth 2.0Reuses the Flow β access_token.Step 2 β Poll periodicallyGETGET /v1/documents/search every 5 minutes, max. 10 retries.Step 3 β Obtain XML and PDFProcessExtract processed_info and download file_url.Document lifecycleβ
Where to go nextβ
Gosocket β DocupathFlowStep-by-step process: OAuth 2.0 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: reuses the access_token, polls every 5 minutes and extracts the XML and PDF without manual intervention.APIsReferenceFull technical reference of the four methods: authentication, parameters, examples and errors.