Skip to content

Renew Issuer Certificate

Replaces the P12 certificate (private key + X.509 cert) stored for an issuer — for example, when the existing certificate has expired or is about to. Only that issuer's row is updated; sibling branches that previously inherited the certificate via sourceIssuerId keep their own copy until renewed individually.

PATCH /v1/issuers/:id/certificate

Authentication

Authorization: Bearer <api-key>

Path parameters

ParameterDescription
idIssuer UUID (from GET /v1/issuers)

Request body

multipart/form-data

FieldTypeRequiredDescription
certfileYesP12/PFX certificate file issued by an authorized Ecuadorian CA (BANCO CENTRAL or SECURITY DATA).
certPasswordstringNoPassword protecting the P12 file, if any.

Response

200 OK

json
{ "ok": true, "certFingerprint": "a1b2c3...", "certExpiry": "2028-06-23T00:00:00.000Z" }

Errors

StatusCodeWhen
400VALIDATION_FAILEDid is not a positive integer
400INVALID_FILE_UPLOADNo cert file provided
400CERTIFICATE_INVALIDFile is not a valid PKCS#12 archive
400CERTIFICATE_PASSWORD_INVALIDWrong certPassword
400CERTIFICATE_KEY_NOT_FOUNDNo BANCO CENTRAL/SECURITY DATA signing key bag found in the P12
400CERTIFICATE_EXPIREDThe uploaded certificate is itself already expired
401UNAUTHORIZEDMissing or invalid API key
403ISSUER_FORBIDDENIssuer belongs to a different tenant
404ISSUER_NOT_FOUNDIssuer not found or inactive
429TOO_MANY_REQUESTSRate limit exceeded

Notes

  • Does not affect already-signed documents. Each signed invoice embeds its own copy of the signing certificate inside the XML signature (<ds:X509Certificate>) at signing time — it is not a live reference to the issuer row. Renewing the certificate only changes what is used for future signing: new POST /v1/documents calls and any subsequent rebuilds of RETURNED/NOT_AUTHORIZED documents.
  • Renewal is scoped to the single issuer in the URL. If the same P12 covers multiple branches/issue points under the same RUC, renew each issuer row separately (or pass the same file to each).
  • An admin override exists at PATCH /v1/admin/issuers/:id/certificate (no tenant ownership check).

Comprobify API Documentation