POST
/api/rpa/get_pdfGet RPA PDF
Returns the receipt PDF URL. It is generated on the first call and reused afterwards. The PDF derives from stored data — including the frozen calculation memo — so regerar never changes any amount.
Required headers
tokenstring | string | Issuing company token |
signstring | string | MD5 signature: MD5(token + path + body + timestamp) |
timestampstring | string | Unix timestamp in seconds |
Body
id*string | string | Receipt ID |
regerarbool | bool | Force PDF rebuild instead of reusing |
* Required field.
Common errors
| Message | Cause |
|---|---|
| id inválido / id无效 | id is not a valid ObjectId |
| RPA não encontrado / 未找到该RPA | The receipt does not exist or does not belong to the company |
| Falha ao gerar o PDF do RPA / 生成RPA的PDF失败 | PDF generation failed |
| Falha ao enviar o PDF do RPA / 上传RPA的PDF失败 | Upload of the PDF to file storage failed |
Examples
# sign = md5(token + path + body + timestamp) # Template generated from the endpoint path; replace the placeholders curl -X POST "https://api.tffiscal.com/api/rpa/get_pdf" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{
"id": "66c1f4b7e4b0a1c2d3e4f5b1"
}
{
"success": true,
"message": "成功",
"data": {
"url": "https://storage.../rpa/202608/1-27.pdf"
}
}