API reference · tag admin
Administrative
ERP module: human resources, payroll, accounting and treasury. Documents come in as drafts (DRAFT); approvals still happen in the dashboard.
This page is generated from the contract (data/gateway-v1.json): each operation shows its verb,
path, parameters, body, responses, whether it carries an Idempotency-Key, and the equivalent method in all five SDKs.
For the end-to-end flow with complete examples, see the implementation guide.
Operations in tag admin #
Contract description: The entity’s Administrative / ERP module: human resources (employees, contracts, HR adjustments), payroll (payroll adjustments, periods, payslips, electronic payroll), accounting (draft journal entries, third parties, taxes) and treasury (draft collections, outgoing payments, receivables and statements). The API doesn’t approve, calculate or post anything: that’s done in the panel.
| Method | Path | Operation | Scope | Idem. |
|---|---|---|---|---|
| GET | /v1/gateway/admin/accounting/entries/ | Journal entries | accounting:read | — |
| POST | /v1/gateway/admin/accounting/entries/ | Create a DRAFT journal entry | accounting:write | recommended |
| GET | /v1/gateway/admin/accounting/entries/{entry_id}/ | Journal entry with its lines | accounting:read | — |
| POST | /v1/gateway/admin/accounting/taxes/compute/ | Simulate taxes and withholdings | accounting:read | — |
| GET | /v1/gateway/admin/accounting/third-parties/ | Search third parties | accounting:read | — |
| POST | /v1/gateway/admin/accounting/third-parties/ | Create or update a third party | accounting:write | recommended |
| GET | /v1/gateway/admin/accounting/third-parties/{third_party}/ | Third party (by id or document) | accounting:read | — |
| GET | /v1/gateway/admin/hr/employees/ | Search employees | hr:read | — |
| POST | /v1/gateway/admin/hr/employees/ | Create or update an employee (upsert by document) | hr:write | recommended |
| GET | /v1/gateway/admin/hr/employees/{employee}/ | Employee profile | hr:read | — |
| GET | /v1/gateway/admin/hr/employees/{employee}/contracts/ | Employee contracts | hr:read | — |
| GET | /v1/gateway/admin/hr/novelties/ | HR adjustments | hr:read | — |
| POST | /v1/gateway/admin/hr/novelties/ | Record sick leave, leave of absence, time off or vacation | hr:write | recommended |
| GET | /v1/gateway/admin/payroll/electronic/ | Electronic payroll (DIAN) status for a month | payroll:read | — |
| GET | /v1/gateway/admin/payroll/novelties/ | Payroll adjustments | payroll:read | — |
| POST | /v1/gateway/admin/payroll/novelties/ | Upload payroll adjustments (one or a batch) | payroll:write | recommended |
| GET | /v1/gateway/admin/payroll/payslips/{payslip_id}/ | Payslip with its concepts | payroll:read | — |
| GET | /v1/gateway/admin/payroll/periods/ | Payroll periods | payroll:read | — |
| GET | /v1/gateway/admin/payroll/periods/{period_id}/ | Period detail | payroll:read | — |
| GET | /v1/gateway/admin/payroll/periods/{period_id}/payslips/ | Payslips for a period | payroll:read | — |
| POST | /v1/gateway/admin/treasury/payments/ | Register a DRAFT outgoing payment | treasury:write | recommended |
| POST | /v1/gateway/admin/treasury/receipts/ | Register a DRAFT collection | treasury:write | recommended |
| POST | /v1/gateway/admin/treasury/receivables/ | Register a DRAFT billing statement (cuenta de cobro) | treasury:write | recommended |
| POST | /v1/gateway/admin/treasury/statements/ | Upload a bank statement for reconciliation | treasury:write | recommended |
| POST | /v1/gateway/admin/treasury/statements/{statement_id}/auto-match/ | Automatic statement matching | treasury:write | recommended |
Journal entries #
GET/v1/gateway/admin/accounting/entries/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
status | query | string | DRAFT | POSTED | VOID |
voucher_type | query | string | Type (CC…). |
date_from | query | string | From. |
date_to | query | string | To. |
external_id | query | string | ERP id. |
source | query | string | gateway = only those created through the API. |
q | query | string | Text or number. |
offset | query | string | Offset (pages of 100). |
Responses
| Code | Description | Body |
|---|---|---|
| 200 | List. | AdminResultList
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.accounting.list_entries()client.admin.accounting.listEntries()$client->admin->accounting->listEntries()await client.Admin.Accounting.ListEntriesAsync()client.Admin.Accounting.ListEntries(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/admin/accounting/entries/" \
-H "X-API-Key: $COMPENSE_API_KEY"Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Create a DRAFT journal entry #
POST/v1/gateway/admin/accounting/entries/
external_id: the same id returns the existing entry (created: false).Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Client-generated key that makes a write safely retryable. Replaying the same key returns the original result with idempotent_replay: true; a replay while the original is still in flight returns 409. E.g.: horizonte-2026-06-26-credit-000123 |
Request body
Content type: application/json · required
Schema AdminEntryIn — Journal entry in DRAFT. external_id (the ERP id) makes it idempotent in the engine. post: true is rejected: the accountant posts it in the panel.
| Field | Type | Description |
|---|---|---|
date required | string (date) | |
description required | string | |
external_id | string | E.g.: "ERP-AS-2026-000123" |
lines required | array of object | |
reference | string | |
third_party | string | Third-party id or document. |
voucher_type | string | E.g.: "CC" |
Accepts additional fields (additionalProperties): they're forwarded to the engine unchanged.
Responses
| Code | Description | Body |
|---|---|---|
| 200 | Registered (standard envelope; data carries the engine object). | TransactionEnvelope
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.accounting.create_entry()client.admin.accounting.createEntry()$client->admin->accounting->createEntry()await client.Admin.Accounting.CreateEntryAsync()client.Admin.Accounting.CreateEntry(ctx, …)curl -X POST "https://sandbox.dev.compense.co/gw/v1/gateway/admin/accounting/entries/" \
-H "X-API-Key: $COMPENSE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"external_id": "ERP-AS-2026-000123",
"voucher_type": "CC",
"date": "2026-11-02",
"description": "<description>",
"lines": [
{
"account": "13050501"
}
]
}'Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Journal entry with its lines #
GET/v1/gateway/admin/accounting/entries/{entry_id}/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
entry_id required | path | string | Journal entry id. E.g.: 5c9d… |
Responses
| Code | Description | Body |
|---|---|---|
| 200 | Object. | AdminObject
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.accounting.get_entry()client.admin.accounting.getEntry()$client->admin->accounting->getEntry()await client.Admin.Accounting.GetEntryAsync()client.Admin.Accounting.GetEntry(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/admin/accounting/entries/5c9d…/" \
-H "X-API-Key: $COMPENSE_API_KEY"Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Simulate taxes and withholdings #
POST/v1/gateway/admin/accounting/taxes/compute/
Request body
Content type: application/json · required
Schema AdminTaxComputeIn
| Field | Type | Description |
|---|---|---|
date | string (date) | |
items required | array of object | |
third_party | string |
Accepts additional fields (additionalProperties): they're forwarded to the engine unchanged.
Responses
| Code | Description | Body |
|---|---|---|
| 200 | List. | AdminResultList
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.accounting.compute_taxes()client.admin.accounting.computeTaxes()$client->admin->accounting->computeTaxes()await client.Admin.Accounting.ComputeTaxesAsync()client.Admin.Accounting.ComputeTaxes(ctx, …)curl -X POST "https://sandbox.dev.compense.co/gw/v1/gateway/admin/accounting/taxes/compute/" \
-H "X-API-Key: $COMPENSE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"items": []
}'Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Search third parties #
GET/v1/gateway/admin/accounting/third-parties/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
q | query | string | Name or document. |
role | query | string | customer | supplier | employee | associate |
limit | query | string | Maximum 500. |
brief | query | string | 1 = identification only. |
Responses
| Code | Description | Body |
|---|---|---|
| 200 | List. | AdminResultList
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.accounting.list_third_parties()client.admin.accounting.listThirdParties()$client->admin->accounting->listThirdParties()await client.Admin.Accounting.ListThirdPartiesAsync()client.Admin.Accounting.ListThirdParties(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/admin/accounting/third-parties/" \
-H "X-API-Key: $COMPENSE_API_KEY"Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Create or update a third party #
POST/v1/gateway/admin/accounting/third-parties/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Client-generated key that makes a write safely retryable. Replaying the same key returns the original result with idempotent_replay: true; a replay while the original is still in flight returns 409. E.g.: horizonte-2026-06-26-credit-000123 |
Request body
Content type: application/json · required
Schema AdminThirdPartyIn — Create or update a third party (upsert by document type and number). id_type accepts the DIAN code (31, 13…) or the alias (NIT, CC, CE, PA…). Bank details: panel only.
| Field | Type | Description |
|---|---|---|
business_name | string | |
email | string | |
first_last_name | string | |
first_name | string | |
id_number required | string | E.g.: "900123456" |
id_type required | string | E.g.: "NIT" |
is_customer | boolean | |
is_supplier | boolean | |
phone | string | |
responsibilities | array of string | |
tax_regime | string |
Accepts additional fields (additionalProperties): they're forwarded to the engine unchanged.
Responses
| Code | Description | Body |
|---|---|---|
| 200 | Registered (standard envelope; data carries the engine object). | TransactionEnvelope
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.accounting.upsert_third_party()client.admin.accounting.upsertThirdParty()$client->admin->accounting->upsertThirdParty()await client.Admin.Accounting.UpsertThirdPartyAsync()client.Admin.Accounting.UpsertThirdParty(ctx, …)curl -X POST "https://sandbox.dev.compense.co/gw/v1/gateway/admin/accounting/third-parties/" \
-H "X-API-Key: $COMPENSE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"id_type": "NIT",
"id_number": "900123456"
}'Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Third party (by id or document) #
GET/v1/gateway/admin/accounting/third-parties/{third_party}/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
third_party required | path | string | Third-party id or document. E.g.: 900123456 |
Responses
| Code | Description | Body |
|---|---|---|
| 200 | Object. | AdminObject
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.accounting.get_third_party()client.admin.accounting.getThirdParty()$client->admin->accounting->getThirdParty()await client.Admin.Accounting.GetThirdPartyAsync()client.Admin.Accounting.GetThirdParty(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/admin/accounting/third-parties/900123456/" \
-H "X-API-Key: $COMPENSE_API_KEY"Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Search employees #
GET/v1/gateway/admin/hr/employees/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
q | query | string | Text: name, document, code or email. |
status | query | string | ACTIVO | RETIRADO |
document | query | string | Exact document. |
area | query | string | Area id. |
position | query | string | Position id. |
Responses
| Code | Description | Body |
|---|---|---|
| 200 | List. | AdminResultList
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.hr.list_employees()client.admin.hr.listEmployees()$client->admin->hr->listEmployees()await client.Admin.Hr.ListEmployeesAsync()client.Admin.HR.ListEmployees(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/admin/hr/employees/" \
-H "X-API-Key: $COMPENSE_API_KEY"Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Create or update an employee (upsert by document) #
POST/v1/gateway/admin/hr/employees/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Client-generated key that makes a write safely retryable. Replaying the same key returns the original result with idempotent_replay: true; a replay while the original is still in flight returns 409. E.g.: horizonte-2026-06-26-credit-000123 |
Request body
Content type: application/json · required
Schema AdminEmployeeIn — Create or update an employee (upsert by id_number). Bank details are only accepted on creation; changing them later is done in the panel. user_id is not accepted.
| Field | Type | Description |
|---|---|---|
area_id | string | |
bank_account_number | string | |
bank_account_type | string | |
bank_name | string | |
email_work | string | |
eps_code | string | |
first_name | string | E.g.: "Laura" |
hire_date | string (date) | E.g.: "2025-02-01" |
id_number required | string | E.g.: "1032456789" |
id_type | string | E.g.: "CC" |
last_name | string | E.g.: "Pérez" |
pension_fund_code | string | |
phone | string | |
position_id | string |
Accepts additional fields (additionalProperties): they're forwarded to the engine unchanged.
Responses
| Code | Description | Body |
|---|---|---|
| 200 | Registered (standard envelope; data carries the engine object). | TransactionEnvelope
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.hr.upsert_employee()client.admin.hr.upsertEmployee()$client->admin->hr->upsertEmployee()await client.Admin.Hr.UpsertEmployeeAsync()client.Admin.HR.UpsertEmployee(ctx, …)curl -X POST "https://sandbox.dev.compense.co/gw/v1/gateway/admin/hr/employees/" \
-H "X-API-Key: $COMPENSE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"id_number": "1032456789",
"id_type": "CC",
"first_name": "Laura",
"last_name": "Pérez",
"hire_date": "2025-02-01"
}'Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Employee profile #
GET/v1/gateway/admin/hr/employees/{employee}/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
employee required | path | string | Employee id or document number. E.g.: 1032456789 |
Responses
| Code | Description | Body |
|---|---|---|
| 200 | Object. | AdminObject
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.hr.get_employee()client.admin.hr.getEmployee()$client->admin->hr->getEmployee()await client.Admin.Hr.GetEmployeeAsync()client.Admin.HR.GetEmployee(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/admin/hr/employees/1032456789/" \
-H "X-API-Key: $COMPENSE_API_KEY"Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Employee contracts #
GET/v1/gateway/admin/hr/employees/{employee}/contracts/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
employee required | path | string | Employee id or document number. E.g.: 1032456789 |
Responses
| Code | Description | Body |
|---|---|---|
| 200 | List. | AdminResultList
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.hr.list_employee_contracts()client.admin.hr.listEmployeeContracts()$client->admin->hr->listEmployeeContracts()await client.Admin.Hr.ListEmployeeContractsAsync()client.Admin.HR.ListEmployeeContracts(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/admin/hr/employees/1032456789/contracts/" \
-H "X-API-Key: $COMPENSE_API_KEY"Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
HR adjustments #
GET/v1/gateway/admin/hr/novelties/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
employee | query | string | Id or document. |
status | query | string | SOLICITADA, APROBADA… (comma-separated) |
category | query | string | Category (comma-separated). |
from | query | string | From (YYYY-MM-DD). |
to | query | string | To (YYYY-MM-DD). |
Responses
| Code | Description | Body |
|---|---|---|
| 200 | List. | AdminResultList
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.hr.list_novelties()client.admin.hr.listNovelties()$client->admin->hr->listNovelties()await client.Admin.Hr.ListNoveltiesAsync()client.Admin.HR.ListNovelties(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/admin/hr/novelties/" \
-H "X-API-Key: $COMPENSE_API_KEY"Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Record sick leave, leave of absence, time off or vacation #
POST/v1/gateway/admin/hr/novelties/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Client-generated key that makes a write safely retryable. Replaying the same key returns the original result with idempotent_replay: true; a replay while the original is still in flight returns 409. E.g.: horizonte-2026-06-26-credit-000123 |
Request body
Content type: application/json · required
Schema AdminHrNoveltyIn — Human resources novelty. It remains SOLICITADA until human resources validates it.
| Field | Type | Description |
|---|---|---|
certificate_number | string | |
days | integer | |
diagnosis_code | string | ICD-10; never returned through the API. |
employee required | string | Employee id or document. E.g.: "1032456789" |
end_date | string (date) | |
hours | number | |
issuing_entity | string | |
reason | string | |
start_date required | string (date) | |
type_code required | string | E.g.: "INCAPACIDAD_COMUN" |
Accepts additional fields (additionalProperties): they're forwarded to the engine unchanged.
Responses
| Code | Description | Body |
|---|---|---|
| 200 | Registered (standard envelope; data carries the engine object). | TransactionEnvelope
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.hr.create_novelty()client.admin.hr.createNovelty()$client->admin->hr->createNovelty()await client.Admin.Hr.CreateNoveltyAsync()client.Admin.HR.CreateNovelty(ctx, …)curl -X POST "https://sandbox.dev.compense.co/gw/v1/gateway/admin/hr/novelties/" \
-H "X-API-Key: $COMPENSE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"employee": "1032456789",
"type_code": "INCAPACIDAD_COMUN",
"start_date": "2026-11-02"
}'Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Electronic payroll (DIAN) status for a month #
GET/v1/gateway/admin/payroll/electronic/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
year | query | string | Year. |
month | query | string | Month (1-12). |
status | query | string | Status. |
Responses
| Code | Description | Body |
|---|---|---|
| 200 | List. | AdminResultList
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.payroll.electronic()client.admin.payroll.electronic()$client->admin->payroll->electronic()await client.Admin.Payroll.ElectronicAsync()client.Admin.Payroll.Electronic(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/admin/payroll/electronic/" \
-H "X-API-Key: $COMPENSE_API_KEY"Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Payroll adjustments #
GET/v1/gateway/admin/payroll/novelties/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
employee | query | string | Id or document. |
period | query | string | Period id. |
status | query | string | PENDIENTE | LIQUIDADA | ANULADA |
concept | query | string | Concept code. |
from | query | string | From. |
to | query | string | To. |
Responses
| Code | Description | Body |
|---|---|---|
| 200 | List. | AdminResultList
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.payroll.list_novelties()client.admin.payroll.listNovelties()$client->admin->payroll->listNovelties()await client.Admin.Payroll.ListNoveltiesAsync()client.Admin.Payroll.ListNovelties(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/admin/payroll/novelties/" \
-H "X-API-Key: $COMPENSE_API_KEY"Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Upload payroll adjustments (one or a batch) #
POST/v1/gateway/admin/payroll/novelties/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Client-generated key that makes a write safely retryable. Replaying the same key returns the original result with idempotent_replay: true; a replay while the original is still in flight returns 409. E.g.: horizonte-2026-06-26-credit-000123 |
Request body
Content type: application/json · required
Schema AdminPayrollNoveltyIn — A single payroll adjustment (AdminPayrollNovelty fields at the root) or a batch in items (max. 500, all or nothing). period_id is optional: it validates that the period is open and that the date falls within it; without date, the period start is used.
| Field | Type | Description |
|---|---|---|
amount | number | string | |
concept_code | string | |
date | string (date) | |
employee | string | |
items | array of AdminPayrollNovelty | |
period_id | string | |
quantity | number | string |
Accepts additional fields (additionalProperties): they're forwarded to the engine unchanged.
Responses
| Code | Description | Body |
|---|---|---|
| 200 | Registered (standard envelope; data carries the engine object). | TransactionEnvelope
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.payroll.create_novelties()client.admin.payroll.createNovelties()$client->admin->payroll->createNovelties()await client.Admin.Payroll.CreateNoveltiesAsync()client.Admin.Payroll.CreateNovelties(ctx, …)curl -X POST "https://sandbox.dev.compense.co/gw/v1/gateway/admin/payroll/novelties/" \
-H "X-API-Key: $COMPENSE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Payslip with its concepts #
GET/v1/gateway/admin/payroll/payslips/{payslip_id}/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
payslip_id required | path | string | Payslip id. E.g.: 7a2e… |
Responses
| Code | Description | Body |
|---|---|---|
| 200 | Object. | AdminObject
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.payroll.get_payslip()client.admin.payroll.getPayslip()$client->admin->payroll->getPayslip()await client.Admin.Payroll.GetPayslipAsync()client.Admin.Payroll.GetPayslip(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/admin/payroll/payslips/7a2e…/" \
-H "X-API-Key: $COMPENSE_API_KEY"Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Payroll periods #
GET/v1/gateway/admin/payroll/periods/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
status | query | string | ABIERTO | CALCULADO | APROBADO | REVERTIDO |
kind | query | string | ORDINARIA, PRIMA… |
year | query | string | Year. |
Responses
| Code | Description | Body |
|---|---|---|
| 200 | List. | AdminResultList
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.payroll.list_periods()client.admin.payroll.listPeriods()$client->admin->payroll->listPeriods()await client.Admin.Payroll.ListPeriodsAsync()client.Admin.Payroll.ListPeriods(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/admin/payroll/periods/" \
-H "X-API-Key: $COMPENSE_API_KEY"Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Period detail #
GET/v1/gateway/admin/payroll/periods/{period_id}/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
period_id required | path | string | Payroll period id. E.g.: 3f1c… |
Responses
| Code | Description | Body |
|---|---|---|
| 200 | Object. | AdminObject
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.payroll.get_period()client.admin.payroll.getPeriod()$client->admin->payroll->getPeriod()await client.Admin.Payroll.GetPeriodAsync()client.Admin.Payroll.GetPeriod(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/admin/payroll/periods/3f1c…/" \
-H "X-API-Key: $COMPENSE_API_KEY"Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Payslips for a period #
GET/v1/gateway/admin/payroll/periods/{period_id}/payslips/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
period_id required | path | string | Payroll period id. E.g.: 3f1c… |
employee | query | string | Id or document. |
Responses
| Code | Description | Body |
|---|---|---|
| 200 | List. | AdminResultList
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.payroll.list_period_payslips()client.admin.payroll.listPeriodPayslips()$client->admin->payroll->listPeriodPayslips()await client.Admin.Payroll.ListPeriodPayslipsAsync()client.Admin.Payroll.ListPeriodPayslips(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/admin/payroll/periods/3f1c…/payslips/" \
-H "X-API-Key: $COMPENSE_API_KEY"Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Register a DRAFT outgoing payment #
POST/v1/gateway/admin/treasury/payments/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Client-generated key that makes a write safely retryable. Replaying the same key returns the original result with idempotent_replay: true; a replay while the original is still in flight returns 409. E.g.: horizonte-2026-06-26-credit-000123 |
Request body
Content type: application/json · required
Schema AdminTreasuryDocIn — Collection / outgoing payment (third_party, bank_account id or number, date, amount, method, reference, applications) or billing statement (third_party, issue_date, description, income_account, subtotal, iva_concept). Always in DRAFT.
| Field | Type | Description |
|---|---|---|
amount | number | string | |
applications | array of object | |
bank_account | string | |
date | string (date) | |
description | string | |
income_account | string | |
issue_date | string (date) | |
method | string | E.g.: "TRANSFERENCIA" |
reference | string | |
subtotal | number | string | |
third_party required | string |
Accepts additional fields (additionalProperties): they're forwarded to the engine unchanged.
Responses
| Code | Description | Body |
|---|---|---|
| 200 | Registered (standard envelope; data carries the engine object). | TransactionEnvelope
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.treasury.create_payment()client.admin.treasury.createPayment()$client->admin->treasury->createPayment()await client.Admin.Treasury.CreatePaymentAsync()client.Admin.Treasury.CreatePayment(ctx, …)curl -X POST "https://sandbox.dev.compense.co/gw/v1/gateway/admin/treasury/payments/" \
-H "X-API-Key: $COMPENSE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"third_party": "<third_party>",
"method": "TRANSFERENCIA"
}'Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Register a DRAFT collection #
POST/v1/gateway/admin/treasury/receipts/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Client-generated key that makes a write safely retryable. Replaying the same key returns the original result with idempotent_replay: true; a replay while the original is still in flight returns 409. E.g.: horizonte-2026-06-26-credit-000123 |
Request body
Content type: application/json · required
Schema AdminTreasuryDocIn — Collection / outgoing payment (third_party, bank_account id or number, date, amount, method, reference, applications) or billing statement (third_party, issue_date, description, income_account, subtotal, iva_concept). Always in DRAFT.
| Field | Type | Description |
|---|---|---|
amount | number | string | |
applications | array of object | |
bank_account | string | |
date | string (date) | |
description | string | |
income_account | string | |
issue_date | string (date) | |
method | string | E.g.: "TRANSFERENCIA" |
reference | string | |
subtotal | number | string | |
third_party required | string |
Accepts additional fields (additionalProperties): they're forwarded to the engine unchanged.
Responses
| Code | Description | Body |
|---|---|---|
| 200 | Registered (standard envelope; data carries the engine object). | TransactionEnvelope
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.treasury.create_receipt()client.admin.treasury.createReceipt()$client->admin->treasury->createReceipt()await client.Admin.Treasury.CreateReceiptAsync()client.Admin.Treasury.CreateReceipt(ctx, …)curl -X POST "https://sandbox.dev.compense.co/gw/v1/gateway/admin/treasury/receipts/" \
-H "X-API-Key: $COMPENSE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"third_party": "<third_party>",
"method": "TRANSFERENCIA"
}'Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Register a DRAFT billing statement (cuenta de cobro) #
POST/v1/gateway/admin/treasury/receivables/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Client-generated key that makes a write safely retryable. Replaying the same key returns the original result with idempotent_replay: true; a replay while the original is still in flight returns 409. E.g.: horizonte-2026-06-26-credit-000123 |
Request body
Content type: application/json · required
Schema AdminTreasuryDocIn — Collection / outgoing payment (third_party, bank_account id or number, date, amount, method, reference, applications) or billing statement (third_party, issue_date, description, income_account, subtotal, iva_concept). Always in DRAFT.
| Field | Type | Description |
|---|---|---|
amount | number | string | |
applications | array of object | |
bank_account | string | |
date | string (date) | |
description | string | |
income_account | string | |
issue_date | string (date) | |
method | string | E.g.: "TRANSFERENCIA" |
reference | string | |
subtotal | number | string | |
third_party required | string |
Accepts additional fields (additionalProperties): they're forwarded to the engine unchanged.
Responses
| Code | Description | Body |
|---|---|---|
| 200 | Registered (standard envelope; data carries the engine object). | TransactionEnvelope
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.treasury.create_receivable()client.admin.treasury.createReceivable()$client->admin->treasury->createReceivable()await client.Admin.Treasury.CreateReceivableAsync()client.Admin.Treasury.CreateReceivable(ctx, …)curl -X POST "https://sandbox.dev.compense.co/gw/v1/gateway/admin/treasury/receivables/" \
-H "X-API-Key: $COMPENSE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"third_party": "<third_party>",
"method": "TRANSFERENCIA"
}'Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Upload a bank statement for reconciliation #
POST/v1/gateway/admin/treasury/statements/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Client-generated key that makes a write safely retryable. Replaying the same key returns the original result with idempotent_replay: true; a replay while the original is still in flight returns 409. E.g.: horizonte-2026-06-26-credit-000123 |
Request body
Content type: application/json · required
Schema AdminStatementIn — Bank statement: lines (JSON) or content (CSV with date and amount).
| Field | Type | Description |
|---|---|---|
bank_account required | string | |
closing_balance | number | string | |
content | string | |
date_from | string (date) | |
date_to | string (date) | |
lines | array of object | |
opening_balance | number | string |
Accepts additional fields (additionalProperties): they're forwarded to the engine unchanged.
Responses
| Code | Description | Body |
|---|---|---|
| 200 | Registered (standard envelope; data carries the engine object). | TransactionEnvelope
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.treasury.import_statement()client.admin.treasury.importStatement()$client->admin->treasury->importStatement()await client.Admin.Treasury.ImportStatementAsync()client.Admin.Treasury.ImportStatement(ctx, …)curl -X POST "https://sandbox.dev.compense.co/gw/v1/gateway/admin/treasury/statements/" \
-H "X-API-Key: $COMPENSE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"bank_account": "<bank_account>"
}'Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.
Automatic statement matching #
POST/v1/gateway/admin/treasury/statements/{statement_id}/auto-match/
Parameters
| Name | In | Type | Description |
|---|---|---|---|
statement_id required | path | string | Statement id. E.g.: 8b1f… |
Idempotency-Key | header | string | Client-generated key that makes a write safely retryable. Replaying the same key returns the original result with idempotent_replay: true; a replay while the original is still in flight returns 409. E.g.: horizonte-2026-06-26-credit-000123 |
Responses
| Code | Description | Body |
|---|---|---|
| 200 | Registered (standard envelope; data carries the engine object). | TransactionEnvelope
application/json |
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
See problem+json errors for the equivalent exception in each SDK.
Example
client.admin.treasury.auto_match_statement()client.admin.treasury.autoMatchStatement()$client->admin->treasury->autoMatchStatement()await client.Admin.Treasury.AutoMatchStatementAsync()client.Admin.Treasury.AutoMatchStatement(ctx, …)curl -X POST "https://sandbox.dev.compense.co/gw/v1/gateway/admin/treasury/statements/8b1f…/auto-match/" \
-H "X-API-Key: $COMPENSE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.