Skip to content

Business partners ​

Customers (C) and suppliers (P). Requires authentication.

See Resource template.

Main routes ​

MethodPathDescription
GET/business-partnersList
GET/business-partners/clientsCustomers
GET/business-partners/suppliersSuppliers
GET/business-partners/:idGet
POST/business-partnersCreate
PUT/business-partners/:idUpdate

Create business partner ​

POST /business-partners
Content-Type: application/json

Main fields ​

FieldTypeRequiredDescription
namestringyesName
partner_typestringyes"C" or "P"
rtnstringrecommendedTax ID / RTN
email / phone / addressstringnoContact
is_activebooleannoDefault true
paymentConditionIdnumbernoDefault payment terms
withholds_ivabooleannoIVA withholding (SV customers only)

Field names

Use partner_type and rtn — not type / taxId.

Example JSON — customer ​

json
{
  "name": "API Demo Customer",
  "partner_type": "C",
  "rtn": "08011990123456",
  "email": "client@example.com",
  "phone": "2234-5678",
  "address": "Tegucigalpa",
  "is_active": true,
  "credit_limit": 50000,
  "credit_days_limit": 30
}

Example cURL ​

bash
curl -X POST "https://api.abaco.hn/business-partners" \
  -H "Authorization: Bearer YOUR_KEY_ID:YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "API Demo Customer",
    "partner_type": "C",
    "rtn": "08011990123456",
    "email": "client@example.com",
    "is_active": true
  }'

Use the returned id as businessPartnerId when creating documents.

Get by ID ​

GET /business-partners/:id
bash
curl -X GET "https://api.abaco.hn/business-partners/10" \
  -H "Authorization: Bearer YOUR_KEY_ID:YOUR_SECRET"
json
{
  "id": 10,
  "name": "API Demo Customer",
  "partner_type": "C",
  "rtn": "08011990123456",
  "credit_limit": 50000,
  "is_active": true
}

Open AR: Credits.

Common errors ​

json
{
  "error": "Ya existe un socio activo con ese RTN y tipo"
}
CodeWhen
400Validation / duplicate active RTN for same role C/P
401Invalid credentials
404Partner not found

API index