Skip to content

Documents

Invoices, quotes, credit notes and other tax or sales/purchase documents. All routes require authentication.

Main routes

MethodPathDescription
GET/documentsList documents (paginated)
GET/documents/:idGet a document by ID
POST/documentsCreate a document
PUT/documents/:idUpdate a document
POST/documents/:id/confirmConfirm a document
POST/documents/:id/cancelCancel a document

List parameters (GET /documents)

ParameterTypeDescription
pagenumberPage number (e.g. 1)
limitnumberRecords per page (e.g. 20)
typestringDocument type code
statusstringDocument status
Date filters-As per implementation

Example: list documents

bash
curl -X GET "https://api.abaco.hn/documents?page=1&limit=10" \
  -H "Authorization: Bearer YOUR_KEY_ID:YOUR_SECRET"

Example response (list)

json
{
  "documents": [
    {
      "id": 1,
      "number": "001-001-0000001",
      "type": "01",
      "businessPartnerId": 10,
      "total": 1500.00,
      "status": "confirmed",
      "createdAt": "2024-01-15T10:00:00.000Z"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 10
}

Confirm document

POST /documents/:id/confirm

Confirms a purchase document (103, 105, 106). Applies inventory and creates journal entry.

Auto-confirmation

Purchase documents 103, 105, and 106 created without automatic invoice capture are auto-confirmed on save. Those created with that flow require manual confirmation.

Unconfirm document

POST /documents/:id/unconfirm

Only for type 103. Reverses inventory and allows re-editing. Requires no confirmed payments.

Cancel document

POST /documents/:id/cancel

Cancels credit notes (06, 105), debit notes (07, 106) and imports (104).

Physical delete of drafts

Permanently deleting an unconfirmed purchase document type 103 (inventory and related entries) is only available from the web app, not with an API key.

POST /documents/:id/print

Send document by email

POST /send-document

Document types

CodeTypeModule
01Sales invoiceSales
06Sales credit noteSales
07Sales debit noteSales
100QuoteSales
101Sales orderSales
112DeliverySales
113Reservation invoiceSales
103Purchase invoicePurchases
104ImportPurchases
105Purchase credit notePurchases
106Purchase debit notePurchases
102Purchase orderPurchases
11ExpensePurchases
05Withholding certificateBoth

Common errors

  • 401: Check that the Authorization: Bearer <keyId:secret> header is correct.
  • 403: The API key's company does not have access to the resource.
  • 404: No document exists with that id.
  • 400: Validation failed (amounts, accounts, closed period, etc.)

Back to API index