Aller au contenu

Documents (PDFs)

Read time: 2 minutes. Who it's for: Developers archiving quote PDFs in an ERP, DMS or CRM.

⚠️ Requires the Enterprise plan. Listing a quote's documents needs read_quotes. Downloading one needs both read_quotes and read_customer_data - quote PDFs print the buyer's name, email and addresses, so they count as buyer personal data.

List a quote's documents - GET /v1/quotes/{id}/documents

Returns every PDF generated for the quote, newest first - metadata only, no download link.

curl https://api.quotway.com/v1/quotes/clz8k2x9f0001qw7h3m4n5p6r/documents \
  -H "Authorization: Bearer $QUOTWAY_API_KEY"
{
  "object": "list",
  "data": [
    {
      "object": "document",
      "id": "clz9d1e2f0009qw7hg3h4i5j6",
      "quote_id": "clz8k2x9f0001qw7h3m4n5p6r",
      "type": "proposal",
      "file_name": "QW-1042-proposal-v2.pdf",
      "file_size": 48213,
      "locale": "en",
      "generated_at": "2026-09-24T16:02:51.377Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

A quote has at most a handful of documents, so the list is never paginated (the newest 100 are returned). A quote from another store returns 404 not_found.

When to call it: after quote.proposal_sent (the Proposal PDF), and after quote.accepted or quote.partially_accepted (the Confirmation and Pro-forma). PDFs are generated in the background a few seconds after the event - if the list doesn't have the one you expect yet, try again shortly.

Retrieve a document - GET /v1/documents/{id}

Returns a generated PDF's details and a signed download link valid for 15 minutes.

curl https://api.quotway.com/v1/documents/clz9d1e2f0009qw7hg3h4i5j6 \
  -H "Authorization: Bearer $QUOTWAY_API_KEY"
{
  "object": "document",
  "id": "clz9d1e2f0009qw7hg3h4i5j6",
  "quote_id": "clz8k2x9f0001qw7h3m4n5p6r",
  "type": "proposal",
  "file_name": "QW-1042-proposal-v2.pdf",
  "file_size": 48213,
  "locale": "en",
  "generated_at": "2026-09-24T16:02:51.377Z",
  "download_url": "https://…/d/document/clz9d1e2f0009qw7hg3h4i5j6?token=…",
  "download_url_expires_at": "2026-09-29T15:19:11.000Z"
}
Field Description
type proposal, confirmation or proforma_invoice.
file_name, file_size File name and size in bytes.
locale The language the document was generated in.
generated_at When it was generated.
download_url A signed link to the PDF. Anyone with the link can download the file until it expires, so treat it as a secret.
download_url_expires_at When the link stops working - 15 minutes after the request.

Download the file straight away and store your own copy; don't save the link. Call the endpoint again for a fresh link.

Notes

  • A document from another store, or from a deleted quote, returns 404 not_found.
  • Which documents exist depends on the store's settings: QuotWay generates the Proposal, Confirmation and Pro-forma PDFs automatically or on demand. See PDF branding and documents.
  • Get document ids from GET /v1/quotes/{id}/documents.

Besoin d'un coup de main ? L'équipe est là pour vous aider.

Nous souhaitons déposer des cookies de mesure d'audience pour comprendre comment le site est utilisé. Ils ne sont pas nécessaires : refuser ne change rien au fonctionnement du site, et vous pouvez revenir sur votre choix à tout moment depuis notre page de confidentialité.