The Spanish version is the authoritative reference. View in Spanish
Docupath: Periodic polling — automatic process
Flow ② (Docupath → Gosocket) delivers the processed document via push, but it only happens once the document reaches approved status in Docupath — a transition that requires manual review in the portal, since Docupath's auto-approval ("autoreview") feature doesn't behave reliably. That's why Flow ② is only a manual contingency, not the main mechanism.
This flow (③) is the integration's automatic process: Gosocket queries the result directly on its own, every 5 minutes, without depending on anyone approving anything by hand in the portal.
Process actors
Environments
| Environment | Base URL |
|---|---|
| DEV / Testing | https://api.docupathdev.app |
| PRD / Production | https://api.docupath.app |
Same credentials and access_token as Flow ① (Gosocket → Docupath) — no additional authentication is required.
Process flow
Step 1 — Authentication
This flow reuses the OAuth 2.0 access_token obtained in Flow ①. If it expired (it lasts ~1 hour), renew it with the refresh_token before continuing polling — see POST /v1/oauth/token.
Step 2 — Poll periodically
GET /v1/documents/search?external_id={id} using the same external_id that Gosocket sent in Flow ①. Retry policy:
If the 10 attempts run out without current_status reaching pending_review or approved, the document must be flagged as pending/error in Gosocket's monitoring table for manual review — Docupath doesn't proactively notify when a document gets stuck in processing.
Step 3 — Obtain XML and PDF
As soon as the response includes processed_info, polling is considered resolved — there's no need to wait for approved: