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
Supplier’s tax identification number (RUC)
Supplier active status. Automatically set to true on creation.
Response Fields
Unique supplier identifier
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
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
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
Request Body
Supplier’s tax identification number (RUC)
Delete Supplier
curl -X DELETE https://api.example.com/proveedor/1
Path Parameters
Deactivate Supplier
curl -X PUT https://api.example.com/proveedor/desactivar/1
Path Parameters
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
This endpoint sets the supplier’s estado field to true.