Sales documents & PDF links
Every quotation, sales order, delivery note, invoice, credit note and return note returned by the RedERP MCP server carries a signed PDF download link, a printable page and a deep link into RedERP.
Whenever a tool returns a sales document (list_sales_documents, get_sales_document, create_sales_document, convert_sales_document, fetch, …) the payload includes three links:
| Field | Example | Purpose |
|---|---|---|
pdf_url | https://rederp.ai/api/orm/public/sales/invoice/<id>/pdf?exp=…&sig=… | Download the PDF — no login needed, valid for a limited time |
pdf_expires_at | 2026-09-17T09:12:44.000Z | When the link stops working |
print_url | https://rederp.ai/print/sales/invoice/<id> | Printable web page of the document |
app_url | https://rederp.ai/modules/sales/invoices/<id> | Open the document in RedERP (login required) |
Ask the assistant for "the PDF" and it will call get_sales_document_pdf (or reuse the link it already has) and hand you pdf_url.
How the PDF is produced
The link is served by RedERP itself. On the first download the server renders the same print template you see in RedERP (company header and logo, client block, lines, taxes, totals in words, QR code, digital signature if enabled) with a headless browser and streams it as application/pdf with a proper filename (FV-0001-2026.pdf). The result is cached for a few hours, so repeated downloads are instant. The document itself is never modified.
Supported documents: quotation, sales order, delivery note, invoice, credit note, return note. Payment receipts are not exported as PDF yet — the assistant returns the payment details and the PDF link of the related invoice instead.
Security of the links
- Each link is signed (HMAC) for one document type, one document id and one expiry timestamp. Changing any part invalidates it.
- Links expire after 7 days (
HTTP 410 Goneafterwards). Ask the assistant for a fresh link at any time. - A link only exposes the printable content of that document — no other data of your company.
- Because anyone holding the link can download the document during its validity, treat it like an email attachment: share it only with the intended recipient.
Language, currency and templates
The PDF follows the document's own settings: the company language for labels, the document currency and decimal digits, and the sales print settings of the company (digital signature, print note, templates). Change them in Sales → Settings and the next download reflects them.