Release a tenant provisioned by mistake (only while it has no fiscal history)
const url = 'https://api.emite.cr/v1/partner/tenants/example';const options = {method: 'DELETE'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.emite.cr/v1/partner/tenants/exampleRevokes every key this partner minted for the tenant, deletes its ATV credentials in both environments and deletes the tenant, freeing the cédula. 409 PARTNER_TENANT_HAS_FISCAL_HISTORY (params.documents) once any production document got a number or any purchase response (MensajeReceptor) was sent in production — use detach to offboard a tenant with history. Provisioning the same cédula again revives this tenant, numbering intact.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Partner app credential (ecp_*)
Responses
Section titled “Responses”object
Always true: the company is released and its cédula free. If this partner provisions that cédula again, this same company comes back, numbering intact.
How many data-plane keys this partner had minted for the company, in both environments, that still worked — one in a rotation grace included — and stopped working with this call.
Environments that had ATV credentials (.p12, PIN, ATV user and password), now deleted; empty when none had been uploaded.
Example
{ "released": true, "revokedKeys": 2, "credentialsRemoved": [ "sandbox" ]}