Skip to main content

Create Supplier

curl -X POST https://api.example.com/proveedor \
  -H "Content-Type: application/json" \
  -d '{
    "ruc": "20123456789",
    "nombre": "Distribuidora ABC S.A.C.",
    "telefono": "014567890",
    "direccion": "Av. Industrial 1000",
    "correo": "[email protected]",
    "estado": true
  }'
{
  "id": 1,
  "ruc": "20123456789",
  "nombre": "Distribuidora ABC S.A.C.",
  "telefono": "014567890",
  "direccion": "Av. Industrial 1000",
  "correo": "[email protected]",
  "estado": true
}

Request Body

ruc
string
required
Supplier’s tax identification number (RUC)
nombre
string
required
Supplier’s business name
telefono
string
Supplier’s phone number
direccion
string
Supplier’s address
correo
string
Supplier’s email address
estado
boolean
default:"true"
Supplier active status. Automatically set to true on creation.

Response Fields

id
number
Unique supplier identifier
ruc
string
Supplier’s RUC
nombre
string
Supplier’s business name
telefono
string
Supplier’s phone number
direccion
string
Supplier’s address
correo
string
Supplier’s email address
estado
boolean
Supplier active status

List All Suppliers

curl -X GET https://api.example.com/proveedor
[
  {
    "id": 1,
    "ruc": "20123456789",
    "nombre": "Distribuidora ABC S.A.C.",
    "telefono": "014567890",
    "direccion": "Av. Industrial 1000",
    "correo": "[email protected]",
    "estado": true
  },
  {
    "id": 2,
    "ruc": "20987654321",
    "nombre": "Importaciones XYZ E.I.R.L.",
    "telefono": "013456789",
    "direccion": "Jr. Comercio 500",
    "correo": "[email protected]",
    "estado": true
  }
]

Get Supplier by ID

curl -X GET https://api.example.com/proveedor/1
{
  "id": 1,
  "ruc": "20123456789",
  "nombre": "Distribuidora ABC S.A.C.",
  "telefono": "014567890",
  "direccion": "Av. Industrial 1000",
  "correo": "[email protected]",
  "estado": true
}

Path Parameters

id
number
required
Supplier ID

Get Supplier by RUC

curl -X GET https://api.example.com/proveedor/buscar?ruc=20123456789
{
  "id": 1,
  "ruc": "20123456789",
  "nombre": "Distribuidora ABC S.A.C.",
  "telefono": "014567890",
  "direccion": "Av. Industrial 1000",
  "correo": "[email protected]",
  "estado": true
}

Query Parameters

ruc
string
required
Supplier’s tax identification number

Update Supplier

curl -X PUT https://api.example.com/proveedor/1 \
  -H "Content-Type: application/json" \
  -d '{
    "ruc": "20123456789",
    "nombre": "Distribuidora ABC S.A.C.",
    "telefono": "014567999",
    "direccion": "Av. Industrial 1000, Oficina 201",
    "correo": "[email protected]",
    "estado": true
  }'
{
  "id": 1,
  "ruc": "20123456789",
  "nombre": "Distribuidora ABC S.A.C.",
  "telefono": "014567999",
  "direccion": "Av. Industrial 1000, Oficina 201",
  "correo": "[email protected]",
  "estado": true
}

Path Parameters

id
number
required
Supplier ID to update

Request Body

ruc
string
required
Supplier’s tax identification number (RUC)
nombre
string
required
Supplier’s business name
telefono
string
Supplier’s phone number
direccion
string
Supplier’s address
correo
string
Supplier’s email address
estado
boolean
Supplier active status

Delete Supplier

curl -X DELETE https://api.example.com/proveedor/1

Path Parameters

id
number
required
Supplier ID to delete

Deactivate Supplier

curl -X PUT https://api.example.com/proveedor/desactivar/1

Path Parameters

id
number
required
Supplier ID to deactivate
This endpoint sets the supplier’s estado field to false without deleting the record.

Activate Supplier

curl -X PUT https://api.example.com/proveedor/activar/1

Path Parameters

id
number
required
Supplier ID to activate
This endpoint sets the supplier’s estado field to true.

Build docs developers (and LLMs) love