Reference / SUNAT
Series F invoice download
Series F invoices as PDF, XML or JSON, using your SOL credentials.
POST
/api/sunat/download/factura/external/{pdf|xml|json} What it's for: Retrieve the invoice a supplier issued to you and reconcile it with your books.
Authentication
-
X-API-Keystring header required -
X-API-Key: tu_token -
Authorizationstring header -
Authorization: Bearer tu_token
Either one works. The token is generated from the client dashboard. Go to the dashboard →
Body parameters
-
ruc-empresastring required - Part of your own SOL credentials, you provide it. Example:
20123456789 -
usuario-solstring required - Part of your own SOL credentials, you provide it. Example:
USUARIO01 -
clave-solstring required - Part of your own SOL credentials, you provide it. Example:
•••••••• -
ruc-emisorstring required - Tax ID of the invoice issuer. Example:
20987654321 -
seriestring required - Invoice series. Example:
F001 -
numerostring required - Sequential number. Example:
184
Response
Main fields this lookup returns:
archivo PDF, XML o JSON
Status codes
- 200 OK
- Lookup resolved. Counts one request against the plan.
- 401 Invalid or expired token
- The authentication header is missing or the token isn't valid.
- 403 No access
- The plan doesn't cover this service, or the subscription isn't active.
- 404 Not found
- The lookup ran but returned nothing. It still counts.
- 429 Limit reached
- The period's lookups have run out.
- 500 Service error
- The official source failed to answer. Nothing is cached.