{"openapi":"3.1.0","info":{"title":"Aurora HCM Public API (Colombia)","version":"1.0.0","description":"API REST multi-tenant para integración contable (PUC), nómina electrónica (DIAN), empleados y webhooks en tiempo real. Soporta ambientes Sandbox (`ak_sbx_*`) y Producción (`ak_live_*`). Todos los montos monetarios se representan como cadenas decimales exactas (`0.00`, cero floats)."},"servers":[{"url":"https://hcm.auroratechnology.com.co/api/v1","description":"Canonical Aurora HCM API v1 (Sandbox & Production selected by API Key prefix)"}],"security":[{"BearerApiKey":[]},{"HeaderApiKey":[]}],"components":{"securitySchemes":{"BearerApiKey":{"type":"http","scheme":"bearer","description":"Tenant API Key (`ak_sbx_...` for Sandbox, `ak_live_...` for Production)"},"HeaderApiKey":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Alternative Tenant API Key header"}},"schemas":{"DecimalMoneyString":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,2})?$","example":"1750905.00"},"WebhookEnvelope":{"type":"object","required":["eventId","eventType","tenantId","occurredAt","data"],"properties":{"eventId":{"type":"string","format":"uuid"},"eventType":{"type":"string","enum":["payroll.liquidated","payroll.closed","employee.created","employee.terminated","accounting.ready","dian.accepted"]},"tenantId":{"type":"string","format":"uuid"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","additionalProperties":true}}}}},"paths":{"/employees":{"get":{"summary":"List tenant employees","description":"Requires scope `employees:read`. Never exposes encrypted PII fields.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["onboarding","active","suspended","terminated"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Paginated list of tenant employees"},"401":{"description":"Unauthorized"}}},"post":{"summary":"Create employee record","description":"Requires scope `employees:write`. Dispatches `employee.created` webhook.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["documentType","documentNumber","firstName","lastName","personalEmail"],"properties":{"documentType":{"type":"string","enum":["CC","CE","TI","PA","PPT","PEP"]},"documentNumber":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"personalEmail":{"type":"string","format":"email"},"hireDate":{"type":"string","format":"date"}}}}}},"responses":{"201":{"description":"Employee created"},"409":{"description":"Duplicate document"}}}},"/payroll-runs":{"get":{"summary":"List closed or transmitted payroll runs","description":"Requires scope `payroll:read`. Returns exact decimal totals.","responses":{"200":{"description":"List of payroll runs"},"401":{"description":"Unauthorized"}}}},"/accounting-entries":{"get":{"summary":"List PUC accounting vouchers and lines for ERP integration","description":"Requires scope `accounting:read`. Filter optionally by `payrollRunId` to retrieve balanced debit/credit PUC lines discriminated by third-party NIT and cost center.","parameters":[{"name":"payrollRunId","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Balanced PUC accounting entries and lines"},"401":{"description":"Unauthorized"}}}}},"webhooks":{"payroll.liquidated":{"post":{"summary":"Signed HMAC-SHA256 notification (`X-Aurora-Signature: t=...,v1=...`) when a payroll run closes","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Webhook acknowledged"}}}},"employee.created":{"post":{"summary":"Signed HMAC-SHA256 notification when a new employee is created","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Webhook acknowledged"}}}},"accounting.ready":{"post":{"summary":"Signed HMAC-SHA256 notification when a balanced PUC accounting voucher is generated","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Webhook acknowledged"}}}}}}