ARCA

issued-invoices

arca.gob.ar
InstallationInstalls just this skill for your agent
Side effectread
Authsession (an ARCA Clave Fiscal session with "Comprobantes en linea" adhered and an empresa selected; strictly same-origin, the tab must be on fe.afip.gob.ar, RCEL rides JSESSIONID with no CORS)
Needsnavigate · evaluate
Summary

List the electronic invoices a CUIT issued through ARCA's RCEL, by date range: type, number, CAE, receiver doc and total. One same-origin POST, no captcha, no async job.

Params
{"fechaDesde":"DD/MM/AAAA optional, default today","fechaHasta":"DD/MM/AAAA optional, default today","tipoComprobante":"optional: AFIP code (1 Fac A, 6 Fac B, 11 Fac C, ...) or the visible text like \"Factura C\"; blank = all","puntoDeVenta":"int|string optional","nroComprobante":"optional","tipoDocReceptor":"optional doc-type code (80 CUIT, 96 DNI, ...)","nroDocReceptor":"optional","codAutorizacion":"optional CAE to filter by"}
Returns
{"desde":"string","hasta":"string","total":"int","comprobantes":"[{fecha,tipo,comprobante:\"PtoVta-Nro\",tipoDocReceptor,nroDocReceptor,cae,importeTotal,id}] id feeds imprimirComprobante.do?c=id (PDF) and exportarComprobante.do?t=z|v&c=id (duplicado / ventas)"}
SKILL.md72 lines

arca-issued-invoices

Lists the comprobantes a taxpayer issued through RCEL (Regimen de Comprobantes en Linea), the same JSP app as arca-prepare-invoice, via its Consultas screen. Resolves in a single bridge call: the extractor POSTs the filter to buscarComprobantesGenerados.do and parses the whole result table. No AJAX, no captcha, no async queue, unlike Mis Comprobantes.

Prerequisite: an empresa must be selected. Open RCEL from the portal ("Comprobantes en linea"), pick the empresa on index_bis.jsp, and you land on menu_ppal.jsp. The extractor can then be called from any RCEL page. If the session dropped you back to the empresa/login screen, the call returns {error:"session_expired"}.

ARCA (ex AFIP) keeps its service URLs on afip.gob.ar. The catalog domain reads ARCA but the tab must be on fe.afip.gob.ar. RCEL has no CORS and authenticates with JSESSIONID, so it is same-origin: there is no way to run it from another site.

This lists what was issued through RCEL. Invoices issued from an external billing system do not appear here; those live in Mis Comprobantes (arca-received-invoices with tipo:"E").

The extractor lives as text in the site's localStorage (key arca-issued-invoices), rebuilt on each call with synchronous eval. Stored once, persists across navigation and restarts.

Default action: just call (step 1). The call reports NEEDS_STORE when the extractor is missing or out of date; only then store (step 2) and call again.

Versioning. Gated by VER (must match version in the frontmatter). When evaluate.js changes, bump both.

1. Call (do this every run: params only, single bridge call)

await (() => {
  const KEY = "arca-issued-invoices", VER = "1";
  const s = localStorage.getItem(KEY);
  if (!s || localStorage.getItem(KEY + ":ver") !== VER) return 'NEEDS_STORE';
  const fn = eval('(' + s + ')');
  return fn(document, { fechaDesde: "01/01/2026", fechaHasta: "31/12/2026" });
})()

Run this snippet verbatim. Never add an await before the eval. Only the outer await is allowed.

2. Store (only when step 1 returned NEEDS_STORE)

From a fe.afip.gob.ar tab, evaluate the following with the bridge, replacing <FN> with the contents of evaluate.js (the ( async (root, params) => { ... } ) function). Keep VER equal to the call snippet's:

(() => {
  const KEY = "arca-issued-invoices", VER = "1";
  const fn = (<FN>);
  localStorage.setItem(KEY, String(fn));
  localStorage.setItem(KEY + ":ver", VER);
  return 'stored';
})()

Returns "stored". Then go back to step 1.

Param vocabulary

tipoComprobante uses the standard AFIP codes, which differ from the emission wizard: 1 Factura A, 2/3/4 NDA/NCA/Recibo A, 6 Factura B, 7/8/9 NDB/NCB/Recibo B, 11 Factura C, 12/13/15 NDC/NCC/Recibo C. (In arca-prepare-invoice, Factura C is 2, do not reuse that table here.) Visible text ("Factura C") also works. Leave blank for all types.

tipoDocReceptor: 80 CUIT, 86 CUIL, 96 DNI, 99 Consumidor Final, etc.

Dates are DD/MM/AAAA. Both default to today, so pass a range to get history.

Reading the data

  • comprobante is "PtoVta-Nro" (e.g. "0001-00000003"); cae is the 14-digit authorization; importeTotal is the total as ARCA prints it (string, no thousands separator).
  • id is RCEL's internal id. Build follow-up URLs from it: imprimirComprobante.do?c={id} (the PDF), exportarComprobante.do?t=z&c={id} (duplicado electronico), exportarComprobante.do?t=v&c={id} (exportar ventas).
  • No pagination control was observed on small result sets; a very large range may paginate, verify against a heavy account before assuming completeness.

Errors

  • NEEDS_STORE: extractor missing or version-mismatched in this browser; run step 2 once, then retry step 1.
  • session_expired: RCEL bounced to the empresa/login screen. Re-open Comprobantes en linea, pick the empresa, retry from the menu.
  • fetch_failed: the tab is not on fe.afip.gob.ar.
  • no_result_table: the response had no results table (unexpected layout); re-open the menu and retry.

Success assertion

{ "type": "json", "jsonPath": "total" }
issued-invoices: a ARCA skill for AI browsing agents · browser-memory