Control Panel & Metrics

Real-time monitoring of queries, API quotas, and SUNAT bulk synchronizations.

TOTAL REQUESTS 📈
0
TAXPAYERS IN DATABASE 🏢
0
TIER 3 API CONSUMPTION 🌐
0
IMPORT STATUS ⏱️
IDLE

Daily Volume of Inquiries (Approved vs. Failed)

Real-time breakdown of queries across the last 14 days

Last 14 Days

Overall Resolution Distribution

Global Approved vs Failed ratio

Monthly Consumption of API Quotas

Active consumption vs. allocated monthly credit caps

Current Calendar Month

Live Synchronization Monitor

Automated ETL extraction and atomic Blue/Green shadow database swapping

Current Phase: STANDBY (IDLE)
Elapsed Duration: 0s
0% Completed 0 records processed
Lines Read 0
Valid Records 0
Corrupted Lines 0
Read Interruption 0 ms (Shadow Swap)

Automated Daily Schedule (Cron)

Default: 30 4 * * * (Every day at 4:30 AM).

Historical Sync Duration (Seconds)

Ingestion Audit & History Log

ID Started At Type Valid Records New Updated Duration File Size Status

External API Provider Governance

Manage tokens, toggle failover gateways, and control monthly query limits.

Live RUC Query Console

Directly test search requests against Tier 1 Cache, Tier 2 Database, and Tier 3 API Fallback.

Try testing: 20131312955 (SUNAT) | 20100070970 (Supermercados Peruanos) | 20552103816

WordPress Integration & Docker Deployment Guide

Connect your external WordPress platform to this standalone microservice securely.

1. Microservice REST Endpoint

Any external WordPress instance can query taxpayers via a lightweight HTTP POST or GET request:

POST http://<MICROSERVICE_IP>:3000/api/ruc
Content-Type: application/json

{"ruc": "20131312955"}

2. PHP Integration Snippet for functions.php

Add this helper to your WordPress theme with 30-day Transient caching to minimize network overhead:

function lookup_sunat_ruc( $ruc ) {
    $ruc = trim( $ruc );
    if ( ! preg_match( '/^[0-9]{11}$/', $ruc ) ) {
        return new WP_Error( 'invalid_ruc', 'RUC must contain exactly 11 digits.' );
    }

    $cache_key = 'sunat_ruc_' . $ruc;
    $cached = get_transient( $cache_key );
    if ( false !== $cached ) return $cached;

    $url = 'http://127.0.0.1:3000/api/ruc/' . $ruc;
    $res = wp_remote_get( $url, [ 'timeout' => 5 ] );
    if ( is_wp_error( $res ) ) return $res;

    $data = json_decode( wp_remote_retrieve_body( $res ), true );
    if ( ! empty( $data['success'] ) && ! empty( $data['data'] ) ) {
        set_transient( $cache_key, $data['data'], 30 * DAY_IN_SECONDS );
        return $data['data'];
    }

    return new WP_Error( 'not_found', $data['message'] ?? 'Taxpayer not found.' );
}

3. Docker Compose Production Deployment

Deploy and maintain the microservice on any VPS with a single command:

docker compose up -d