Skip to content

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:

text
<Key ID>:<Secret>

When a key is created, the Secret is generated as base64url (URL-safe, similar to standard base64). Illustrative example:

text
abk_abc123:your_base64url_secret

The first : separates Key ID and Secret; secrets generated by abaco do not contain :.

How to send it ​

http
Authorization: Bearer abk_abc123:your_base64url_secret

Option 2: X-API-Key header ​

http
X-API-Key: abk_abc123:your_base64url_secret

Example with curl ​

Replace YOUR_KEY_ID, YOUR_SECRET and https://api.abaco.hn with your values:

bash
curl -X GET "https://api.abaco.hn/business-partners" \
  -H "Authorization: Bearer YOUR_KEY_ID:YOUR_SECRET"

Error responses (code in JSON body) ​

HTTPCodeMeaning
401TOKEN_MISSINGMissing authentication (session or API key).
401INVALID_API_KEYAPI key credentials are not usable (wrong, revoked, or not bound to a valid context).
401API_KEY_EXPIREDThe key has an expiration date that has passed.
401TOKEN_EXPIRED / INVALID_TOKEN / SESSION_EXPIREDWeb session issues, not API key.
403WEB_SESSION_REQUIREDRoute is web-app only (e.g. change company or user management).
403API_KEY_MANAGEMENT_FORBIDDENKey management is not available with an API key. Use the web app.
403API_KEY_DELETE_FORBIDDENAPI keys cannot perform DELETE; use the web app.
429RATE_LIMIT_EXCEEDEDToo 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).