Ir al contenido

Descargar el XML firmado

Devuelve el XML UBL 2.1 firmado (Content-Type: application/xml), con el nombre oficial que exige SUNAT en la cabecera Content-Disposition: <RUC>-<tipo>-<serie>-<correlativo>.xml (p. ej. 20000000001-03-B001-1.xml).

Método: GET

GET https://faktura-test.cgallardo.me/v1/documents/{id}/xml

Guarda el archivo con el nombre que indica la API:

Ventana de terminal
curl -OJ https://faktura-test.cgallardo.me/v1/documents/<id>/xml -H "Authorization: Bearer sk_test_..."
Estado reason Significado
200 — Devuelve el XML UBL 2.1 firmado (application/xml).
401 Unauthenticated Falta la API key, es inválida o venció.
403 ApiKeyScopeInsufficient La clave es de alcance lookup.
404 NotFound El comprobante no existe para tu clave o aún no tiene XML firmado.
429 TooManyRequests Superaste las 120 peticiones por minuto.