Skip to content

Reference / SUNAT

Tax ID lookup

Full taxpayer record: legal name, status, condition, registered address, economic activities and registers.

GET /api/sunat/consulta-ruc/{ruc}

What it's for: Fill in a new customer's details from their tax ID, without anyone typing them.

Authentication

X-API-Key string header required
X-API-Key: tu_token
Authorization string header
Authorization: Bearer tu_token

Either one works. The token is generated from the client dashboard.

Path parameters

ruc string required
11-digit tax ID (RUC). Example: 20123456789

Response

Main fields this lookup returns:

  • nombre_o_razon_social
  • estado y condicion
  • direccion y ubigeo
  • actividades_economicas
  • sistema_emision_electronica
  • es_buen_contribuyente
  • es_agente_de_retencion

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.