Skip to main content

Overview

The Supplier Service (jea-proveedor) manages supplier relationships and information for Sistema de Ventas. It maintains a comprehensive supplier database integrated with the purchase order system.

Key Features

Supplier Profiles

Complete supplier information including company details and contact information

RUC Identification

RUC (tax identification) number for legal compliance and tracking

Contact Management

Phone, email, and physical address for supplier communications

Status Tracking

Active/inactive status management for supplier relationships

Purchase Integration

Direct integration with purchase order system

Automatic Status

Automatic active status assignment on creation

Supplier Entity Structure

The supplier entity captures essential vendor information:
@Entity
public class Proveedor {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    private String ruc;              // Tax identification number

    private String nombre;           // Company name

    private String telefono;         // Phone number

    private String direccion;        // Physical address

    private String correo;           // Email address

    private Boolean estado;          // Active/inactive status
}

Automatic Status Assignment

New suppliers are automatically set to active status:
@PrePersist
public void prePersist() {
    this.estado = true;
}
This ensures all newly created suppliers are immediately available for purchase orders.

Available Endpoints

The Supplier Service provides comprehensive supplier management:
MethodEndpointDescription
GET/proveedorList all suppliers
GET/proveedor/{id}Get supplier by ID
POST/proveedorCreate new supplier
PUT/proveedor/{id}Update supplier
DELETE/proveedor/{id}Delete supplier
GET/proveedor/activosList active suppliers only
GET/proveedor/ruc/{ruc}Find supplier by RUC

Supplier Management

Creating Suppliers

When creating a new supplier, provide:
  • Nombre - Company or business name
  • RUC - Tax identification number (Peru)
  • Telefono - Contact phone number
  • Direccion - Physical business address
  • Correo - Email address for communications
The status is automatically set to active.

Updating Supplier Information

Supplier information can be updated at any time:
  • Contact details (phone, email, address)
  • Company name changes
  • Status modifications
  • RUC corrections

Supplier Status Management

Manage supplier relationships with status flags:
  • Active - Available for new purchase orders
  • Inactive - Disabled but retained for historical data
Inactive suppliers are retained in the system to preserve purchase order history. Use the status field rather than deleting supplier records.

RUC (Tax ID) Management

What is RUC?

RUC (Registro Único de Contribuyentes) is Peru’s tax identification number for businesses:
  • 11-digit unique identifier
  • Required for legal business operations
  • Used for tax reporting and compliance
  • Essential for invoice generation

RUC Validation

Implement RUC validation to ensure:
  • Correct format (11 digits)
  • No duplicate RUC numbers
  • Valid RUC checksum
  • Active tax registration status

Purchase Order Integration

Suppliers are directly integrated with the purchase order system:

Purchase Order Creation

When creating purchase orders:
  1. Select supplier from active supplier list
  2. System validates supplier status
  3. Supplier information is linked to purchase order
  4. Supplier details are retrieved via Feign client

Supplier Purchase History

Track procurement activities:
  • View all purchase orders from each supplier
  • Calculate total spending per supplier
  • Monitor supplier delivery performance
  • Generate supplier-specific reports

Search and Filtering

Active Suppliers

Retrieve only active suppliers:
GET /proveedor/activos
Useful for purchase order creation and supplier selection. Find suppliers by tax identification:
GET /proveedor/ruc/20123456789
Quick lookup for invoice processing and tax compliance.

Supplier Evaluation

Evaluate supplier performance based on:

Quality Metrics

  • Product quality consistency
  • Defect rates and returns
  • Compliance with specifications
  • Certification and standards

Delivery Performance

  • On-time delivery rate
  • Order accuracy
  • Lead time consistency
  • Response time to inquiries

Financial Metrics

  • Pricing competitiveness
  • Payment term flexibility
  • Volume discounts
  • Total spending per supplier

Relationship Factors

  • Communication effectiveness
  • Problem resolution
  • Flexibility and responsiveness
  • Long-term reliability

Supplier Categories

Organize suppliers by categories:
  • Primary Suppliers - Main vendors for critical products
  • Secondary Suppliers - Backup vendors for continuity
  • Specialty Suppliers - Niche products or services
  • Local Suppliers - Regional vendors for specific needs

Contact Management

Communication Channels

Maintain multiple contact methods:
  • Telefono - Primary phone contact
  • Correo - Email for formal communications
  • Direccion - Physical address for visits and deliveries

Contact Best Practices

  • Keep contact information current
  • Verify email addresses periodically
  • Maintain backup contacts
  • Document communication preferences

Compliance and Documentation

Maintain compliance documentation:
  • Valid RUC registration
  • Tax compliance certificates
  • Business licenses
  • Insurance documentation

Audit Trail

Track supplier relationship history:
  • Creation date and user
  • Modification history
  • Status change records
  • Purchase order history

Best Practices

Always validate RUC format and uniqueness before creating supplier records. Verify the RUC is registered with SUNAT (Peru’s tax authority) for active suppliers.
Before creating new suppliers, search by RUC to prevent duplicate records. Multiple records for the same supplier can cause reporting issues.
Verify email addresses and phone numbers when creating supplier records. Invalid contact information can delay procurement processes.
Use the estado field instead of deleting supplier records. This preserves purchase order history while preventing new purchases from inactive suppliers.
Periodically review supplier list to identify inactive suppliers, update contact information, and evaluate supplier performance.

Supplier Lifecycle

Onboarding

1

Initial Contact

Establish contact and assess supplier capabilities
2

Documentation

Collect RUC, business licenses, and compliance documents
3

Registration

Create supplier record in the system with complete information
4

Activation

Set status to active, making supplier available for purchase orders

Active Period

  • Process purchase orders
  • Track delivery performance
  • Monitor quality metrics
  • Maintain communication

Offboarding

  • Mark supplier as inactive
  • Complete pending purchase orders
  • Archive documentation
  • Preserve historical data

Reporting and Analytics

Supplier data enables various analytics:
  • Spending Analysis - Total spending per supplier over time
  • Supplier Concentration - Risk assessment for supplier dependency
  • Performance Metrics - Delivery and quality tracking
  • Cost Trends - Price changes and negotiation opportunities

Next Steps

API Reference

Detailed supplier API documentation

Purchase Orders

Create and manage purchase orders

Inventory Control

Manage product inventory

Analytics & Reporting

Supplier performance reports

Build docs developers (and LLMs) love