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
200withcreated: falseand the sametenant_id, so a retry after a lost answer is safe. Other data for the same NIT answers409 tenant_nit_conflict. - Keys are shown once.
api_keysof the201answer carries the plaintext of each key asked inissue_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 withPOST /v1/partner/tenants/{tenant_id}/api-keys{"stage": "test"}and revoke the old one withDELETE .../api-keys/{key_id}. Aproductionkey answers409 stage_closeduntil 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 (type31, same number); another one answers409 issuer_nit_locked, and the database refuses it as well. - Only your tenants exist for you.
GET /v1/partner/tenantslists them (filter withnit, page withlimitandnext_cursor); any other tenant id answers404 tenant_not_found. - Every create, authorization and key operation is recorded in the tenant’s audit log with the partner as the actor.