Skip to main content
A partner (a reseller that bills its own clients) provisions each client company as a Cufea tenant of its own: the tenant is the client’s NIT and, later, the client’s certificate. The partner acts on the client’s written authorization, which Cufea stores when the tenant is created; the partner keeps the signed copy and answers for it. The operator issues the partner key (cufea_partner_...). It works only under /v1/partner: it creates no documents, reads no configuration and no secrets. Everything else is done with the tenant’s own keys.
  • One tenant per NIT and partner. The call is idempotent by NIT: repeating it with the same company data answers 200 with created: false and the same tenant_id, so a retry after a lost answer is safe. Other data for the same NIT answers 409 tenant_nit_conflict.
  • Keys are shown once. api_keys of the 201 answer carries the plaintext of each key asked in issue_keys (sandbox and test only: a new tenant is in the DIAN test stage). A repeated call issues none; if a key was lost, issue another with POST /v1/partner/tenants/{tenant_id}/api-keys {"stage": "test"} and revoke the old one with DELETE .../api-keys/{key_id}. A production key answers 409 stage_closed until the tenant is promoted.
  • The check digit is checked with the DIAN modulo-11 rule (422 tenant_invalid).
  • The NIT is locked. The tenant has no issuer yet: set it with the tenant’s test key (PUT /v1/tenant/issuer). Its identification must be that NIT (type 31, same number); another one answers 409 issuer_nit_locked, and the database refuses it as well.
  • Only your tenants exist for you. GET /v1/partner/tenants lists them (filter with nit, page with limit and next_cursor); any other tenant id answers 404 tenant_not_found.
  • Every create, authorization and key operation is recorded in the tenant’s audit log with the partner as the actor.