Preview a Letter Draft
preview_draftReturn a link to the rendered PDF of a draft together with its page count and current total price. Refreshes the stored price quote when pricing has changed. Use this to show the user exactly what will be printed and exactly what it costs before calling send_letter. The total in the response is the number send_letter requires as confirm_total_cents. This does not create an order or mail a letter.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| draft_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tier | Yes | The product this draft is priced as, as passed to create_draft. | |
| quote | Yes | A priced letter. State total.display to the user before sending, and pass total.amount_cents as confirm_total_cents. | |
| draft_id | Yes | ||
| expires_at | Yes | ||
| page_count | Yes | ||
| tier_title | Yes | What the price card in force calls that product, such as Standard. Use this name when you tell the user what they are buying. | |
| preview_url | Yes | A time-limited link to the exact PDF that will be printed. Give it to the user; it dies with the draft. | |
| requirements | Yes | What the user is agreeing to: how USPS requires the envelope to be printed, and what this particular letter is. State these to the user before calling send_letter. | |
| included_pages | Yes | Printed pages the headline price covers. This draft is priced at that total up to this many pages. |