Skip to content

Invoice PDF archive

Invoice PDF Archive API With Dated Copies and Retrieval by ID

SitePDF renders an invoice from your HTML and keeps a dated archive copy of the same render, so an invoice PDF archive costs one extra parameter instead of a storage project. Each copy comes back by ID with its capture time and SHA-256 hash.

  • PDF and archive in one call
  • Plans from $49 a month
  • Your HTML stays yours

Short answer

Send your invoice HTML to the SitePDF render endpoint with archive set to true and you get the PDF plus an archive record with an ID, a capture time and a SHA-256 hash. You can list archived renders, fetch one by ID and delete one on request. Starter API is $49 a month for 10,000 renders ($288 billed yearly) and keeps each copy for 90 days.

Growth ($99 a month, 50,000 renders) keeps copies for 365 days and Scale ($299 a month, 250,000 renders) for 3 years. If your records rule asks for longer than your plan window, download the PDF into your own storage as well.

Written and fact checked by the SitePDF team.

What an archived invoice record holds

These are the fields the archive API returns today for each archived render.

Field What it gives you Why an invoice team wants it
id A stable archive ID you store on the invoice row Support finds the exact file that was sent, without searching a bucket
captured_at UTC time of the render The date the document was produced, separate from the invoice date
sha256 Hash of the stored bytes Later proof that the stored copy is unchanged, see the integrity check
expires_at End of the plan retention window You know when to move a copy to your own storage
document Link to the PDF rendered from that snapshot One record points to the file the customer received

Plans and prices are from our own pricing page. Retention is 90 days on Starter API, 365 on Growth and 3 years on Scale.

Who needs an invoice PDF archive

SaaS billing teams. A customer says the invoice they received shows the wrong plan. Without an archive you re-render from today data and hope it matches. With one, support opens the stored copy by ID. The same flow suits the teams on HTML to PDF API for SaaS.

Ecommerce and marketplaces. Order volumes spike, templates change, and a dispute arrives 60 days later. The record shows what the buyer was sent. See HTML to PDF API for ecommerce for the volume side.

A worked example

A subscription company issues 12,000 invoices a month. At month end its billing job posts each invoice HTML to /v1/render with archive true and saves the returned archive ID on the invoice row. That is 12,000 renders, so it sits on Growth at $99 a month, not Starter, whose limit is 10,000.

In week three a customer disputes a line item. Support calls GET /v1/archives?url=... or fetches the stored ID, reads the capture time and downloads the exact copy. If a finance team also sends quote PDFs from an outreach tool such as Coldmailer, the same pattern gives sales a dated copy of what the prospect saw.

What an invoice archive does not do

It is not a statutory e-invoicing system. SitePDF does not sign documents, issue tax authority formats or promise that a copy satisfies a particular retention law. Check your own rules, for example the IRS guidance on how long to keep records.

Copies expire with the plan window and are removed afterwards, so the API answers that an expired copy is gone rather than that it never existed. A copy can also be deleted on request with one call, which removes the snapshot and the file rendered from it.

Where it fits in your billing flow

Render at the moment you send the invoice, store the archive ID and hash with the invoice row, and email or serve the PDF as usual. The invoice template stays your own HTML, so there is no second layout, which the invoice PDF API guide covers in detail. For many documents at once see bulk HTML to PDF.

Who it is for and who it is not for

It is for teams that already generate invoices, statements or order documents from HTML and want a dated copy retrievable by ID, from a few hundred to a few hundred thousand a month.

It is not for teams that need a document management system with folders, user permissions and legal hold, or teams that need signed e-invoice formats. SitePDF is an API, not an archive product with a dashboard for finance staff.

Render an invoice with an archive copy, then fetch the record by ID.
curl -X POST https://api.sitepdf.com/v1/render \
  -H "Authorization: Bearer $SITEPDF_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html": "<h1>Invoice 1042</h1>...", "format": "Letter", "archive": true}'

# later, with the archive id from the response
curl https://api.sitepdf.com/v1/archives/$ARCHIVE_ID \
  -H "Authorization: Bearer $SITEPDF_KEY"

This is the documented API call shape. Full request and response walkthrough.

Questions about this job

How do I archive invoice PDFs automatically?
Set archive to true on the render call that makes the invoice. The response returns the PDF and an archive ID, capture time and hash. Store the ID on the invoice row and fetch the copy later with one request.
How long does SitePDF keep an archived invoice?
Starter API keeps copies for 90 days, Growth for 365 days and Scale for 3 years. After that the copy is removed and the API says it has expired. Download PDFs you must keep longer into your own storage.
Can I delete an archived invoice?
Yes. A DELETE request on the archive ID removes the snapshot and the document rendered from it. Repeating the call gives the same answer, so a retry is safe.
Is an archived PDF valid as a legal invoice?
SitePDF stores a dated, hashed copy of what you rendered. Whether that meets a tax or retention rule depends on your country and your auditor. It does not sign documents or issue e-invoice formats.
How much does it cost?
Starter API is $49 a month for 10,000 renders, or $288 billed yearly. Growth is $99 a month for 50,000 renders and Scale is $299 a month for 250,000. Archiving is included on every plan.

Index

More PDF and archiving tools

Get started

Render and archive with one API call

A pixel perfect PDF and a dated copy of the page from the same request. Plans from $49 a month, half price billed yearly.

HTML to PDF, in your browser

Buy the plan