Skip to content

Products ​

Catalog, prices, and sell/purchase/inventory flags. Requires authentication.

See Resource template.

Main routes ​

MethodPathDescription
GET/productsList
GET/products/:idGet
POST/productsCreate
PUT/products/:idUpdate
GET/products/searchSearch

Create product ​

POST /products
Content-Type: application/json

Main fields ​

FieldTypeRequiredDescription
namestringyesName
pricenumberyesSale price
costnumberyesCost
codestringconditionalUnique code, or use autoCode
barcodestringnoUnique if set
tax_ratenumbernoTax rate
is_sellable / is_purchasable / is_inventoriablebooleannoFlags
requiresLotControl / requiresSerialControlbooleannoDo not combine both

Example JSON ​

json
{
  "code": "PROD-001",
  "name": "API sample product",
  "description": "Created from integration",
  "barcode": "7501234567890",
  "category_id": 3,
  "price": 500.00,
  "cost": 320.00,
  "tax_rate": 15,
  "is_active": true,
  "is_sellable": true,
  "is_purchasable": true,
  "is_inventoriable": true
}

Example cURL ​

bash
curl -X POST "https://api.abaco.hn/products" \
  -H "Authorization: Bearer YOUR_KEY_ID:YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "PROD-001",
    "name": "API sample product",
    "price": 500.00,
    "cost": 320.00,
    "tax_rate": 15,
    "is_active": true,
    "is_sellable": true,
    "is_purchasable": true,
    "is_inventoriable": true
  }'

Get by ID ​

GET /products/:id
bash
curl -X GET "https://api.abaco.hn/products/5" \
  -H "Authorization: Bearer YOUR_KEY_ID:YOUR_SECRET"

Use the returned id as productId on document lines.

Common errors ​

json
{
  "error": "Ya existe un producto con ese código"
}
CodeWhen
400Invalid price/cost, duplicate code or barcode, lot+serial together
401Invalid credentials
404Product not found

Create a document with productId · API index