Authentication
The API accepts API key authentication or, in the web app, a signed-in session (session cookie).
Priority: web session vs API key
If the client already has a valid abaco web session (e.g. a browser where you are signed in), that session takes priority over an API key header on the same request. To test a key-based integration, use a client without a session (script, Postman, private window without login) or your backend.
Token format
The token must be in the form:
<Key ID>:<Secret>When a key is created, the Secret is generated as base64url (URL-safe, similar to standard base64). Illustrative example:
abk_abc123:your_base64url_secretThe first : separates Key ID and Secret; secrets generated by abaco do not contain :.
How to send it
Option 1: Authorization header (recommended)
Authorization: Bearer abk_abc123:your_base64url_secretOption 2: X-API-Key header
X-API-Key: abk_abc123:your_base64url_secretExample with curl
Replace YOUR_KEY_ID, YOUR_SECRET and https://api.abaco.hn with your values:
curl -X GET "https://api.abaco.hn/business-partners" \
-H "Authorization: Bearer YOUR_KEY_ID:YOUR_SECRET"Error responses (code in JSON body)
| HTTP | Code | Meaning |
|---|---|---|
| 401 | TOKEN_MISSING | Missing authentication (session or API key). |
| 401 | INVALID_API_KEY | API key credentials are not usable (wrong, revoked, or not bound to a valid context). |
| 401 | API_KEY_EXPIRED | The key has an expiration date that has passed. |
| 401 | TOKEN_EXPIRED / INVALID_TOKEN / SESSION_EXPIRED | Web session issues, not API key. |
| 403 | WEB_SESSION_REQUIRED | Route is web-app only (e.g. change company or user management). |
| 403 | API_KEY_MANAGEMENT_FORBIDDEN | Key management is not available with an API key. Use the web app. |
| 403 | API_KEY_DELETE_FORBIDDEN | API keys cannot perform DELETE; use the web app. |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests. See Rate limits. |
Responses usually include a Spanish message as well as code.
API keys are not managed through documented integration flows: create and revoke only in the web app (abaco.hn → Settings > Integrations), for business proprietor or administrator roles.
DELETE operations: with an API key, any DELETE returns 403 (API_KEY_DELETE_FORBIDDEN). Remove records in the web app, or use cancel/reversal POST flows when the API exposes them.
Company scope: with an API key, every request stays in that key's company. Do not try to switch company in the body or query.
Best practices: treat the key as a trusted credential (rotate it; server-side only; never in public frontends).