Try the stored ATV credentials that Hacienda refused, once
const url = 'https://api.emite.cr/v1/tenants/example/credentials/sandbox/verify';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.emite.cr/v1/tenants/example/credentials/sandbox/verify \ --header 'Authorization: Bearer <token>'For credentials marked as refused (atvRejectedAt): ONE password grant against Hacienda's IdP with the stored user and password. If Hacienda accepts them the mark is cleared and every document that waited goes to Hacienda on its own (outcome: restored); otherwise nothing changes. Use it when the credentials were fixed at Hacienda without changing them here (a lockout that expired, a password changed back). Each attempt is a login at Hacienda, so it is limited to one per minute per environment (429 CREDENTIALS_VERIFY_COOLDOWN).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”object
restored: Hacienda accepted them — the refusal mark is cleared and the documents that waited are on their way to Hacienda. still_rejected: Hacienda refused them again; save corrected credentials (PATCH or PUT). unavailable: Hacienda did not answer, nothing changed; try again later. not_rejected: nothing was known against them (or no credentials are stored for the environment), so no attempt was made.
Example
{ "outcome": "restored"}Missing or invalid JWT / API key
:tenantId is not the caller's company, or insufficient scope — credentials:* is never granted to an API key.
Verified less than a minute ago (CREDENTIALS_VERIFY_COOLDOWN).