heruAPI
Retention certificates

Get a download link

LiveServed by the v1 API in development with the same checks as production; production opens on the same contract. The capabilities from before v1 keep running in production at the path your account team gives you.

GET
/retention-certificates/{id}/download

Returns a signed link to the stamped certificate on download.heru.app, valid for 15 minutes. format=xml is the CFDI as the SAT stored it, the document with fiscal validity; format=pdf is a printable version with the SAT seal and the QR to verify it. The files are never at a public address: request a new link each time someone needs them.

Needs the retention_certificates:download scope.

Authorization

oauth2 retention_certificates:download
headerAuthorizationBearer <token>

OAuth 2.0 client credentials. Exchange your client_id and client_secret at /oauth/token of the environment for a bearer token valid for one hour. The playground of every operation asks for your own client and keeps it in your browser tab only.

Scope: retention_certificates:download

Path parameters

id*string

The retention certificate id.

Match^rtc_[0-7][0-9a-hjkmnp-tv-z]{25}$

Query parameters

format*string

xml or pdf.

Value in"xml""pdf"

Response body

The link to the file.

application/json
  1. response
url*string

Signed link to the file on download.heru.app. It works for anyone who has it until expires_at, so you can hand it to the worker or the customer. Request a new one after it expires.

Formaturi
expires_at*string

When the link stops working. Each operation says how long its links last: 15 minutes for invoices, retention certificates and signed documents, 24 hours for IMSS documents.

Formatdate-time
content_type*string
Value in"application/pdf""application/xml"
filename*string

Suggested file name, e.g. the folio fiscal and the extension.

curl -X GET 'https://api.dev.b2b.heru.app/v1/retention-certificates/rtc_01m4rdmjy8fr1tn1re492c0z4j/download?format=pdf'

{  "url": "https://download.heru.app/retention-certificates/rtc_01m4rdmjy8fr1tn1re492c0z4j/5829F7E9-4996-450C-BE13-9EE83FD56065.pdf?Expires=1791818348&KeyName=b2b-files&Signature=Hq3sY8pLmN2vKx9wQ7tB4cR6zA1d",  "expires_at": "2026-10-12T15:19:08.000Z",  "content_type": "application/pdf",  "filename": "5829F7E9-4996-450C-BE13-9EE83FD56065.pdf"}

© 2026 Kuarto Inc. (heru)heru.appQuestions about your integration? Contact your heru account team.