Odoo 19 app

Peru RUC DNI Lookup

Consulta RUC and consulta DNI inside the Odoo contact form

What it does

Type a RUC or a DNI and the contact is filled with the official data: razon social or RENIEC name, fiscal address with ubigeo, SUNAT status and condition, retention agent and good taxpayer flags.

Pick your provider in Settings (Decolecta / apis.net.pe, apiperu.dev or json.pe) and paste the token of your account. A SUNAT button next to a RUC, or a RENIEC button next to a DNI, fills the contact; it can also happen as soon as you finish typing the number. Press it again on an existing contact to update it (actualizar RUC) with the current datos de SUNAT: a consulta RUC y DNI whenever you need it.

The ubigeo is mapped to the district, province and department of the Peruvian localization, so the address is complete. Natural persons get their names and surnames in separate fields and a clean APELLIDOS NOMBRES contact name.

Without any token, the official SUNAT padron reducido file can refresh the status and condition of every contact with a RUC once a week. Contacts and invoices of taxpayers that are not ACTIVO or not HABIDO show a warning.

Who it is for

  • Sales teams opening new customer accounts in Peru. Typing a RUC and getting the razon social, fiscal address and district filled in saves the copy and paste from the SUNAT site, and cuts the typos that later bounce an e-invoice.
  • Purchasing departments checking suppliers. Buyers see a warning on the contact, and on the vendor bill before posting, when a supplier is not ACTIVO or is NO HABIDO, so a risky supplier is spotted before you pay.
  • Shops and service firms registering individuals by DNI. For natural persons, the RENIEC lookup fills the first name and both surnames in separate fields and can turn the DNI into the matching RUC 10.
  • Accountants keeping a large contact base current. A weekly scheduled action reads the official SUNAT padron reducido file and refreshes the status and condition of every contact with a RUC, with no provider token needed.

Features

RUC lookup
DNI lookup
SUNAT warning
Warning on bills
Search by razon social
RUC check digit
Lookup log

Setting it up

  1. Open an account with Decolecta (apis.net.pe), apiperu.dev or json.pe and copy its API token. You can skip this and pick Demo while you try the module.
  2. Go to Invoicing (or Accounting) > Configuration > Settings and find the Peru RUC / DNI lookup (SUNAT, RENIEC) section.
  3. Choose the Provider, paste the API token and click Test connection.
  4. Decide whether to keep Look up while typing, Overwrite the contact name and Warn on non ACTIVO / NO HABIDO taxpayers switched on.
  5. Open a contact, enter a RUC or DNI and click the SUNAT or RENIEC button, or let it fill in by itself when you finish typing.
  6. To refresh every RUC for free, click Refresh now under SUNAT padron reducido in the settings, or activate the weekly scheduled action named SUNAT padron reducido: refresh status and condition of contacts.

Peru RUC DNI Lookup: questions

Is there any lookup that costs nothing?

The padron reducido refresh is free and comes straight from SUNAT, but it only updates status and condition, not new contacts. RENIEC has no public service, so DNI names need a provider account. Many of the supported providers offer a free monthly quota.

Does it check that a RUC is valid before calling the provider?

Yes. The modulo 11 check digit and the RUC prefix are verified offline, and a wrong number is flagged before any request is sent.

Can I find a RUC when I only know the company name?

Yes, through Contacts > Configuration > Peru RUC / DNI > Search SUNAT by name. That search is only available with the json.pe provider. The other providers return an error saying so.

What happens if the provider is down or the token is wrong?

You get a message, and the failed call is written to the Lookup log with the number, provider, user and result. The contact itself is left as it was.

Can each company use its own provider?

Yes. The provider, token and lookup options are stored per company, so a multi-company database can use different accounts. The token field is only visible to administrators.

What does it need, and does it work on Community?

It depends on the core Peru localization (l10n_pe) and Contacts, so Community and Enterprise both work. The interface ships with English and Spanish.