Products
Product catalog, prices and stock. All routes require authentication.
Main routes
| Method | Path | Description |
|---|---|---|
| GET | /products | List products (paginated) |
| GET | /products/:id | Get a product by ID |
| POST | /products | Create a product |
| PUT | /products/:id | Update a product |
| GET | /products/search | Search products |
Example: list products
bash
curl -X GET "https://api.abaco.hn/products?page=1&limit=20" \
-H "Authorization: Bearer YOUR_KEY_ID:YOUR_SECRET"Example response (object)
json
{
"id": 5,
"code": "PROD-001",
"name": "Sample product",
"salePrice": 100.00,
"stock": 50
}Common errors
- 401: Invalid or expired API key.
- 404: Product not found.